[MOD/ HOW TO] Enable WiFi Tethering

Search This thread

elvin9

Member
Apr 27, 2011
27
3
THIS IS FOR THE BRAVE PEOPLE ONLY!!!

I deodexed my own system in order to do this modification.
I replaced the files manually using an on device file explorer.
I do not recommend doing this if you aren't comfortable dealing with smali.

I got tethering working by modifying:

TetheringProvision.apk




&&




It fails the authentication quickly and anonymously by calling localhost (127.0.0.1) and allows hot spot enabling after.


The modified APK is attached. Rename existing APK and ODEX file to .BAK then place modded APK in system/app and reboot.


Work Perfect!!!! thanks
 

billinaz

Senior Member
Sep 1, 2007
667
87
Im not sure where Im going wrong but I simply can not change the permissions. Android commander does not connect to my phone. I tried ES file explorer and root explorer but could not get an option to change the permissions.

I got Ghost Commander and I can select the permissions I want changed, I see the app interact with SU but it does not write the permission change, it stays where it is.

Can anyone help me out here?
 
Last edited:

ericos123

Senior Member
Jul 24, 2010
165
17
Farmingdale Ny
Don't have my S4 yet or I'd build it for you..

This method completely bypasses tether provisioning to the point where you can delete the 'TetherProvisioning.apk' as it's not needed. It never gets used after this mod..

First decompile /system/framework/framework-res.apk using your preferred method (I do it with apktool manually)..

In the directory where you decompiled to browse to \res\values\.

Open the xml file arrays.xml in your preferred editor.

Starting at line 551 we see:

Code:
    <array name="config_tether_bluetooth_regexs" />
    <array name="config_tether_dhcp_range" />
    <string-array name="config_mobile_hotspot_provision_app">
        <item>com.sec.tetheringprovision</item>
        <item>com.sec.tetheringprovision.TetheringProvisionActivity</item>
    </string-array>[

We want to change those to look EXACTLY like this..

Code:
    <string-array name="config_tether_bluetooth_regexs">
        <item>bnep\\d</item>
    </string-array>
    <array name="config_tether_dhcp_range" />
    <array name="config_mobile_hotspot_provision_app" />

Notice the Bluetooth addition and the removal the configuration of tethering provision...

The added Bluetooth reference enables Bluetooth tethering which for some reason AT&T seems to not wanna give us..

I've applied this mod to three previous sammy devices so I can say with reasonable assurance that it'll work but seeing as how I don't have my device yet to test keep that in mind please...

In no way do I mean to steal credit from the OP here.. Just sharing what I've found from past devices and saw that the arrays were identical.


im going to give this a shot we now have ways to recover from soft brick i will let you know once i try
 

gzrecoil

Senior Member
Mar 29, 2011
265
27
Confirmed working after ATT incremental update

Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
 

billinaz

Senior Member
Sep 1, 2007
667
87
I used rootexplorer and was able to change permissions on the modded apk.

Works great, and it sets up an SSID and password but I have no idea where it got this information (its not a default SSID its a custom one, I just have no idea where I found that to customize it and set up a password...)
 
Last edited:

slider2828

Senior Member
Jul 19, 2010
1,153
128
You are not going to brick the device by replacing changing the name and putting the new apk on your system/app....

Its as easy as it gets and its working great!
 

brickjr

Member
Aug 17, 2008
12
3
Don't have my S4 yet or I'd build it for you..

This method completely bypasses tether provisioning to the point where you can delete the 'TetherProvisioning.apk' as it's not needed. It never gets used after this mod..

First decompile /system/framework/framework-res.apk using your preferred method (I do it with apktool manually)..

In the directory where you decompiled to browse to \res\values\.

Open the xml file arrays.xml in your preferred editor.

Starting at line 551 we see:

Code:
    <array name="config_tether_bluetooth_regexs" />
    <array name="config_tether_dhcp_range" />
    <string-array name="config_mobile_hotspot_provision_app">
        <item>com.sec.tetheringprovision</item>
        <item>com.sec.tetheringprovision.TetheringProvisionActivity</item>
    </string-array>[

We want to change those to look EXACTLY like this..

Code:
    <string-array name="config_tether_bluetooth_regexs">
        <item>bnep\\d</item>
    </string-array>
    <array name="config_tether_dhcp_range" />
    <array name="config_mobile_hotspot_provision_app" />

Notice the Bluetooth addition and the removal the configuration of tethering provision...

The added Bluetooth reference enables Bluetooth tethering which for some reason AT&T seems to not wanna give us..

I've applied this mod to three previous sammy devices so I can say with reasonable assurance that it'll work but seeing as how I don't have my device yet to test keep that in mind please...

In no way do I mean to steal credit from the OP here.. Just sharing what I've found from past devices and saw that the arrays were identical.

Has anyone gotten this method to work? I'd really like to use this because I want to activate Bluetooth tethering. However, each time I try I get tons of errors when attempting to recompile. If anyone has made it work, could you post the modded framework-res.apk somewhere? I'd really appreciate it. This is the only thing that's really making me keep my Note 2 right now. Also, if there's a different way to activate Bluetooth tether, I'd be willing to give it a try. Thanks.
 

Nottach

Senior Member
Mar 20, 2008
1,587
3,934
New York
Has anyone gotten this method to work? I'd really like to use this because I want to activate Bluetooth tethering. However, each time I try I get tons of errors when attempting to recompile. If anyone has made it work, could you post the modded framework-res.apk somewhere? I'd really appreciate it. This is the only thing that's really making me keep my Note 2 right now. Also, if there's a different way to activate Bluetooth tether, I'd be willing to give it a try. Thanks.

It's included in the P-ROM in my Dev-Resources thread.
 
  • Like
Reactions: brickjr

smitty1

Senior Member
Oct 11, 2007
86
6
Does anyone have a copy of the original tethering apk and Odex? I deleted them instead of renaming them.DOH!

Tethering is not working for me when I try and turn it on, Settings crashes. Not sure what the issue is.
 

cinnabar

Member
May 6, 2012
40
3
KY
So this mod ignores the carrier provisioning check?

Sent from my SAMSUNG-SGH-I337 using xda app-developers app
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 38
    THIS IS FOR THE BRAVE PEOPLE ONLY!!!

    I deodexed my own system in order to do this modification.
    I replaced the files manually using an on device file explorer.
    I do not recommend doing this if you aren't comfortable dealing with smali.

    I got tethering working by modifying:

    TetheringProvision.apk


    /com/sec/tetheringprovision/TetheringProvisionActivity$5.smali
    --return -1 instead of 0

    Code:
        .line 990
         iget-object v0, p0,  Lcom/sec/tetheringprovision/TetheringProvisionActivity$5;->this$0:Lcom/sec/tetheringprovision/TetheringProvisionActivity;
    
    [COLOR=Red]--    const/4 v1, 0x0
    [/COLOR][COLOR=YellowGreen]++    const/4 v1, -0x1[/COLOR]
    
        #calls: Lcom/sec/tetheringprovision/TetheringProvisionActivity;->sendResult(I)V
         invoke-static {v0, v1},  Lcom/sec/tetheringprovision/TetheringProvisionActivity;->access$800(Lcom/sec/tetheringprovision/TetheringProvisionActivity;I)V

    &&

    /com/sec/tetheringprovision/TetheringProvisionActivity$TetheringPlanCheckTask.smali
    --change auth links to localhost

    Code:
       .line 1081
        const-string v0, "[COLOR=Red]127.0.0.1[/COLOR]"
    
         iput-object v0, p0,  Lcom/sec/tetheringprovision/TetheringProvisionActivity$TetheringPlanCheckTask;->ATTTetheringPlanCheckURL:Ljava/lang/String;
    
        .line 1082
        const-string v0, "[COLOR=Red]127.0.0.1[/COLOR]"
    
         iput-object v0, p0,  Lcom/sec/tetheringprovision/TetheringProvisionActivity$TetheringPlanCheckTask;->ATTMHSPlanCheckURL:Ljava/lang/String;


    It fails the authentication quickly and anonymously by calling localhost (127.0.0.1) and allows hot spot enabling after.


    The modified APK is attached. Rename existing APK and ODEX file to .BAK then place modded APK in system/app and reboot.

    UPDATE: The attached APK is out of date and obsolete. See my dev-resources thread for an updated deodexed system installer based on the newest system release that includes this mod.
    8
    Ok....real simple to do everyone. .

    First make sure you have a browser with root access.

    Go into system/app and rename the tetheringprovision.apk to tetheringprovision.apk.bak and do the same thing for the tetheringprovision.odex file. This is your saftey net just encase you want to revert back.

    Now copy over the file you downloaded and move into system/app. Change the permisions to rw-r-r and reboot.

    You now have tether....when you turn on you will get a screen that says to call or visit att to enable tether...click ok and you are now a wifi hotspot...

    Thanks to the op for the mod....

    Sent from my SAMSUNG-SGH-I337 using xda premium
    4
    Since you modified the apk already we should be able to push the apk into the system and change the permissions using a root Explorer. Even if you mess up this apk won't brink anything. The worst case is your tethering just won't work. You can even just rename the old system files to .bak just incase.

    Can you post up the modified apk...

    Sent from my SAMSUNG-SGH-I337 using xda premium


    Posted modded APK in OP.
    3
    I can confirm that the modified APK works. Here's the instructions for ADB if people prefer that method. Make sure your SDK tools are up to date.

    Commands:
    adb shell
    su
    mount -o remount,rw /dev/block/platform/msm_sdcc.1/by-name/system /system
    chmod 777 /system/app
    exit
    exit

    adb pull /system/app/TetheringProvision.apk C:\BackupDir\TetheringProvision.apk
    adb pull /system/app/TetheringProvision.odex C:\BackupDir\TetheringProvision.odex

    adb shell
    su
    mv /system/app/TetheringProvision.apk /system/app/TetheringProvision.apkbak
    mv /system/app/TetheringProvision.odex /system/app/TetheringProvision.odexbak
    exit
    exit

    adb push C:\DownloadDirectory\TetheringProvision.apk /system/app/TetheringProvision.apk

    adb shell
    su
    chmod 644 /system/app/TetheringProvision.apk
    reboot

    -----Do this at your own risk, we have very few options to recover your device.-----
    2
    I guess I'm not that familiar with .smali but how did you get root permission?

    Sent from my SAMSUNG-SGH-I337 using xda premium

    Really man? How did he root? Spend 30 seconds looking at the forum.

    Sent from my SAMSUNG-SGH-I337 using xda app-developers app