[HOWTO] n4root - Root your Nexus 4 [ROOT, BUSYBOX, SU] - Nexus 4 Android Development

n4root - Nexus 4 rooting application​by @Complex360 (cyr0s on XDA-Developers)​
THIS HAS NOT BEEN TESTED. BEFORE USING THIS, YOU ACKNOWLEDGE THAT IT COULD POTENTIALLY HARM YOUR DEVICE.
If there is a bug or issue you've found, post it here or preferably PM me.
(If this tool works for you, please comment below so I can remove the obnoxious banner about reliability)
​
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Description:
Sadly, I was unable to get my hands on a Nexus 4, regardless, it's a bloody awesome device and anyone lucky enough to own one deserves a quick and easy rooting method. This is it.
This uses the insecure boot.img method
1) Unlocks Bootloader
2) Boots with insecure boot.img (root access)
3) Installs Busybox
4) Installs SuperUser and su binary
If you've already unlocked the bootloader in anticipation for rooting solutions, you can just go through the bootloader stage, the application assumes you're telling the truth, regardless of whether you are.
Changelog:
Code:
V1.2 ([URL="https://github.com/compl3x/android/commit/3522237659aaf790e9cbd23df43aa354d950a42a"]1[/URL]) [URL="https://github.com/compl3x/android/commit/9bd487fa73fd650e4a61a020c9161d3f71f0512c"](2)[/URL] - Merged improvements of Kumouri
[URL="https://github.com/compl3x/android/tree/8b264c1b693452abfc6b6a70aa40f47071a6b1ab"]V1.1[/URL] - Fixed boot.img freeze bug
V1.0 - Initial release
Alas, it is here that I must shake my digital, Github markdown formatted donation box.
If this has worked where the needlessly convoluted alternatives didn't, please consider donating to me via Paypal:
Feeling generous?
DOWNLOAD || GITHUB​

If this tool works for you, please comment below so I can remove the obnoxious banner about reliability

Due to the I guess you could say availability of this phone, I would need somebody to test this out before using it... Really don't want to turn the wonderful N4 into a really good paper weight.
Sent from my Nexus 4 using xda premium

Well, its using the tried and tested method manually posted earlier in this section, I mean more if there was an error with the actual application

Are there any instructions for how to use this?

zander145 said:
Due to the I guess you could say availability of this phone, I would need somebody to test this out before using it... Really don't want to turn the wonderful N4 into a really good paper weight.
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Just look at it. There's nothing in there that could brick the phone.

The application will guide you through how to do it .
Sent from my HTC One X using xda app-developers app

How do you install su binary?

Thanks for the work. I'll try it after I get me Nexus 4.

I'll test it when/if I manage to get a Nexus 4 from an O2 store later today.
--
Bootloader unlocked fine using the program, although I had a bit of trouble rooting the phone with it. I'm not sure what happened, it just didn't root and I wasn't sure how to get back to that stage in the prompt again without going through the bootloader process again. Ultimately I gave up and rooted it myself.

Testing today after I get off from work thanks ! I'll make sure to donate as well !
Sent from my Nexus 4 using xda premium

p5f said:
Are there any instructions for how to use this?
Click to expand...
Click to collapse
F4M0U569 said:
How do you install su binary?
Click to expand...
Click to collapse
Just run the application, it'll do everything for you.
iHarkunwar said:
Thanks for the work. I'll try it after I get me Nexus 4.
Click to expand...
Click to collapse
Thanks mate, please report back how it went.
OverTheBelow said:
I'll test it when/if I manage to get a Nexus 4 from an O2 store later today.
--
Bootloader unlocked fine using the program, although I had a bit of trouble rooting the phone with it. I'm not sure what happened, it just didn't root and I wasn't sure how to get back to that stage in the prompt again without going through the bootloader process again. Ultimately I gave up and rooted it myself.
Click to expand...
Click to collapse
Odd, did you save the output? it should' have sorted root out. Btw, bootloader stuff assumes you're telling the truth, you could have just skipped it.
VictorNYC said:
Testing today after I get off from work thanks ! I'll make sure to donate as well !
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Thanks! I look forward to the donation or angry messages depending on your success

Yeah, I tried skipping through it but it wouldn't let me get past the "Attempting to unlock bootloader (when a prompt appears press YES)" bit regardless of what I did. That was after I had already unlocked the bootloader using it previously.
Great effort nonetheless, I'm sure others will get it to work. I was a tad impatient tbh because I was so excited to get the phone set up.

I'm gonna try it soon. I'll let you know. I haven't tried unlocking the boot loader, so this should be a good practice run.

This is not working for me.
It works up to the "Booting into insecure boot.img", but once it gets there it never reboots and when I manually reboot it nothing happens. There is no su binary or busybox when I manually reboot.
Thanks for the help unlocking the bootloader, though

Kumouri said:
This is not working for me.
It works up to the "Booting into insecure boot.img", but once it gets there it never reboots and when I manually reboot it nothing happens. There is no su binary or busybox when I manually reboot.
Thanks for the help unlocking the bootloader, though
Click to expand...
Click to collapse
Thanks for saying exacting where it failed, I think I've fixed the issue (tool was waiting for fastboot to do something it'd never do)
If anyone can test now, please do
-Fixed boot.img freeze bug​

Well it still isn't working.
I looked through your code and everything seems in order, more or less, although I would change "Booting into insecure boot.img" to "Loading insecure boot.img." and then when it is done "Reboot phone now."
I tried rebooting using "fastboot reboot" (from a command prompt) but it said "<waiting for device>" even after the phone had completely loaded. I assume this is the line you took out.
Assuming there is a way to get the phone to reboot from fastboot, then I think it should be all good.
For some reason it did not correctly load Superuser or any of that, though. I ended up doing it manually from the commands in your code and that seems that have worked (although not for busybox ).
I'll look through your code some more tomorrow, but I have 2 programs and a test due in the next 2 days (Yay CSC major ), so I'm not sure how much time I'll have. On Wednesday, though, I might write up a little C# GUI to go along with this if you don't have a problem with it
Thanks for everything!
---------- Post added at 02:22 AM ---------- Previous post was at 02:19 AM ----------
Kumouri said:
I tried rebooting using "fastboot reboot" (from a command prompt) but it said "<waiting for device>" even after the phone had completely loaded. I assume this is the line you took out.
Click to expand...
Click to collapse
I just tried it again one more time before I went to sleep and that seemed to have worked perfectly fine. I'm going to make a couple of quick changes and see what happens.

cyr0s said:
n4root - Nexus 4 rooting application​by @Complex360 (cyr0s on XDA-Developers)​
THIS HAS NOT BEEN TESTED. BEFORE USING THIS, YOU ACKNOWLEDGE THAT IT COULD POTENTIALLY HARM YOUR DEVICE.
If there is a bug or issue you've found, post it here or preferably PM me.
(If this tool works for you, please comment below so I can remove the obnoxious banner about reliability)
​
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Description:
Sadly, I was unable to get my hands on a Nexus 4, regardless, it's a bloody awesome device and anyone lucky enough to own one deserves a quick and easy rooting method. This is it.
This uses the insecure boot.img method
1) Unlocks Bootloader
2) Boots with insecure boot.img (root access)
3) Installs Busybox
4) Installs SuperUser and su binary
If you've already unlocked the bootloader in anticipation for rooting solutions, you can just go through the bootloader stage, the application assumes you're telling the truth, regardless of whether you are.
Changelog:
Code:
[URL="https://github.com/compl3x/android/tree/8b264c1b693452abfc6b6a70aa40f47071a6b1ab"]V1.1[/URL] - Fixed boot.img freeze bug
V1.0 - Initial release
Alas, it is here that I must shake my digital, Github markdown formatted donation box.
If this has worked where the needlessly convoluted alternatives didn't, please consider donating to me via Paypal:
Feeling generous?
DOWNLOAD || GITHUB​
Click to expand...
Click to collapse
Umm...sorry if i am noob
But where can i flash it or do with it
Thabks
Sent from my GT-N7000 using xda premium

Okay, I think I have gotten it working, although I am not sure if busybox installed correctly. There seemed to be a typo in that line, it was "busybox -- install" instead of "busybox --install". I could be wrong about it being a typo, but Windows and Android (tried it from cmd and in a shell) both complained about it
I will message you the modified code so I don't screw up anyone's device on accident. You can look through it and let me know if there are any problems or modify it yourself. It is your code, after all
Cheers
---------- Post added at 02:58 AM ---------- Previous post was at 02:51 AM ----------
Androidclub said:
Umm...sorry if i am noob
But where can i flash it or do with it
Thabks
Sent from my GT-N7000 using xda premium
Click to expand...
Click to collapse
All you have to do is download the zip file on the first page (There is a huge DOWNLOAD button at the bottom of the first post), and download n4root-windows.zip from the good man's github account.
Then you extract the files and run "n4root.exe".
There are a couple of bugs right now, though, so I would wait until the OP updates

Kumouri said:
Okay, I think I have gotten it working, although I am not sure if busybox installed correctly. There seemed to be a typo in that line, it was "busybox -- install" instead of "busybox --install". I could be wrong about it being a typo, but Windows and Android (tried it from cmd and in a shell) both complained about it
I will message you the modified code so I don't screw up anyone's device on accident. You can look through it and let me know if there are any problems or modify it yourself. It is your code, after all
Click to expand...
Click to collapse
Ah What a good set of eyes you have! I've pushed your modifications (and added brackets )
BTW, good luck with tests and sure, I have no problem with you making a GUI of this (stick on github so I can fork)
V1.2 (1) (2) - Merged improvements of Kumouri​

Related

[SOLVED] Stock 4.2.1 upgrade failed.

I've bought my son and daughter a nexus 7 each for Christmas.
His upgraded over the air fine, hers downloaded the firmware, rebooted and the installation started.
After a couple of minutes the Android fell over with a red exclamation mark.
I've tried forcing the upgrade and the same happened.
Any ideas how to upgrade her nexus 7?
Thanks
Fastboot mode is working ?
Sent from my GT-I9100 using xda premium
I've not tried it.
How do I try it?
Assuming it's ok, does that help with upgrading?
Any issue truing fast boot mode?
Any ideas? Or will it need replacing?
Factory reset and try again
Sent from my Nexus 7
I have the same problem.
Hey guys,
I made an account just to post this, however it was all done my G2 so I apologize for poor formatting and/or not completely clear instructions. This issue has kept me up for hours upon hours, and I finally figured out how to fix it. The issue apparently has something to do with the way the Nexus was formatted, prohibiting the update from working. Google/Asus support have been useless regarding the issue which is a very simple fix just requiring the user to reflash the N7 with a stock image. It has been confirmed working by not just me but other people on the reddit nexus 7 board. Here is what I did (copy/pasted from my reddit thread):
---------------------------------------------------------------------------------------------------------------------
There are two methods to fix this, an in depth method, and an easy and quick method. My first time I used the in depth, but I tested this with the easy method too so I'll just post that. I'm on a cell phone so I'm not going into the in depth method - I'm posting this so hopefully the other people like me who got this on Christmas won't have to return it.
----------------
For the quick and easy method, download Wug's toolkit here:
(google this, forums wont let me post links until I reach 10 posts)
Run the driver install guide, making sure to follow the parts about uninstalling previous drivers. Follow this to a T. Next, unlock your bootloader. Its painless and takes seconds. Next, go here and download your Nexus specific update.
(Find this on google developer site, you can google it too - forums wont let me post links - also make sure its 4.2.1)
Click on the "back to stock + unroot" -- we never rooted, but just do this. Select other/browse and browse to the image you downloaded. Flash this. You WILL fail on three files - it says something like recovery.sig failed - it will do it for two other .sig files. This is fine. Let it do its thing. A few minutes later your android will boot up. Log in, and go to settings. Click about tablet. Click on build number like 10 times, until it tells you developer options unlocked. Go into developer options and enable USB debugging. Now, go back to Wugs toolkit and lock the bootloader. There you have it, an updated nexus running stock everything, and locked so your warranty is not void.
----------------------------------------------------------------------------------------------------------------------------
This was a very sloppy guide put together on my cell phone. Any questions just post and I'll do my best to get back to you. Goodluck!
Hi.
Thanks for the reply.
Just wondering if there is an easier way to do this.
I'm not comfortable flashing a new device.
What was the suggestion about fast boot?
Thanks
albert_htc said:
Hi.
Thanks for the reply.
Just wondering if there is an easier way to do this.
I'm not comfortable flashing a new device.
What was the suggestion about fast boot?
Thanks
Click to expand...
Click to collapse
This is definitely the easiest way for you to fix your problems. The risk of your device becoming unusable is practically none. This is the beauty of nexus devices, Google provides official factory reset ROMs for you to flash in these sorts of situations. You can either use Wugs or mskip's tookit as advised to automate the process (fastboot commands used to flash the recovery image, fastboot commands are simply used to flash it to your device) or you can use fastboot to flash it yourself manually (still very easy)
I would 100% do this to fix your device. Don't be scared! This is the official way of fixing a nexus device when it doesn't function.
Thanks.
I'm trying this now.
I've uninstalled all previous drivers, and it's updated to an 'Android Phone -> Android Composite ADB Interface'
I've clicked the Reboot BootLoader Button.. and nothing happens on the tablet.
This was trying with the #3 driver option.
I'm now trying driver #2 !!
Another quick question...
Once all this is done, will I have issues with it in the future, or should this resolve future updates.?
albert_htc said:
Another quick question...
Once all this is done, will I have issues with it in the future, or should this resolve future updates.?
Click to expand...
Click to collapse
I'm not certain about the driver issues because I don't use Wug's toolkit, sorry!
However, when you get this completed, it should solve this problem in the future.
I've had to go with option 1 for the drivers..
but it's done and working
One thing I did have to do after unlocking the boot loader was reset up on the wifi and re enable USB debugging before I could continue.
all sorted thanks
albert_htc said:
Thanks.
I'm trying this now.
I've uninstalled all previous drivers, and it's updated to an 'Android Phone -> Android Composite ADB Interface'
I've clicked the Reboot BootLoader Button.. and nothing happens on the tablet.
This was trying with the #3 driver option.
I'm now trying driver #2 !!
Click to expand...
Click to collapse
Let us know how it comes out and if there's problems, exactly where you're hitting the problem. I will try to help you out and later today I could probably get on team viewer and help you figure the drivers out.
Sent from my Nexus 7 using Tapatalk HD
Hi CharliesTheMan..
It's working. Had to use option 1 for the drivers.. but its updated and working
Thanks
Glad it worked out!
Sent from my Nexus 7 using Tapatalk HD

[Q] bionic jb 98.72.22 su binary help! root access?

So from the beginning I updated from notification on phone from 4.0.4 to 4.1.2. Then bricked after trying to gain root acess. Finally able to flash jb 98.72.22. Tried for days to find a root that worked. Couldn't get motochopper to gain root. Tried god knows how many others. Finally got virtual box, imported Root_Bionic_JB.ova and still wouldn't work. Keep coming across su binary issues. The closest i got was with the virtual box installing superuser. But when I trying to update the binary says unable and to send a log report. What am i doing wrong? is it a step im missing when unzipping to desktop? everything goes smooth until cmd gets to rooting, then says failed. cleaning. press enter to reboot and close. Im about to lose my mind! Please some assistance. I sick of failing every attempt from every suggest forum (quietly sobbing )
You need to go back to what has been proven to work. Moto chopper 2. Not to be insulting BUT I know from experience, just BC you can't get something to work the first couple of times you try it doesn't mean it does not work. Period. Now, where did you get hung up on the Ubuntu exploit? List all that you did.
Sent from my XT875 using xda premium
linux minimal screen shot, and unbuntu hang up
DanRyan85 said:
You need to go back to what has been proven to work. Moto chopper 2. Not to be insulting BUT I know from experience, just BC you can't get something to work the first couple of times you try it doesn't mean it does not work. Period. Now, where did you get hung up on the Ubuntu exploit? List all that you did.
Sent from my XT875 using xda premium
Click to expand...
Click to collapse
Well, not to be insulting, but it was my understanding that moto chopper would only work if temp rooted or had gained root acess previously? I may be wrong. Anyways, the prob. with unbuntu is thing i guess froze (but still ran) after patiently running it like six hours. Last screen at was installing-reinstalling previous "somethings" but I figured need a system clean and would try again. gotta be easier way. so here is my linux minimal screenshot attempt. running root bionic jb ovf file. noticed where it starting going wrong is
chmod: pwn: operation not permitted.
rooting phone...
phone may appear to.......
/system/bin/sh: /storage/rfs0/pwn: not found <-------Right here i noticed the file path on the phone and it's ---> storage/rfs1 Would that have something to do w/ it?
nothing ever vibrates and reboots in flash. got bad flash or something?
MotoChopper works on non TI (OMAP) CPus that are in Motoroal devices.
Coincidentally, it also works on ASUS Tranformer Infinity (and the Prime as well, IIRC).
It does not work on the BIONIC.
The method that works on rooting the JB build on the BIONIC is one that is based upon the older RAZR method - see http://www.droidrzr.com/index.php/topic/16518-root-motoshare-2-old-bug-new-exploit/
Bionic and JB OVA flash superuser binary outdated
Naughtybutbritt said:
So from the beginning I updated from notification on phone from 4.0.4 to 4.1.2. Then bricked after trying to gain root acess. Finally able to flash jb 98.72.22. Tried for days to find a root that worked. Couldn't get motochopper to gain root. Tried god knows how many others. Finally got virtual box, imported Root_Bionic_JB.ova and still wouldn't work. Keep coming across su binary issues. The closest i got was with the virtual box installing superuser. But when I trying to update the binary says unable and to send a log report. What am i doing wrong? is it a step im missing when unzipping to desktop? everything goes smooth until cmd gets to rooting, then says failed. cleaning. press enter to reboot and close. Im about to lose my mind! Please some assistance. I sick of failing every attempt from every suggest forum (quietly sobbing )
Click to expand...
Click to collapse
I am having same issue. Using Marty OVA in virtual box. works great, no issues w/ samba or USB. Root is successfully run. however.
root checker indicated that I am not rooted and as mentioned above, superuser needs to update the binaries.
" the Superuser binary (su) must be updated
please choose an installation method
recovery mode installation is recommended for HTC devices.
Cancel <> Recovery Install<> Install
hit install
there was an error installing superuser. Please send a log of the error to the developer.
<ok>
wonder if I could replace the superuser.adk file in the /home/guest/share directory with a newer adk file?
could not get post on droidrzr.com on a thread there. ( link not permitted by Noobs )
Marty45714 informed us He posted this here as well. can anyone answer this?
T
To Naughty: Sorry about the mix up that was what I meant to say Moto share 2 NOT Motochopper. I had all the same problems as you after some number of tries with motoshare2 I was in business.
To martin: have you already tried the motoshare 2 on Ubuntu?
Sent from my XT875 using xda premium
toddmartin- you're gonna love me...i gotcha
toddmartin said:
I am having same issue. Using Marty OVA in virtual box. works great, no issues w/ samba or USB. Root is successfully run. however.
root checker indicated that I am not rooted and as mentioned above, superuser needs to update the binaries.
" the Superuser binary (su) must be updated
please choose an installation method
recovery mode installation is recommended for HTC devices.
Cancel <> Recovery Install<> Install
hit install
there was an error installing superuser. Please send a log of the error to the developer.
<ok>
wonder if I could replace the superuser.adk file in the /home/guest/share directory with a newer adk file?
could not get post on droidrzr.com on a thread there. ( link not permitted by Noobs )
Marty45714 informed us He posted this here as well. can anyone answer this?
T
Click to expand...
Click to collapse
Ok so using virtual box the ova Root_Bionic_JB_20130501-4 the fourth ubdate of the orginal release. Now i suggest erasing all superuser apps installed your self and anything to do with them. When it's done right, it will appear on it's own and work flawlessly. No uncertianties about it. Then i've posted a screen shot of the commands with notes to help understand easiest. The instant the command to press hardware key or power/or each volume itself is the instant you want to press it. Now the reboot is instantious kinda itself and gotta be noticing phone unless have ungodly long boot up let me know if the screen shot helped what you were asking.

App that runs the 2 Pie root commands from the phone

since the phone maintains the 2 pushed files on the phone after reboot, is it possible to make an app that can be run from the phone itself to run the two adb commands of Pie root that do the rooting?
Well Google now doesn't work worth an iPhone. .I've spoken those last two lines ADB shell commands out loud for the past 15 minutes and I don't get root
You cannot do it from the phone. That method lacks sufficient permissions
Sent from my XT1058 using XDA Free mobile app
Neighbor808 said:
You cannot do it from the phone. That method lacks sufficient permissions
Sent from my XT1058 using XDA Free mobile app
Click to expand...
Click to collapse
I'm starting to believe you....
doitinthedirt said:
I'm starting to believe you....
Click to expand...
Click to collapse
We KNOW that the commands MUST be run from ADB (and not from a SHELL, as your screenshot shows you have tried).....
But before we discount the idea completely, perhaps an experienced DEV could commend on this possibility:
Guys, have a look at this thread regarding running adb commands (through adb wireless) from another android device:
http://androidforums.com/android-applications/783226-run-adb-shell-another-android-phone.html
See the last 2 posts. This user successfully connected one android device to another via WiFi and was able to run adb commands.
Now first, I know that "ADB Wireless" requires root access, however there are 2 non-root variants aptly called "ADB Wireless (No Root)" -- see the play store.
Having read up on those specific apps, I've found that they require you to first connect the USB cable to the PC, and run an adb command to activate ADB over WiFi. What I'm not sure about is if you must do this each time the phone is rebooted. If not, then we have the possibility to actually run adb commands through TCP/IP possibly from the phone itself.
Consider the possibility of using the loop-back address...for instance: adb connect 127.0.0.1 in order to achieve a connection to the device itself.
If the adb command to activate adbwireless on non-rooted devices must be run each time the phone is rebooted, then this solution is probably going to go nowhere....but its worth checking out nonetheless....
We would definitely need a working adb binary for the Moto X in order for this to be possible at all.
See this link: http://forums.androidcentral.com/be...ol-native-adb-fastboot-your-phone-tablet.html
This user has repacked the adb and fastboot binaries (called "kadb" and "kfastboot") so they can be run on an android device itself. The intention is to use USB-OTG to connect another android device and run adb commands on the connected device.
^^ This definitely shows that it is possible to at least run adb commands from another android device connected via USB-OTG.
I know that many users are looking for a way to use PIE without having to connect to the PC after each reboot, hence the reason the "TowelRoot" app has had so much interest...
Unfortunately, TowelRoot has inherent limitations, because of the SU context (Non--Trusted App) as I understand. Several of us (myself included) have attempted to reach out to the developer for comment as to why this SU context is being used, and whether or not it can be modified to use the "Kernel" SU context that jcase is using with PIE, but none of us have received a response....
Do any experienced DEVS care to comment on the possibility of using the methods I have described, or something similar?
EDIT: Also, @doitinthedirt : have you tried to unlock your bootloader via the middleman? Or do you have a 2013 variant that he can not access the code for? The BL unlock solution is far superior to any of these temp-root methods, and it is permanent. (disregard if you already know this and are unable to obtain a code...)
I was running those commands from the same phone.. it was on a wifi network only to access internet. i used an app https://play.google.com/store/apps/details?id=com.spartacusrex.spartacuside
Only had about 10 minutes to mess around with it.. going to experiment more tonight.. and another app https://play.google.com/store/apps/details?id=jackpal.androidterm
The wireless from my nexus 7 was going to be my next try if i I couldnt get anywhere running from phone itself. And no I have not tried the middleman.. phone is july 3 2014 make so going to send a paypal to him and see if i get a code to unlock.
Getting nowhere..
doitinthedirt said:
Getting nowhere..
Click to expand...
Click to collapse
I appreciate your enthusiasm, but you are still trying to run the commands from a terminal SHELL. We -know- that this won't work. I'm not sure you understand what I was trying to express in my earlier post. I will attempt to experiment with the kadb binary, but you shouldn't continue trying to do this from ANY terminal emulator - it simply won't work, as @Neighbor808 has correctly advised...
Both of the apps you have linked ARE terminal emulators (hence running from SHELL).
If an experienced DEV could read my post, they might be able to comment further.
EDIT: I believe this is a lost cause:
From the dev who compiled the kadb binary: "Note : You do not need to be rooted, you do however need a custom recovery or temp boot a custom recovery."
This means that it should -absolutely- work for those of us who are unlocked, but definitely not temp-rooted.
Additionally, the AdbWireless method seems to fall short as well. It will probably work, but only if you connect to your PC first to run an ADB command to activate adb over WiFi, which defeats the whole idea of not having to use a PC.
The only method that IS viable for those of you using PIE, is the USB-OTG method. If you have ANOTHER android device (NOT your X) that:
1. has custom recovery
and
2. supports USB-OTG
Then you could purchase a USB-OTG cable, install the flashable zip containing the kadb and kfastboot binaries from the post I linked earlier, and run the ADB commands FROM the 2nd device.
This may be an option for you. Assuming you have installed custom recovery on your Nexus 7 (it definitely supports USB-OTG), you should be able to install the flashable zip, and run the commands from your Nexus 7 (just like you would from a PC, except using the command "kadb" instead of "adb".....i.e.:
kadb shell chmod 755 /data/local/atvc/root.sh
kadb shell /data/local/atvc/root.sh
I see no reason that this would not work....all the other methods I suggested have been eliminated as possibilities during my research/testing.
I don't, however, see how this is any better than simply connecting to your pc and running the adb commands the traditional way.
Good Luck
---------- Post added at 02:48 AM ---------- Previous post was at 02:19 AM ----------
doitinthedirt said:
Well Google now doesn't work worth an iPhone. .I've spoken those last two lines ADB shell commands out loud for the past 15 minutes and I don't get root
Click to expand...
Click to collapse
Oh wow! I missed this post. You are joking, right? You've --spoken-- the commands to Google Now?!?! LMFAO + ROFL + LOL....I just can't find a way to express just how humorous this post is
Good One :silly:
Use towel root if your trying to root from your phone.
Sent from my XT1058 using XDA Premium 4 mobile app
Thanks Sir, towelroot does not root my moto X
[email protected] said:
Use towel root if your trying to root from your phone.
Sent from my XT1058 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
This:
samwathegreat said:
I know that many users are looking for a way to use PIE without having to connect to the PC after each reboot, hence the reason the "TowelRoot" app has had so much interest...
Unfortunately, TowelRoot has inherent limitations, because of the SU context (Non--Trusted App) as I understand. Several of us (myself included) have attempted to reach out to the developer for comment as to why this SU context is being used, and whether or not it can be modified to use the "Kernel" SU context that jcase is using with PIE, but none of us have received a response....
Click to expand...
Click to collapse
samwathegreat said:
This:
Click to expand...
Click to collapse
Oh yeah? What about this?
Sent from my XT1058 using XDA Premium 4 mobile app
[email protected] said:
Oh yeah? What about this?
Sent from my XT1058 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Um... Pointing out the inherent limitations of the towel root and why it doesn't work for many and causes issues for others. I'm going to assume that because you are using the XDA app, you didn't see the quote attached to my post, but if you view it in a browser you should understand the point I was making...
I'm glad that towel root is actually working for you. Are you experiencing the random reboots?
[email protected] said:
Use towel root if your trying to root from your phone.
Sent from my XT1058 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
towel root will not work on the motoX
it doesn't work for Him I get that same screen saying you should have root but if he would bother checking with file explorer root access he will find out he doesn't have root
yamaha83 said:
towel root will not work on the motoX
Click to expand...
Click to collapse
Not entirely accurate. Some have managed to use after rooting with PIE, but it does cause issues for many and (once again) has inherent limitations due to the SU context being used.
---------- Post added at 02:26 PM ---------- Previous post was at 02:22 PM ----------
doitinthedirt said:
it doesn't work for Him I get that same screen saying you should have root but if he would bother checking with file explorer root access he will find out he doesn't have root
Click to expand...
Click to collapse
I don't think hovax is foolish enough to mistakenly believe he has root when he does not lol. He has obviously managed to get it to work for him, as have many others. I am curious if he is experiencing the problems that many others are with towel root, however.
a simple screenshot showing root access in system folder like this one from my other moto x running ios 4.4 rooted with slap, that will convince me
doitinthedirt said:
is it possible to make an app that can be run from the phone itself to run the two adb commands of Pie root that do the rooting?
Click to expand...
Click to collapse
If it was possible, I would have thought JCASE would have released it that way, instead of having to do the process while connected to the PC.
doitinthedirt said:
a simple screenshot showing root access in system folder like this one from my other moto x running ios 4.4 rooted with slap, that will convince me
Click to expand...
Click to collapse
You have to realize that many users including hovax are much more experienced than you seem to be. All the proof you should need is located in the towel root discussion thread.
Remember: you were trying to -speak- adb commands using Google now in order to root your phone...
Some of your comments are likely being taken as insults...
EDIT: I won't be posting any further in this thread. This idea is going nowhere and (obviously) does not belong in the original android development sub-forum.
EDIT2: Mods moved the thread to the appropriate location, so I will continue posting here.
I dont believe anyone has ever rooted an x with tr. all you get is the page pictured in the post above by the guy saying tr says you should have root... ive got it on two moto xs a broken one and a replacement one both on 4.4.2 and fx explorer and root checker confirm no root. one is 15 april 2014 build and the other is 03 july 2014 build. both fail under tr.

[ROOT][System R/W Enabling] 4.4 (System Version 19.5.3 ONLY)

DISCLAIMER: I AM NOT RESPONSIBLE IF YOUR PHONE GROWS LEGS AND EATS YOUR DOG, YOUR LOVE LIFE IS DESTROYED, YOUR PET ROCK GOES MISSING OR ANYTHING ALONG ANY LINES REGARDING YOU, YOUR FAMILY, YOUR PHONE, OR ANYTHING FOR THAT MATTER.
------------------------------------------------------------------------------------------------------------------------------------------------------------
Now that we have gotten that out of the way on to the root.
I will tell you now this is a LONG grueling process not meant for most new comers but if you want to take a stab feel free ill help if need be.
Now first things first before we do ANYTHING make sure your using a Droid Maxx, Droid Ultra, Moto X or any of those phones and make sure their on System version: 19.5.3 and Android: 4.4. Now that we've separated the men from the women (no sexism implied) lets move on.
You now need to go into your settings and make sure you have developer options available if not go to about phone in settings and scroll down and tap build number till it tells you your a developer. Pretty straight forward and simple. Now go back and go into developer options and enable USB Debugging and plug your phone into your PC (don't forget you need a computer for this process). Now it will most likely prompt you to authorize your pc on your device. Tap the check box and tap OK.
Now I need you to do a couple of things. Make sure you don't have an update pending, make sure your battery is charged, and make sure you have no root apps installed, this is almost specifically pointed at SuperSu, Superuser, etc. This will ensure your safe to do this whole process error free (not guaranteed but almost positive it prevents all your problems).
Now that we've separated the boys from the men lets continue.
Your going to want to download the file below ROOT.zip. That is the file with all the goodies. Download it and extract it to your C drive (root directory).
Go to the ROOT/PIE folder and run the ROOT.bat it will direct you from there. If you want me to paste what it says here, well then here you go-->
First it will say​
--Root Achived--
Click to expand...
Click to collapse
Now you'll need to follow the other directions it gives you.​
Please run wpbegone.exe in /ROOT/RWPD/ as administrator-------------------------
-----------------------------------------------------------------------------------------------------
Press Enter when you've done so and its made you say yes a couple of times----
Click to expand...
Click to collapse
This is somewhat what it will look like. Do what it says and it will say the next thing.​
Please click ONCE on 1.bat and hold Enter once it says waiting for adb-----------
Once its rerooted your device with pie and has said must play a little while--------
longer please wait till it goes through the process and gets to clobbering 2--------
Then click 2.bat ONCE and press and hold enter till it roots your device-----------
After your rooted wait till all is completed and it tells you to press enter------------
Then reroot your device using pie and go to the safestrap app now in your app-
drawer and tap install recovery. Then reboot into recovery using safestrap-------
and install su.zip on your sdcard/internalstorage and reboot-------------------------
After all of that go to SuperSu and update your binary--------------------------------
now your done PROFIT B**** ;D
Click to expand...
Click to collapse
Follow those instructions to the tee or it will NOT work.​If you need urgent help email me at [email protected] if not just post on here and ill get back to you asap i am a busy person and may be living on the streets soon so please don't be a d*** to me. Be patient.
Credits:
Credits for Pie go to jcase
Credits for MotoWpNoMo (wpbegone.exe) go to beaups
Credits for the batch files go to Muah (ME)
Credits for the time and effort put into all of this go maily to jcase,beaups, and somewhat myself.
Download Section:
Mod edit
Is this root tethered or is it all untethered and just full on root for 4.4?
Jay_P11 said:
Is this root tethered or is it all untethered and just full on root for 4.4?
Click to expand...
Click to collapse
Its full unthethered root on 4.4. You just have to downgrade from 19.6.3 system version to the 19.5.3 system version if your not already on it.
Why are you reposting and repackaging devs' exploits. This is essentially a repost and repackage. Not sure @jcase or @beaups would approve of this.
Topsnake said:
Why are you reposting and repackaging devs' exploits. This is essentially a repost and repackage not sure @jcase or @beaups would approve of this.
Click to expand...
Click to collapse
Your right neither of us would, this behavior is why I'm toning down my public work.
jcase said:
Your right neither of us would, this behavior is why I'm toning down my public work.
Click to expand...
Click to collapse
And that is sad to hear @jcase but I understand and have followed your lead with my work ( granted it is MUCH LESS than yours).
Know that some of us such as @samwathegreat @SamuriHL @bigv5150 @caseky621 and myself do appreciate your work and understand the frustration you must feel when someone does this.
---------- Post added at 02:40 PM ---------- Previous post was at 02:36 PM ----------
[/COLOR @jcase anyway we cant get a lock for this thread and the one linked below for repost?
http://forum.xda-developers.com/showthread.php?t=2849171
Repost
While all guides and tutorials are highly appreciated, reposting them is highly unnecessary and will only be confusing for people trying to find the right guide. Pie root by Jcase can be found here, and as his thread states:
Pie is a root for motorola devices, should work up to and including 4.4.2.
Click to expand...
Click to collapse
Meaning it also works on the Droid Ultra or any Motorola device for that matter.
Link removed & thread closed

Lost system on A partition, how to get back?

Totally stock pixel 5. Tried to sideload 12, and due to crappy instructions on XDA, that failed to mention the need to do the OEM unlock step, I ended up with a ADB sideload flash that failed at 94% and resulted in a empty A partition and a phone that failed to boot, so it switched to the backup system partition.
I'm now booted on the B partition (Android 11).
How can I fix my phone, so it's got 2 good system partitions?
Enable OEM unlocking, unlock bootloader, then use the Android Flash Tool to flash 12 Beta 5. Wiping /data shouldn't be necessary; however, if this fails and you have to force flash all partitions, a /data wipe will be required.
I highly recommend you keep the bootloader unlocked while using beta firmware, because it makes it a LOT easier to downgrade back to production firmware.
If you intend to root, don't forget to disable dm-verity and vbmeta-verification.
Detailed instructions on using the Android Flash Tool
Tip: When you get to the step of selecting which build to flash to your device, click the pencil icon to change options. Make sure you leave Relock Bootloader unchecked,
V0latyle said:
Wiping /data shouldn't be necessary
Click to expand...
Click to collapse
But unlocking the bootloader will wipe the phone.....
EDIT: I'm assuming there is a wipe data option with Android Flash Tool?
I don't know. I've never used it
xunholyx said:
But unlocking the bootloader will wipe the phone.....
Click to expand...
Click to collapse
Correct, but it's still necessary to install the beta (and downgrade)
xunholyx said:
EDIT: I'm assuming there is a wipe data option with Android Flash Tool?
I don't know. I've never used it
Click to expand...
Click to collapse
There is indeed. It's actually quite comprehensive.
I don't want to unlock the bootloader. I just want to get a system partition back, I do t want root or any modifications,
Chr1stOnABike said:
I don't want to unlock the bootloader. I just want to get a system partition back, I do t want root or any modifications,
Click to expand...
Click to collapse
In that case, I believe the only option for you is to attempt to sideload the OTA via recovery.
Download the beta OTA here
Follow the instructions to apply the OTA here
If this does not work, you can try using the Android Flash Tool after enabling Developer Options and USB Debugging. You can choose not to wipe your device in the tool options. No guarantee this will work. Requires unlocked bootloader
I will say this: Running beta software on a locked bootloader is not only highly inadvisable, it's foolhardy. Beta software is EXPERIMENTAL, you use it AT YOUR OWN RISK, meaning it is YOUR responsibility to fix it if something goes wrong. Keeping your bootloader unlocked means your ability to fix it is limited, if not impossible.
V0latyle said:
In that case, I believe the only option for you is to attempt to sideload the OTA via recovery.
Download the beta OTA here
Follow the instructions to apply the OTA here
If this does not work, you can try using the Android Flash Tool after enabling Developer Options and USB Debugging. You can choose not to wipe your device in the tool options. No guarantee this will work.
I will say this: Running beta software on a locked bootloader is not only highly inadvisable, it's foolhardy. Beta software is EXPERIMENTAL, you use it AT YOUR OWN RISK, meaning it is YOUR responsibility to fix it if something goes wrong. Keeping your bootloader unlocked means your ability to fix it is limited, if not impossible.
Click to expand...
Click to collapse
Flash tool doesn't work, as it expects to go i to recovery, and it doesn't it comes up with the no system error.
So when android 12 releases in a couple of weeks, will it just flash it to the other partition, to retain 11? In other words,will this fix itself in the fullness of time.
Also, who is going to fix the crappy XDA blog post that was poorly checked that caused this mess. I can't be the only one (I know the flawed instructions have been copied by the usual churnalists 9to5google Android authority, Android police)
Chr1stOnABike said:
Flash tool doesn't work, as it expects to go i to recovery, and it doesn't it comes up with the no system error.
Click to expand...
Click to collapse
Ah. Well, you can fix this, but it will require unlocking the bootloader.
You can always relock it after you're done.
Chr1stOnABike said:
So when android 12 releases in a couple of weeks, will it just flash it to the other partition, to retain 11? In other words,will this fix itself in the fullness of time.
Click to expand...
Click to collapse
Don't know. Given that you can't boot into recovery, you can't sideload the OTA to test this theory. I personally doubt it. You can either wait and see, or you can just bite the bullet and fix the issue.
Chr1stOnABike said:
Also, who is going to fix the crappy XDA blog post that was poorly checked that caused this mess. I can't be the only one (I know the flawed instructions have been copied by the usual churnalists 9to5google Android authority, Android police)
Click to expand...
Click to collapse
Link to the post? You may not be the only one, but the majority of folks (including myself, I was in the Marine Corps for 9 years so you can guess my mental acuity) have been able to use the instructions to our success.
Isn't unlocking and relocking bootloader detectable in soft fuses and an instant warranty void?
How to install Android 12 and 12L on Google Pixel and other Android devices
Google has just released Android 12L beta for the Pixel lineup. Here is how you can install Android 12 (or 12L) on your smartphone!
www.xda-developers.com
Someone in the comments also broke their phone by following the untested Instructions.
Chr1stOnABike said:
Isn't unlocking and relocking bootloader detectable in soft fuses and an instant warranty void?
Click to expand...
Click to collapse
I'm not sure. But that raises a question for you: Why are you running beta firmware if you're worried about the warranty?
Chr1stOnABike said:
How to install Android 12 and 12L on Google Pixel and other Android devices
Google has just released Android 12L beta for the Pixel lineup. Here is how you can install Android 12 (or 12L) on your smartphone!
www.xda-developers.com
Someone in the comments also broke their phone by following the untested Instructions.
Click to expand...
Click to collapse
I have updated my phone using both of these methods and can personally confirm the instructions are correct. The only difference I would point out is that I'm comfortable enough using adb and fastboot commands that I manually type them and don't use the batch file.
It is your responsibility to understand the instructions and follow them. You flash and modify your device at your own risk. If you do not fully understand the instructions, it is also your responsibility to either find the details you need, or ask for help.
This may seem rather condescending or apathetic, but the situation is this:
- You tried to run experimental beta firmware on your device despite your concerns for the warranty
- You did not ask questions before doing so, and if you did read any of the multiple threads on this issue, you would have been acutely aware of the recommendation to unlock your bootloader before you proceed
- You are now left with few options to fix your device because you decided to ignore experienced advice and do things your own way
As I stated previously, the responsibility for fixing things is yours and yours alone. If you were that concerned with your warranty, you should have kept your phone completely stock and avoided installing the beta.
I have one last recommendation for you:
Disenroll from the beta program and wait for the OTA to take you back to A11 public release. A data wipe will be required.
You have been told in detail what you can do to fix your device. What you do now is completely up to you.
V0latyle said:
I'm not sure. But that raises a question for you: Why are you running beta firmware if you're worried about the warranty?
I have updated my phone using both of these methods and can personally confirm the instructions are correct. .
Click to expand...
Click to collapse
The instructions only work if you have previously done the unmentioned OEM unlock step, which you must have done.
The fact you don't understand this, it limits your credibility. Just because something worked for you, doesn't make it correct.
It also sounds like you don't understand the difference between OEM unlock and a bootloader unlock.
Chr1stOnABike said:
The instructions only work if you have previously done the unmentioned OEM unlock step, which you must have done.
Click to expand...
Click to collapse
Yes - I unlocked and rooted my phone the day I got it, and I bought it full price direct from Google. Your point?
Chr1stOnABike said:
The fact you don't understand this, it limits your credibility. Just because something worked for you, doesn't make it correct.
Click to expand...
Click to collapse
Yes, it's always worked for me. I've been trying to work with you here and give you options that do not require OEM Unlock or unlocking the bootloader. The reason I thought the Android Flash Tool might work is because it's literally a tool provided by Google, and though it uses ADB, I figured they might have some sort of security to allow recovery of locked phones.
What exactly is it you don't think I understand? As I've pointed out, you decided to install beta software on your device despite your concerns for warranty. As I ALSO pointed out, if warranty was that much of a concern for you, you should have stayed on stock public release firmware and not messed with anything at all.
I will admit that the guide you linked does not mention needing an unlocked bootloader. I think it's generally been assumed among us in the community that modifying your device requires an unlocked bootloader. I will talk to the mods and see if we can get a note added to the post. However, you seemed to miss the big warning that advises against using the beta on your daily driver.
Chr1stOnABike said:
It also sounds like you don't understand the difference between OEM unlock and a bootloader unlock.
Click to expand...
Click to collapse
Again, how so? If you're going to call me ignorant, you had better explain how.
OEM Unlock simply sets a flag: "unlock-ability" to 1. It's an on/off switch that corresponds to the 1 or 0 set for the "unlock-ability" flag. It has no other function.
When someone attempts to unlock the bootloader, the device checks that flag. If it's 0, the bootloader cannot be unlocked. If it's 1, it can.
Unlocking the bootloader disables security features that prevent you from flashing partitions on your phone, or booting images sent via ADB. The reason why this is important when running custom or experimental firmware is because it allows the user to reflash corrupted partitions (like in your case). It allows a lot more freedom over what you can do with your phone.
I've been doing this for years - more than 10 years in fact. I would be careful about making accusations like "you don't understand the difference" or "you don't know what you're talking about'" to someone who is trying to help you. I understand you're frustrated, but you're going to have to swallow your pride here and admit, at least to yourself, that you screwed up. It seems pretty clear to me that you either did not fully understand the risk of trying to modify your device with a locked bootloader (yes, installing the beta counts as a modification), or you ignored the risk and tried to do it anyway. Yet you come here and impugn my credibility? As they say, "check yourself before you wreck yourself". You screwed up and got yourself into this mess. You alone are to blame. No one has to help you, and believe me, I've been quite tempted to tell you to pound sand. The least you can do is show a little gratitude for someone who's trying to help, and respect for experience and knowledge far beyond your own.
I have one more option for you: Rescue mode.
Reboot your phone into bootloader (hold power + volume down, release power but keep holding volume down when screen turns off)
Use volume buttons to select rescue mode on the right side, then press power to select
Google Pixel Repair Tool
This probably won't work because the repair tool only works if the firmware on your phone is older or equivalent to the firmware the repair tool has.
Chr1stOnABike said:
The instructions only work if you have previously done the unmentioned OEM unlock step, which you must have done.
The fact you don't understand this, it limits your credibility. Just because something worked for you, doesn't make it correct.
It also sounds like you don't understand the difference between OEM unlock and a bootloader unlock.
Click to expand...
Click to collapse
I haven't had time to read much of this thread yet, but why insult the one person I see who's trying to help you?
I've seen this before and other users who may know what to do, usually just walk away as they don't want to help someone who may just insult them or are clearly unappreciative of the help given.
Everyone let's all keep it civilized.
If you have issue with a post, please hit report button and walk away.
Positive vibes, all.
--andybones
@Chr1stOnABike I am indeed trying to help you, as I understand your situation is frustrating. I also understand that it may be frustrating to be told to do what you didn't want to do in the first place, but the reason why I'm telling you to do it is because it'll be of the most help to you.
Losing your data sucks. I get it. But fortunately the Pixel 5 is great about backing everything up to your Google account. Just make sure your photos are backed up and you'll be fine. Setting it back up after a wipe is a pain in the ass, but again, I'm recommending the bootloader unlock because I believe it's your best chance at recovery.
As far as that goes, I'm still trying to be flexible and provide you with different options. Be aware that if these other options don't work, you have no other choice. I'm not saying that to be rude, that's just the reality of it.
And lastly, I would very much appreciate you making the distinction between thinking I'm wrong because you have evidence to the contrary, vs thinking I'm wrong simply because you don't like my recommendations. If you sincerely believe I'm incorrect and can demonstrate how, please feel free to do so.
My only objective here is to help people the best I can with the knowledge and experience I have.
For those who ever get stuck like I did. When I got stuck in a bootloop, I realized I could 'fastboot boot twrp.img' and was able to save my internal storage from being lost by backing up to PC with TWRP, then move it back onto internal after the factory reset. Did I lost app data in these cases, yes. But that's my own fault for not regularly backup app data up with something like Swift or AppDash.
@Chr1stOnABike just checking in to see if you were able to get your problem resolved?

Categories

Resources