[ROOT][CWM] Root Nexus 4 & Install Official ClockworkMod Recovery - Nexus 4 Android Development

I originally posted this method at AddictiveTips. The method I posted there is targeted at everyone including the absolute beginners and I have also included instructions there for setting up the required tools, and for reverting back to the original recovery and boot image in case anything goes wrong. All external credits should be given to that guide (it does link back to this thread). Here is the link: How To Root Nexus 4 and Install ClockworkMod Recovery on it.
To my knowledge, this is the first confirmed working rooting method for Nexus 4 posted here at XDA. Though my knowledge is limited, so please correct me if I am wrong.
UPDATE: There is an official ClockworkMod recovery for Nexus 4 now available directly by Koush, so this should all be easy as pie now and you can now safely install CWM too. I am updating the CWM method with the updated instructions.
This method requires an unlocked bootloader. You can find instructions for unlocking it at XDA, or at the AddictiveTips guide linked above (the link to the bootloader unlock guide is in the requirements section there).
UPDATE 2: If your device does NOT get wiped after unlocking the bootloader, fret not. While this isn't expected behavior, several users have experienced the same on the Nexus 4. This could be due to some error at Google's end, but unlocking still works perfectly fine.
That said, let's get on with rooting and flashing CWM.
ClockworkMod Recovery Method:
Download the latest official ClockworkMod recovery from CWM website and rename it to recovery.img
Enable Android Debugging from Settings > Developer Options. (If you can't find developer options, go to 'About' and tap 'Build number' seven times.)
Connect the device to your computer via USB, and install the required drivers.
Download the recovery flashable SuperSU package with Busybox and transfer it to your phone's internal SD card.
Reboot into fastboot/bootloader:
Code:
adb reboot bootloader
You can also power off the phone and then use power + volume-down key combination to get into bootloader.
Unlock the bootloader if you haven't done so already. WARNING: This command will wipe all data on your device.
Code:
fastboot oem unlock
Enter this command in a command prompt to flash the ClockworkMod recovery (making sure you are in the directory where you downloaded the recovery file):
Code:
fastboot flash recovery recovery.img
OR
If you simply want to root without flashing a custom recovery and want to stick to your stock recovery, simply boot this recovery once using this command:
Code:
fastboot boot recovery.img
If you flashed the recovery in the previous step, you can now boot into recovery by pressing volume-up or volume-down twice to select the recovery option, and then the power button to enter it. If you simply booted into the recovery file without flashing it in the previous step, you should already be in recovery now.
Once in recovery, take a backup to be on the safe side.
Flash the downloaded SuperSU and busybox package zip file from recovery.
Clear cache and dalvik cache just in case (not required but won't hurt).
Reboot the device.
ADB and Insecure Boot Image Method:
Grab the insecure boot image from this thread.
Also download these root files. This package includes the latest SuperSU 0.98, latest su binary that comes with it, and working busybox (not sure if latest).
Extract the contents of the downloaded zip file to your computer.
Enable Android Debugging from Settings > Developer Options. (If you can't find developer options, go to 'About' and tap 'Build number' seven times.)
Connect the device to your computer via USB, and install the required drivers.
Reboot into fastboot/bootloader:
Code:
adb reboot bootloader
You can also power off the phone and then use power + volume-down key combination to get into bootloader.
Unlock the bootloader if you haven't done so already. WARNING: This command will wipe all data on your device.
Code:
fastboot oem unlock
Get back into bootloader mode and boot into the downloaded insecure boot image:
Code:
fastboot boot boot.img
Don't worry, this will not replace your existing boot image and will only boot from the insecure one once.
If it does NOT work for you and you get stuck in a boot loop, simply reboot your phone into bootloader and use the above command again. Some users had issues with booting from it the first time, but a second attempt worked.
Once booted into Android successfully using the insecure boot image, simply enter these commands one by one in command prompt (making sure you are in the directory where you downloaded the files):
Code:
adb shell mount -o remount,rw /system
adb push su /system/bin/
adb push Superuser.apk /system/app/
adb push busybox /system/xbin/
adb shell
chmod 06755 /system/bin/su
chmod 0644 /system/app/Superuser.apk
chmod 04755 /system/xbin/busybox
cd /system/xbin
busybox --install /system/xbin/
exit
exit
Reboot your device.
You will now have root access. Tested and confirmed working by Stryder5 and many others.
Credits:
Stryder5 for testing, confirming, tipping me about working CWM, providing the required drivers, and helping others on the thread. :highfive:
Harry GT-S5830 for the insecure boot image.
fkrone for his recovery revert disabler script and his unofficial working CWM before an official one became available.
Kstarz for posting this same recovery method with his own working CWM in this thread before an official one was out.
evaradar for informing about the release of official ClockworkMod recovery.
Koush for developing ClockworkMod recovery.
Chainfire for developing SuperSU.
Everyone else on this thread for testing, providing feedback and hitting the 'THANKS' button. =)
I have tried my best to give everyone the due credit but if I have missed out on anyone, please do remind me.

Yep, worked like a charm. Got Titanium running and restored all my apps
Btw, check your PM.

Checked...thanks. =) Added the links.

stem/bin/sh: su: can't execute: Permission denied
that is what i always get when i put in the "su"--permision denied

jshaw06 said:
stem/bin/sh: su: can't execute: Permission denied
that is what i always get when i put in the "su"--permision denied
Click to expand...
Click to collapse
You need to boot the unsecure boot.img first.

BTW can you confirm me the insecure boot.img you used? I just provided the link to the thread by Harry GT-S5830 but there were multiple ones posted in that thread, so I'm thinking of adding the direct link to the one confirmed working.

HQRaja said:
BTW can you confirm me the insecure boot.img you used? I just provided the link to the thread by Harry GT-S5830 but there were multiple ones posted in that thread, so I'm thinking of adding the direct link to the one confirmed working.
Click to expand...
Click to collapse
I'm pretty sure I used the one Harry GT-S5830 provided.

I used the one in the OP of that thread.. is there a different one I'm supposed yo use?
Sent from my SGH-T999 using Tapatalk 2
---------- Post added at 06:41 AM ---------- Previous post was at 06:23 AM ----------
It works
Sent from my SGH-T999 using Tapatalk 2

jshaw06 said:
It works
Click to expand...
Click to collapse
Glad to hear
Did you install the OTA before doing this? I gained root before installing the OTA.

Stryder5 said:
Glad to hear
Did you install the OTA before doing this? I gained root before installing the OTA.
Click to expand...
Click to collapse
No issues with installing the OTA after root?
Edit: Just noticed in your sig that you did not install the update.

I installed after ota
Sent from my SGH-T999 using Tapatalk 2

jshaw06 said:
I installed after ota
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
You mean you gained root after you installed the OTA?
---------- Post added at 01:12 AM ---------- Previous post was at 01:11 AM ----------
apzalo said:
No issues with installing the OTA after root?
Click to expand...
Click to collapse
I gained root, but haven't installed the OTA yet.

when I boot the boot.img. It rebooted and got stuck at the nexus boot animation for a long time. Does it suppose to do that?

Yes sorry gained root after OTA
Sent from my SGH-T999 using Tapatalk 2

Elemenopee said:
when I boot the boot.img. It rebooted and got stuck at the nexus boot animation for a long time. Does it suppose to do that?
Click to expand...
Click to collapse
Nope, it isn't. Try again...it's safe to try as many times as you want since we're not flashing the boot image; merely booting from it, which is temporary and doesn't last after reboot. Hope it works on the next try.

After step 8 we boot up the phone normally and then start running those adb commands? I'm assuming that's what you mean by "Once booted into Android successfully..." right? Sorry if it's an obvious question, just making sure!

quick question to ease my mind: if i needed to return this device for warranty purposes, how would i revert all of this back to stock? i know its something to do with the stock factory image, or am i wrong?

Ngo93 said:
After step 8 we boot up the phone normally and then start running those adb commands? I'm assuming that's what you mean by "Once booted into Android successfully..." right? Sorry if it's an obvious question, just making sure!
Click to expand...
Click to collapse
Step 8 itself will boot up the phone normally into Android, just using that insecure boot image instead of the stock one. And yes, you then just start entering those adb commands. =)

0.0 said:
quick question to ease my mind: if i needed to return this device for warranty purposes, how would i revert all of this back to stock? i know its something to do with the stock factory image, or am i wrong?
Click to expand...
Click to collapse
Best way would be to grab a stock factory image and flashing it. I recently wrote a post on the portal with the links: http://www.xda-developers.com/android/android-4-2-images-for-galaxy-nexus-nexus-7-4-and-10/
The method can be found at the factory images download page, and is as easy as extracting the image and running the included .bat file while your phone is connected to PC in fastboot mode.

HQRaja said:
Best way would be to grab a stock factory image and flashing it. I recently wrote a post on the portal with the links: http://www.xda-developers.com/android/android-4-2-images-for-galaxy-nexus-nexus-7-4-and-10/
The method can be found at the factory images download page, and is as easy as extracting the image and running the included .bat file while your phone is connected to PC in fastboot mode.
Click to expand...
Click to collapse
so i extract the "occam-jop40c-factory-cd3dc140.tgz" file, then double-click the "flash-all.bat" file?

Related

Nexus S & Galaxy Nexus one click root toolkit ! Unlock bootloader+CWM+Su(or)SuperSu

Nexus S & Galaxy Nexus one click root toolkit ! Unlock bootloader+CWM+Su(or)SuperSu
This tool will root you nexus s/Galaxy Nexus install su or super su and ClockWorkMod recovery!!
For Nexus S:4G,I9020T,I9023,I9020A.
Galaxy Nexus:GSM/Verizon/Sprint
Disclaimer!
Your warranty is now void.
I am not responsible for bricked or damaged devices
YOU are choosing to make these modifications.
Click to expand...
Click to collapse
DOWNLOAD
Click to expand...
Click to collapse
Current Version (Nexus S + Galaxy Nexus) 3.5: http://d-h.st/qaL
MIRROR:http://www.mediafire.com/download.php?1if2rvgpcte2rcs
Old versions:
3.0: http://d-h.st/mhO
2.0: http://dev-host.org/gcZ (nexus s only)
1.0: http://dev-host.org/bEE (nexus s only)
HOW-TO
Click to expand...
Click to collapse
just unzip the content and run the tool ! drivers are included in case you need them.
incase you had any problems try rerunning the tool,and if you got superuser/supersu app but you are unable to use root apps,update superuser/supersu from the play store then update the binary from inside the app.
CHANGELOG
Click to expand...
Click to collapse
V3.5
-added support for jelly bean
-few script optimization
-updated superuser and supersu
V3.0
-added support to galaxy nexus and all it's variants.
-added support to install super su.
-moved from *.bat to *.exe
-new icon
-su/super su, will now automatically flash no need to touch "install zip"
-skip bootloader unlock if you are already unlocked.
-update drivers
V2.0
-Removed "sticky.bat"
-modified su flashing script.
-the recovery now will stick automatically no need to flash any file after rooting or running any script.
V1.0
-initial release
ALL DATA WILL BE WIPED FROM DEVICE(only if bootloader is locked)
credits
-Chainfire for super su
-ChainsDD for superuser
-Pdanet for drivers
-Clockworkmod team for recovery
-my friend for the icon​
am i going to loose everithing on USB storage ? or jjust sistem data ? i have to have a full rom right ?
raducux said:
am i going to loose everithing on USB storage ? or jjust sistem data ? i have to have a full rom right ?
Click to expand...
Click to collapse
if your bootloader is locked then yes you will loose everything on USB storage,if the bootloader is already unlocked you will not loose any data,you don't need to flash a rom after rooting the device as it will not wipe the system.
Hi, I installed the drivers on my computer and am currently running the run.bat file. It's saying my device is not found. I have USB Debugging on, and USB storage is on. Any ideas?
Sticky please
Can i replace CWR with newest img version?
PLEASE STICKY THIS THREAD ON TOP.
Romaniac said:
Hi, I installed the drivers on my computer and am currently running the run.bat file. It's saying my device is not found. I have USB Debugging on, and USB storage is on. Any ideas?
Click to expand...
Click to collapse
Turn off the usb storage,you just need usb debugging enabled if you turned on usb storage it will not work
stewie-droid said:
Can i replace CWR with newest img version?
PLEASE STICKY THIS THREAD ON TOP.
Click to expand...
Click to collapse
The tool includes the latest cwm img,but if you want to replace it with another one you can do,just make sure you rename it to same name of the img in the root tool folder,but make sure that the recovery you will use is compatible with the nexus s
After I execute run.bat the phone is rooted. I reboot using ClockWorkMod Recovery. Then, when I run sticky.bat and follow the instructions I get the following:
[email protected]:/ $ su
su
[email protected]:/ # rm /etc/installrecovery.sh
rm /etc/installrecovery.sh
rm failed for /etc/installrecovery.sh, No such file or directory
What should I be doing? Please help.
Ritwik7 said:
After I execute run.bat the phone is rooted. I reboot using ClockWorkMod Recovery. Then, when I run sticky.bat and follow the instructions I get the following:
[email protected]:/ $ su
su
[email protected]:/ # rm /etc/installrecovery.sh
rm /etc/installrecovery.sh
rm failed for /etc/installrecovery.sh, No such file or directory
What should I be doing? Please help.
Click to expand...
Click to collapse
The phone should booted normally when running the sticky.bat (On the home screen),there is nothing to worry about just Complete the instructions normally one of the two scripts will fail since the name of the file differ in gingerbread and ics,try this rm /etc/install-recovery.sh and continue the instruction it should work and clockworkmod recovery would stick.
Thanks for your reply. I used a FixRecovery.zip file from another thread and flashed it after executing run.bat again. Now I am able to boot into ClockWorkMod.
Ritwik7 said:
Thanks for your reply. I used a FixRecovery.zip file from another thread and flashed it after executing run.bat again. Now I am able to boot into ClockWorkMod.
Click to expand...
Click to collapse
My friend can you guide where i can find this .zip because i m facing the same problem.thank you in advance
Ok I got it to stick by using Root Explorer to mount it as read/write first then ran the sticky.bat. ICS is the rm /etc/install-recovery.sh command.
m.sabra said:
The phone should booted normally when running the sticky.bat (On the home screen),there is nothing to worry about just Complete the instructions normally one of the two scripts will fail since the name of the file differ in gingerbread and ics,try this rm /etc/install-recovery.sh and continue the instruction it should work and clockworkmod recovery would stick.
Click to expand...
Click to collapse
I tried this and when I want to do the sticky.bat, when I type the "rm /etc/install-recovery.sh" it sais rm failed for /etc/.., Read-only file system
I had the same problem with sticky.bat.
Once you 're done with run.bat and it reboots in cwm just flash fix-recovery.zip
http://forum.xda-developers.com/showthread.php?p=20432966&highlight=fix-recovery#post20432966
karx23 said:
I had the same problem with sticky.bat.
Once you 're done with run.bat and it reboots in cwm just flash fix-recovery.zip
http://forum.xda-developers.com/showthread.php?p=20432966&highlight=fix-recovery#post20432966
Click to expand...
Click to collapse
thanks ! added the link to the OP in case anyone had problems like this.
Argh, I seem to have successfully unrooted my Nexus S 9020t and had it rebooted back in, but while it was booting up again I accidentally pressed a button and it told me "error: device not found" twice followed by "<waiting for device>".
Unfortunately my phone has already been rebooted, but it still seems to be waiting for my device. I'm not sure if I can disconnect this device from USB while this is going on, so uh, what do I do?
Edit: Disconnected and reconnected the USB cable on the phone to see what would happen, and it seems to be ok. I'm still stuck on "waiting for device" though. Should I consider restarting the process again?
Edit Edit: Decided to just try to redo the process all over again...seems to have worked!
Updated tool to version 2.0 ! check the changelog in OP, it should solve all sticky recovery related problems,as i removed sticky.bat and now the recovery will stick automatically without the need of running any commands or flashing any fixes.
thanks for reporting problems and feedbacks
thank you for this
Okay, I've tried to run this but it always fails at flashing the recovery.. Any help?
Lelouche said:
Okay, I've tried to run this but it always fails at flashing the recovery.. Any help?
Click to expand...
Click to collapse
Ok first have you unlocked your bootloader when the tool asked you to use volume buttons to chose yes and unlock ? (If you did this you should see an unlocked lock under google logo when booting the phone) if you didn't just run the script again and unlock the bootloader.
Are the drivers installed properly ? When you connect the phone to the pc check device manager to see if the PC recognizes the phone (the drivers are included in the tool in case you need them .
And last check the root tool folder on your pc it should have a file called cwm.img if it doesn't then download the tool again.
SuperUser is not visible after the process
I am on stock ICS, I had previously unlocked the bootloader, then I did the whole process mentioned in this thread. It showed me the CWM menu but when I did the reboot, I couldn't find the superuser app. Then to test whether it is rooted or not, I installed titanium backup but it says the device isnt rooted. What to do now? I tried SuperOneClick but it doesn't seem to work.
Edit: Thanks guys, sorry. It was my mistake, I didnt do the whole process in a right way. It is working as expected.

How to Install 4.2 images, keep root and all data

**Disclaimer** If you don't understand what follows, don't attempt this. I'm not responsible for you softbricking your device,
This is a quick guide for how to install the new android without losing anything. You'll need fastboot for this. Also, before doing this, be sure to download the supersu cwm update zip, and have it on your sdcard. Make sure you also already have a custom recovery installed (I did twrp, but i'm sure cwm will work just as well). I would also suggest having a backup done, through titanium backup and through recovery, just incase.
First, download the factory images for the n7 from google's website. Decompress them (if you're in windows, you'll need winrar or something similar.) After you decompress the archive, there'll be another one inside (image-nakasi-jop40c.zip), decompress this one as well. Under here, you'll see the .img files for all the partitions. For now, go up one directory. You'll also see here bootloader-grouper-4.13.img. Once you have all this, reboot into the bootloader.
Once you're in the bootloader, you can update the bootloader to the new version (this step isn't needed, but I did it anyways). Plug into your pc, and type fastboot devices. Make sure it's not blank. If it is, you have to update drivers. If you can see the device, open up a command prompt, and cd to the directory that has the bootloader-grouper file. Type the following:
fastboot flash bootloader-grouper-4.13.img
then, after it's done, type:
fastboot reboot-bootloader
Now, you'll be booted back into the bootloader, it'll say 4.13. On to the rom.
cd into the folder image-nakasi-jop40c (make sure you see the files system.img and boot.img before you continue. If you don't see them, the next steps will do nothing but erase your kernel and system parition.)
now, you see the image files. Type the following (still in the bootloader)
fastboot erase system
fastboot flash system system.img
wait until it completes, then type:
fastboot erase boot
fastboot flash boot boot.img
Once this is done, hit the volume up on the device until it shows recovery mode on the top. When it does, push the power key and you'll boot into your recovery (shouldn't be touched.) Inside here, flash the supersu cwm zip file, which'll flash the superuser binary, and supersu. Once this is done, do a factory reset (removing your data and cache.) Boot into the rom.
Once it's booted, you'll notice your internal sd card appears to be empty (mine did, I was worried at first.) For some odd reason, it moved the entire contents of my sdcard into a folder on it called 0. When you get back into android, simply move the folder all up one level so they're in the proper place. You now have the rom booted, rooted, with all your data. Now, you can do a titanium restore to get all your stuff back.
My first boot got stuck for some reason. if it happens to you, just hold the power button and hard reboot. (I did this on 2 devices, it only happened to one of them, so I figured I'd give you all warning.)
Links:
SuperSu binary: https://docs.google.com/open?id=0B7a8xHNJlpgTR0ZkR1pWZWR2VzA
Google Factory Images: https://developers.google.com/android/nexus/images
Thanks for this.
I flashed the 4.2 ota in the dev section and I lost root. Can I just flash the supersu binary in cwm to regain root?
Thanks for this.. Apparently you found out too a clean 4.2 isn't rootable via typical methods.
That SuperSU package did the trick. I have to remember to keep a SuperSU binary on hand for these kinds of situations that SuperUser fails..
jefferson9 said:
Thanks for this.
I flashed the 4.2 ota in the dev section and I lost root. Can I just flash the supersu binary in cwm to regain root?
Click to expand...
Click to collapse
Yes. If you do it though cwm, you're not using any exploits, you're just inserting the superuser binary and supersu.apk into the proper places on the rom. On any nexus device, any rom, this will root it.
mstrk242 said:
Once it's booted, you'll notice your internal sd card appears to be empty (mine did, I was worried at first.) For some odd reason, it moved the entire contents of my sdcard into a folder on it called 0. When you get back into android, simply move the folder all up one level so they're in the proper place.
Click to expand...
Click to collapse
DANGER WILL ROBINSON!!
The "odd reason" is called "multiple users" - add a second user and they get a folder called 10.
tehSmoogs said:
DANGER WILL ROBINSON!!
The "odd reason" is called "multiple users" - add a second user and they get a folder called 10.
Click to expand...
Click to collapse
Exactly.
If everything goes right we should have an AOSP prerooted build in about *looks at watch* 20 minutes.... Unless there is a compile error or SU error. *laff*
Back to watching the scrolling terminal window
Just got this working on a mac...
did not update bootloader(couldnt get it to)
other than that, same commands except all fastboots are ./fastboot on a mac
the only other trick is i needed the fastboot and abd files in the jop40c folder...seems to have worked like a charm....im deff on 4.2 with su installed... and it looks like my data is still there...once google is done restoring i'll know just how sucessfull it is, but so far, seems to work!!!
kwhee07 said:
Just got this working on a mac...
did not update bootloader(couldnt get it to)
other than that, same commands except all fastboots are ./fastboot on a mac
the only other trick is i needed the fastboot and abd files in the jop40c folder...seems to have worked like a charm....im deff on 4.2 with su installed... and it looks like my data is still there...once google is done restoring i'll know just how sucessfull it is, but so far, seems to work!!!
Click to expand...
Click to collapse
I did this all on linux, just kind of adapted the guide for windows. I figured all the linux users would understand how to do it on their own. Glad to know it's the same for mac as well.
OK where did they put the developer options? Not in settings on my 32GB 4.2 device
Never mind. This: http://www.androidpolice.com/2012/1...hidden-in-android-4-2-heres-how-to-find-them/
rootbrain said:
OK where did they put the developer options? Not in settings on my 32GB 4.2 device
Never mind. This: http://www.androidpolice.com/2012/1...hidden-in-android-4-2-heres-how-to-find-them/
Click to expand...
Click to collapse
Settings - about tablet - build number
push it a few times and it will enable dev options
You have .bat file in the package.
Why so complicated?
I downloaded 4.2 from here:
http://android.clients.google.com/p...gned-nakasi-JOP40C-from-JZO54K.094f6629.zipia
I then just flashed it from recovery via CWM.
Done.
CWM asked me if I wanted to maintain root and of course I chose the correct answer on this, so now my N7 is running on a rooted 4.2.
Here is my method:
1. Download official 4.1.2 from http://forum.xda-developers.com/showthread.php?t=1929270 and 4.2 OTA image from http://forum.xda-developers.com/showthread.php?t=1989188
2. Boot into CWM (i have CWM touch installed)
3. Clear data and install 4.1.2, don't forget to turn on root in the installer
4. reboot check that root is fully working
5. reboot into recovery install 4.2
6. before reboot CWM will ask to disable recovery flash and protect root. Ansver yes to both questions
I'm confused, it says if you are already on a custom rom, just flash as usual.
What makes this different?
I was on stock ROM rooted with some system modifications, and this wwadd the only way I could get the update working...
Sent from my Nexus 7 using xda app-developers app
mstrk242 said:
For some odd reason, it moved the entire contents of my sdcard into a folder on it called 0. When you get back into android, simply move the folder all up one level so they're in the proper place. You now have the rom booted, rooted, with all your data. Now, you can do a titanium restore to get all your stuff back.
Click to expand...
Click to collapse
So I'm at the step listed above. I have 4.2 on my device but I can't seem to find this "0" folder. I'm browsing the /sdcard folder via adb shell. Am I looking at the wrong place? Do I have have the incorrect permissions? Or might it not be there?
Thanks.
Ill have to wait until a rooted rom is created, I have no comp.
Sent from my Nexus 7 using XDA Premium HD app
can I install image-nakasi-jop40c.zip directly without upgrading bootloader?
Zuk. said:
So I'm at the step listed above. I have 4.2 on my device but I can't seem to find this "0" folder. I'm browsing the /sdcard folder via adb shell. Am I looking at the wrong place? Do I have have the incorrect permissions? Or might it not be there?
Thanks.
Click to expand...
Click to collapse
Not advisable to move this folder - if it got moved to a new location by the o/s then there's probably a good reason why - maybe like 4.2 introducing multiple users
Each user appears to get their own "home" directory created in /mnt/shell/emulated/
Default user dir is "0"
Second user dir is "10"
Each contain the standard dir's from 4.1 and earlier.
Travelawyer said:
Why so complicated?
I downloaded 4.2 from here:
http://android.clients.google.com/p...signed-nakasi-JOP40C-from-JZO54K.094f6629.zip
I then just flashed it from recovery via CWM.
Done.
CWM asked me if I wanted to maintain root and of course I chose the correct answer on this, so now my N7 is running on a rooted 4.2.
Click to expand...
Click to collapse
You had two extra characters at the end of your link, but I fixed it above and it's good to go for others in the future. Just flashed it in TWRP, it didn't ask if I wanted to maintain root, hit reboot when it was complete and lost root, so it doesn't work for everyone - good news is that all my data remained intact without having to resort to advanced restoring my data from a backup....
When I tried the SuperSU binary root flash trick, I finally got root back. But don't think it's as easy to get to recovery! I had to obtain the TWRP Recovery one more time since it wiped it and put in place a recovery that did absolutely nothing but reboot the device after a few minutes, so you'll have to
Code:
fastboot flash recovery openrecovery-twrp-2.3.1.1-grouper.img
to get TWRP back.... Hope that helped everyone!

[HOW TO][Unlocked Bootloaders]Install Fastboots, CWM, Tips & Ticks, and More

Now that the bootloader is unlocked, everyone is asking "WTF do I do now?". Well, here's a bit of help to get you started. I'm assuming you already have adb and fastboot setup and working -- if not, quit reading and get that taken care of. Also, I only run Linux...so I'll try to be transparent and only list the fastboot commands.
I assume that you're not a complete moron and can Google what you don't understand.
Don't use the stock\SDK fastboot binary for flashing /system.
An updated fastboot binary for Lin\Win\Mac can be found here on the Batakang FTP from our local, neighborhood Mattlgroff.
Linux -- Rename the file to moto-fastboot and add it to a directory in your $PATH -- Ubuntu\Debian users can just add it to ~/bin (enabled by default)
Windows -- Rename the file to moto-fastboot and put it somewhere handy...that's on you to decide.
ROOT\ADMINISTRATOR INFO
On Linux, you might have to run as root in order to run some of the fastboot commands. If your system uses sudo for root commands, typing "sudo -i" will bring up an interactive sudo shell so you don't have to type sudo over and over again. If your system uses su for root, well, you already know the command.
On Windows, you have to enable Administrator Privileges to be able to run some of the fastboot commands.
Linux Terminal Hints
~/ means your home directory -- example -- "gedit ~/Documents/file.txt" would open file.txt in gedit easier than /home/yourusername/Documents/file.txt
You can add a * to file names and directories to not type as much -- example -- "gedit ~/Doc*/file.txt" is the same as the command above, only shortened. If two files have similar names, like Documents and Downloads, then you have to type the name up until the firs different character then add *.
Use the command "../" to go up\back one directory. The command is stackable so "../../" would go back 2 directories and so forth and so on.
Use "cd" to change directories. Is an example really needed for this...
Proper Apps to Use
For zip file editing, use 7-zip on Windows and Archive Manager (file-roller) on Linux
For editing text files on Windows use Notepad++ or any text editor that has unix line breaks -- do not use default Notepad or Wordpad -- you've been warned. Use what ever you prefer on Linux. I prefer Gedit myself.
Basic Fastboot Command Syntax
fastboot flash "partition" "image" -- flashes partition image where partition is where to write to and image is the path to the image being written.
example -- fastboot flash system /path/to/system.img
fastboot -w -- does a factory reset; to expedite things, "-w" can be added to "fastboot flash system system.img -w"
fastboot continue -- continue with the boot process
fastboot devices -- list devices fastboot recoginzes
fastboot -s "device model number" -- set the device fastboot will write commands to; use "fastboot devices" to find model number
fastboot reboot bootloader -- reboot phone into fastboot mode (or restart fastboot mode while in fastboot); same as "adb reboot bootloader"
fastboot help -- list all of this & more
Command Info
Not all the fastboot commands work for us. Specifically, the "erase" commands. If a wipe command doesn't work, skip it. I'll mark them with a ! at the end if it might fail.
Install CWM Recovery by Epinter
Read Epinter's RAZR HD CWM Thread
Download the recovery image
On stock rom, navigate to /system/etc and rename install-recovery.sh to install-recovery.sh.bak
Reboot into fastboot -- use "adb reboot bootloader" from Terminal\Command Prompt
Wipe the existing recovery -- "fastboot erase recovery" !
Flash the recovery with "fastboot flash recovery cwmrecovery6028-xt925_20130219-epinter.img"
That's it, CWM is installed.
Install Stock Fastboots JB
Download the respective fastboot zip you want to use
Extract the zip
Open a terminal to the extracted zips directory
Reboot into fastboot
Type the following commands in this order
fastboot flash boot boot.img
fastboot flash devtree device_tree.bin
fastboot erase system -w !
fastboot flash system system.img
fastboot -w
fastboot erase cache !
fastboot reboot
Install Stock Fastboots ICS
Download the respective fastboot zip you want to use
Extract the zip
Open a terminal to the extracted zips directory
Reboot into fastboot
Type the following commands in this order
fastboot flash boot boot.img
fastboot flash devtree device_tree.bin
fastboot erase system -w !
fastboot flash system system.img.ext4
fastboot erase cache !
fastboot -w
fastboot reboot
Install Alternate Radio
Reboot into fastboot
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
NON-HLOS.bin is found inside a fastboot zip.
Easy Kernel Install
Download kernel-flash.zip in the attachments[/URL]
Open the zip
Replace the zips current boot.img and device_tree.bin from the fastboot of your choice
Install the zip with CWM
By default, kernel-flash.zip comes with Mex Retail kernel and devtree
Easy CWM Install
Download recovery-flash.zip in the attachments[/URL]
Install the zip with CWM
Not sure if its SS compatible, but it is CWM compatible (for the lazy Photon Q users).
Obtain root after installing a Stock Firmware
There are two choices for obtaining root after a stock flash. the closed source SuperSu by Chainfire & and the open source Superuser by Koush.
Download SuperSu zip from Chainfire (Closed Source)
Download Superuser from Koush (Open Source)
Download the one of the root zips above.
Reboot into CWM/TWRP -- adb reboot recovery
Locate and flash the zip (see below for an alternative way)
Reboot, that's it. Nice not having to run exploits\hacks\Linux just for root
Install Rom/Zip file with ADB + CWM
CWM has the awesome ability to install zip files without having to manually copy them to the phone first. All's necessary is a PC with working adb.
Reboot into recovery
Select "install zip from sideload"
On PC, type "adb sideload /path/to/zip" and press enter
The zip will now be copied to the phone's cache & install
Once installed, do any requirements you'd normally do like wipe caches, etc
I have done this numerous times and it still will not boot into recovery. I have read and followed epinter, yours, official cwm, and other various Google found instructions (none of them functionally different) and still the same result. It recognizes the phone, writes, completes, then if I reboot and select recovery it goes to the android with the open chest cover with the exclamation point....
Any ideas how I could be screwing this up?
Sent from my MB886 using Tapatalk 2
miketravis said:
I have done this numerous times and it still will not boot into recovery. I have read and followed epinter, yours, official cwm, and other various Google found instructions (none of them functionally different) and still the same result. It recognizes the phone, writes, completes, then if I reboot and select recovery it goes to the android with the open chest cover with the exclamation point....
Any ideas how I could be screwing this up?
Sent from my MB886 using Tapatalk 2
Click to expand...
Click to collapse
Unless you're not rooted with an unlocked BL, there's really no reason why it shouldn't work?
Sent from my N4'd Atrix HD
I was rooted before unlocking... shouldn't it still be rooted?
Sent from my MB886 using Tapatalk 2
miketravis said:
I have done this numerous times and it still will not boot into recovery. I have read and followed epinter, yours, official cwm, and other various Google found instructions (none of them functionally different) and still the same result. It recognizes the phone, writes, completes, then if I reboot and select recovery it goes to the android with the open chest cover with the exclamation point....
Any ideas how I could be screwing this up?
Sent from my MB886 using Tapatalk 2
Click to expand...
Click to collapse
Did you uninstall safestrap?
Yep. Should I reinstall it and try again?
Sent from my MB886 using Tapatalk 2
---------- Post added at 01:40 PM ---------- Previous post was at 01:30 PM ----------
reinstalled safestrap and tried again, success!!
Not sure why that made a difference but I got it so thank you very much.
miketravis said:
Yep. Should I reinstall it and try again?
Sent from my MB886 using Tapatalk 2
---------- Post added at 01:40 PM ---------- Previous post was at 01:30 PM ----------
reinstalled safestrap and tried again, success!!
Not sure why that made a difference but I got it so thank you very much.
Click to expand...
Click to collapse
Still did not work for me
Did you install recovery inside safestrap? Then fastboot cwm?
Sent from my MB886 using Tapatalk 2
miketravis said:
Did you install recovery inside safestrap? Then fastboot cwm?
Sent from my MB886 using Tapatalk 2
Click to expand...
Click to collapse
Yes, I did. After fastboot, I followed the OP instructions to uninstalling the SS recovery and SS app. Boot into recovery and got the open android.
tvd0405 said:
Yes, I did. After fastboot, I followed the OP instructions to uninstalling the SS recovery and SS app. Boot into recovery and got the open android.
Click to expand...
Click to collapse
same here.
I have the same problem. I was able to flash cwm, uninstall the SS recovery, and uninstall the app. The first time I got the dead android symbol. I restored SS via Titanium Backup, reinstalled the SS recovery, and flashed cwm again. I tried rebooting into recovery and was able to get cwm working. As soon I uninstalled SS and rebooted, I got another dead android.
probably because were all on the XT926 if we were to revert back to XT925 then the recovery should work otherwise we will have to tweak the recovery to get it to work properly witht the XT926 software awesome thing is we can now free up the space that SS used for a rom slot however for noobs you might wana stick with SS once you hardbrick without anything to go back too it will be game over for your phone and then you have to con ATT for another
i got it.....
i was on ICS 404 bootloader unlcoked and rooted
how the hek you go on bootloader menu (power vol.down???????)
right now im accessing evything with boot widget from play market....
everything works i backed up my stock rom.....
can i try a jellybean rom????? and go back to ICS as many times i want???? from cwm recovery???
thanx
htchd2fix said:
i got it.....
i was on ICS 404 bootloader unlcoked and rooted
how the hek you go on bootloader menu (power vol.down???????)
right now im accessing evything with boot widget from play market....
everything works i backed up my stock rom.....
can i try a jellybean rom????? and go back to ICS as many times i want???? from cwm recovery???
thanx
Click to expand...
Click to collapse
From Phone Off, Hold Power and Both Volumes.
If the phone is on, do the above and when the screen goes black, press them all again...I've been doing that for an hour now
I installed MR via fastboot and just now got it booting. I made the mistake of using the SDK fastboot to flash /system.
skeevy420 said:
From Phone Off, Hold Power and Both Volumes.
If the phone is on, do the above and when the screen goes black, press them all again...I've been doing that for an hour now
I installed MR via fastboot and just now got it booting. I made the mistake of using the SDK fastboot to flash /system.
Click to expand...
Click to collapse
What's MR?
yes it works.....thanx
i was used to powr vol.down with atrix4g
ok..now can i install any rom and if dont like it go back to may backup????
still a little scared.....
i mean i wont loose root right?
Markyzz said:
What's MR?
Click to expand...
Click to collapse
Mexican Retail
Install instructions in OP
htchd2fix said:
yes it works.....thanx
i was used to powr vol.down with atrix4g
ok..now can i install any rom and if dont like it go back to may backup????
still a little scared.....
i mean i wont loose root right?
Click to expand...
Click to collapse
You won't lose root
And with an unlocked bootloader, all you gotta do is flash an updater zip with the su binary and app for Stock roms that don't have root
I'll link to a root zip in the op once I find one (or just make it; depends on how quick I find it in a search)
thanx again..
ahahahha...what a beautifullll day....
skeevy420 said:
Mexican Retail
Install instructions in OP
Click to expand...
Click to collapse
is there a point to flash a different firmware? is it required by any means?
I had SS and was backed up, I booted up the "stock ROM" and was successful in unlocking the BL and flashing CWM. I made a new backup of the stock ROM and restored it with success in CWM. In the video it show he has MR , but im confused as to why.
Also, I cant seem to get rid of safestrap....how in the hell do you uninstall it???

[Root] Root and TWRP for R

Disclaimer: If you are not comfortable with using Fastboot and ADB and editing system files than this guide might not be for you. At this point this is what I have to offer.
Click here for the unofficial twrp image - Latest version as of 12/27/14
So getting right into it.
1. Turn on ADB mode on the watch by going to about and tapping the build info 7 times.
2. Download ADB and Fastboot utilties
3. Plug the watch into the computer and your phone should vibrate and ask you to accept the computers fingerprint, tick the check box to always allow and hit ok
4. Open up a command prompt or terminal inside of where the ADB utilities are located and enter
Code:
adb reboot bootloader
This next step will wipe your data!
5. Now you should be in fastboot, go ahead and on the terminal use the next code and follow prompts to unlock
Code:
fastboot oem unlock
6. Now after you re-set up your watch again you will need to do step 1 and 3 again.
Please do not skip step 6!
7. Go ahead and issue
Code:
adb reboot bootloader
8. Flash unofficial twrp, make sure the recovery image file is in the same location as fastboot than issue
Code:
fastboot flash recovery YOURIMGNAMEHERE.img
9. Upon successfully doing that you should have twrp installed
10. Lots in one step here, download the latest supersu.zip flashable file and put it in the same folder as ADB use the proper name of what you downloaded. Issue
Code:
adb push SUPERSUNAMEHERE.zip /sdcard/
11. Issue
Code:
adb reboot recovery
12. than using the very tiny TWRP and somewhat messed up go ahead and use it to install the supersu.zip under the folder /sdcard
13. Enjoy root and twrp.
I will make this guide into a much easier Java program in the very near future to make it easier to use.
This was typed up pretty fast and it is kinda hacky, I will work on a bat script and a shell script if we have enough osx users here. I'm sure someone will come along and make this better if I don't get around to it.
Credits:
Dees-Troy for his TWRP support for dory our fish brother device which worked on our device
Chainfire for all his hard work these many years
Q: ADB complains there is no device listed.
A: Install universal ADB drivers and then go to device manager and under the device with a yellow warning icon go to update driver, Browse my computer, let me pick from list of device drivers, than Google ADB interface. If it still complains turn off debugging, than turn it back on, revoke authorization, then disable and re-enable again.
One more just in case.
Great work!!
Just got the watch today and couldn't be happier. Custom kernel, TWRP and root (well sort of) all within 6 hours of having this watch.
I say root (sort of) because SU is force closing when running su in adb shell. First time it crashed adb on PC and had to reboot watch. Now it just force closes on my watch and adb exits on PC. What is the most current version of SuperSU? I have 1.94 from Chainfire's site.
Thank you SO MUCH for this! Do you or your team have a paypal?
hatefuel19 said:
Just got the watch today and couldn't be happier. Custom kernel, TWRP and root (well sort of) all within 6 hours of having this watch.
I say root (sort of) because SU is force closing when running su in adb shell. First time it crashed adb on PC and had to reboot watch. Now it just force closes on my watch and adb exits on PC. What is the most current version of SuperSU? I have 1.94 from Chainfire's site.
Thank you SO MUCH for this! Do you or your team have a paypal?
Click to expand...
Click to collapse
The latest supersu is version 2.36 dated 11.27.2014. 1.94 is well over a year old, you need to update for sure that is why you are force closing.
I figured that's what it was. Feeel real dumb for not finding the newest version the first time. Also most current is now 2.37 XD
Edit: That got it! Thanks tonu!
hatefuel19 said:
I figured that's what it was. Feeel real dumb for not finding the newest version the first time. Also most current is now 2.37 XD
Edit: That got it! Thanks tonu!
Click to expand...
Click to collapse
I'm here to help! I'm working on adding other mods to my other thread right now I'm working on getting busybox working.
Thanks for doing all of this work.
I was hoping you could help me with a step I am stuck on.
10. Lots in one step here, download the latest supersu.zip flashable file and put it in the same folder as ADB. Issue "adb push SUPERSUNAMEHERE.zip /sdcard/
When I do this it is saying permission denied. Also, should the watch be in recovery or fully booted when I run this command?
Thanks
---------- Post added at 09:31 PM ---------- Previous post was at 09:28 PM ----------
jimmydigital00 said:
Thanks for doing all of this work.
I was hoping you could help me with a step I am stuck on.
10. Lots in one step here, download the latest supersu.zip flashable file and put it in the same folder as ADB. Issue "adb push SUPERSUNAMEHERE.zip /sdcard/
When I do this it is saying permission denied. Also, should the watch be in recovery or fully booted when I run this command?
Thanks
Click to expand...
Click to collapse
Disregard I did it again and for some reason it worked. Maybe I need to reboot first.
Recovery
I went through your command and everything worked until I ran:
fastboot flash recovery UNOFFICIAL-openrecovery-twrp-2.8.0.0-lenok.img
Now the device just boots into the recovery and not into the system. The system/data partitions keep saying:
E:Unable to mount /data
E:Unable to mount /system
I am very comfortable with fastboot and adb so I do not know what I did wrong here.
Any ideas?
adamrobles said:
I went through your command and everything worked until I ran:
fastboot flash recovery UNOFFICIAL-openrecovery-twrp-2.8.0.0-lenok.img
Now the device just boots into the recovery and not into the system. The system/data partitions keep saying:
E:Unable to mount /data
E:Unable to mount /system
I am very comfortable with fastboot and adb so I do not know what I did wrong here.
Any ideas?
Click to expand...
Click to collapse
Try reflashing the recovery IMG again. And check back here.
Sent from my A0001 using XDA Free mobile app
reflashed
tonu42 said:
Try reflashing the recovery IMG again. And check back here.
Sent from my A0001 using XDA Free mobile app
Click to expand...
Click to collapse
I reflashed the recovery you provided and I keep rebooting to system but it takes me to twrp.
I am in the process of downloading the system dump from another thread to hopefully flash those to get back into the system.
adamrobles said:
I reflashed the recovery you provided and I keep rebooting to system but it takes me to twrp.
I am in the process of downloading the system dump from another thread to hopefully flash those to get back into the system.
Click to expand...
Click to collapse
The dump is extracted from the system.img, you won't be able to flash it in any way. None of this guide touches system files besides the root stuff which shouldn't affect boot. Try flashing the stock recovery.img instead.
tonu42 said:
The dump is extracted from the system.img, you won't be able to flash it in any way. None of this guide touches system files besides the root stuff which shouldn't affect boot. Try flashing the stock recovery.img instead.
Click to expand...
Click to collapse
Thank you for that information, I stopped the download of the dump.
Downloading the stock recovery now.
---------- Post added at 02:24 PM ---------- Previous post was at 02:10 PM ----------
tonu42 said:
The dump is extracted from the system.img, you won't be able to flash it in any way. None of this guide touches system files besides the root stuff which shouldn't affect boot. Try flashing the stock recovery.img instead.
Click to expand...
Click to collapse
I must have skipped a step...
installed stock recovery
booted into the watch system
enabled adb debugging
reboot to bootloader
install your recovery image
rebooted
pushed supersu
rebooted to twrp
installed supersu
rebooted to system
adb shell - verified root!
You are awesome! Thank you for taking the time to help me!
HYPE for 5.0.1
'm Hype! can't wait to flash the first 5.0.1 system dump on this as stated by +Darek Ross we MAY be receiving update as early as today!
I did this yesterday, and run into the same problem - TWRP spitting out errors when flashing
It was caused by NOT rebooting after unlocking bootloader, but proceeding with the flash rightaway - this apparently leaves the watch in an empty state (no /sdcard or /system contents) and it needs to boot up at least once before you flash anything
So the correct procedure is like this
1) enable development options
2) enable usb debugging
3) adb reboot-bootloader
4) fastboot oem unlock
5) let the watch boot normally, pair with your phone, enable development options and usb debugging again
6) adb reboot-bootloader
7) fastboot flash recovery recovery.img
8) fastboot reboot
9) adb push supersu.zip /sdcard/
10) adb reboot recovery
11) flash supersu.zip
Apparently, there is a problem when the original kernel is not present after "fastboot oem unlock" - the watch will be left empty, while on the original kernel it "reinstalls"
I typed this from memory, but I think you should know how these things work anyway, as there's not much for a "normal" user to do anyway... yet...
zvieratko said:
I did this yesterday, and run into the same problem - TWRP spitting out errors when flashing
It was caused by NOT rebooting after unlocking bootloader, but proceeding with the flash rightaway - this apparently leaves the watch in an empty state (no /sdcard or /system contents) and it needs to boot up at least once before you flash anything
So the correct procedure is like this
1) enable development options
2) enable usb debugging
3) adb reboot-bootloader
4) fastboot oem unlock
5) let the watch boot normally, pair with your phone, enable development options and usb debugging again
6) adb reboot-bootloader
7) fastboot flash recovery recovery.img
8) fastboot reboot
9) adb push supersu.zip /sdcard/
10) adb reboot recovery
11) flash supersu.zip
Apparently, there is a problem when the original kernel is not present after "fastboot oem unlock" - the watch will be left empty, while on the original kernel it "reinstalls"
I typed this from memory, but I think you should know how these things work anyway, as there's not much for a "normal" user to do anyway... yet...
Click to expand...
Click to collapse
My guide is setup like the one you put there. In order to get adb working again you need to re setup the watch step 6. Read the instructions carefully. I'll post a batch script later to simplify this.
Sent from my A0001 using XDA Free mobile app
Step 6 doesn't really say "you need to do this, OR ELSE", it seems like you just rehash the factory reset thing
And you should put step 10 before step 6, it can't really be done in that order...
but again, I guess the people trying this should now how it works, so no biggie, but since a few of us got hit by that "no initial boot" issue, it would be better to put a note in there
zvieratko said:
Step 6 doesn't really say "you need to do this, OR ELSE", it seems like you just rehash the factory reset thing
And you should put step 10 before step 6, it can't really be done in that order...
but again, I guess the people trying this should now how it works, so no biggie, but since a few of us got hit by that "no initial boot" issue, it would be better to put a note in there
Click to expand...
Click to collapse
By default debugging is disabled, I'm not sure how you were able to issue an ADB command on step 7 with out first performing step 6.
Aaah, sorry, should have been "after step 6"
another option is to do adb push with recovery loaded
I guess that's why I got that error before, because I combined 5+8 and flashed the recovery, but TWRP was unable to revive the watch from factory reset state (which makes me think it should not be on the watch unless needed...)
zvieratko said:
Aaah, sorry, should have been "after step 6"
another option is to do adb push with recovery loaded
I guess that's why I got that error before, because I combined 5+8 and flashed the recovery, but TWRP was unable to revive the watch from factory reset state (which makes me think it should not be on the watch unless needed...)
Click to expand...
Click to collapse
Ah I see, yea the guide is written as the absolute minimum to work right now. Like I said later today I'll try to post a script that automates all of this, its much easier.

[TUTORIAL] Applying an OTA update with stock + root/custom recovery

Preamble
As the title suggests, I had a Nexus 5 running stock Android 5.0, with root and TWRP, and wanted to update to Android 5.0.1 (without losing all my data, of course). I couldn't find any guides for my particular circumstances, so after working out how to do it myself, I thought I'd share my method.
Note: This guide is not for the uninitiated. Be prepared to Google something for yourself if you don't understand it.
Prerequisites
Before starting this guide, you should have:
A Nexus 5 that running stock Android. The presence of root/Xposed/custom recovery (maybe custom kernels?) shouldn't be relevant, but I can't vouch for the efficacy of this guide if you've done something obscure to your install.
Android SDK tools, specifically the ADB and fastboot binaries. Additional USB drivers may be required on Windows.
The factory image for the Android version you are currently running.
1. Uninstall root and other /system modifications
If you have rooted your Android, and/or installed BusyBox, Xposed or other modifications to /system, you will need to uninstall these modifications. Failing to do so will cause the OTA to complain that there's something funky going on in your /system partition.
You may be able to manually uninstall each of these modifications, but this was not enough for my install – doing a ‘Full unroot’ in SuperSU still left behind files in /system. The easiest way to uninstall all /system modifications is to reflash the /system partition.
Extract the Nexus 5 factory image (e.g. hammerhead-lrx21o-factory-01315e08.tgz), yielding a directory with files such as flash-all.bat and image-hammerhead-XXXXXX.zip. Do not use the flash-all script, as this will unnecessarily wipe all data on the device.
Extract the image-hammerhead-XXXXXX.zip file, specifically the system.img file.
Open a command prompt/terminal window.
Connect the phone to the computer with a USB cable.
Boot the phone into the bootloader.
Method 1: Power down the phone, then hold VolUp + VolDn + Power until the phone boots into the bootloader.
Method 2: From the terminal, run adb reboot bootloader while the phone is still powered on.
From the terminal, run fastboot flash system /path/to/system.img.
2. Uninstall any custom recovery
Custom recoveries don't seem to support OTA updates, making it necessary to uninstall the custom recovery by reflashing the stock recovery.
Extract the recovery.img file from the factory image, as in Part 1.
Open a command prompt/terminal window, connect the phone to the computer, and boot into the bootloader, as in Part 1.
From the terminal, run fastboot flash recovery /path/to/recovery.img.
Optional: Reflash boot.img and/or cache.img
Some users have reported that reflashing system.img was not sufficient, and that reflashing boot.img and/or cache.img was also necessary. I did not have this problem, but if you do:
Extract the boot.img and/or cache.img files from the factory image, as in Part 1.
Open a command prompt/terminal window, connect the phone to the computer, and boot into the bootloader, as in Part 1.
From the terminal, run fastboot flash boot /path/to/boot.img.
From the terminal, run fastboot flash cache /path/to/cache.img.
3. Apply the OTA update
The simple part. In the bootloader, use the VolUp/VolDn buttons to select ‘Start’, then press the Power button, to reboot into Android. Follow the system update instructions to install the OTA update.
4. Reflash the custom recovery and re-root
Also self-explanatory.
Hey,
I just wanted to say thanks. This totally fixed the problem I was having. I also want to add that after I flashed the system.img, I was getting errors related to "EMMC:/dev/block/platform/msm_sdcc.1/by-name/boot" with a bunch of numbers after. I googled it and found I had to also flash boot.img, and after that, the OTA worked fine. I would assume if anyone else gets errors like this, they should flash whatever img it shows in the error (ie: mine said /by-name/boot so I flashed boot.img).
-BGM
It worked for me
I've always been using a toolkit for my rooting purposes, I have done Full Unroot on SuperSU, but still getting an error when trying to update to 5.0.1
Will flashing stock wipe everything(whatsapp image, camera's,messages, etc etc)on my phone?
azlan96 said:
I've always been using a toolkit for my rooting purposes, I have done Full Unroot on SuperSU, but still getting an error when trying to update to 5.0.1
Will flashing stock wipe everything(whatsapp image, camera's,messages, etc etc)on my phone?
Click to expand...
Click to collapse
I also had problems using ‘Full Unroot’ in SuperSU. It's not actually as ‘full’ as it sounds.
Flashing a full factory image would normally wipe everything, but carefully following this guide will only reset the /system partition, not any user data.
I'd like to say thank you very much! I was looking for this kind of tutorial... I encountered an error while following all the steps because I forgot I had a custom kernel. So I wanted to add that if you have a custom kernel remember to do the same steps as described above for the kernel (return to stock) and then follow the system and recovery steps afterwards.
If you don't like running commands in terminal you can use Nexus Root Toolkit, on advanced, you have all the commands you need available.
Thank you very much RunasSudo
Taiyo85 said:
I'd like to say thank you very much! I was looking for this kind of tutorial... I encountered an error while following all the steps because I forgot I had a custom kernel. So I wanted to add that if you have a custom kernel remember to do the same steps as described above for the kernel (return to stock) and then follow the system and recovery steps afterwards.
If you don't like running commands in terminal you can use Nexus Root Toolkit, on advanced, you have all the commands you need available.
Thank you very much RunasSudo
Click to expand...
Click to collapse
I have my ADB and Fastboot ok as confirmed by nexus root toolkit, but I am not sure on how to use terminal.. I launched command prompt but it doest recognise all the commands..
Tried Flash Stock + Unroot on Nexus Root Toolkit but the software will crash (fastboot.exe has stopped responding)
I am really clueless on what to do next..
azlan96 said:
I have my ADB and Fastboot ok as confirmed by nexus root toolkit, but I am not sure on how to use terminal.. I launched command prompt but it doest recognise all the commands..
Tried Flash Stock + Unroot on Nexus Root Toolkit but the software will crash (fastboot.exe has stopped responding)
I am really clueless on what to do next..
Click to expand...
Click to collapse
Flash Stock + Unroot wipes everything and defeats the purpose of the tutorial made by RunasSudo
First and foremost you should download Android SDK (Tools only) on http://developer.android.com/sdk/index.html and then ask to install the extra: Google USB Driver.
With Nexus Root Toolkit you don't need terminal, click on advanced and you should see options to flash through fastboot the system only, recovery and kernel. It is pretty straighforward and it asks where the .img are in your computer
Thanks! This guide worked.
For Ubuntu users, you need to install adb and fastboot with these commands :
sudo add-apt-repository ppahablet-team/tools && sudo apt-get update (optional)
sudo apt-get install android-tools-adb android-tools-fastboot
Thanks for the great step by step.
As with some of the other posters, re-flashing system.img was not enough for me, I had to also re-flash the boot.img. Once that was done, I had no problems side loading the update and am now running LRX22C.
I only seem to fiddle with adb once a year - when it OTA time comes - and can never seem to remember some of the steps that need to be taken. Reading through some of the other threads, I have a feeling a lot of people who rooted/custom recovery and cant do the OTA are going to be doing complete image re-flashes when this guide makes that completely unecessary.
thanks again,
.d
BananasGoMoo said:
I googled it and found I had to also flash boot.img, and after that, the OTA worked fine.
Click to expand...
Click to collapse
datcon said:
As with some of the other posters, re-flashing system.img was not enough for me, I had to also re-flash the boot.img.
Click to expand...
Click to collapse
Thanks for the feedback! I've added a note about boot.img to the OP.
+1 for flashing boot.img worked perfect after I did that.
I tried with this tutorial. I flashed system and recovery and then restart. Confirm OTA but I get ERROR.
Then I flashed boot as it was described. Now I don't get OTA In About phone, I'm still on 5.0.0, Check for updates now don't find update
Any idea?
UPDATE - UPDATE: After hour now it is here ... super, it works.
This walkthrough was most helpful! Ended up replacing the boot.img as well since I had ElementalX installed. My apps are optimizing as we speak. Thank you!
Worked for me. What a hassle!
Here is a summary of the process for those looking for a less wordy procedure, with a few added steps:
Download Nexus 5 5.0 (LRX21O) file (note: NOT 5.0.1 yet) https://developers.google.com/android/nexus/images
Unzip via 7-zip multiple times in order to get boot.img, recovery.img, system.img
Enable USB debugging: http://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android-5-lollipop.htm
Plug phone into PC > cmd prompt where adb is installed > type "adb devices" to ensure connection is valid (will need to authorize via popup on phone > then "adb devices" should return your device id and "device"; if it says "unauthorized" then look for the popup on your phone)
adb reboot bootloader
Put system.img, recovery.img, and boot.img in same folder as fastboot.exe
Run commands:
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot erase cache (this is optional. I didn't have to do it, but you might)
Use Volume Up/Down to select Start > press Power Button to reboot
Update via Settings > About Phone > System Update
Re-flash TWRP recovery:
Get the file from here: http://forum.xda-developers.com/showpost.php?p=57580889&postcount=1
adb reboot bootloader
fastboot flash recovery openrecovery-twrp-2.8.1.0-hammerhead.img
Paul22000 said:
Worked for me. What a hassle!
Here is a summary of the process for those looking for a less wordy procedure, with a few added steps:
1. Download Nexus 5 5.0 (LRX21O) file (note: NOT 5.0.1 yet) https://developers.google.com/android/nexus/images
2. Unzip via 7-zip multiple times in order to get boot.img, recovery.img, system.img
3. Enable USB debugging: http://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android-5-lollipop.htm
4. Plug phone into PC > cmd prompt where adb is installed > type "adb devices" to ensure connection is valid (will need to authorize via popup on phone > then "adb devices" should return your device id and "device"; if it says "unauthorized" then look for the popup on your phone)
5. adb reboot bootloader
6. Put system.img, recovery.img, and boot.img in same folder as fastboot.exe
7. Run commands:
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash boot boot.img
8. Use Volume Up/Down to select Start > press Power Button to reboot
9. Update via Settings > About Phone > System Update
Click to expand...
Click to collapse
Maybe you could add `fastboot erase cache` as stepp 8.
gee2012 said:
Maybe you could add `fastboot erase cache` as stepp 8.
Click to expand...
Click to collapse
I added it to step 7, thanks. :good: I also cleaned up the formatting and added step 10 about re-flashing TWRP.
Loading problem
I flashed system, recovery & boot images strictly following the instructions, restarted the phone. It got stuck in loading where balls in four colors keep running for half an hour. Shall I keep waiting? I think there must be something wrong. Your advises are welcome.
guangy said:
I flashed system, recovery & boot images strictly following the instructions, restarted the phone. It got stuck in loading where balls in four colors keep running for half an hour. Shall I keep waiting? I think there must be something wrong. Your advises are welcome.
Click to expand...
Click to collapse
Try flash the partitions again. If it's still not working, you may need to reflash a factory image.
RunasSudo said:
Try flash the partitions again. If it's still not working, you may need to reflash a factory image.
Click to expand...
Click to collapse
I flashed the cache image as well, then the problem solved. Thanks

Categories

Resources