[Mod][Systemless Root][Pixel/Pixel XL] TetherMod - Bypass provisioning checks.

Search This thread

Builtfordtough1

Senior Member
Dec 17, 2010
127
35
Before and after running your command

Row: 0 _id=2918, name=internet, numeric=310120, mcc=310, mnc=120, apn=n.ispsn, user=, server=, password=, proxy=, port=, mmsproxy=, mmsport=, mmsc=, authtype=-1, type=default,supl,mms,ims,cbs,ia, current=1, protocol=IPV4V6, roaming_protocol=IP, carrier_enabled=1, bearer=0, bearer_bitmask=12288, mvno_type=, mvno_match_data=, sub_id=1, profile_id=0, modem_cognitive=0, max_conns=0, wait_time=0, max_conns_time=0, mtu=0, edited=4, user_visible=1

Still no data flowing to devices
 
Last edited:

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,386
2,073
F(x)tec Pro1-X
Google Pixel 6 Pro
Before and after running your command

Row: 0 _id=2918, name=internet, numeric=310120, mcc=310, mnc=120, apn=n.ispsn, user=, server=, password=, proxy=, port=, mmsproxy=, mmsport=, mmsc=, authtype=-1, type=default,supl,mms,ims,cbs,ia, current=1, protocol=IPV4V6, roaming_protocol=IP, carrier_enabled=1, bearer=0, bearer_bitmask=12288, mvno_type=, mvno_match_data=, sub_id=1, profile_id=0, modem_cognitive=0, max_conns=0, wait_time=0, max_conns_time=0, mtu=0, edited=4, user_visible=1

Still no data flowing to devices

Ahh, you're not on the main Sprint MNC MCC.

Code:
content update --uri content://telephony/carriers --where "_id=2918" --bind type:s:default,supl,mms,ims,cbs,ia,dun
 
  • Like
Reactions: Builtfordtough1

Builtfordtough1

Senior Member
Dec 17, 2010
127
35
That did it sort of, the changes to telephony.db are not changing when running the commands see my next post for the fix.
 
Last edited:

Builtfordtough1

Senior Member
Dec 17, 2010
127
35
I finally got the hotspot working for sprint with a lot of help from Fenny.

These steps are ONLY for SPRINT and only tested on NDE63V, NPF26J and NMF26O

These are the steps I followed

Open Root Explorer and navigate to:
/data/user_de/0/com.android.providers.telephony/databases

Copy telephony.db to your computer

Restore phone back to stock

Install TWRP, Root, and Tethering Mod

Boot Phone

Copy your backed up telephony.db to

/data/user_de/0/com.android.providers.telephony/databases

Overwrite the currently in that location and leave the permissions rw-rw-rw-

Run the command:

content update --uri content://telephony/carriers --where "_id=2918" --bind type:s:default,supl,mms,ims,cbs,ia,dun

After running the command you will see the phone drop data then pick it back up at this point reboot and your all set.
 
Last edited:
  • Like
Reactions: Fenny

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,386
2,073
F(x)tec Pro1-X
Google Pixel 6 Pro
I finally got the hotspot working for sprint with a lot of help from Fenny.

These steps are ONLY for SPRINT and only tested on NDE63V and NPF26J

These are the steps I followed

Open Root Explorer and navigate to:
/data/user_de/0/com.android.providers.telephony/databases

Copy telephony.db to your computer

Restore phone back to stock

Install TWRP, Root, and Tethering Mod

Boot Phone

Copy your backed up telephony.db to

/data/user_de/0/com.android.providers.telephony/databases

Overwrite the currently in that location and leave the permissions rw-rw-rw-

Run the command:

content update --uri content://telephony/carriers --where "_id=2918" --bind type:s:default,supl,mms,ims,cbs,ia,dun

After running the command you will see the phone drop data then pick it back up at this point reboot and your all set.

Great!

Just to add to your explanation and to generalize the fix a bit more.

If your carrier prevents you from editing your APNs
You can change permissions on your telephony db with this command:

Code:
adb shell
su
chmod 666 /data/user_de/0/com.android.providers.telephony/databases/telephony.db

Grab the ID of your current APN using the following command:
Code:
adb shell
content query --uri content://telephony/carriers/preferapn

If the type doesn't contain "dun", copy the existing type string and add ",dun" to the end:

In the following command you would substitute
your current type string for "your_type_here",
and the _id for your_id_here:

Code:
adb shell
su
content update --uri content://telephony/carriers --where "_id=your_id_here" --bind type:s:your_type_here,dun
 
  • Like
Reactions: Ringfinger69

Builtfordtough1

Senior Member
Dec 17, 2010
127
35
Try setting it to lte-only and then rebooting.

Ahh, you're not on the main Sprint MNC MCC.

Code:
content update --uri content://telephony/carriers --where "_id=2918" --bind type:s:default,supl,mms,ims,cbs,ia,dun

Great!

Just to add to your explanation and to generalize the fix a bit more.

If your carrier prevents you from editing your APNs
You can change permissions on your telephony db with this command:

Code:
adb shell
su
chmod 666 /data/user_de/0/com.android.providers.telephony/databases/telephony.db

Grab the ID of your current APN using the following command:
Code:
adb shell
content query --uri content://telephony/carriers/preferapn

If the type doesn't contain "dun", copy the existing type string and add ",dun" to the end:

In the following command you would substitute
your current type string for "your_type_here",
and the _id for your_id_here:

Code:
adb shell
su
content update --uri content://telephony/carriers --where "_id=your_id_here" --bind type:s:your_type_here,dun

I had changed the permissions and the db still refused to update its almost like its checking for newer time stamps.
 

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,386
2,073
F(x)tec Pro1-X
Google Pixel 6 Pro
I had changed the permissions and the db still refused to update its almost like its checking for newer time stamps.

Hmm, could be. I think the selinux context would be switched from
Code:
u:object_r:radio_data_file:s0
to
Code:
u:object_r:system_file:s0
by that process you describe.
Might be able to chcon the file in place if that is the needed change.

Should be able to "ls -lZ" to check and see which owner, and context the db has on your system after the fix.
 

sickboy82

Senior Member
May 28, 2011
227
55
Pittsburgh, PA
Not working on Sprint. It installs and tethering will enable but connected devices will not get data.
I haven't rooted mine yet, but I know with my previous Nexus devices on Sprint after editing the build prop I had to t
Not working on Sprint. It installs and tethering will enable but connected devices will not get data.
I haven't rooted mine yet, but I know with my previous Nexus devices on Sprint after editing the build prop I had to run in terminal emulator "settings put global tether_dun_required 0" to get it fully functional. I'm not sure if this will help with this method or phone, but it's worth a shot.

Sent from my Pixel XL using XDA-Developers mobile app
 

Builtfordtough1

Senior Member
Dec 17, 2010
127
35
I haven't rooted mine yet, but I know with my previous Nexus devices on Sprint after editing the build prop I had to t

I haven't rooted mine yet, but I know with my previous Nexus devices on Sprint after editing the build prop I had to run in terminal emulator "settings put global tether_dun_required 0" to get it fully functional. I'm not sure if this will help with this method or phone, but it's worth a shot.


I had tried that also did not work
 

njinstantkarma

Senior Member
Mar 17, 2011
167
19
Already Rooted but looking to root systmenless

I have already unlocked my bootloader installed twrp and also installed SU. (not systemless)
Can I just flash systemless root in twrp. with the flashable zip. OR do I need to uninstall SU (not sure how) and then flash Pixel-PixelXL-Systemless-TetherMod-1.0.zip.
Or is this provided zip file just for tethering assuming you already have SU installed as systemless... Sorry for the confusion
 

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,386
2,073
F(x)tec Pro1-X
Google Pixel 6 Pro
I have already unlocked my bootloader installed twrp and also installed SU. (not systemless)
Can I just flash systemless root in twrp. with the flashable zip. OR do I need to uninstall SU (not sure how) and then flash Pixel-PixelXL-Systemless-TetherMod-1.0.zip.
Or is this provided zip file just for tethering assuming you already have SU installed as systemless... Sorry for the confusion

The zip is for tethering and assumes you have a systemless root that supports su.d. It works by overlaying the modified system files in a bind mount.
SuperSU, by default, roots in systemless mode. However, if you have modified the system partition, you should probably flash it back to stock.
 

njinstantkarma

Senior Member
Mar 17, 2011
167
19
Thanks for the clarification but curious as to why u recommend the following? However, if you have modified the system partition, you should probably flash it back to stock. Is there a way to unroot SU then instal systemless root or is it too late since I modified the system partition
 

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,386
2,073
F(x)tec Pro1-X
Google Pixel 6 Pro
Thanks for the clarification but curious as to why u recommend the following? However, if you have modified the system partition, you should probably flash it back to stock. Is there a way to unroot SU then instal systemless root or is it too late since I modified the system partition

Modifying /system breaks dm-verity. If you want the full benefits of a systemless root, you will want to make sure /system is stock.

Simply undoing changes to the file-system will not make block-based dm-verity pass. All you should need to do is flash system partition and the kernel, you do not need to wipe data. After that, you can flash supersu without issue.
 
  • Like
Reactions: njinstantkarma

jasoraso

Senior Member
May 24, 2007
581
177
Salt Lake City, UT
Does this method require root after installation of the .apk (or this .zip)? Is it possible to uninstall root after installation?

I'm on VZW and looking for a method to have tethering w/o root (so I can have Android Pay). I want my cake, and eat it too :)

I tried the method of modifying build.prop, and then I uninstalled root (used the SuperSU uninstall, then flashing stock boot.img, then elemental kernel to mask the unlocked bootloader). However, upon rebooting > I lost the ability to tether :(
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    This guide presupposes that you have Supersu installed as systemless, and that you have access to adb.

    This will bypass provisioning checks for builtin tether app. The modded apk should work with future updates without touching /system at all.

    Installation

    Method 1 - Manual install
    Download the attached CarrierEntitlement apk.

    If you have su.img su:
    Code:
    adb push CarrierEntitlement.apk /sdcard/CarrierEntitlement.apk
    adb shell
    su
    mkdir /su/CarrierEntitlement
    cp /sdcard/CarrierEntitlement.apk /su/CarrierEntitlement/CarrierEntitlement.apk
    chmod 644 /su/CarrierEntitlement/CarrierEntitlement.apk
    echo "mount -o bind /su/CarrierEntitlement/CarrierEntitlement.apk /system/priv-app/CarrierEntitlement/CarrierEntitlement.apk" > /su/su.d/05TetherMod
    chmod +x /su/su.d/05TetherMod
    reboot

    If you have sbin su (Android 8.0+)
    Code:
    adb push CarrierEntitlement.apk /sdcard/CarrierEntitlement.apk
    adb shell
    su
    mkdir /sbin/supersu/CarrierEntitlement
    cp /sdcard/CarrierEntitlement.apk /sbin/supersu/CarrierEntitlement/CarrierEntitlement.apk
    chmod 644 /sbin/supersu/CarrierEntitlement/CarrierEntitlement.apk
    echo "mount -o bind /sbin/supersu/CarrierEntitlement/CarrierEntitlement.apk /system/priv-app/CarrierEntitlement/CarrierEntitlement.apk" > /sbin/supersu/su.d/05TetherMod
    chmod +x /sbin/supersu/su.d/05TetherMod
    reboot

    Method 2 - Flashable Zip (su.img only)
    Code:
    1. Download attached zip. 
    2. Flash in TWRP (Last tested in alpha 2)

    Information

    This mod is accomplished by replacing the following function:
    Code:
    .method public static getCarrierEntitlement(Landroid/content/Context;)Lcom/google/android/carrierentitlement/CarrierEntitlement;
        .registers 2
        .param p0, "context"    # Landroid/content/Context;
        .prologue
    
        .line 56
        const/4 v0, 0x0
    
        return-object v0
    .end method

    NOTE: Post install
    You may need to edit your APNs to get tethering working for your carrier.

    On sprint, where editing APNs is disabled, the fix is here: Sprint Fix
    Be sure to thank @Builtfordtough1 for all his help in diagnosing the issue at this post: The Solution!

    Be sure to thank sb1893 for sbin su instructions.
    3
    Now that Magisk appears to be working for the Pixel XL, is there any way to convert this into a Magisk module?


    I have Sprint for the smaller Pixel. Does this mod zip still work ?


    Looks like dude has jetted...

    This works with SuperSu. I plan on doing a Magisk module if it continues to be stable for me.
    3
    Is there an advantage to doing this over adding "net.tethering.noprovisioning=true" to the build.prop file?
    This mod is systemless, and should survive OTAs. That mod changes the build.prop on the system partition, which could prevent taking OTAs.

    Can you normally update your device with OTA-updates like a un-rooted device, without flashfire or connect to your computer?

    Any modification to the boot image *should* prevent OTAs from working at all. However, you can flash back to stock boot images, and take OTAs as long as you have not modified /system, which this mod does not do.
    Furthermore, as long as you don't wipe /data/ this mod will live in su.img and survive when you flash newer system software.
    3
    Quick question, just to make sure i'm understanding correctly, this will allow us to tether without it counting towards our "mobile hotspot" data allocation? Is that correct?

    Yes, that is the idea. Be aware that T-Mobile has invested in technologies to inspect packets and determine if you are tethering a device that is not your phone. As of this time, they don't slap you on the wrist or display a warning like they once did, they just deduct it from your usage if they detect it. YMMV with tethering devices that aren't android tablets, I.E. PC, PS4, Xbox, etc...
    2
    is there a non root method to bypass the checks? i dont plan on unlocking or rooting since i use android pay...

    I also use Android pay, so I have two boot images ready to fastboot or flash. I have a boot image with root, and a boot image without root running a kernel that hides the bootloader unlocked flag.

    So, the way I handle this, I flash the unrooted (bootloader flag hidden) image as my daily driver kernel, this passes safetynet, and allows me to use Android pay.

    I make a backup of that boot image. Then, I install TWRP, my custom kernel, and SuperSU. I make a backup of that image as well.

    So I have two backed up boot images:

    rooted.img
    HideBLUnlock.img

    I flash HideBLUnlock.img to boot a, and boot b, safetynet passes.
    Whenever I need to tether I have my computer with me, so I "fastboot boot rooted.img" which leaves me rooted until my next reboot.

    Depending on your usage you might want to reverse that.

    All my mods get stored in su.img, so switching out the boot images is all I need to have the best of both worlds.