• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

Gooch4130

Member
Jul 10, 2013
19
6
Raleigh, NC
After updating to 7.1.2 on Pixel XL (Marlin), I noticed that this no longer worked.

An updated CarrierEntitlement.apk was generated, and I made the 05TetherMod file contain the following entries. They may not both be required. Prior to adding them, even with the modified APK, 'tethering' was greyed out.

/su/su.d/05TetherMod
Code:
settings put global tether_dun_required 0
setprop net.tethering.noprovisioning 1;
mount -o bind /su/CarrierEntitlement/CarrierEntitlement.apk /system/priv-app/CarrierEntitlement/CarrierEntitlement.apk

You can go ahead and push the attached file instead of the file in the first post, and replace it in /su/CarrierEntitlement.
Code:
adb push CarrierEntitlement.og.s.apk /sdcard/CarrierEntitlement.apk


For the interested in what goes into the pudding,

Fetch the /system/priv-app/CarrierEntitlement/CarrierEntitlement.apk file;
Code:
cp /system/priv-app/CarrierEntitlement/CarrierEntitlement.apk /sdcard/CarrierEntitlement.og.apk

Then pull using adb
Code:
adb pull /sdcard/CarrierEntitlement.og.apk

Use apktool to decompile;
Code:
apktool d CarrierEntitlement.og.apk

Remove the calls to carrier-specific provisioning, and instead return a null-response.

Per Fenny's guide, the following function was patched to this, in the file smali/com/google/android/carrierentitlement/CarrierEntitlement.smali
Code:
.method public static getCarrierEntitlement(Landroid/content/Context;)Lcom/google/android/carrierentitlement/CarrierEntitlement;
    .locals 3
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 103
 
    const/4 v2, 0x0

    return-object v2
.end method

rebuild the thing;
Code:
apktool b CarrierEntitlement.og

Re-sign, I don't think the signatures matter, but I didn't feel like spending the evening finding out with a bricked phone. Fenny apparently used this, and I did the same;
github.com/appium/sign

Code:
java -jar sign.jar ~/CarrierEntitlement.og/dist/CarrierEntitlement.og.apk
Then push the signed file;
Code:
adb push CarrierEntitlement.og/dist/CarrierEntitlement.og.s.apk /sdcard/CarrierEntitlement.apk
Follow directions, with extra lines covered above added to 05TetherMod

I apologize for my ignorance - are you saying that the files in the first post will no longer work? I was planning on just flashing the zip. Assuming that to be the case, I'm a bit confused on specifically what I will do different. Can I simply follow the steps on the first post just with your file? I'm guessing that's not the case, just not sure when / where you would type the extra lines you added above and which ones are specifically needed. Sorry I'm a noob, but I appreciate your efforts/help!
 

sb1893

Senior Member
Apr 2, 2014
200
74
Changes needed to work with SuperSU 2.82 SR2 / SBIN mode

I recently updated to the August 2017 Security patch and then today, I updated to SuperSU 2.82 SR2 and enabled SBIN mode, which then allowed me to install the new/experimental suhide. However, the net of all those changes (which did work as intended) was to break this long-standing and excellent TetherMod. The implementation of SBIN mode as I understand it, deprecates the /su path formerly used by SuperSU and now uses /sbin. So - with a few directory tweaks, I was able to get this TetherMod to work again...

Using the manual method in the OP, you just need to alter the commands to reference the new directory structure as follows: (bold items are the changes). If you prefer, you can backup the needed files (the modded CarrierEntitlement.apk and the text file containing the scripting (05TetherMod) from their original locations in the /su structure on your device, place them in the new locations defined below and then you just need to change permissions as detailed below and reboot.

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

Good luck!
 
  • Like
Reactions: Fenny

TheDonXR

Member
May 8, 2011
37
27
Tried to use the SBIN method for 8.0+ but no luck, hotspot still does a subscription check. Has anyone gotten this to work on a Google Store Pixel XL on a Verizon Legacy Unlimited plan? I noticed it said I may need to change my VPN settings, however everything is greyed out and it won't let me change anything.
 

jsbeagle

Member
Aug 8, 2014
34
9
I've always just added the following line to my build.prop file after each update to enable wifi tethering. I'm on a grandfathered Verizon UDP. I upgraded to 8.0 and its still working. Am I missing something?

net.tethering.noprovisioning=true
 

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,383
2,072
I've always just added the following line to my build.prop file after each update to enable wifi tethering. I'm on a grandfathered Verizon UDP. I upgraded to 8.0 and its still working. Am I missing something?

net.tethering.noprovisioning=true

Ought to be able to do something like that with setpropex
 

lloydsw

Senior Member
Feb 19, 2012
166
19
I've always just added the following line to my build.prop file after each update to enable wifi tethering. I'm on a grandfathered Verizon UDP. I upgraded to 8.0 and its still working. Am I missing something?

net.tethering.noprovisioning=true

Did you edit the one in system or system_root/system?
 

sb1893

Senior Member
Apr 2, 2014
200
74
Did you edit the one in system or system_root/system?

I edited the build.prop in /system and it works fine.

As an aside, this thread and the mod that it was originally centered around was a method to enable tethering while avoiding the need to edit build.prop in /system. I think the original intent was to avoid / minimize changes in system. In the past, OTAs would fail if any changes were detected in /system. (At least when the OTA was applied in the traditional method, it doesn't appear to be an issue when sideloading OTAs) Also, I'm unclear if changes to build.prop might someday pose a risk to passing SafetyNet, etc..(it doesn't appear to currently do so) I am rooted with SuperSu and using suhide 1.08. I've edited my build.prop now and still passing SafetyNet.

I believe that the reason the original method in this thread (which relies on a modded CarrierEntitlement.apk that short circuits the call to check provisioning) being placed in sbin/supersu/ and bound to the "real" CarrierEntitlement.apk in system/priv-app) no longer works is that with Oreo, CarrierEntitlement.apk seems to have been deprecated and perhaps replaced with TetheringEntitlement.apk. I tried to replicate the mods Fenny described as the other user in this thread also did a few posts back, but I was not successful in creating a working modded TetheringEntitlement.apk (I'm clearly not a developer.) For now, it probably doesn't matter as the build.prop mod does work to enable tethering and still appears to allow SafetyNet to pass and there are other upgrade paths vs. taking the OTA directly on the phone. If anything changes, this type of approach might be worth revisiting - it certainly worked great and was very elegant while it worked - basically since the introduction of the Pixel / Pixel XLs. (Thanks for that, Fenny!)
 

sb1893

Senior Member
Apr 2, 2014
200
74
How would this work for Project Fi users? Would it work at all due to 3-carrier service?

Sent from my Pixel XL using XDA Labs

Isn't tethering included for Project Fi plans? When you attempt to enable wifi tethering on your Pixel / Project Fi device, does it launch the provisioning check telling you you need to subscribe? This mod is really focused on bypassing that provisioning app for most carriers which require a separate subscription to allow tethering in addition to standard data plan....
 

Bagman530

Member
Feb 25, 2010
6
0
Just for anyone wondering: If you edit the build.prop file with the following line:

net.tethering.noprovisioning=true

Then the september update won't install via OTA. The hotspot does in fact work though. This is on Oreo.
 

cowsquad

Senior Member
Aug 31, 2009
1,345
320
Portland, Oregon
Just for anyone wondering: If you edit the build.prop file with the following line:

net.tethering.noprovisioning=true

Then the september update won't install via OTA. The hotspot does in fact work though. This is on Oreo.
Thank you but I comment it out and I still get a failed to update error. I am trying to install the 50. Mb latest update
Edit.
It is due to being rooted

Sent from my Pixel XL using Tapatalk
 
Last edited:

criminal666

Senior Member
Dec 28, 2011
63
5
Trying to flash the flashable zip and encountering the following error.

No SU image detected

Any suggestions?
 

nyydynasty

Senior Member
Sep 15, 2010
1,484
276
anyone get this working on a rooted stock 8.0 device? (without modifying net.tethering.noprovisioning=true, i mean)

I tried this on my Pixel XL without success. I wiped it, rerooted, tried again, still not success. I'm thinking it's Android O, at this point.
 

edjanx

Senior Member
Nov 5, 2008
79
16
Scranton
This works for me net.tethering.noprovisioning=true
I'm on September oreo

I am on Oreo September build, rooted, and this also worked for me. I just downloaded the JRummy Apps BuildProp Editor, added "net.tethering.noprovisioning=true" as the first entry under the # ADDITIONAL_BUILD_ROPERTIES section, restarted, and it worked. The whole process took all of three minutes.
 

edjanx

Senior Member
Nov 5, 2008
79
16
Scranton
FWIW, I just took the October Security update, which disabled tethering again, so I re-rooted with Magisk 14.2, added the "net.tethering.noprovisioning=true" to the BuildProp again, and tethering is now working again. From what I understand using Magisk vs. SuperSu is the way to go for Android 8+, so I changed my root method after taking the Oct update as well. Supposedly it will make the monthly updates much easier without loosing root, so let's see if the November security patch lives up to this promise, and also retains tethering.
 

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.