yashsingh1/xdaforums huggingface dataset:
[Moto X Themes and Apps] phositadc:
Once system r/w is enabled you will be able to make this permanent right? So that it stays enabled even when rebooting?

Sent from my Nexus 7
[Moto X Themes and Apps] amoamare:
Yes once system has r/w access you can make this a permanent solution.
[Moto X Themes and Apps] Squintz:
Can this be installed from your phone?
[Moto X Themes and Apps] amoamare:
Yeah you can keep a copy of it in /data/local/tmp

That way you can just run the terminal commands or build a shell script to run them for ease.
[Moto X Themes and Apps] htowngator:
Awesome, great job. Can't wait till r/w enabled.
[Moto X Themes and Apps] ericizzy1:
deleted
[Moto X Themes and Apps] terabyte128:
After doing this, should the /system partition be remounted as read only? I'm making a script to automatically do this at boot.

BTW thanks for the app, much appreciated!
[Moto X Themes and Apps] amoamare:
Its always a good idea no idea why i left it out haha.

adb shell mount -o remount,ro /system
[Moto X Themes and Apps] terabyte128:
When I try to do this using scripter I get the error "device busy." The hotspot works but I'm worried it's not remounting it, any ideas? Here's the script (I just modified yours slightly):

mount -o remount,rw /system
rm /system/app/VzwEntitlementService.apk
rm /system/app/VzwEntitlementService..odex
cat /storage/emulated/legacy/VzwEntitlementService.apk > /system/app/VzwEntitlementService.apk
mount -o remount,ro /system
[Moto X Themes and Apps] terabyte128:
Also, do youhappen to know of any good tutorials for learning how to decompile/recompile APKs? I'm trying to better understand how they work. I was able to decompile the original VzwEntitlementCheck.apk and change the appropriate lines of code, but I can't figure out how to recompile it.

Thanks!
[Moto X Themes and Apps] thepolishguy:
For those of us who have installed PwnMyMoto and can write to system - do the steps remain the same? Or is there something different we should do?

Thanks for this and any help.

****EDIT****

Got it figured out. Thanks for your work.
[Moto X Themes and Apps] ericizzy1:
rooted phone, tried installing the apk, it says app not installed. any ideas? thanks
[Moto X Themes and Apps] thepolishguy:
Well a couple of things (and the OP can of course correct any mistakes I may make here)...

It's a system app so you do not install it. You place is in /system and give it the proper permissions.

Have you used [MENTION=2376614]jcase[/MENTION]'s PwnMyMoto.apk yet? His new release allows for writing to the system partition. You can either follow the OP's instructions or there are probably a couple of other options.

What I did was install jcase's newly released exploit to get access to system write. Then I renamed the existing system apps VZWentitlement.apk and VZWentitlment.apk.odex with a .bak (for backup). Then with RootExplorer I moved the OP's modified .apk to the system folder and changed the permissions to match the other system app permissions.

Reboot.

Or reboot recovery.

Should be ready to go.
[Moto X Themes and Apps] drpencilcase:
Thanks, worked like a charm
[Moto X Themes and Apps] nimos001:
Are you saying you used RootExplorer to do all of this versus using adb commands? I actually followed this but when I try to enable my hotspot I get a message ' Unfortunately, Settings has stopped.'

EDIT: Rebooted phone and all is good!
[Moto X Themes and Apps] thepolishguy:
Yes I did. Glad it worked out for you.
[Moto X Themes and Apps] Rahshaka:
This method worked perfectly for me. Now have free Wi-fi Tether with out THE MAN (Verizon) trying to hassle me to pay.
[Moto X Themes and Apps] seanrobot:
By reboot recovery are u just turning the phone into fast boot mode and selecting recovery? Should the phone then boot up like normal?

JK got it to work. I used the reboot menu widget that was posted here and selected reboot recovery
[Moto X Themes and Apps] thepolishguy:
I have been using terminal emulator.

su

reboot recovery

But I believe power + volume down also does the trick (I think).
[Moto X Themes and Apps] phositadc:
Does this method from the droid ultra forum not work on the X? http://xdaforums.com/showthread.php?t=2442616

Sent from my Nexus 7
[Moto X Themes and Apps] thepolishguy:
Correct. It does not work on the X
[Moto X Themes and Apps] amoamare:
Added AT&T apk same steps apply just replace the name to entitlementservice.apk
[Moto X Themes and Apps] mandrsn1:
Worked perfectly. Thanks.
[Moto X Themes and Apps] ericizzy1:
in the op code,the line that says : rm /system/app/VzwEntitlementService..odex

should be: rm /system/app/VzwEntitlementService.odex

with only one "." between service and odex. this solved my problem, hope it helps someone
[Moto X Themes and Apps] cowenby:
Alternate Directions

Hey guys, here are detailed directions based on thepolishguythat doesn't require ADB. It can be done completely free directly from the phone. (OP feel free to copy these into the first post.)

Root using pwnMyMoto.

Boot into recovery mode. (Press Volume Down + Power. Hold for 5 seconds and release. Press Volume down to highlight recovery. Press volume up to select.)

Download and install Root Browser by JRummy.

Download the correct apk.

Open Root Browser. Download Utilities.

Navigate to system -> apps.

Delete entitlementservice.odex (vzwentitlementservice.odex for Verizon)

Rename entitlementservice.apk to entitlementservice.apk.bak (vzwentitlementservice.apk.bak for Verizon)

Navigate all the back up to main folder and then to sdcard -> Download

Copy entitlementservice.apk (downloaded from below) to the system -> apps location.

Reboot into Recovery again.
[Moto X Themes and Apps] d4mi3n:
Would you guys be so kind as to do one up for sprint also? :D
[Moto X Themes and Apps] jonnrb:
I'll second that! The APK that checks entitlement for Sprint is /system/app/SprintEntitlement.apk. I'll post one pulled from my MoX. It's really small (only 4K) which I found was weird...

If anyone knows how to disassemble an APK like OP did, some pointers would be good too. Kind of a Android reverse-engineering noob here.

EDIT: Forgot about odexing... The odex has the extension .txt

EDIT2: I learned some smali and created a Sprint version of amoamare's hack. It's in the next post. The attached files here are the originals in case you have to go back for some reason
[Moto X Themes and Apps] jonnrb:
Created a Sprint version of amoamare's hack. Push the apk to /system/app and you should be good to go. We can haz tether people.

Here's the code I changed:

.method protected isEntitlementSuccess()Z
#.registers 2
.locals 1

.prologue
.line 189
#iget-boolean v0, p0, Lcom/motorola/sprint/entitlement/EntitlementDialogActivity;->mCheckResult:Z
const/4 v0, 0x1

return v0
.end method

EDIT: This will work for a while, but you will soon notice (like I did) that while you can create a hotspot and connect to it, you will not be able to actually get to the outside world after a few hours of tethering. This, I presume, is because Sprint uses a different APN for tethering than they do for normal everyday data so that they can track usage. So, while you can in fact create a hotspot after removing the entitlement check, you cannot actually use tethering.

I did some digging and found a workaround posted various places around XDA. It uses iptables to reroute all traffic coming from the hotspot's network to the normal data network via NAT. You have to run this command as root!

iptables -tnat -A natctrl_nat_POSTROUTING -s 192.168.0.0/16 -o rmnet0 -j MASQUERADE

Personally, I found it was easy to create a Tasker context that runs this command as root every time my MoX boots. In truth, there's a million ways to accomplish this though.

Just a reminder: this is in addition to the SprintEntitlement.apk hack for Sprint Moto X's.
[Moto X Themes and Apps] amoamare:
I added it to the first post, hope thats okay also gave you credit for it thanks for doing it.
[Moto X Themes and Apps] flip3d:
Can someone please post the unmodified at&t entitlementservice.apk? I forgot to back it up and the current one keeps stopping settings even after reboot.
[Moto X Themes and Apps] Kev1000000:
No love for T-Mobile?
[Moto X Themes and Apps] M@XLOL:
worked for me on verizon through a reboot thank OP
[Moto X Themes and Apps] mandrsn1:
This isn't working on AT&T after the camera update.
[Moto X Themes and Apps] defsquad:
Any of you able to use Tasker to toggle on/off the hotspot?

I've got it toggling it on, but my "off" task just will not work. I've tried the Locale plugin (that works with Tasker) and used the Secure Settings plugin's hotspot toggle.

I'm glad it switches it on automatically, but would love it to switch it off when my tasker task sets it off.

Should I be using some other method for auto-toggling the tethering with this native tether functionality? (I'm on a VZW Developer Edition, TWRP bootloader/recovery/rooted)
[Moto X Themes and Apps] vwyankee:
+1
[Moto X Themes and Apps] mandrsn1:
Here is the AT&T entitlement apk from the new version.

https://db.tt/RBWzvJ2a
[Moto X Themes and Apps] vwyankee:
Thanks for that. Unfortunately I now get the error, "Unfortunately, settings has stopped."

I've redone the process a few times carefully considering previous other posts of the same error.

*Edit*

Just re-read - my bad. Now realize you were offering the apk so someone in the know can modify for the AT&T folk.
[Moto X Themes and Apps] defsquad:
So, is any one able to get Tasker to toggle wifi tethering on/off after they've implemented the necessary patched files in this thread?

I can get it to start the tethering just fine, but can never get it to turn it off even though the other tasks in my "off" task executes.. Would LOVE to hear of other folks' successes with doing this :D
[Moto X Themes and Apps] Jexx11:
I have a similar issue, I've tried several different Toggle Widgets to turn the WiFi Hotspot on/off. All of them are able to turn the Hotspot on, but when trying to turn it back off the widget will hang, and it will not toggle off properly. I can go into the settings and turn the Hotspot off manually and that works just fine.

This is probably the same bug you are referring too, however I never did try using the WiFi hotspot before applying this hack/fix, so I'm not sure how the widgets would of behaved prior to this native tether fix.
[Moto X Themes and Apps] defsquad:
Jexx11, that is the EXACT behavior I'm experiencing. Glad it's not just my phone/scenario of usage.
[Moto X Themes and Apps] goose71:
Are you guys using the built-in tethering or wifi tether from the market?
[Moto X Themes and Apps] vwyankee:
Built in. I'd rather not have to use a third party app for something that's baked in.
[Moto X Themes and Apps] Jexx11:
Yeah I'm also using the built in tethering
[Moto X Themes and Apps] goose71:
So no one has figured how to get Wifi tether to work? Or is this just a better alternative?
[Moto X Themes and Apps] defsquad:
if you don't want native tether, here's wifi tether for root instructions for the motox: http://xdaforums.com/showthread.php?t=2449534
[Moto X Themes and Apps] defsquad:
I really wish the "ending" of the tethering via tasker was figured out/a possibility. nothing i've tried can programmatically disable the native tethering..
[Moto X Themes and Apps] tscan:
I'm guessing this is no longer working? I have a 4.2.2 Moto X that I just purchased yesterday. I rooted it, and did this exploit, and it stick after reboot however I'm getting "Settings has stopped working" whenever I try to enable it. :(
[Moto X Themes and Apps] mandrsn1:
It worked for me on AT&T until I got the camera update. After that it doesn't work.
[Moto X Themes and Apps] tscan:
I'm on verizon and we haven't got this yet. Also, according to jcase, root will not work after the camera update. I've double checked my write permissions with the adb command and everything is good (getting back a 0). I just get an error as soon as i try to activate the tether.
[Moto X Themes and Apps] defsquad:
FYI, this 100% still works on an unlocked VZW developer edition.

It just can't be turned off programmatically (e.g. Tasker to turn it off when needed).
[Moto X Themes and Apps] tscan:
I don't have a unlocked dev edition :/. But that shouldn't matter right?
[Moto X Themes and Apps] stillthisguy:
I have the carrier vzw version and this works fine. I just delete the original files, place the file listed here and then set permissions.
[Moto X Themes and Apps] mandrsn1:
You should rename the files rather than delete. OTA updates will fail if you don't have the orginal files.
[Moto X Themes and Apps] stillthisguy:
You can do either, as it isn't hard to get the files again from source. More than likely if you wanted the OTA you would be using RSDLite to return to stock. There are a lot of reasons OTA updates will fail just by being rooted, not just missing files. Rename or delete, there is hardly a difference.
[Moto X Themes and Apps] tscan:
So you installed PwnMyMoto, then put the files in system>app? Or? Can you provide explicit instructions haha. I really thought I followed this completely, I just copied and pasted the lines shown in the OP and no dice :(.
[Moto X Themes and Apps] thepolishguy:
You can try my "non-adb instructions" on page 1...

http://xdaforums.com/showpost.php?p=45603100&postcount=16
[Moto X Themes and Apps] tscan:
Did you actually try this or was this just a guess? This was the first thing I tried and I was getting the same result, although I'm not sure if I set the permissions correctly, could you clarify on what exactly needs to be set on the .apk?
[Moto X Themes and Apps] tscan:
Finally got it to work, had to flash back to stock with rsdlite, rerooted, and reused the adb commands posted in the OP. I have no idea why it wasn't working originally, BUT YES TETHER WOOOO. Now to figure out how to get weather to display on active notifications... hmmmmmm.
[Moto X Themes and Apps] thepolishguy:
It was not a guess. It is what i did. And it worked great.

You have to rename both of the other .apks (regular apk and its odexed counter part).

Then just put the modified apk in system. Use root explorer. Right click the apk (long press). Choose, "permissions". And then make the apks permissions match the rest of the apks on the folder..

rw-r--r--

On the little grid its going to look like this i believe...

XX-

X--

X--

The "X" means there's a check mark. The dash "-" means the box is empty (unchecked). So another way to put it...

checkmark|checkmark|empty

checkmark|empty|empty

checkmark|empty|empty

reboot

?

profit

Worked fine for me.
[Moto X Themes and Apps] sravanz:
Works great thanks a lot :)
[Moto X Themes and Apps] thepolishguy:
This is still working on VZW after the update. Just wanted to share. Thanks.
[Moto X Themes and Apps] mandrsn1:
Damn. We got screwed with AT&T.
[Moto X Themes and Apps] thepolishguy:
I should have mentioned I'm on the Dev Ed MotoX so I am able to flash su & write to system still.

Sorry about that.
[Moto X Themes and Apps] tf22:
Odd... I also have the VZW Dev Ed, and although I had this working fine before the OTA update.. it no longer does for me.

My Steps:

1. RSD stock firmware

2. Recieved OTA notification

3. Installed PwnMyMoto (but did not run)

4. Installed OTA update (rebooted several times)

5. Installed SuperSU from Play Store (SUCCESS - verified that I have root w/ root checker + misc root apps)

6. Followed instructions found on this thread (tried both adb + root explorer copy/paste method w/ permission changes)

7. Error... (Please contact customer service...)

Any suggestions?
[Moto X Themes and Apps] Rahshaka:
Try rebooting normal and not recovery. I did all the same steps as you and was getting the same error. Rebooted normal and not recovery and it works now.
[Moto X Themes and Apps] thepolishguy:
Curious - why did you install #PwnMyMoto?

Trying to save your warranty?

I'm bootloader unlocked. Don't know if that is what made the difference or not.
[Moto X Themes and Apps] sravanz:
I am updated, rooted and this works like charm. I have an AT&T variant
[Moto X Themes and Apps] mandrsn1:
interesting... i will try some more. it keeps checking the entitlement with AT&T for me.

edit: I feel like an idiot... It worked. I tried and replaced the APK several times. I don't know what I was screwing up. Oh well. Its working now. :) Thanks for commenting that you got it to work.
[Moto X Themes and Apps] Ctrl-Freak:
I read that sometimes carriers use a separate APN for tethering in order to better track tethering.

Does AT&T do that with the Moto X?
[Moto X Themes and Apps] mandrsn1:
I don't believe so. The Moto X only has 2 APNs stored for AT&T, one for MMS and one for regular data.
[Moto X Themes and Apps] Jexx11:
Just an obvious suggestion, but are you making the changes in Recovery? Since you are using PwnMyMoto you need to make system changes in Recovery for them to "stick". Its something obvious, but is easy to overlook and could cause your problem.

For what its worth, I'm also on Verizon DE Moto X, and this method works perfectly for me after the update, although I am unlocked, not sure that would make any difference though.
[Moto X Themes and Apps] Zero_FeniX:
Just want to throw this out there. I have a Verizon Moto X (non-DE) that was updated and has root. I replaced the APK and rebooted, no entitlement check. Everything appeared to start up properly.

I did this using Solid Explorer instead of ADB commands. I renamed the old ,apk and .odex to .orig so that I have them if I need them and pasted the new .apk into the folder.
[Moto X Themes and Apps] ericizzy1:
mind sharing how you got root? thanks
[Moto X Themes and Apps] Zero_FeniX:
If you're not rooted and you already took the update you're SOL, but if you haven't then there's this thread. http://xdaforums.com/showthread.php?p=46808512

Alternatively, you can do what I did. I had the stock rom for the pre-camera fix OTA, never rooted it. I installed PwnMyMoto but did not run the application once installed, then I took the update. The update automatically activates pwnmymoto and you get root. But if for whatever reason you break your rom and you have to flash to stock you lose root forever, or at least until someone releases an updated root method or bootloader unlock.
[Moto X Themes and Apps] ericizzy1:
this works for me after the new , past camera update, root
[Moto X Themes and Apps] Magnus_CA:
I just wanted to post my experience getting this to work on my vzw Dev edition (I had it working even before I unlocked my boot loader, in case you were wondering).

I chose to eschew the adb route since I didn't have my laptop handy and conceptually I knew I could do everything the terminal commands were doing from within root explorer. I set my system/app directory to r/w and then added a .bak to the apk and odex files. Then I copied over the modded apk to the same directory and set its permissions to rw-r--r-- as all files here should be. I rebooted for good measure and fired it up. I tethered my nexus 7 on the first try w/ WPA2 enabled. One important difference in my case from the way most others may be using it is I disabled the hotspot app and just used the tethering option that appears in the Settings menu. I froze all the Verizon apps out of habit so I'll never know whether it's a variable or not but I know it's working my way.

BTW, there's no need to toggle the system/apps directory back to r/o. A reboot will do it for you.
[Moto X Themes and Apps] ArtnerC:
How did you go about getting root without unlocking the boot loader? Trying to get this on my VZW DE, without having to unlock/void.

Sent from my XT1060
[Moto X Themes and Apps] Magnus_CA:
I was using pwnmymoto to gain root access. You can get root without unlocking your BL. I'm super glad I decided to unlock it though. It's nice to have tarp and nandroid back.
[Moto X Themes and Apps] yoondroid:
At&t

Has anyone been able to patch the AT&T apk OP posted? It'd be much appreciated! I'll keep trying when I have some free time, but am getting stuck on figuring out how to convert the .dex files to .jar for me to modify (so even any insight on that would be great).
[Moto X Themes and Apps] KidJoe:
RockMyMoto in the development section. Its how I'm running my Developer Edition VZW Moto X until I've made sure there are no issues with it before I unlock and void my warranty.
[Moto X Themes and Apps] 640k:
can we back up for a second? can you not do the standard, remove the entitlement check in the systems database using a SQL editor?? all of the .apks are rendered useless if the tethering app isn't even allowed to check first, right?

has anyone tried this?

from my D4:

i don't have an X in front of me, but this has always worked in the past.
[Moto X Themes and Apps] KidJoe:
In Post #24 of this thread, thepolishguy the SQL tweak doesn't work.
[Moto X Themes and Apps] ManHands:
Do you still have the .orig files? I deleted mine w/out reading through this entire thread first (idiot). Did you have to change permissions of the system/app directory at all? VZW Moto X (non-DE) w/ RockMyMoto root. Replaced the apk, changed permissions, rebooted. When I try to turn on tethering it does a check and says subscription invalid.

EDIT - Problem solved. This time after copying the .apk to system/app, I turned on WiFi tethering prior to rebooting. Turned on w/ no issues. Rebooted, and still works. If you/anyone still has the .orig .apk or .odex, feel free to share. Appreciate it.
[Moto X Themes and Apps] kiasan:
Cant Remount?

I have root access.

root@ghost:/ # id
id
uid=0(root) gid=0(root)

But whenever I try to remount the /system partition read-write it will not work:

root@ghost:/ # mount -o remount,rw /system
mount -o remount,rw /system
mount: Read-only file system

Any ideas?
[Moto X Themes and Apps] 9kracing:
There is no VzwEntitlementService.apk in 4.4 :(

I pushed this to system/app anyway and set permissions... it's still checking my subscription.

Damn you Verizon. :mad:
[Moto X Themes and Apps] 640k:
this SHOULD be good news...
[Moto X Themes and Apps] dtannen:
ncheay qug

I tried to decompile framework-res.apk and got:

Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file

If anyone finds a good solution, please let me know.
[Moto X Themes and Apps] 9kracing:
Is that 'mobilehotspot.apk' new? I don't remember seeing it before.
[Moto X Themes and Apps] blcnexus:
it appear it has been moved to the priv-app folder. I had tried the "FIX" and it appears that it no longer works.
[Moto X Themes and Apps] 640k:
since the VzwEntitlementService.apk is missing, has anyone tried editing the settings.db like on the DROIDs? go back to basics.
[Moto X Themes and Apps] cj64:
http://xdaforums.com/showthread.php?t=2536166
[Moto X Themes and Apps] Zero_FeniX:
This does work, even for the consumer edition Moto X.
[Moto X Themes and Apps] mj0528:
What about at&t?
[Moto X Themes and Apps] ericizzy1:
works for me on non DE verizon 4.4
[Moto X Themes and Apps] cj64:
Please send me the AT&T 4.4 entitlement apk via PM.
[Moto X Themes and Apps] cj64:
Here is a test build for AT&T.

(edit) http://xdaforums.com/showthread.php?p=47880191
[Moto X Themes and Apps] mandrsn1:
Worked fine for me.
[Moto X Themes and Apps] dobbs3x:
There was a script on the sprint HTC one that allowed native tether bypass. Anyone know if that would work on sprint moto x? It basically updated some iptables or something I think.

Nvm found the answer in this thread.
[Moto X Themes and Apps] sfetaz:
Has anyone figured out a solution yet to disabling Tether using 3rd party apps like Tasker? I still have this problem as well. I am on Verizon Moto X 4.4
[Moto X Themes and Apps] <:GeeK:>:
http://xdaforums.com/showthread.php?p=48088398 might help you
[Moto X Themes and Apps] sfetaz:
Didn't help, used the all in one exe file, rebooted the phone using recovery, same issue, cannot disable tether with tasker or macrodroid.
[Moto X Themes and Apps] <:GeeK:>:
I glanced at your post and misread your intention. Yeah, it will not disable tether.

TASKER: Select Action Category -> Net -> WiFi Tether
[Moto X Themes and Apps] buton2:
so is this working with all the new updates i got:

the android 4.4

verizon system version

140.45.5.ghost_verizon.verizon.en.us
[Moto X Themes and Apps] charlie-n:
so has anyone found a way to get this to work with sprint after 4.4 update