5,594,700 Members 33,614 Now Online
XDA Developers Android and Mobile Development Forum

Easier WiFi Tether Hack (No SQL Edits + Survives Factory Resets)

Tip us?
 
progrockguy
Old
(Last edited by progrockguy; 27th March 2014 at 07:22 PM.) Reason: fixed JB version number
#1  
Senior Member - OP
Thanks Meter 189
Posts: 134
Join Date: Feb 2013
Default Easier WiFi Tether Hack (No SQL Edits + Survives Factory Resets)

** Designed for stock Moto 98.72.22 and 98.72.22-based ROMs **
** FOR OTHER ROMS and updated stock, see post #7 **


When you do the entitlement_check SQL hack, you are modifying a string provided by MotorolaSettingsProvider.apk. But anytime you do a factory reset, you have to repeat the SQL hack. I didn't like this, so I modified the system APK to disable entitlement by default = same end result as SQL hack.

I have tested this twice without issue, so I'd say it's ready for release. Of course you need to be rooted to modify /system/app.

I did the following with Safestrap file manager and upon rebooting (no need to wipe, it seems) the Mobile Hotspot launcher worked like a charm (:
Also did a factory reset (data, dalvik, cache) and tethering still worked just fine!

Instructions:
0. Backup just in case!!
1. Download attached MotorolaSettingsProvider.apk
2. Reboot into Safestrap, Mount System, and then open the File Manager (under Advanced)
3. Browse to /system/app and rename MotorolaSettingsProvider.apk to *.apk.BAK (keep as a backup)
4. Browse back to the downloaded file, click it, select Move, browse to /system/app, click Select, OK
5. Browse again to /system/app, click on MotorolaSettingsProvider.apk (NOT the one ending in .BAK)
6. CHMOD permissions as 0644 (rw r- r-)
7. Rename MotorolaSettingsProvider.odex to *.odex.BAK (backup)
8. Reboot, click Thanks, and enjoy!
Attached Files
File Type: apk MotorolaSettingsProvider.apk - [Click for QR Code] (28.1 KB, 46 views)
The Following 4 Users Say Thank You to progrockguy For This Useful Post: [ Click to Expand ]
 
Ismokel
Old
#2  
Ismokel's Avatar
Junior Member
Thanks Meter 1
Posts: 9
Join Date: Dec 2010
tried this on stock jb.no go. fc and started reading notifications. also constant network loss and re-aquire.
 
progrockguy
Old
(Last edited by progrockguy; 27th March 2014 at 07:47 PM.)
#3  
Senior Member - OP
Thanks Meter 189
Posts: 134
Join Date: Feb 2013
Quote:
Originally Posted by Ismokel View Post
tried this on stock jb.no go. fc and started reading notifications. also constant network loss and re-aquire.
JB 246 98.72.22? I'm assuming you used a root explorer due to the FC. I recommend using Safestrap's built-in file manager (see the updated instructions).

I could also make a flashable ZIP to mitigate user-error if there is demand for it.

The last issues you mentioned are unrelated to this. The modified APK is exactly the same as the original, except for a single byte (1 -> 0) and deodexed. Oh, and a "false" to "true" in the manifest so we could manually clear data, but that didn't work out. You can decompile and compare yourself
 
ShadyDreamer
Old
#4  
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Mar 2014
Same issue here as Ismokel. It might be a signing issue, as I saw the same thing occur when I tried doing the mod myself and was experimenting with the different options for signing. It worked for me when I left the existing signature.

I would post my modded version, but I need to make one with only that mod first, as mine has mods to change other defaults as well.

Also, what is this JB 246 you are referring to? Wrong number? Just from a quick search, the only 246 reference I found was ICS.

You mentioned that yours worked for you without wiping data. Did you change default_entitlement_check in the xml resources or did you change something else? I was only interested in this mod to change the default and not the existing setting, but I'm still somewhat curious.
 
dpcsar
Old
#5  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Mar 2014
Quote:
Originally Posted by progrockguy View Post
** Designed for stock Moto 246 (JB 4.1.2) and 246-stock-based ROMs **

When you do the entitlement_check SQL hack, you are modifying a string provided by MotorolaSettingsProvider.apk. But anytime you do a factory reset, you have to repeat the SQL hack. I didn't like this, so I modified the system APK to disable entitlement by default.

I have tested this twice without issue, so I'd say it's ready for release. Of course you need to be rooted to modify /system/app.

I did the following with Safestrap file manager and upon rebooting (no need to wipe, it seems) the Mobile Hotspot launcher worked like a charm (:
Also did a factory reset (data, dalvik, cache) and tethering still worked just fine!

Instructions:
1. Download attached MotorolaSettingsProvider.apk
2. Reboot into Safestrap, Mount System, and then open the File Manager (under Advanced)
3. Browse to /system/app and rename MotorolaSettingsProvider.apk to *.apk.BAK (keep as a backup)
4. Browse back to the downloaded file, click it, select Move, browse to /system/app, click Select, OK
5. Browse again to /system/app, click on MotorolaSettingsProvider.apk (NOT the one ending in .BAK)
6. CHMOD permissions as 0644 (rw r- r-)
7. Rename MotorolaSettingsProvider.odex to *.odex.BAK (backup)
8. Reboot, click Thanks, and enjoy!
I would like to know how you made the modifications to the apk. I would like to make the same modifications for my Atrix HD.
 
Brolzy
Old
#6  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Nov 2013
Quote:
Originally Posted by dpcsar View Post
I would like to know how you made the modifications to the apk. I would like to make the same modifications for my Atrix HD.
has anyone tried this with SlimKat? It's the one thing that's missing from it that I've wanted so far.
 
progrockguy
Old
#7  
Senior Member - OP
Thanks Meter 189
Posts: 134
Join Date: Feb 2013
Quote:
Originally Posted by ShadyDreamer View Post
Also, what is this JB 246 you are referring to? Wrong number? Just from a quick search, the only 246 reference I found was ICS.
Whoops!! 98.72.22 is the base I used. If you took OTA updates, that could explain the boot loops. See below on how to DIY

Quote:
Originally Posted by dpcsar View Post
I would like to know how you made the modifications to the apk. I would like to make the same modifications for my Atrix HD.
Quote:
Originally Posted by Brolzy View Post
has anyone tried this with SlimKat? It's the one thing that's missing from it that I've wanted so far.
This mod is easy and should work on all ROMs. All you need is a deodexed version of MotorolaSettingsProvider.apk from your current/desired ROM.

Steps: after decompiling, open the following text file:
res/values/integers.xml
look for: def_entitlement_check
Change the 1 to a 0 and save.
Recompile and KEEP EXISTING SIGNATURE.

My safestrap instructions will work on your newly modified APK. (If you're going to try replacing via root file explorers, I suggest an overwriting Paste. That way you'll keep permissions in case android crashes and hot reboots. Do not delete, *then* paste. It'll likely crash before you can set the permissions.)

Good luck!
 
ShadyDreamer
Old
(Last edited by ShadyDreamer; 27th March 2014 at 08:07 PM.) Reason: clarifications and command name emphasis
#8  
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Mar 2014
Quote:
Originally Posted by progrockguy View Post
This mod is easy and should work on all ROMs. All you need is a deodexed version of MotorolaSettingsProvider.apk from your current/desired ROM.

Steps: after decompiling, open the following text file:
res/values/integers.xml
look for: def_entitlement_check
Change the 1 to a 0 and save.
Recompile and KEEP EXISTING SIGNATURE.
That's exactly what I did, so I don't know why your file didn't work for me. I'm using 98.72.22, too. A while ago when I did that exact mod myself it worked fine.


If you are using adb from a computer connected by USB to copy and install the apk, after using su you can use the stop command to close all apps, then you can safely move, rename, replace, or delete system apps without it crashing and rebooting. Just make sure you have it in the proper state before you reboot. If a prompt to allow su from adb comes up on the phone, be sure to allow it with no time limit in case you need to use su again before you use adb reboot to restart the phone.
 
progrockguy
Old
#9  
Senior Member - OP
Thanks Meter 189
Posts: 134
Join Date: Feb 2013
Quote:
Originally Posted by ShadyDreamer View Post
That's exactly what I did, so I don't know why your file didn't work for me. I'm using 98.72.22, too. A while ago when I did that exact mod myself it worked fine.
Curious, where did you get your APK from? Because stock is odexed.
My file also had a manifest edit (which didn't work out), but I doubt that's the issue since it works on two of my Bionics.
 
ShadyDreamer
Old
#10  
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Mar 2014
When I quoted the part I was replying to, I included your "All you need is a deodexed version of MotorolaSettingsProvider.apk from your current/desired ROM." line in the quote for a reason. I did that part.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Motorola Droid RAZR HD and M to Receive KitKat in a “Few More Weeks”

Verizon and Motorola shocked us all back in November when … more

[APK] YouTube Update to 5.6 Now Lets You Cast Live Video to Your Chromecast

Earlier today, we talked about how Google brought two new apps to … more

[OTA Captured] Android 4.4.2 Now Rolling Out to the AT&T Galaxy S 4 Active

A little under two months ago, AT&T started rolling out … more