yashsingh1/xdaforums huggingface dataset:
[Moto X Original Android Development] DarkWolffe:
By the way, there is a permanent root method available now for the AT&T and Verizon models running 4.4.4.
[Moto X Original Android Development] mschumacher69:
It's not permanent because it doesn't disable write protection. So all changes made will be reverted back after rebooting the phone...
[Moto X Original Android Development] DarkWolffe:
I am a living case that your statement is completely false. The system.img file is prerooted, so it retains its changes after you reboot the device.

I promise, it survives reboots.
[Moto X Original Android Development] mschumacher69:
Dude, I know that root survives reboots, but write protection is not disabled so any changes you make on root won't survive reboots...
[Moto X Original Android Development] DarkWolffe:
That's true, I read your original statement wrong. However, that doesn't mean it isn't a permanent root.
[Moto X Original Android Development] Sparx639:
What is this new root method for 4.4.4?
[Moto X Original Android Development] NWKENT:
HINT: Throw all your Moto's out the window..You tired of having to jump thru flaming hoops just to Root your Moto..purchase the 1+1..

How I tolerated the Moto devices (exclusively) since 1989..I'll never know..purchased at least two devices per year since, but one day, a few months ago now, I realized how Moto no longer is the only device one can purchase..

sent by my: SandStone Black 1+1

(aka) OnePlus One, OPO (Device 1 of 2)
[Moto X Original Android Development] DarkWolffe:
This one here.
[Moto X Original Android Development] XTheArrowX:
What about the Moto G (2013) on Verizon 4.4.4?
[Moto X Original Android Development] XTheArrowX:
What is it? I still need my bootloader unlocked.
[Moto X Original Android Development] DarkWolffe:
I put a link to it two posts above yours, dude.
[Moto X Original Android Development] XTheArrowX:
Sorry, will it actually root the Verizon Moto G on 4.4.4?
[Moto X Original Android Development] DarkWolffe:
This is the Moto X forums. You need to check the Moto G forums for KitKat root methods.
[Moto X Original Android Development] cell2011:
When im done temp root i pull my usb cable but it reboots everytime and i lose root why?
[Moto X Original Android Development] samwathegreat:
As jcase told us, this exploit does not give you system write access. As you can see from your screenshot, Xposed is attempting to mount /system writable.
[Moto X Original Android Development] xDroid4Lifex:
When you first open xposed do NOT choose classical install. Choose the normal install, then SOFT reboot. Install your modules and ONLY SOFT REBOOT or you'll loose root.

I've already installed GravityBox, and a few other modules. Oh how I've missed xposed! It's really the only reason I like having root.
[Moto X Original Android Development] twinkyz1979:
Confirmed rolling back to 19.5.3 on the Droid Ultra does allow this root method to work.

I can also say I have been able to write to /system using ES File Explorer. I was able to delete some /system/app's and move a few from /data/app to /system/app did numerous reboots using PIE each time afterwards and all my changes stuck.

Now I don't know much of anything about getting root but it seems to me it's just putting certain files in certain areas with certain permissions. If that is true knowing what I did with ES File Explorer wouldn't it be possible to attain root permanently?
[Moto X Original Android Development] danger2u:
works with 4.4.3???

somone tested it?

wich comands i must make?

i didn t understand very well

with ADB?
[Moto X Original Android Development] hovax615@hotmail.com:
He said in the OP that the vulnerability was patched on the 4.4.3 update.

MOTO X
[Moto X Original Android Development] danger2u:
there is no NORMAL. there is only Clasic and Recovery

someone knows what i do wrong?
[Moto X Original Android Development] PJnc284:
you're trying to enter the commands from within adb shell which is probably why you're getting adb not found. The push commands should be from the command prompt itself.

And getting su not found on a Republic Wireless Moto X (XT1049) running 4.4.2 (System Version:165.44.12, Build Number: KXA20.16-1.24-1.12)
[Moto X Original Android Development] danger2u:
ok i did it again and now works.

i instaled Rom Toolboxkit and run the script Mount system R/W then installed Xposed and instaled the framework with normal method and soft reboot.

everythinh works fine.

thanks [MENTION=2376614]jcase[/MENTION] and all other who are involved in this

Inviato dal mio XT1052 utilizzando Tapatalk
[Moto X Original Android Development] jrk190:
I was wondering if safestrap could be installed with this, but I'm not sure it will. But we're getting closer! I'll try this on my 4.4.2 RAZR m.
[Moto X Original Android Development] SamuriHL:
No. SafeStrap requires the ability to write to system to install the hooks.
[Moto X Original Android Development] hiratafabio:
Great work, jcase!

Now guys, even if this root doesn't allow writing to /system, some Xposed modules would still work, right?
[Moto X Original Android Development] danger2u:
yes

i make it W/R with a script and Gravity Box working fine

attention to soft reboot

Inviato dal mio XT1052 utilizzando Tapatalk
[Moto X Original Android Development] hiratafabio:
Thanks! Where can I find this script?
[Moto X Original Android Development] gotsaved289:
Could someone please post a step by step on how to obtain root? I can't find instructions anywhere...
[Moto X Original Android Development] abuttino:
Ya, first post.. If you don't understand that, you probably shouldn't root
[Moto X Original Android Development] gotsaved289:
Well I've acquired root on many devices before and was always able to figure it out. I just don't see where to put the zip file. I can run the code posted through Command prompt that's not hard I'm just missing a clear instruction to know if I'm doing it right I've already flashed back to the pre-April release. I just need some explanation not a ton.
[Moto X Original Android Development] PJnc284:
The files needed to copy to the phone are in the zip file. Just unzip it.
[Moto X Original Android Development] Nerekan:
What's the problem?

C:\>adb push pie.jar /data/local/atvc

4783 KB/s (1538138 bytes in 0.314s)

C:\>adb push root.sh /data/local/atvc

62 KB/s (192 bytes in 0.003s)

C:\>adb shell chmod 755 /data/local/atvc/root.sh

C:\>adb shell /data/local/atvc/root.sh

rm failed for /data/local/atvc/blop.asec, No such file or directory

mkdir failed for /data/local/atvc/dalvik-cache, File exists

pie by jcase

want to buy me pie? paypal-> jcase@cunninglogic.com

XT1080 Ultra firmware 19.6.3 android 4.4
[Moto X Original Android Development] jcase:
You need to downgrade to 19.5.3
[Moto X Original Android Development] jcase:
put it anywhere, as long as you unzip it and run the contained files on the device from /data/local/atvc
[Moto X Original Android Development] Nerekan:
it really possible? via RSD Lite?
[Moto X Original Android Development] REDFOCZ:
OK so I downloaded ROM toolbox pro and when running the script for R/W , I get this error. How did you overcome it.

Sent from my Moto X
[Moto X Original Android Development] jcase:
yes, yes
[Moto X Original Android Development] gotsaved289:
So I unzipped the files into my droid maxx in the /storage/emulated/0 part of my phones memory, at least that's what the File Manage APK says .

When I run the first command I get this

C:\SDK tools\sdk\platform-tools>adb push pie.jar /data/local/atvc

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

error: device unauthorized. Please check the confirmation dialog on your device.
[Moto X Original Android Development] PJnc284:
That command would assume the pie.jar is within the platform-tools folder. Since it's on your phones memory, it won't see it. Copy the unzipped files to that folder on your pc.

Also [MENTION=2376614]jcase[/MENTION]- Any idea on the Republic Wireless Moto X (XT1049) running 4.4.2 (System Version:165.44.12, Build Number: KXA20.16-1.24-1.12)? Getting Su not found.
[Moto X Original Android Development] Nerekan:
after downgrade to 19.5.3

C:\>adb devices

List of devices attached

TA62701T3Z device

C:\>adb push pie.jar /data/local/atvc

3821 KB/s (1538138 bytes in 0.393s)

C:\>adb push root.sh /data/local/atvc

46 KB/s (192 bytes in 0.004s)

C:\>adb shell chmod 755 /data/local/atvc/root.sh

C:\>adb shell /data/local/atvc/root.sh

rm failed for /data/local/atvc/blop.asec, No such file or directory

rm failed for /data/local/atvc/blop, No such file or directory

pie by jcase

want to buy me pie? paypal-> jcase@cunninglogic.com
[Moto X Original Android Development] jcase:
authorize the device, look at your screen

What is the date on the firmware?
[Moto X Original Android Development] jcase:
??? typical expected output
[Moto X Original Android Development] gotsaved289:
C:\SDK tools\sdk\platform-tools>adb push root.sh /data/local/atvc

cannot stat 'root.sh': No such file or directory

C:\SDK tools\sdk\platform-tools>adb push pie.jar /data/local/atvc

cannot stat 'pie.jar': No such file or directory

C:\SDK tools\sdk\platform-tools>adb push pie.jar /data/local/atvc

5383 KB/s (1538138 bytes in 0.279s)

C:\SDK tools\sdk\platform-tools>adb push root.sh /data/local/atvc

62 KB/s (192 bytes in 0.003s)

C:\SDK tools\sdk\platform-tools>adb shell chmod 755 /data/local/atvc/root.sh

C:\SDK tools\sdk\platform-tools>adb shell /data/local/atvc/root.sh

rm failed for /data/local/atvc/blop.asec, No such file or directory

rm failed for /data/local/atvc/blop, No such file or directory

pie by jcase

want to buy me pie? paypal-> jcase@cunninglogic.com

This means it worked right?
[Moto X Original Android Development] danger2u:
search on Play store

Rom toolbox pro o whatever app does this

like Root explorer etc

Inviato dal mio XT1052 utilizzando Tapatalk

---------- Post added at 06:02 PM ---------- Previous post was at 06:01 PM ----------

if the results is 0 means that is ok

the sistem is R/W now

right [MENTION=2376614]jcase[/MENTION]?

Inviato dal mio XT1052 utilizzando Tapatalk
[Moto X Original Android Development] PJnc284:
Kernel says 4/3. Is there a date somewhere else? Republic didn't actually start pushing it out until 4/22.
[Moto X Original Android Development] jcase:
Does su work?

no idea, thats not my script/program

if it doesnt work, downgrade firmware to the one before
[Moto X Original Android Development] hiratafabio:
Ah, got it! I already have Root Explorer, so I guess I'm good to go. Thanks!
[Moto X Original Android Development] PJnc284:
The only kit Kat firmware we've received is the 4.4.2 that's on it now. Guess that means this method is out for Republic users?
[Moto X Original Android Development] erikwervo:
Thanks jcase for the exploit. You are a rockstar!!

Quick question for those who install framework. Which version did you guys install? I cant get the "normal method" showed up. Just the classic and 2 recovery mode. TIA
[Moto X Original Android Development] Nerekan:
NO :(
[Moto X Original Android Development] twinkyz1979:
For those of us that have to downgrade I suggest getting TB (Titanium Backup) and freezing MotorolaOTA or you will keep getting that annoying reminder about a software update. Freezing that will stop OTA updates until you unfreeze it.

I have also noticed once it is frozen even upon a reboot where you lose root it stays frozen.
[Moto X Original Android Development] bagheadinc:
I just long pressed the notification, clicked App info and unchecked "Show notifications". I had thought about freezing it, but wasn't sure if it would have any negative effects in the future (I doubt there would be, I'm just paranoid about what I freeze :P ).
[Moto X Original Android Development] twinkyz1979:
I completely forgot about being able to do that. Thank you for reminding me and giving others another option.
[Moto X Original Android Development] KennyG123:
Thread cleaned

Please take the Xposed issues to an Xposed thread or

Feel free to make a thread in Q&A

Thank you for your cooperation

Friendly Neighborhood Senior-Mod
[Moto X Original Android Development] NWKENT:
Thank you for the cleansing.. :)

Sent from my 4.4_19.6.3

(Unlocked) XT1080M Droid Maxx #2

http://waynekent.com/page6.html
[Moto X Original Android Development] E:V:A:
@jcase: Any ideas why it doesn't stick through reboot?

What I find funny with your root, is that it gives you an abnormal context:

root@ghost:/ # id
uid=0(root) gid=0(root) context=u:r:kernel:s0

Usually root should be: "u:r:init:s0" or "u:r:init_shell:s0"...

Or is this a Moto X thing?
[Moto X Original Android Development] jcase:
Because I'm not actually installing su onto system, instead I'm mounting an additional partition overtop of /system/xbin. Motorola is using the emmc write protection feature, requiring an additional exploit, which a stable one is not available at this point.

I'm not sure where u:r:init_shell:s0 comes from, that sounds like an improper context.

u:r:init:s0 comes from using install-recovery.sh to start daemon-su, and is the normal context (running in the context of init).

u:r:kernel:s0 means deamon-su is running in the context of the kernel, as far as i know this has all abilities as running in the context of init, but if you can point out a reason not to use it, I can run it in init context.
[Moto X Original Android Development] samwathegreat:
It doesn't stick through reboot because it is a "tethered" root...

I confirm that my bootloader-unlocked (no exploit) Moto X shows: context=u:r:init:s0

Interesting. Must have something to do with being tethered root.
[Moto X Original Android Development] E:V:A:
I've just been reading Chainfires blog about all this, and I've never seen that context after su, but then again I'm on 4.2.2 Enforcing on an I9195.

[SIZE=2]5.4.1. Basics

The current SELinux context defines which policies apply to your process. The
'highest' context is generally u:r:init:s0. Contrary to what you may expect,
this does not necessarily mean this context has access to everything. Some
common contexts you may come in contact with:

u:r:init:s0 - Highest init context
u:r:init_shell:s0 - Shell started from init
u:r:shell:s0 - Unpriviliged shell (such as an adb shell)

u:r:system_server:s0 - system_server
u:r:system_app:s0 - System apps
u:r:platform_app:s0 - System apps
u:r:untrusted_app:s0 - Third-party apps

The bottom four of these contexts can be used with SuperSU's -cn/--context
option.

The default policies that make up these contexts can be found under
external/sepolicy in your Android source tree. Note that OEMs tend to modify
these policies, and these policies change between Android version. To assure
compatibliity, your app should be tested on all API revisions, and if possible
on flagship devices from all the major OEMs - if you cannot do this yourself,
depend on your core users.

5.4.2. init vs init_shell vs shell

On firmwares that use SELinux, su is generally implemented as a proxy to a
daemon started from init. [B]It is important to note that su shells may run as
u:r:init:s0 or u:r:init_shell:s0. SuperSU should always run as u:r:init:s0 if
SELinux is set to enforcing, but not all superuser shells do.[/B] These context are
somewhat similar, but they are certainly not the same, and both cases should be
tested for your app.

There are various ways to switch contexts, for this specific case switching from
u:r:init:s0 to u:r:init_shell:s0 can be done by launching a second sh (be
careful not to use mksh as it is being deprecated). If you have a command that
needs to be run as u:r:init_shell:s0, just wrap the command in sh -c
"...command...", to make sure that it does.

Adb uses the u:r:shell:s0 context, which has very different policies. Be careful
not to confuse them!
[/SIZE]
[Moto X Original Android Development] jcase:
I believe the kernel context is higher than init, in theory this would have more capabilities than init. If anyone can identify anything negative with using it, I'll switch to init. maybe [MENTION=631273]Chainfire[/MENTION] can comment
[Moto X Original Android Development] Chainfire:
I don't know which capabilities u:r:kernel:s0 would have above u:r:init:s0, though it does sound logical it would have some. The source policies are not really clear about it, and I've never tested, as none of my devices run su as u:r:kernel:s0.

My primary concern in this case would be su's context switching functionality, these switches are fairly carefully crafted to work at all, and I'm not sure if they would work when starting out with u:r:kernel:s0 instead of u:r:init:s0.

Unless we can find a practical benefit of running as u:r:kernel:s0, I think for consistency's sake u:r:init:s0 should be used.
[Moto X Original Android Development] hiratafabio:
I'm getting the same error and no root. SU doesn't install and Root Checker says it is not rooted. All stock.

FW is 161.44.26 Vivo BR

Enviado de meu XT1058 usando Tapatalk
[Moto X Original Android Development] E:V:A:
@Chainfire [MENTION=2376614]jcase[/MENTION] :

This is what I (suppose) is bad with using contexts in development. On the top of my head and from what minimal reading I have done on this, it seem that the power of these contexts are relatively arbitrarily set (by context policy files?), so that they don't follow any pre-defined precedence. In that way a particular context could have most power over certain operations while a different context could have the complete opposite. What this means is, that to navigate these rough seas of context dependent operations we are doomed into some context switching nightmare scenario, in order to perform a series of operations necessary for some root app X. Is this correct or have I misunderstood something?
[Moto X Original Android Development] PJnc284:
jcase has said those messages are more for informational purposes. If you haven't rooted before, you'll probably get those since they don't yet exist. Guessing those messages go away the second and any subsequent attempts but you probably get a different one saying the dalvik-cache folder already exists. Neither has an impact on whether your device has been successfully rooted.
[Moto X Original Android Development] zenofase:
Before I create a Pie root and Xposed thread, do you know if someone already did? I missed the steps to take to get it to work.
[Moto X Original Android Development] hiratafabio:
Thanks!

So I have to keep trying 'till it works?

Edit: tried again and now it worked. Thanks!

Enviado de meu XT1058 usando Tapatalk
[Moto X Original Android Development] Chainfire:
Yes and no.

First, keep in mind that we've had arbitrary differences between OEM devices in the wild before as well. I'm not writing an essay here where nobody will ever find it so I'm not going to detail the differences, but they are there. There's quite a bit of OEM-specific code in SuperSU to work around various limitations.

Root app devs will indeed need to be more context-aware. While an OEM can of course adjust the standard AOSP policies (as we know Samsung does), they will still generally follow the same lines.

The init context (used by su by default, because its the top user-space context) needs to be able to do quite a few things. So root-using apps can do those very same things as init. the system app or system server contexts also need to be able to do a lot of things, so if your app needs to do one of those things, using that context is pretty safe bet long-term as well.

It's not as doomsday as it all sounds (aside from the coming inability to write /system, and a dm-verity future - yikes), root app devs will need to gain some SELinux knowledge, but for most root apps adjustments will be rather trivial.
[Moto X Original Android Development] underdog1799:
I got it working on my moto x. The steps I took were exactly what jcase posted then:

1. install supersu

2. install root checker

3. Check root

4. Install xposed framework

5. Update/Install xposed framework

6. SOFT reboot

7. profit

If your device hard reboots after the soft reboot for xposed, try doing a soft reboot immediately once android boots back up. I am not sure about why that worked, but that's what happened to me, and it worked. I do still have some issues trying to install certain modules though (my phone will just freeze up and hard reboot)
[Moto X Original Android Development] zenofase:
It worked! Thanks! I swear I did those steps before without success but installed root checker this time and it worked.
[Moto X Original Android Development] roemicha:
I have searched the complete Moto X threads and can not figure out how to get adb to recognize my phone as being on online. I'm not new to adb. In the past I had a Samsung Galaxy S3 and have now moved onto the Moto X. I have install Android SDK, installed tools and platform tools within Android SDK, installed Motorola Device Drivers, and unzipped Jcases files into platform tools. I believe that I have everything set up properly to use this method. I open cmd, pull my phone into fastboot, plug in USB, and type adb devices. It finds my device and tells me it's offline. What am I missing? Any assistance would be greatly appreciated. The phone is a XT1058. Thanks.
[Moto X Original Android Development] underdog1799:
You don't need to be in fastboot for this root method... Just be in android with usb debugging turned on. Make sure to accept your computer's authentication key as well
[Moto X Original Android Development] zenofase:
So will this allow WiFi tether or does something need to be written for that to work?
[Moto X Original Android Development] underdog1799:
I don't believe it will... that is if you are doing the build.prop mod. Tethering apps that use root I think will work fine though. Might want to defer to the experts though
[Moto X Original Android Development] roemicha:
Thanks for the help. I can now get the phone to be recognized. Now I have another issue. I have unzipped the pie.jar and root.sh to both the phone's internals and to the SDK platform-tools folder and keep getting the following message "cannot stat 'pie.jar': No such file or directory. I love my Moto X, but damn is it a *****.
[Moto X Original Android Development] underdog1799:
You just need to make sure that the pie.jar and root.sh files are in the same folder as your adb.exe file.

It's basic windows function, you need to either give it the directory to the files you are going to push, or put the files in the same directory as the tool you are using to push.
[Moto X Original Android Development] zenofase:
I was receiving that too but did a check with root checker and it actually was rooted. I think it might be best to ignore the messages.

---------- Post added at 05:42 PM ---------- Previous post was at 05:37 PM ----------
[Moto X Original Android Development] roemicha:
Thanks for all the help. These communities are great.
[Moto X Original Android Development] underdog1799:
No problem, just make sure to hit the thanks button for those that helped... including jcase for releasing this exploit
[Moto X Original Android Development] cestdiego:
Thank you jcase

Thank you, Thank you,Thank you,Thank you,Thank you,Thank you,Thank you, I am finally able to use xposed framework. Just make sure you don't use classic install and that you are careful when rebooting. just soft reboot and everything should be fine.
[Moto X Original Android Development] jcase:
that means adb is not in your path, or alternatively pie is not in your current dir
[Moto X Original Android Development] abuttino:
What do you guys use for a soft reboot?

Can you do it with a shell command?
[Moto X Original Android Development] underdog1799:
I use xposed to do it, or you can install extra power options using xposed
[Moto X Original Android Development] abuttino:
How are you supposed to install xposed modules if you can't reboot?
[Moto X Original Android Development] cestdiego:
Un the closed app. In the same menu you use to install there is a soft reboot option. Use that one
[Moto X Original Android Development] abuttino:
Cool. What happens when you lose root? Do you have to install everything again?
[Moto X Original Android Development] underdog1799:
You run the script again, update/install posed, soft reboot, and everything is back