yashsingh1/xdaforums huggingface dataset:
[Moto X General] samwathegreat:
run from terminal after rooting with TR and elevating to su

then, exit, then su, then id

If you STILL get the untrusted app context, do this:

exit (de-elevate back to normal user), then type: /system/xbin/su , then ID

Do you see "Kernel" context??
[Moto X General] :
Still untrusted. I don't have a su folder in xbin.
[Moto X General] samwathegreat:
Not a su folder, but a su file... and in /system/xbin, not /xbin

OK, so you have run the pie root.sh after running TR, opening a terminal and typing su, right?

change directories to /system/xbin and do ls -la

Do you see su or daemonsu inside? If not, then PIE absolutely does NOT work when run from terminal (even with superuser privileges), and we should probably abandon this idea...
[Moto X General] chrisp6825:
So.. this may mean that executing that PIE root.sh script from the phone isn't benefiting you at all..

Is there any thing you notice change once doing that? An particular apps that won't work till you do that?

(retracted due to MY READING SKILLZ SUCK TONIGHT...)
[Moto X General] :
Yes that's what I did. Both files are there
[Moto X General] samwathegreat:
both files are in /system/xbin ????

That's great!

so exit superuser status by typing 'exit'

then type /system/xbin/su (don't change directories, just type that)

do you get su privileges? If so, type id

Kernel or Untrusted?
[Moto X General] :
Yes both files are there. When I run /system/xbin/su it just freezes terminal.
[Moto X General] samwathegreat:
Bummer!!! I was hoping that we could do this:

Root with TR, elevate to su, run PIE root.sh

Then de-elevate to normal user (exit), and run /system/xbin/su (running the PIE variant of su)

Then rm /sbin/su and rm /sbin/daemonsu (erase TR variants of su and daemonsu, leaving JUST the PIE variants)

and happily have a working PIE root without using ADB (with no TR binaries to interfere)

I wonder why it freezes the terminal? Time to abandon the idea, I guess. Interesting that running it from a TR su elevated terminal DOES yield the expected binaries in /system/xbin though. Maybe there is something more to this, but I'm out of ideas......

Thanks for trying :good:
[Moto X General] :
Any clue why its not working for some?
[Moto X General] samwathegreat:
None. We need to get someone to do a full SBF to stock, then re-try your instructions step-by-step and see if it still doesn't work.

Just process of elimination.

I DO know that anyone with a Kernel build date of June 6th 2014 or newer should NOT be able to use TR....but AFAIK, none of the Moto X variants have a build date more recent than this --- except for maybe the 4.4.4 soak testers. :confused:
[Moto X General] :
I can tell you that when I first did pie, I blindly was looking for a perm root and shot a lot of commands through terminal. Maybe it did someone. I don't know.
[Moto X General] chrisp6825:
Yea, Jan kernel build date here.

I'm planning on doing an sbf wipe tomorrow, for the sake of research :p

I glanced at the thread and noticed some similarities from fxz'ing on a bionic. I run Linux exclusively, so I need to read up first and see if I can use the same method.

Thanks for the help tonight guys. And thanks particularly to samwa, I'm not sure why you're in this thread other than curiosity, but I thank you anyways lol.

tapa'd on my moto x
[Moto X General] samwathegreat:
Curiosity, yes :) nothing more...

Also, just a thought. Just a quick read on some of Chainfire's comments seems to suggest that "daemonsu" is running as background process. Perhaps this is why [MENTION=2831641]jpond83[/MENTION] 's terminal freezes when trying to run the PIE instance of su. If we could figure out a way to terminate the TR daemonsu process, we might be able to successfully run the PIE variant.

Also, returning to stock should be quite simple, even on Linux. As long as you can find a linux variant of "mfastboot", you can follow the "manual method" in the return to stock thread. The android SDK already includes fastboot, but it can't handle flashing the Moto X "system.img" (It's too big). I know for a fact there is a MAC variant of mfastboot, so you should be able to find a Linux variant.

If you can get your hands on a Linux mfastboot, you can literally flash back to stock in just a couple minutes using the manual method. See the "Return to Stock" thread in the general sub-forum.

I remember how incredibly long it used to take my HTC incredible to flash ANY rom....the first time I did it on the Moto X, I honestly thought something had gone wrong...."There's NO WAY it flashed that quickly!??!" I thought, LOL

Anyways, good luck. Time for bed :)

EDIT: Find the linux 'mfastboot' here (I think...): http://xdaforums.com/moto-x/moto-x-qa/mfastboot-linux-t2724274/page2
[Moto X General] KidJoe:
That zip on the drop box account appears to be the one I posted at -> http://mark.cdmaforums.com/X-STUFF/Mfastboot-4.4.zip

For the record, it contains the windows, linux and mac mfastboot I had taken from the X Dev Edition 4.4.0 "factory images" (requested/downloaded from Moto's web site).

Doing an FC /b on those included in the 4.4.0 and 4.4.2 roms, they haven't changed.

That thread is a good reference for getting the Linux version working (since I don't have Linux)
[Moto X General] chrisp6825:
The binary here (from samwathegreat) links to fastboot, and describes it as fastboot, but is thrown into a discussion about obtaining mfastboot.

And yea, KidJoe linked to a zip containing the exact same file, with the same fingerprint.

Is it understood by others that the mfastboot utility I'm looking for is named just "fastboot"?

While there is also a fastboot file that apparently wont work (due to the system.img file size), this seems unnecessarily confusing.. lol
[Moto X General] samwathegreat:
You might consider giving it a shot with the "fastboot" linked by myself & KidJoe. Perhaps the linux variant of fastboot does not have the size limitation that the PC/MAC variants do.

I agree - it is confusing. Why couldn't google just code their "fastboot" like "mfastboot" which is compatible for ALL flashing needs (you can use mfastboot for everything fastboot is used for -- even though the "Return to Stock" thead suggests using fastboot for all commands except flashing system.img)?

Reading some of the relevant threads, Linux users have suggested that the linux fastboot has no issues flashing system.img.

EDIT: If that doesn't work, try the file I just attached to this post. The ZIP says "Moto Fastboot", but the file inside is just called fastboot. Reports are that it works without issue.
[Moto X General] chrisp6825:
Right, and thats what I intend to do anyways.

From my understanding, there is not a binary name "mfastboot" for linux, it is all just "fastboot"; even from the links you two posted.

I've got it all in order now though. I'm waiting on the phone to charge up and I'll start.

--- edit

lol, so now I've got 2 different fastboot binary's. The first two you guys posted were similar (exactly).

here is the info on all 3 files now:

here is the info about a few different fastboot binaries I've come across in the past 30 minutes..

[chris@Vector mfastboot]$ ls -la
total 1116
drwxr-xr-x 2 chris users 4096 Jul 20 15:15 .
drwxr-xr-x 4 chris users 4096 Jul 20 15:06 ..
-rwxr-xr-x 1 chris users 42789 Jun 1 2011 fastboot
-rwxr-xr-x 1 chris users 541322 Dec 6 2013 fastboot.1
-rw-r--r-- 1 chris users 541322 Nov 1 2013 fastboot.2
[chris@Vector mfastboot]$ md5sum fastboot.1
e13506cc4564f0aa76ee5e50628a4aa1 fastboot.1
[chris@Vector mfastboot]$ md5sum fastboot.2
e13506cc4564f0aa76ee5e50628a4aa1 fastboot.2
[chris@Vector mfastboot]$ md5sum fastboot
b2d563d0d92e6200fc793198d11f061b fastboot

[chris@Vector mfastboot]$ which fastboot
/opt/android-sdk/platform-tools/fastboot
[chris@Vector mfastboot]$ md5sum /opt/android-sdk/platform-tools/fastboot
9a3fffc0703847134ac3610603bd495a /opt/android-sdk/platform-tools/fastboot

I don't know where you got that last one from.

FYI, fastboot.1 is from http://xdaforums.com/moto-x/moto-x-qa/mfastboot-linux-t2724274/page2

fastboot.2 is from kidjoe's post http://mark.cdmaforums.com/X-STUFF/Mfastboot-4.4.zip

fastboot is your attachment

---

I know much of this is misplaced in this thread (sorry!), but something else I noticed..

Each of these fastboot binaries support the command 'getvars', which I noticed in the instructions that we need to remove a line pertaining to that in the XML file, since fastboot wont support that (step 4 of RSD steps).

So the linux binary apparently will support it..

I don't feel like being too risky/experimental at the moment, so I'm still going to follow the instructions as posted.

Just thought it was interesting is all.
[Moto X General] chrisp6825:
Ok, it is done. In case anyone is interested, here are some logs as well.

Here is a log of the SBF wipe.

Here is a log of the PIE root right after.

I then fully powered off. Powered on. Launched TowelRoot v3. Changed the temp switch to 1. 'Make it rain'.

[chris@Vector x pie root]$ adb shell
shell@ghost:/ $ su
/system/bin/sh: su: not found
127|shell@ghost:/ $

No such luck. Whatever the reason it's not working on my devices, eludes me.

My data partition was untouched after the SBF. I'm understanding this is expected, since I manually re-flashed each of the other partitions, excluding the data partition?

Also, the custom boot message (made during moto maker) was untouched as well, which kinda surprised me.

---

cache and/or dalvik-cache partitions were untouched as well : Android did not 'upgrade' during boot.
[Moto X General] samwathegreat:
So........

You didn't follow the instructions in the Return to Stock thread at all!

You missed SEVERAL of the commands.....

You SHOULD have executed these commands, in this order:

fastboot flash partition gpt.bin

fastboot flash motoboot motoboot.img

fastboot flash logo logo.bin

fastboot flash boot boot.img

fastboot flash recovery recovery.img

mfastboot flash system system.img

fastboot flash modem NON-HLOS.bin

fastboot erase modemst1

fastboot erase modemst2

fastboot flash fsg fsg.mbn

fastboot erase cache

fastboot erase userdata

fastboot erase customize

fastboot erase clogo

Red indicates the steps you failed to take...

Did you read the Return to Stock thread? http://xdaforums.com/moto-x/general/guide-moto-x-return-to-100-stock-using-t2446515
[Moto X General] chrisp6825:
uggh, I see. I did read it, quite a few times, and copied that section of instructions locally..

I managed to complete all steps, to that point, and didn't scroll down.. excuse my stupidity..
[Moto X General] samwathegreat:
No worries LOL, but I wouldn't expect a different result running towelroot since you didn't erase userdata / cache / etc...

If you happen to do it again (all steps), I'd be interested to see the results. :)
[Moto X General] chrisp6825:
Ok, here is the log, correctly this time. lol

No go for TowelRoot still.

I double and triple checked everything, but let me know if you spot anything again.
[Moto X General] samwathegreat:
Nope, that is a perfect SBF to stock.

Whatever the issue is preventing some from being able to use TR, it is beyond me :eek:
[Moto X General] chrisp6825:
I guess it's safe to say that some moto Xs wont take the TowelRoot method at all.
[MENTION=4895568]dier325[/MENTION] it may be helpful to add some info about that to the opening post, to prevent future confusion.

If anyone has any other ideas, I'll happily be a guinea pig. I'd like to one day figure this out.
[Moto X General] samwathegreat:
I agree...

In fact, I made suggestions to update the OP as well (long ago)....it never happened. I'm anxious to see if he obliges your request...

Thanks again for all your effort.
[Moto X General] chrisp6825:
Yea, and thanks for the help as well.

Now to rebuild my data partition...

I lost my custom boot message... lol
[Moto X General] samwathegreat:
If the custom boot message is important to you, you can add any message you would like (including customizing font, size, and color) by following this post:

http://www.xda-developers.com/andro...your-moto-x-boot-animation-with-bootiescreen/
[Moto X General] DogzOfWar:
What are people's overall thoughts on PIE + Towelroot and the whole process? I've seen some messages about random reboots, etc. Is this pretty stable? Are people worried about when 4.4.4 comes out? If people do have to reboot their phones (battery ran out, etc), is the process pretty reliable afterwards?

Mostly I've been hesitant to try this since I expect 4.4.4 will be out "soon", maybe a month or so.
[Moto X General] samwathegreat:
Once again, TowelRoot and PIE will definitely NOT work on any kernel build date of June 6th 2014 or later. The 4.4.4 rom is almost certain to have a build date after this. Post-June 6th Kernels are immune to the exploit used by TowelRoot, and most 4.4.3 ROMS are already immune to PIE. This means absolutely NO root unless you unlock your bootloader.

If you read through the thread, you will find that many are unable to use TowelRoot at all, with no explanation what-so-ever. Even after a complete return-to-stock, these users are still unable to use it successfully (we don't know why). From all reports, it is not very stable at all. You can give it a shot, but be prepared for the possibility it won't work at all for you.

Trying and/or using it shouldn't affect your ability to OTA to 4.4.4 in the future, but the exploits will almost certainly not work after the update.
[Moto X General] DogzOfWar:
Thanks, I really appreciate the reply. I've read through the whole thread, but it can be tough to figure out "Oh he had this problem, but is it fixed now?" Stuff like that. Especially the other Towelroot and PIE threads which are 70+ pages long.

Sounds like I'll continue to chicken out on this process and hope the Chinese middleman can somehow provide 2013 bootloader unlocks instead. I really want Gravitybox, but oh well.
[Moto X General] doitinthedirt:
Pie is full root working great on a july 2014 moto x. you just have to repie it.. run one command line on adb if you reboot it.. but if you dont reboot you are full root. cant you install gbox using Pie alone?

I never got towelroot to do anything... verses Pie is great.. complete root.. but temporary and has to be run again if you reboot
[Moto X General] samwathegreat:
He's concerned about the upcoming 4.4.4 OTA....

Once on 4.4.4, your delicious PIE will SPOIL and be completely in-edible :p
[Moto X General] doitinthedirt:
o.. ok.. i just wont update.. have to have root to work hotspot with unlimited data plan on veri$on.
[Moto X General] GS4privileged:
Guys has anything been updated with towel root yet I just rooted using towel root on my att galaxy s4 4.4.2 on nc1 what do I need to do now after I've rooted? Do I still need to use pie or has stuff change since this root was found? And how can I do all of this thank you guys
[Moto X General] iKrYpToNiTe:
It's not completely certain a kernel built after June 6th will have the futex vuln patched but it's highly likely. A full futex patch wasn't released until a couple days after the vuln was leaked. Also we all know how lazy oem's can be when it comes to patching vuln's, shoot look at the lg g3 root. When jcase posted about the g3's root on his g+ I was literally smh lol. So y'all need to pray, knock on wood, whatever you want that Moto didn't patch the futex vuln in the 4.4.4 update.
[Moto X General] samwathegreat:
Thanks [MENTION=4850320]iKrYpToNiTe[/MENTION] I always enjoy your insightful wisdom :p

Shouldn't be hard to find out!!! The 4.4.4 roll-out has started for some Xs, so all we need is for someone on 4.4.4 to try it out! I'm anxious to see, but not too hopeful....many are unable to use TR even on 4.4.2....

EDIT: Also, since TR requires PIE to be applied FIRST on the X, I'm wondering if it will even matter.... We know for sure that the PIE exploit is patched on 4.4.4, so maybe it's a moot point?

---------- Post added at 10:59 PM ---------- Previous post was at 10:23 PM ----------

Your attention please ---

This is a Public Service Announcement / Word of Wisdom to the Wise:

All of you with locked bootloaders, who have been enjoying jcase's scrumptious PIE ---

Take note that if you take the plunge to Android 4.4.4, you will find that your once-delicious PIE is now SPOILED! You will PERMANENTLY lose root, forever, unless:

1. You unlock your bootloader

2. Another exploit is found (extremely unlikely, at best)

3. By some grace of god the Futex flaw (used by TowelRoot) hasn't been patched, AND we find a way around HAVING to run PIE first...

Keep this in mind BEFORE you blindly jump on the 4.4.4 bandwagon, if ROOT is important to you.

For those of you who "don't get it": the vulnerability that was exploited by jcase's PIE root method is patched on 4.4.4. This new android version is therefore completely immune to PIE.

And finally, for the "Visual Learners" amongst us:

[IMG="spoiled pie"]http://s7c.info/spoiledpie.gif[/IMG]
[Moto X General] :
Figured it out. The V3 version of towelroot on the towelroot website is crap. He must have replaced it with a non working version since he works for google now. That is 100% the issue. I factory reset my phone to see if it would work since others were having issues. Downloaded tr from the site. Didn't work. Spent all night trying to figure it out. Used a backup of the v3 that use to be on his site and it worked. Md5 checks shows different files. This copy works

http://adbtoolkit.com/rooting/apk/TowelRoot/tr3.apk

I'm sure I'm not suppose to post links but his site no longer offers a working version. Use this and follow my directions.
[Moto X General] matthebe:
This copy worked on my phone when the "official" copy didn't.
[Moto X General] :
Great. I been racking my brain as to why it won't work for people. This is a official version. He took this one off and replaced it with one that doesn't work. Doesn't surprise me. It wouldn't be the first time he sold out.
[Moto X General] doitinthedirt:
trying to doownload your tr3 file and google warns maleware... the tr file from towel site doesnt do that..
[Moto X General] :
Yes it's a virus a big bad one. But really, not sure why. Didn't do it for me. Scan it I'm sure it's safe. The md5 matched up with the original v3 I got from the towelroot site a while back ago.

[MENTION=2509024]samwathegreat[/MENTION] , can you confirm this working for you also?
[Moto X General] doitinthedirt:
I believe you about the virus but google is having hell with it.. wonder if there is something on your computer you dont know of?
[Moto X General] samwathegreat:
Doubtful. I've had this issue on chrome before. Try downloading with Firefox or IE instead.

EDIT: Google / Chrome also believes that the STOCK, FLASHABLE 4.4.3 TMO ROM has a virus.... Figure that one out :p
[Moto X General] samwathegreat:
Sorry, I have an unlocked device. I've just been trying to help "you guys" (locked BL) out since I have decent Linux skills/knowledge :)
[Moto X General] :
Oh well thanks. Now that its figured out you can trade me [emoji12]
[Moto X General] samwathegreat:
Haha! Sorry, I guarantee you can't use my device on your carrier. I'm on RW.

Anyways, I just happen to have a little "inside info"....

You guys *might* be getting a surprise/present from one of our awesome developers soon that *might* make root-life easier/better for you.

That's all I can say... :silly: We will have to wait and see...
[Moto X General] chrisp6825:
Son of a b****. Works here too..

That really pisses me off, cause that was my first suspect. I pm'd the OP asking for him to send me the copy and he (assumed I was a dumb ass and) pointed me to towelroot.com...

Thanks for this.

---

I would like to call [MENTION=4895568]dier325[/MENTION] to yet again update the OP, to now include this copy of the apk. Also along with this md5sum : 2ee349f8087c8a69db101c4086460e14

It would be much appreciated, and very useful to others.

tapa'd on my moto x
[Moto X General] samwathegreat:
Not meaning to say anything negative, but the OP doesn't seem to be the least bit interested in doing anything. Perhaps he is very busy, but he has ignored multiple requests (over a long time-span) to add/edit any information in the OP... :confused:

Although XDA shows he logged in as recently as 30 minutes ago, he hasn't posted anything in over 2 weeks.

If what I said earlier comes true soon, we will have a NEW thread, anyways. So maybe a moot-point...

I'm irritated as well. I wasted SEVERAL HOURS trying to assist with this, and we even went so far as to have you SBF to stock (which was COMPLETELY unnecessary, in light of these recent findings...)
[Moto X General] chrisp6825:
Agreed.

Also, about the virus/malicious warnings : This is a very widely available root exploit. Meaning, many devices are vulnerable to it and will allow it to give you root permissions. Of course Google is going to flag this files signature as such. In reality, it is a 'virus'/malicious.

If such a root method worked on my other *nix machines, I'd be very troubled and pressed to patch it ASAP.

Though, this case is being used to root android devices on ARM architectures. There's no easy way to tell if it does any more than that, but that's all it need to be able to do in order to be considered a breech in security.

All that aside, the copy jpond83 posted does indeed work and root (my) moto x.

---

I was needing to read up and prepare for it anyways, just in case one day... ;)

Unfortunately, I didn't follow all the directions the first time. Fortunately, it wasn't a destructive mistake, and I re-did it correctly after you pointed it out. Otherwise, I may have thought my phone was also impervious to SBF flashing.. lolol
[Moto X General] :
Well this post will be obsolete soon anyways. I located what you were talking about earlier. It works pretty good.
[Moto X General] samwathegreat:
Does it yield the expected su context? I didn't realize anyone else had access to it yet...
[Moto X General] :
I haven't messed with it much but no need to root every reboot.
[Moto X General] samwathegreat:
Fantastic! So at least -that- part of it works. When you have a hot second, open a terminal (after having used it), and "su", then "id". Which context?
[Moto X General] :
Kernel:s0
[Moto X General] samwathegreat:
YES!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SUCCESS :) :good: :highfive:

The Developer responsible for this (I will let HIM take the glory and create the new thread, and release it - as it should be) IS A FREAKIN' GENIUS!

For anyone who doesn't know: This means we no longer have to use TETHERED PIE to root, AND we can use apps like TiBu that won't work with the current implementation of Towel Root!!!!
[Moto X General] :
Yea its pretty good. Im pretty good at locating things when i feel like it. My mouth is shut.
[Moto X General] chrisp6825:
ugh. lol
[Moto X General] samwathegreat:
Worry not. If [MENTION=2831641]jpond83[/MENTION] is correct, DOES have access to it, and has quoted the correct context (I have no reason to doubt him), you will have access to it VERY soon :)
[Moto X General] doitinthedirt:
What exactly does this mean? I am familiar with Pie.. Does this version of TR do everything Pie does? Does it do more than Pie.. other than obvious running from within the phone?
[Moto X General] samwathegreat:
Yes.

You will probably find out soon enough. I expect a new thread will be made soon covering all the details, and we can put THIS thread to rest.
[Moto X General] PeterDLai:
Is this method going to be rendered useless in 4.4.4 as well?
[Moto X General] samwathegreat:
Almost definitely.
[Moto X General] iKrYpToNiTe:
Here is the new thread everybody TowelPieRoot, Enjoy :D