• 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

Lieu10ant

Senior Member
Nov 10, 2008
439
42
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?
 

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,383
2,072
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...
 

sd_matto

Senior Member
Jun 27, 2006
234
40
Now that Magisk appears to be working for the Pixel XL, is there any way to convert this into a Magisk module?
 

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,383
2,072

Fenny

Inactive Recognized Developer
Jun 28, 2007
1,383
2,072
I have the toggle switch working, but no data is going through. The commands that need to be type is this in adb ? I was trying this and I'm not sure what the commands are that are supposed to be typed, but the toggle for hotspot is working though.

You can try:

su
settings put global tether_dun_required 0
 
  • Like
Reactions: mikeprius

Gooch4130

Member
Jul 10, 2013
19
6
Raleigh, NC
Hoping someone can confirm my understanding below :D. I just ordered a new pixel (standard), straight from google and want to enable tethering as I am still on the UDP verizon plan. Again this is not an XL and I am on verizon and I plan to run through the steps below after activating the phone and ensuring I am on the latest build / security update:

(1) Unlock the bootloader
(2) Download TWRP and SuperSU
(3) Install TWRP (keeping as read-only)
(4) Flash SuperSU
(5) Reboot - check that root is working
(6) Boot back to TWRP
(7) Download Pixel-PixelXL-Systemless-TetherMod-1.0.zip
(8) Flash above zip
(9) Reboot
(10) Verify tethering

Anything I missed? I see mention of modifying the APN in this thread, is this needed on verizon? Also saw these steps:

su
settings put global tether_dun_required 0

Is that needed on verizon and do I simply run that using ADP? Any help would be greatly appreciated. Thank you in advance!
 
  • Like
Reactions: Rav20

tbiehn

New member
Feb 5, 2009
1
0
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
 

Attachments

  • CarrierEntitlement.og.s.apk
    1.5 MB · Views: 24
Last edited:

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.