How To Correctly Apply OTA Updates - Nexus 10 Q&A, Help & Troubleshooting

I should ask for a sticky for this but these instruction will work EVERY TIME if you are running either custom recovery or Root.
You will need the latest adb/fastboot from google, you can either install the SDK or download any of the many smaller adb/fastboot and libs for your OS
You will need STOCK 4.4/4.3/4.2 recovery depending on what version of android you are currently on. Download the factory image from here. Open the zip within the package and pull out recovery.img and rename it stockrecovery.img
Copy your custom recovery to the adb folder name it twrp.zip or short name for whatever you are using I am using twrp.
You will need the correct OTA you are seeking to apply - rename it to something short simple and obvious - for this example I will use otaupdate.zip
If you wish to root get the latest patch (I believe its up to 1.75 now) and copy it to the adb/fastboot folder.
BACKUP YOUR DEVICE FIRST AND COPY IT TO YOUR PC
If you are already Rooted:
If you are using SuperSU - go to the application options and completely unroot and reboot if needed
BACKUP YOUR DEVICE FIRST AND COPY IT TO YOUR PC
If not rooted start here:
I am assuming most of you are Windows users. Open your file explorer and open the ADB folder.
On the left hand folder where ADB is located, press shift and right click the ADB folder and select "Open command window from here". This will open a command prompt window for you to run all your adb/fastboot commands from. This is the same folder where you copied your recoveries and updates to.
BACKUP YOUR DEVICE FIRST AND COPY IT TO YOUR PC
Copy your custom recovery and stock recovery to your adb folder
Copy and rename the OTA to the adb folder
Copy your root.zip patch to the /sdcard downloads folder (if you wish root)
>adb reboot bootloader - if you are already stuck in bootloop you can attempt >fastboot reboot-bootloader to run these steps
>fastboot flash recovery stockrecovery.img
>fastboot reboot-bootloader
Go into recovery and wait till dead droid appears
Press power and Volume Up at same time to go into the stock recovery menu
Using the volume buttons move and down the blue list of options and select: Apply update from ADB
You will now have orange text at the bottom of the screen - follow the instructions to side load by typing >adb sideload otaupdate.zip in your command prompt window
Wait and watch the progress, at this point you should see the ota processing steps of which there a few and will vary depending on the package. When its complete there will be a "install complete" or similar message
Reboot and let the update complete the system optimizations and go in validate your device is working and the version is what you wanted
>adb reboot bootloader
>fastboot flash twrp.zip
>fastboot reboot-recovery
Using your newly installed custom recovery you can now apply zips/root etc
Reboot as needed and update root if using older .zip to current binaries and enjoy your updated device.
And yes you only need to backup once prior to starting but many people skip that step -DON'T BE ONE OF THOSE PEOPLE.
Hopefully I've not missed a bit.
You can also use these same instructions if you're stuck in boot loop or applied a patch without first replacing stock or unrooting - just boot to bootloader using fastboot and replace recovery and apply the patches. This will usually work just fine and prevent much heart ache on your part.

Related

[HOW TO] Revert to latest stock ROM (GRI40)

I personally have tried lots of ROM's but all I really want is the stock ROM with the option to root if I want. After lots of research, I couldn't find a comprehensive tutorial on how to do this. There is of course the GRI40 image available in update.zip format for custom recoveries which is helpful for most. However, if your a bit anal like me, and want the official update directly from Google servers, follow this guide. This might also be helpful for people who can't get into the custom recovery any more.
NOTE: I will not provide help for anybody. This guide assumes you have the Android SDK in order to use adb. There may be other ways of doing this, I am not an experienced programmer, this works for me, it will work for you.
[GUIDE]
Download the following files:
Stock Froyo Image (Contains stock recovery image)
Stock GRI40 Image
Instructions
You first have to revert to stock Froyo image to get the stock recovery back. This is needed to install the GRI40 update ZIP
1. Disable backup my settings under privacy settings.
2. Unzip the original Froyo shipping ROM and put it somewhere you can find
3. Plug in Nexus One with USB to computer (enable USB Debugging)
4. Open command prompt, navigate to SDK folder which contains adb. Type
Code:
adb reboot bootloader
(which will boot into the bootloader)
5. Confirm fastboot connection with
Code:
fastboot devices
6. Type
Code:
fastboot erase userdata
7. Type
Code:
fastboot erase cache
*If step 6 and 7 does not work, and if you have a custom recovery installed, you can do a factory data wipe from there. Also perform a dalvik-cache wipe.
Alternately, you can also do a factory data wipe within Android. Settings => Privacy Settings => Factory Data Reset.
8. Go to the directory that you stored your unzipped files from the official Froyo ROM, for ease of use, copy these into the directory containing adb.exe
9. Type
Code:
fastboot flash userdata userdata.img
10. Type
Code:
fastboot flash boot boot.img
11. Type
Code:
fastboot flash system system.img
12. Type
Code:
fastboot flash recovery recovery.img
13. Type
Code:
fastboot reboot
14. Once phone has started, skip all account setup. Copy the new GRI40 .zip from Google servers to the root of your SD card. Ensure it has been renamed to update.zip if necessary.
15. Reboot into bootloader mode (hold trackball when switching on), select recovery, you will see an exclamation mark with a little green Android.
16. Hold power button and press Vol. Up to see recovery menu. Select 'Apply: Update.zip'
17. After the system boots up and while setting up skip setting up with the google account and you can setup accounts later. This will prevent the phone from pulling down the previous settings (downloaded apps, wallpaper etc) from google.
18. You are done. Enjoy.
If you want to root:
Download the following:
Latest Clockworkmod Recovery
su.zip
Instructions
How to root the stock ROM
1. Download su.zip and copy to root of your SD card
2. Download a recovery image file and for ease of use, copy into same directory containing fastboot on your PC
3. Turn on USB debugging and connect phone to PC
4. Open command prompt, navigate to SDK folder which contains adb. Type
Code:
adb reboot bootloader
(which will boot into the bootloader)
5. Type
Code:
fastboot flash recovery recovery.img
where 'recovery.img' is the name of your recovery image file (easy thing to do is rename the file to 'recovery.img'!)
6. It will upload, once complete, disconnect you phone from computer
7. On your phone, select Bootloader, then Recovery to boot into your new recovery
8. Now select ‘Apply Update.zip’ and find the su.zip file (Turn off signature verification if using Amon RA)
Note:Custom recovery will be overwritten with the stock recovery on reboot but root privelages will still be in place.
No need to do that. Flash the stock rom. Done.
Sent from my Nexus One using XDA App
albundy2010 said:
No need to do that. Flash the stock rom. Done.
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
You mean you can flash the official GRI40 zip from Google server with a custom recovery?
Iggy82 said:
You mean you can flash the official GRI40 zip from Google server with a custom recovery?
Click to expand...
Click to collapse
Yes!
Make sure it's the full image (80+meg), and not just the update (40+ meg). Recovery should restore to stock after a reboot...
Sent from my Nexus One using XDA Premium App
Well that serves me right for assuming Google would not allow an official update zip to install from a custom recovery!
Did the official update ZIP from Google come out after dsixda made his own update zip then?
The link above is for the full update zip from Google (80MB or so)
Sent from my Nexus One using Tapatalk
usually the official updates come out and people edit them to allow root, busybox, etc.
or just a stock rom that won't over write your custom recovery, etc.
Thanks for this. I have been looking for a stock image all morning!

[Tutorial] Root, Unlock, Recovery and flashing a Custom ROM

Just a quick step by step tutorial to get a Custom ROM working on your HTC One or if you just want to unlock and root!
This guide is especially for the new users, experienced HTC users should already be familiar with this process.
Step 1: Unlock
Go on http://www.htcdev.com and create yourself an account on HTCDEV.
Download these adb/fastboot files
Make a new folder on your C:/ drive called fastboot for example.
Extract the zip downloaded in step 2 to the new folder
Go Here http://www.htcdev.com/bootloader/ and select "All Other Supported Models" and "then begin unlock bootloader"
Yes, Tick both Boxes, Proceed
Skip up to step 8 as we have all we need for the first 7 steps
Power off your phone by holding the power button down for 10 seconds
Power your phone on by holding power and volume down
Highlight Fastboot With Volume+or- then press Power
Plug your phone into your PC and open a Command Prompt.
(windows XP - Click Start > Run > type CMD in box then press OK
(Windows 7 - Click Start > type CMD in search box then press Enter)
Change directory to your folder where we put fastboot files cd c:\fastboot
Type this into your command prompt window fastboot oem get_identifier_token
Select & copy the text as per step 9 on the HTCDev website
Paste your identifier token into the box at the bottom and submit
You Will Very Shortly Receive an email from HTCDev with a link to the second part of the instructions and your "Unlock_code.bin" attached
Download the "Unlock_code.bin" from the email and save it to the same folder that we extracted fastboot files to in step 2
Type this into your command prompt window fastboot flash unlocktoken Unlock_code.bin
The Display Will change on your phone, press Vol + to accept and power to confirm.
Step 2: Recovery
Download the Android SDK (optional)
Download the recovery of your choice, here a few links:
- CWM
- CWM 2
- TWRP
Place the Recovery file you downloaded where the fastboot.exe is (Either in the location of your downloaded fastboot drivers or in the Android SDK directory)
Now open the cmd and navigate to the folder where the Recovery File is located or just open a cmd with shift and right click at the correct directory
Now type:
fastboot flash recovery name_of_the_recovery.img
For example:
fastboot flash recovery recovery-clockwork-touch-6.0.2.8-m7.img
Now your recovery is installed
Step 3: Root
This step is only needed if you want a stock rooted ROM, if you want a custom ROM, skip this step.
Now root your phone with SuperSU by Chainfire or SuperUser by koush
Download SuperSU from this link or SuperUser from this link
Flash it with the Recovery:
Power off your device and then hold the VOL DOWN + Power to boot into the Bootloader
Navigate with VOL and Power to Recovery
Now flash the .zip:
- install zip from sdcard
- choose zip from sdcard
- select the downloaded SuperSU/SuperUser zip file and flash it
- Reboot now
Now you are able to flash any Custom ROM.
Step 4: Custom ROM
With htcdev unlock you need to flash the boot.img after every ROM installation
Note: Most of the custom ROMs have a script which lets the boot.img flash automatically with the ROM, so probably the steps after flashing the ROM are not needed.
If you are in a bootlop though, I recommend you to perform these steps and flash the boot.img with fastboot
Download the ROM you want to flash
Open the ROM zip with an archive manager and extract the boot.img out of it and place it in your fastboot directory
Copy the ROM to your sdcard
Now boot into bootloader again (explained above) and choose recovery with your volume keys and power button
In recovery wipe data and cache aka fullwipe before flashing your ROM if you are moving to a new base (for example from CyanogenMod to a Sense ROM, don't forget to backup your data files, like apps) (Often ROM chefs leave a note in their thread if a fullwipe is needed or not, just follow their advices)
Now flash your ROM by installing zip from sdcard
If this is finished, reboot and reboot into bootloader again
Connect your phone to your PC in fasboot mode (choose in bootloader with power button)
Open a cmd in your fastboot folder with your boot.img and type these two commands:
fastboot flash boot boot.img
fastboot erase cache
Then reboot your phone and wait some minutes to see your ROM booted
Enjoy
Video tutorials (for One S but the steps are the same):
Video-Tutorial by Flow-Wolf:
Bootloader Unlock:
Recovery Installation:
Root:
Custom ROM Installation:
I recommend using SuperUser by koush insted of SuperSU. I also made Super Boot to root stock ROM but I need someone with WWE HTC One...
I added a link for koush's SuperUser
hi
i done everything like its writen here, but i cant boot into recovery.. it cames the screen "entering recovery" and then the device is reboot
noob.fl said:
hi
i done everything like its writen here, but i cant boot into recovery.. it cames the screen "entering recovery" and then the device is reboot
Click to expand...
Click to collapse
Yes currently the recoveries are not working, be patient until they work, I will leave a note in the OP
thanks for responce - i will wait :laugh:
ist there any other opinion to put the su binary into system? maybee with adb?
noob.fl said:
thanks for responce - i will wait :laugh:
ist there any other opinion to put the su binary into system? maybee with adb?
Click to expand...
Click to collapse
adb can't write system on stock, you would need a modified boot.img
noob.fl said:
thanks for responce - i will wait :laugh:
ist there any other opinion to put the su binary into system? maybee with adb?
Click to expand...
Click to collapse
I have modified boot.img but it's from .401 ROM. You want to try?
mike1986. said:
I have modified boot.img but it's from .401 ROM. You want to try?
Click to expand...
Click to collapse
im since a longer time no more so familar with htc... can it harm my device or it does not care and the one will run? if cot my one since to day, and its a damn expensive device to brick it at first time... but if it works - je i will try
its like all other androiddevices to flash? fastboot flash boot boot.img?
noob.fl said:
im since a longer time no more so familar with htc... can it harm my device or it does not care and the one will run? if cot my one since to day, and its a damn expensive device to brick it at first time... but if it works - je i will try
its like all other androiddevices to flash? fastboot flash boot boot.img?
Click to expand...
Click to collapse
There is no chance to brick but there is a chance for bootloop
if got the softwarw nr 1.27.206.1 with kernel [email protected]#1 - will it works with your 401 kernel?
Can you pull the system partition so we can enjoy some stuff from the One on other HTC devices?
tell me how to do and i will share
http://d-h.st/2DO
Unpack and run the runme.bat
Dumping may need a while, upload it to dropbox for example
Imho all devs should work together here instead of trying to be the first guy with a deodexed stock ROM
these are just windowsfiles - does not working on my linux, sorry
torxx said:
http://d-h.st/2DO
Unpack and run the runme.bat
Dumping may need a while, upload it to dropbox for example
Imho all devs should work together here instead of trying to be the first guy with a deodexed stock ROM
Click to expand...
Click to collapse
Do i understand it right i do not need to install recovery to get the system dump?
Simply go to your adb dir and type that in terminal:
adb pull /system ./system
optional:
adb kill-server
7za a -tzip system.zip system\ -r (needs the 7za file)
rmdir system /s /q
to pack a zip
simpelsense said:
Do i understand it right i do not need to install recovery to get the system dump?
Click to expand...
Click to collapse
no, all through adb
noob.fl said:
these are just windowsfiles - does not working on my linux, sorry
Click to expand...
Click to collapse
Using ADB (I assume you already isntalled it)
adb devices
adb pull /system ./system
adb kill-server
It will write it in your ADB folder
torxx said:
no, all through adb
Click to expand...
Click to collapse
thought pulling system is a little more magic.

Help rerooting after 4.3

My wife has a rooted nexus 7 2012 wifi and she unintentionally accepted the ota Android 4.3 update. So of course it unrooted her.
I originally had a hell of a time rooting this tablet using wugfresh nexus toolkit. Took me several days to succeed and the same thing is happening again. My Windows 7 laptop keeps installing the wrong drivers even though I selected the option to disable the auto driver configuration. Also USBDeview never shows the installed Samsung adb drivers yet when I try to install them I am warned they are already installed. It's already been hours and who knows how many retries and reboots!
So even though I'm a newbie I decided to go the Android sdk route.
1. Where do I download the files I need to just root the darn tablet?
2. What do I do next?
Please keep it simple........
Anyone want to walk me through it on the phone?
Thanks
If you are new to using SDK, check this out for a well laid out tut on how to get set up and rooted.
I now have android sdk set up.
What are the commands I should issue to root?
Thanks
now you need to flash a custom recovery then flash a root zip file via windows command prompt...Have you figured out how to interface with your device and the windows command prompt? eg;
-a good first command is "adb devices" and see if it lists your device, if it does your golden...
-then you would issue "adb reboot bootloader"
-once in bootloader you would issue "fastboot flash recovery whateverrecoveryouchose.img"
-then while in bootloader toggle with the volume keys to "recovery" option and press power
-now you will be in your new recovery you just flashed and you can push the zipped root file you chose to the sdcard, "adb push rootyouchose.zip /sdcard/"
-once its been pushed you can flash it in recovery and reboot, and you are now rooted
-this is the latest cwm recovery that you could flash in fastboot as described above
-this would be the root file you want to push then flash in recovery
-this may be of some help, scroll down halfway
Thank you so much for helping. You can't know how much it is appreciated.
-a good first command is "adb devices" and see if it lists your device, if it does your golden...
Got that. It works!!
-then you would issue "adb reboot bootloader"
Worked! Got the Android on his back.
-once in bootloader you would issue "fastboot flash recovery whateverrecoveryouchose.img"
Is recovery image on my pc or the tablet?
Why do I have to indicate the img name here if I will later select it
When I write
Fastboot flash......... Img
I get
Unknown partition 'the image file name'
"error : cannot determine image filename for. '.......'
You need to have downloaded a recovery image, that is what you flash I linked to one on my last post, that file is called "recovery-clockwork-touch-6.0.4.3-grouper.img" so you would issue,
fastboot flash recovery recovery-clockwork-touch-6.0.4.3-grouper.img
"fastboot flash recovery" is telling it to flash a recovery file and "recovery-clockwork-touch-6.0.4.3-grouper.img" is the recovery file in this case to be flashed so, combined its, "fastboot flash recovery recovery-clockwork-touch-6.0.4.3-grouper.img"
I do not use Windows, I use a terminal instead of windows command prompt so I can't be specific as I am not too familiar with windows command prompt. With terminal it is much easier in my opinion but you need to be running nix or Mac OS to have a terminal
OK, still can't get past the final stage in rooting my wife's nexus 2012 nexus 7.
I have the proper drivers installed and it connects fine with my Windows 7 laptop.
From a Windows 7 command prompt
1. "abd devices "
Correctly returns the attached nexus
2. "abd reboot bootloader "
Correctly reboots the tablet
3. **here's where things breakdown :
I downloaded the latest twrp openrecovery img for grouper and renamed it (for simpler typing)
" openrecovery-twrp-grouper.img"
However, when I now issue the command
"fastboot flash recovery openrecovery-twrp-grouper.img"
I get an error :
Cannot open openrecovery-twrp-grouper.img
The same thing happened with the clockwork-touch recovery img. That is why I downloaded the twrp img which I am more familiar with anyway.
So, am I missing a step between rebooting the bootloader and flashing the recovery? After the bootloader is rebooted and I get the Android on his back with an empty belly, do I need to do something else before flashing?
Do I need to put the recovery image somewhere special in the nexus file structure?
I'm stuck.
Thanks
Anderson2 said:
OK, still can't get past the final stage in rooting my wife's nexus 2012 nexus 7.
I have the proper drivers installed and it connects fine with my Windows 7 laptop.
From a Windows 7 command prompt
1. "abd devices "
Correctly returns the attached nexus
2. "abd reboot bootloader "
Correctly reboots the tablet
3. **here's where things breakdown :
I downloaded the latest twrp openrecovery img for grouper and renamed it (for simpler typing)
" openrecovery-twrp-grouper.img"
However, when I now issue the command
"fastboot flash recovery openrecovery-twrp-grouper.img"
I get an error :
Cannot open openrecovery-twrp-grouper.img
The same thing happened with the clockwork-touch recovery img. That is why I downloaded the twrp img which I am more familiar with anyway.
So, am I missing a step between rebooting the bootloader and flashing the recovery? After the bootloader is rebooted and I get the Android on his back with an empty belly, do I need to do something else before flashing?
Do I need to put the recovery image somewhere special in the nexus file structure?
I'm stuck.
Thanks
Click to expand...
Click to collapse
Hi, Anderson2...
If I may throw in my couple of cents...
The recovery.img file to be fastboot flashed (TWRP or CWM, it really doesn't matter which) needs be to stored on your PC... on the same PATH as the FASTBOOT.EXE file. The easiest way of accomplishing this, is to copy it directly into the folder that contains your FASTBOOT and ADB executables.
Where this folder is located on your PC depends on how you have fastboot setup, but it's usually stored in a folder called /Platform-Tools (if I remember correctly). But because I've never bothered myself installing the whole Android SDK (of which Fastboot is a part of) on my PC, I'm not sure of it's precise PATH (ie. it's location) but I think it's somewhere in the Android SDK folder.
For myself, I just maintain a simple folder on the Windows desktop containing the FASTBOOT.EXE and ADB.EXE files and a few necessary Windows .DLL files. When I wish to fastboot flash a Custom Recovery, I simply copy the Custom Recovery .img file (TWRP or CWM) into this folder, rename it to recovery.img (renaming it thus makes typing at the command prompt easier, and reduces the scope for potential typos)... boot the Nexus 7 into the bootloader, hook it up to my PC via USB. And then open a command prompt on the folder, and run...
Code:
fastboot devices
This is purely diagnostic, and hopefully confirms a working fastboot connection.
You should see something like this...
Code:
025d2d424bxxxxx fastboot
A serial number followed by the word fastboot. If you see this, you can go ahead and run...
Code:
fastboot flash recovery recovery.img
(This command assumes an unlocked bootloader... indicated by an unlocked padlock symbol under the Google logo upon boot. If it isn't, you should unlock it with fastboot oem unlock BEFORE fastboot flashing the Custom Recovery).
My point is, though... the 'recovery.img' to be flashed must be in the same folder as the FASTBOOT.EXE file, or as you have discovered, you will get the error "Cannot open recovery-twrp-grouper.img".
If fastboot can't find it.. it can't open it.
Hope this helps.
Rgrds.
Ged.
GedBlake said:
Hi, Anderson2...
If I may throw in my couple of cents...
The recovery.img file to be fastboot flashed (TWRP or CWM, it really doesn't matter which) needs be to stored on your PC... on the same PATH as the FASTBOOT.EXE file. The easiest way of accomplishing this, is to copy it directly into the folder that contains your FASTBOOT and ADB executables.
Where this folder is located on your PC depends on how you have fastboot setup, but it's usually stored in a folder called /Platform-Tools (if I remember correctly). But because I've never bothered myself installing the whole Android SDK (of which Fastboot is a part of) on my PC, I'm not sure of it's precise PATH (ie. it's location) but I think it's somewhere in the Android SDK folder.
For myself, I just maintain a simple folder on the Windows desktop containing the FASTBOOT.EXE and ADB.EXE files and a few necessary Windows .DLL files. When I wish to fastboot flash a Custom Recovery, I simply copy the Custom Recovery .img file (TWRP or CWM) into this folder, rename it to recovery.img (renaming it thus makes typing at the command prompt easier, and reduces the scope for potential typos)... boot the Nexus 7 into the bootloader, hook it up to my PC via USB. And then open a command prompt on the folder, and run...
Code:
fastboot devices
This is purely diagnostic, and hopefully confirms a working fastboot connection.
You should see something like this...
Code:
025d2d424bxxxxx fastboot
A serial number followed by the word fastboot. If you see this, you can go ahead and run...
Code:
fastboot flash recovery recovery.img
(This command assumes an unlocked bootloader... indicated by an unlocked padlock symbol under the Google logo upon boot. If it isn't, you should unlock it with fastboot oem unlock BEFORE fastboot flashing the Custom Recovery).
My point is, though... the 'recovery.img' to be flashed must be in the same folder as the FASTBOOT.EXE file, or as you have discovered, you will get the error "Cannot open recovery-twrp-grouper.img".
If fastboot can't find it.. it can't open it.
Hope this helps.
Rgrds.
Ged.
Click to expand...
Click to collapse
Thank you very much! That is very helpful. I had assumed the recovery img should be on the tablet. No wonder fastboot could not find it! I'm sure that will solve my problem.
Thank you for helping. I'm slowly learning my way around the adb, fastboot commands as I'm sure I'll need them again when 4.4 unroots me again.
Anderson2 said:
Thank you very much! That is very helpful. I had assumed the recovery img should be on the tablet. No wonder fastboot could not find it! I'm sure that will solve my problem.
Thank you for helping. I'm slowly learning my way around the adb, fastboot commands as I'm sure I'll need them again when 4.4 unroots me again.
Click to expand...
Click to collapse
No, problem Anderson2... glad to help.
Adb and fastboot are indeed powerful and useful tools, and I would strongly recommend anybody wishing to 'modify' their Nexus 7 (everything from rooting to flashing Custom ROMs) to familiarise themselves with the fundamentals of their operation... rather than relying on toolkits.
There are actually ways of flashing TWRP or CWM Custom Recoveries directly from the Nexus 7 itself, without recourse to either fastboot or the need for a PC... by using apps like Flash Image GUI or Flashify. But these apps need you to be already rooted, unfortunately.
So to summarize how to acquire root the old fashioned way....
---------------------------------------
1). Unlock the bootloader first with fastboot oem unlock. For security reasons, this will factory reset the device... ie., WIPE everything on it.
...but I assume your Nexus 7's bootloader is already unlocked, given it's been rooted once before.
And so swiftly skipping forward to step 2...
2). Fastboot flash a Custom Recovery (CWM or TWRP) with fastboot flash recovery recovery.img... where 'recovery.img' is the Custom Recovery of your choice. Reboot the device by using the Custom Recovery's own reboot option.
3). Download Chainfire's UPDATE-SuperSU-v1.65.zip root package directly to your Nexus 7. This DOES need to be on the Nexus 7. Most Android browsers (including Chrome) download stuff to the /download folder on the devices internal storage. You'll need to remember the location, for when you come to flash it with either CWM or TWRP.
4). Boot the Nexus 7 into the bootloader. Although you can do it with adb reboot bootloader, you can also do it manually as follows...
- Shut down the Nexus 7 completely.
- Press and hold the VOL-DOWN button... whilst holding, press the POWER-ON button for about 5-10 seconds. The device should now boot into the bootloader.
5). Boot into your Custom Recovery... whilst in the bootloader, use the VOL-KEYS to navigate to the RECOVERY MODE option, and press the POWER BUTTON to select. The device will now boot into either CWM or TWRP Custom Recovery.... whichever one you fastboot flashed earlier.
6). Now to ROOT!
** If using TWRP... tap on the INSTALL button, and then navigate to the /download folder on the Nexus 7's internal storage, and where Chainfires UPDATE-SuperSU-v1.65.zip is awaiting. Tap on it, and Swipe to Confirm Flash.
** If using CWM... tap on the INSTALL ZIP option, followed by CHOOSE ZIP FROM /SDCARD... tap on the folder 0/... this gives you access to the internal storage of the Nexus 7... from which you can navigate to the /download folder, where again, Chainfires UPDATE-SuperSU-v1.65.zip is awaiting. Tap on NO (the first default option) or YES - Install UPDATE-SuperSU-v1.65.zip.
On every screen in the CWM filemanager (by which you navigate) there is ALWAYS a ++++Go Back++++ option at the bottom of the screen. So you can always backout out of anything. In CWM you can also use the VOL UP and DOWN keys to scroll, with the POWER-BUTTON to select an option.
Once you have flashed Chainfire's SuperSU root package, reboot the device with the Custom Recovery's own reboot option.
Upon reboot, and whichever Custom Recovery you're using , it ***MIGHT*** suggest you are unrooted... and offer to fix root for you. Ignore it, and continue to reboot.
---------------------------------------
And that's it... that's how you root a first generation Nexus 7 (2012).
Hope this is of use and... Good luck.
Rgrds,
Ged.
GedBlake said:
No, problem Anderson2... glad to help.
Adb and fastboot are indeed powerful and useful tools, and I would strongly recommend anybody wishing to 'modify' their Nexus 7 (everything from rooting to flashing Custom ROMs) to familiarise themselves with the fundamentals of their operation... rather than relying on toolkits.
There are actually ways of flashing TWRP or CWM Custom Recoveries directly from the Nexus 7 itself, without recourse to either fastboot or the need for a PC... by using apps like Flash Image GUI or Flashify. But these apps need you to be already rooted, unfortunately.
So to summarize how to acquire root the old fashioned way....
---------------------------------------
1). Unlock the bootloader first with fastboot oem unlock. For security reasons, this will factory reset the device... ie., WIPE everything on it. I assume your bootloader is already unlocked.
So swiftly skipping forward to step 2....
2). Fastboot flash a Custom Recovery (CWM or TWRP) with fastboot flash recovery recovery.img... where 'recovery.img' is the Custom Recovery of your choice. Reboot the device by using the Custom Recovery's own reboot option.
3). Download Chainfire's UPDATE-SuperSU-v1.65.zip root package directly to your Nexus 7. This DOES need to be on the Nexus 7. Most Android browsers (including Chrome) download stuff to the /download folder on the devices internal storage. You'll need to remember the location, for when you come to flash it with either CWM or TWRP.
4). Boot the Nexus 7 into the bootloader. Although you can do it with adb reboot bootloader, you can also do it manually as follows...
- Shut down the Nexus 7 completely.
- Press and hold the VOL-DOWN button... whilst holding, press the POWER-ON button for about 5-10 seconds. The device should now boot into the bootloader.
5). Boot into your Custom Recovery... whilst in the bootloader, use the VOL-KEYS to navigate to the RECOVERY MODE option, and press the POWER BUTTON to select. The device will now boot into either CWM or TWRP Custom Recovery.... whichever one you fastboot flashed earlier.
6). Now to ROOT!
** If using TWRP... tap on the INSTALL button, and then navigate to the /download folder on the Nexus 7's internal storage, and where Chainfires UPDATE-SuperSU-v1.65.zip is awaiting. Tap on it, and Swipe to Confirm Flash.
** If using CWM... tap on the INSTALL ZIP option, followed by CHOOSE ZIP FROM /SDCARD... tap on the folder 0/... this gives you access to the internal storage of the Nexus 7... from which you can navigate to the /download folder, where again, Chainfires UPDATE-SuperSU-v1.65.zip is awaiting. Tap on NO (the first default option) or YES - Install UPDATE-SuperSU-v1.65.zip.
On every screen in the CWM filemanager (by which you navigate) there is ALWAYS a ++++Go Back++++ option at the bottom of the screen. So you can always backout out of anything. In CWM you can also use the VOL UP and DOWN keys to scroll, with the POWER-BUTTON to select an option.
Once you have flashed Chainfire's SuperSU root package, reboot the device with the Custom Recovery's own reboot option.
Upon reboot, and whichever Custom Recovery you're using , it ***MIGHT*** suggest you are unrooted... and offer to fix root for you. Ignore it, and continue to reboot.
---------------------------------------
And that's it... that's how you root a first generation Nexus 7 (2012).
Hope this is of use and... Good luck.
Rgrds,
Ged.
Click to expand...
Click to collapse
Thank you all very much. I greatly appreciate your help.
This post should be a sticky!
One more question, this nexus 7 2012 is my wife's. But I also own a nexus 7I this one a 2013 which is currently rooted with Android 4.3 and twrp Nandroid backups. I'm afraid that when the 4.4 ota upgrade comes along it might again unroot both our tablets. Are the rooting commands or procedures different for the 2013 nexus 7 (other than using a flo recovery img,) or do I do exactly the same as described above?
Again, you guys are wonderful to help us newbies out. Many thanks to all. Wish I could do something in return.
Anderson2 said:
Thank you all very much. I greatly appreciate your help.
This post should be a sticky!
One more question, this nexus 7 2012 is my wife's. But I also own a nexus 7I this one a 2013 which is currently rooted with Android 4.3 and twrp Nandroid backups. I'm afraid that when the 4.4 ota upgrade comes along it might again unroot both our tablets. Are the rooting commands or procedures different for the 2013 nexus 7 (other than using a flo recovery img,) or do I do exactly the same as described above?
Again, you guys are wonderful to help us newbies out. Many thanks to all. Wish I could do something in return.
Click to expand...
Click to collapse
Hello again, Anderson2...
Well, you sort of are already doing something in return.... you're asking questions.
Questions that require answers. Those answers, whoever posts them, may be of assistance to somebody else. Somebody else looking for a solution to a similar problem.
I always look upon these forums as a means of sharing. Not everybody can know everything. God knows, I don't know everything.... and I've been messing around with Android for three years now. So don't worry so much about it being a quid pro quo sort of arrangement.
I know what I know primarily as a result of my own experiences and what I've learned here from the many (in most cases, more knowledgeable) posters here on XDA. What you learn today, you can pass on to others, tomorrow (metaphorically speaking). We, all of us, stand on the shoulders of each other.
With regard to the second generation Nexus 7 (2013)... I'm afraid I really don't know much about it... but I'd be surprised if rooting it deviated significantly from rooting the first generation Nexus 7....
Namely...
1). Unlock the bootloader.
2). Flash a Custom Recovery.
3). Using that Custom Recovery, flash some SU root package... probably from Chainfire.
Anyway, I've found this tutorial here...
http://forum.xda-developers.com/showthread.php?t=2382051
...and it appears to follow a very similar template.
The Nexus 7 (2013) forum itself, which is also worth visiting, is located here....
http://forum.xda-developers.com/nexus-7-2013
Rgrds,
Ged.

Manual upgrading Nexus 6 without wiping data.

A little how-to on upgrading your nexus phone without having to wipe your data if you rooted and installed some stuff onto system partition.
WARNING!
DO NOT USE THIS METHOD IF YOU ARE NOT GOOD AT USING COMMAND LINE! THIS HAS A POSSIBILITY OF BRICKING YOUR PHONE TO WHERE IT WONT BOOT.
Note:
You will loose the following when using this method:
-Custom Recovery
-Custom Kernel
-ANYTHING that is installed on the system partition including but not limited to: SU (root), Busybox, Xposed, etc.
What is needed:
-ADB (1.0.32+) and Fastboot
-Factory Image of Nexus 6 (https://developers.google.com/android/nexus/images?hl=en)
-- MUST BE THE SAME BUILD VERSION AS YOUR CURRENT VERSION!
--- Check under System > About Phone > Build Number
Step 1 (Catch the update url):
Open up command prompt/terminal and type in
Code:
adb logcat
.
From here you will get a lot of debug lines, dont worry about any of it.
What we are looking for is the url to the update file.
When adb logcat is ready, start the update for your phone. (Dont worry about restarting or whatnot, you wont be using the file it's downloaded anyway).
From the url, use that to download the update file to your computer.
Step 2 (Backup):
This is important as a just in case **** happens thing.
BACK UP YOUR PHONE if you have a custom recovery.
Don't think that this update method is foolproof.
Don't even think.
BACK IT UP!
Step 3 (Restore to "Factory"):
This is where it gets hairy.
Using the factory image you downloaded open up the "image-shamu-<build>.zip" file and extract "boot.img", "recovery.img", and
"system.img".
Restart your phone to bootloader either with adb or pressing and holding power + vol down.
From here, in a command prompt/terminal, type:
Code:
fastboot flash boot <boot.img path>
Code:
fastboot flash recovery <recovery.img path>
Code:
fastboot flash system <system.img path>
System image will take the longest and will be streamed to the phone so just wait until it's finished.
Step 4 (Upgrade):
ok, now that we are in "Factory" settings, start up your phone in recovery mode.
From the recovery screen you should see the little android with the red exclamation point icon thing.
Press and hold power and click the volume up button. Release power button.
From here, select
Code:
apply update from ADB
now in command prompt type:
Code:
adb sideload <update.zip path>
Step 5: ???
Step 6: Profit!
I have done this method twice and haven't experienced any problems myself. As stated above, this does have the possibility of mucking something up so be sure to have backups.
After everything is done, you are using your phone in stock mode.
flash your custom recovery and custom kernel if you'd like. Also reinstall root via custom recovery (twrp will let you know) and busybox.
Troubleshooting:
- Update says system partition has unexpected contents.
-- Reflash system.img.
- Get adb sideload error (xxx)
-- Make sure you have the latest version of adb and that your drivers for your phone are installed. Sometimes you have to manually install the adb drivers when in sideload mode.

[GUIDE] Unlock/Root/Flash for Nexus 5X

[SIZE=+3]Heisenberg's How-To Guide For Beginners[/SIZE]
[SIZE=+2]Nexus 5X[/SIZE]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
[SIZE=+1]Intro[/SIZE]
This thread will serve as a location for basic how-to guides for the Nexus 5X. I'm going to start off with a couple of the more obvious ones and go from there. If anyone has any suggestions for additions please feel free to let me know.
If you're unsure about something please read the FAQ section in post #2 before creating a post to ask a question.
[size=+1]Prerequisites[/size]:
You'll need a working adb/fastboot environment on your PC to get through some of these guides. Below are two options for install.
Please do not install adb/fastboot via any means other than the Android SDK, using other tools (like Minimal adb & fastboot) can lead to an outdated setup and various problems with flashing. You've been warned, other tools will not be supported in this thread.
Option A
Google hosts ADB/Fastboot (platform-tools) for Windows, OSX, and Linux. This is a minimal download, in contrast to Option 2. These links and file sizes may be updated periodically by Google. If using Windows, download the Google USB Driver and follow the driver install instructions. Once you have downloaded the platform-tools zip, extract the file then transfer the platform-tools folder to your desktop. The platform-tools folder contains adb, fastboot, and several other files. Note that clicking any link for platform-tools will immediately start a download.
*Windows: platform-tools. Google USB Driver install.
*OSX: platform-tools. For additional details on how to use OSX and adb/fastboot commands, see post #3.
*Linux: platform-tools.
See Option B below for old method to install adb/fastboot:
Option B
Go here to download the Android SDK, which will give you most updated version of adb and fastboot. Scroll to the bottom of the page and find Other Download Options>SDK Tools Only, and grab the right version for your OS. While it's downloading create a folder in C:\ called SDK (C:\SDK). Once you've downloaded the zip you can extract it into your C:\SDK folder. Navigate to C:\SDK\android-sdk-windows and open SDK Manager.exe. In SDK Manager you need to install the following packages:
Tools> Android SDK Tools, Android SDK Platform-tools
Extras> Android Support Repository, Google USB Driver
Once you have installed those, inside C:\SDK you should see some new folders, one of them will be called platform-tools, within that folder you should see fastboot.exe and adb.exe. I'll refer to this as your fastboot folder/directory or working folder/directory during this guide.
For Option A and B, make sure adb is correctly installed. Open a command prompt from within your fastboot folder (hold shift + right click, select open command prompt here) and issue this command:
Code:
adb version
If it returns a version number for Android Debug Bridge then you're good to go.
You can test adb by connecting your device to your PC while booted into Android (making sure that adb/usb debugging is enabled in Settings>Developer Options) with the screen unlocked and issuing this command:
Code:
adb devices
It should return your device serial number, if so, adb is working.
You can test fastboot by connecting your device to your PC while booted into the bootloader (power + volume down) and issuing this command:
Code:
fastboot devices
It should return your device serial number, if so, fastboot is working.
By attempting any of the processes listed this thread you accept full responsibility for your actions. I will not be held responsible if your device stops working, catches on fire, or turns into a hipster and claims to have been modified before it was cool.
[SIZE=+1]Quick Tips[/SIZE]
How to boot into the bootloader:
Power off your device. Once it's powered off hold power + volume down and the phone will boot into the bootloader. You can also use the following adb command:
Code:
adb reboot bootloader
You can also use an app called Quick Boot to boot into the bootloader directly from Android (root required).
How to boot into recovery:
Boot into the bootloader (see above), use the volume keys to scroll through the options and use the power button to select the recovery mode option. You can also use the following adb command:
Code:
adb reboot recovery
You can also use an app called Quick Boot to boot into the recovery directly from Android (root required).
[SIZE=+1]Index[/SIZE]
How To Unlock Your Bootloader
How To Install A Custom Recovery On Your Device
How To Decrypt Your Data Partition
How To Make A Nandroid Backup With TWRP Recovery
How To Make An EFS Backup With TWRP Recovery
How To Root
How To Install A ROM with TWRP Recovery
How To Install A Custom Kernel With TWRP Recovery
How To Update To A New Build Of The Stock ROM
How To Flash The Factory Images (Return To Stock)
How To Flash The Factory Images (Return To Stock But Leaving Internal Storage Intact)
FAQ can be found in post #2!
[SIZE=+1]1. How To Unlock Your Bootloader[/SIZE]
Go into Settings/About Phone, scroll down and click on ?build number? continuously until you see a toast notification telling you that you've enabled Developer Options. Go back to your Settings menu and enter Developer Options, scroll down and click on the ?Enable OEM Unlock? checkbox, also make sure you enable USB Debugging while you're in the Developer Options menu.
Power off your phone then boot into the bootloader (power + volume down).
Connect your phone to your PC via usb cable.
Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here).
Check your fastboot connection by issuing this command:
Code:
fastboot devices
It should return your device serial number, if not you need to make sure your drivers are installed correctly.​
Once you've confirmed your fastboot connection issue this command:
Code:
fastboot oem unlock
This will erase all user data from the device!
You should now see a screen on your phone asking you to confirm this action, use the volume keys to scroll and the power key to confirm if you're sure you want to go ahead.
Allow the process to complete and then issue this command:
Code:
fastboot reboot
Allow everything to go ahead and once finished you can disconnect your usb cable.
Important: do not relock your bootloader unless your phone is fully stock. You must flash the factory images first in order to remove root and custom recovery (if you have them), if this precaution isn't taken you may end up with a brick. Please see section 10 of this guide for full instructions on how to return to stock.
[SIZE=+1]2. How To Install A Custom Recovery On Your Device[/SIZE]
Prerequisites: unlocked bootloader (section 1). Please read FAQ #7 if using TWRP 3.0.2-1 or 3.0.2-2.
Download TWRP Recovery onto your PC.
Make sure you check the md5 to verify its integrity (where possible).
Place the file in your fastboot folder (this is where fastboot.exe is located on your PC).
Power off your phone then boot into the bootloader (power + volume down).
Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here), enter this command:
Code:
fastboot flash recovery filename.img
(The recovery filename in the command will change depending on which recovery you're flashing)
Use the volume keys to scroll and power key to select the Reboot Bootloader option. Once the phone has booted back into the bootloader, use the volume keys to scroll and the power key to boot into your newly flashed recovery. It's now safe to disconnect your usb cable. If using Nougat 7.0 or newer, you must now boot directly into TWRP and flash SuperSU (or your preferred root alternative) so that TWRP will persist between reboots.
When TWRP boots up you'll be asked whether you want to allow system modifications or to keep it read-only, choose to allow system modifications, there's no benefit to keeping it read-only.
Do not flash the version of SuperSU that TWRP offers to flash for you in order to give you root, it is not compatible and will cause problems. When you attempt to reboot out of TWRP it will tell you that it's detecting that you don't have root and it will offer to root for you, skip past this.
Some users need a custom recovery for a temporary period, so they live boot the recovery. In this scenario, the custom recovery replaces the stock recovery until a reboot is performed. Place the file in your fastboot folder then enter this command:
Code:
fastboot boot filename.img
(The recovery filename in the command will change depending on which recovery you're flashing)
[SIZE=+1]3. How To Decrypt Your Data Partition[/SIZE]
This is no longer necessary as long as you use TWRP 2.8.7.1 or newer
Prerequisites: unlocked bootloader (section 1).
TWRP recovery cannot decrypt your data partition at this stage. In order for TWRP to be able to read/write on your data partition (to root or create a nandroid backup) you will need to format it, a format will remove encryption.
Boot into the bootloader and connect your phone to your PC via usb cable.
Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here), enter this command:
Code:
fastboot format userdata
Please note: this will erase all user data from the device!
Once the process has completed you can either reboot normally:
Code:
fastboot reboot
Or you can reboot back to the bootloader in order to undertake another task:
Code:
fastboot reboot-bootloader
[SIZE=+1]4. How To Make A Nandroid Backup With TWRP Recovery[/SIZE]
Prerequisites: unlocked bootloader (section 1), TWRP recovery (section 2).
A nandroid backup is a very important thing to have before installing any custom software on your device. It's basically a backup of your stock system that you can fall back on if anything goes wrong or if you just want your stock ROM back. You can also use the backup tool to create a backup of your favourite ROM set up exactly the way you like it. The backup you create can be easily restored using the restore tool in TWRP recovery.
Boot TWRP recovery, select the backup option from the TWRP home screen, check the system/data/boot boxes, and swipe to backup. The process will take a few minutes.
[SIZE=+1]5. How To Make An EFS Backup With TWRP Recovery[/SIZE]
An EFS backup is very important to have, if your EFS partition becomes corrupt you will have no IMEI, and therefore will not be able to use the phone as a phone. Making an EFS backup is insurance against this catastrophic event. Without a backup, restoring your EFS can be extremely difficult or impossible. The backup you create can be easily restored using the restore tool in TWRP recovery.
Please read FAQ #7 if using TWRP 3.0.2-1 or 3.0.2-2. Boot into TWRP and select the backup option from the TWRP home screen, make sure only the EFS box is selected, and swipe to backup. The process will take a few seconds. Keep a copy of the backup on your phone and also keep another copy somewhere safe.
[SIZE=+1]6. How To Root[/SIZE]
Prerequisites: unlocked bootloader (section 1), TWRP recovery (section 2).
Download the latest root method of your choosing to your phone:
Magisk
SuperSU Stable
SuperSU Service Release (SuperSU beta channel)
Or to root Android Nougat 7.0 visit this thread: Use SuperSU 2.78 or newer.
[WIP] Android N Preview
Boot into TWRP recovery and enter the install menu.
Navigate to where you have SuperSU stored on your internal storage and select it.
Swipe to install.
Once you've installed SuperSU you'll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button. That's it.
Do not flash the version of SuperSU that TWRP offers to flash for you in order to give you root, it is not compatible and will cause problems. When you attempt to reboot out of TWRP it will tell you that it's detecting that you don't have root and it will offer to root for you, skip past this. You do have root, ignore this every time it comes up.
[SIZE=+1]7. How To Install A ROM with TWRP Recovery[/SIZE]
Prerequisites: unlocked bootloader (section 1), TWRP recovery (section 2), vendor.img (section 9).
Installing a ROM is a straight forward and easy process. Before you install anything you should make a nandroid backup (instructions above). Next, install the vendor.img that matches the Google security OTA that the ROM you want to install is based on. Find the vendor.img inside the factory images provided by Google then flash this file with fastboot (section 9).
Download a ROM and appropriate Gapps package and place on your device.
Boot into your custom recovery.
Select the wipe option from the TWRP home screen.
Perform a Factory Reset.
Select advanced wipe.
Check the system, data, cache, and dalvik cache options.
Swipe to wipe.
Install the ROM.
Select the install option from the TWRP home screen.
Navigate to where you have the ROM zip stored on your sd card and select it.
Swipe to install.
Most ROMs will run an installer script at this point but some ROMs have what is called an Aroma Installer which allow you to choose some install options before the script runs.​
You will also need to install the appropriate gapps package directly after installing the ROM.
Once you've installed all necessary zips you'll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button.
[SIZE=+1]8. How To Install A Custom Kernel With TWRP Recovery[/SIZE]
Prerequisites: unlocked bootloader (section 1), TWRP recovery (section 2).
A custom kernel can open up a new level of control over your device, such as overclocking/underclocking, undervolting, changing governors, changing I/O schedulers, adjusting colour calibrations, adjusting sound calibrations, and many other options.
Download a kernel that is compatible with your current ROM.
Check the md5 to verify its integrity.
Enter TWRP recovery.
Select the install option from the TWRP home screen.
Navigate to the kernel and select it.
Swipe to install.
You'll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button.
Once your phone has booted up you can use a kernel tuning app to change governors, I/O scheduler, clock speed, and other options. Some of the popular kernel apps are Kernel Auditor, EX Kernel Manager, Trickster Mod, No Frills, Kernel Tuner, and many more.
[SIZE=+1]9. How To Update To A New Build Of The Stock ROM[/SIZE]
Prerequisites: unlocked bootloader (section 1).
This method does not wipe your data, so you will keep your apps and settings. You should have no problems, however, if you experience problems you may need to perform a factory reset and flash again. Make a backup first and transfer it to your PC.
Download the latest build via the appropriate factory images for your model (Nexus 5X/Bullhead) here.
Note: Android 7.1.2 and newer factory images do not contain cache.img. Do not wipe the cache.img for this process when using or moving to Android 7.1.2 or newer. If you have wiped cache.img, download the most recent Android 7.1.1 factory image and flash the cache.img from that zip archive.
Unzip the bullhead-xxxxxx-factory-xxxxxxxx (x's replace variables) into a directory on your PC (for this guide we'll use C:\bullhead\).
Once unzipped you should have a folder named bullhead-xxxxxx (x's replace variables). Open it and move the following files to a new directory named C:\bullhead\images\:
bootloader-bullhead-bullhead-xx.xx.img
radio-bullhead-bullhead-xx.xx.img
(Please note that radio and bootloader naming changes from build to build so the filenames and below commands will change with them)
Within C:\bullhead\bullhead-xxxxxx\ you'll see another zip archive named image-bullhead-xxxxxx, unzip the contents of that zip into the C:\bullhead\images\ folder we created before. Now within C:\bullhead\images\ you should have the following files:
android-info.txt
boot.img
bootloader-bullhead-bullhead-xx.xx.img
cache.img
radio-bullhead-bullhead-xx.xx.img
recovery.img
system.img
userdata.img
vendor.img
Boot into the bootloader and connect your phone to your PC via usb cable.
Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here), enter these commands to flash:
Code:
fastboot flash bootloader C:\bullhead\images\bootloader-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash radio C:\bullhead\images\radio-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash boot C:\bullhead\images\boot.img
fastboot erase cache
fastboot flash cache C:\bullhead\images\cache.img
fastboot flash recovery C:\bullhead\images\recovery.img
fastboot flash system C:\bullhead\images\system.img
fastboot flash vendor C:\bullhead\images\vendor.img
You can skip flashing the recovery if you wish, but even if you do the stock recovery may be patched on the first boot anyway. So you'll need to flash TWRP and SuperSU again if you need/want those, as well as any other system modifications you may have had.
You'll have to flash SuperSU again now, plus add any mods that you previously had.
[SIZE=+1]10. How To Flash The Factory Images (And Return To Stock)[/SIZE]
Prerequisites: unlocked bootloader (section 1).
This section will explain how to return the phone to be like it was when it came out of the box. This will wipe everything from the phone. If you wish to flash the factory images without wiping your personal data from the internal storage please move on to the next section.
Note: Android 7.1.2 and newer factory images do not contain cache.img. Do not wipe the cache.img for this process when using or moving to Android 7.1.2 or newer. If you have wiped cache.img, download the most recent Android 7.1.1 factory image and flash the cache.img from that zip archive.
Go to Settings/Backup & Reset and perform a factory data reset. This will remove all of your user data from the device (apps, settings, photos, music, etc).
Download the appropriate factory images for your model here.
Unzip the bullhead-xxxxxx-factory-xxxxxxxx (x's replace variables) into a directory on your PC (for this guide we'll use C:\bullhead\).
Once unzipped you should have a folder named bullhead-xxxxxx (x's replace variables). Open it and move the following files to a new directory named C:\bullhead\images\:
bootloader-bullhead-bullhead-xx.xx.img
radio-bullhead-bullhead-xx.xx.img
(Please note that radio and bootloader naming changes from build to build so the filenames and below commands will change with them)
Within C:\bullhead\bullhead-xxxxxx\ you'll see another zip archive named image-bullhead-xxxxxx, unzip the contents of that zip into the C:\bullhead\images\ folder we created before. Now within C:\bullhead\images\ you should have the following files:
android-info.txt
boot.img
bootloader-bullhead-bullhead-xx.xx.img
cache.img
radio-bullhead-bullhead-xx.xx.img
recovery.img
system.img
userdata.img
vendor.img
Boot into the bootloader and connect your phone to your PC via usb cable.
Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here), enter these commands to flash:
Code:
fastboot flash bootloader C:\bullhead\images\bootloader-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash radio C:\bullhead\images\radio-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash boot C:\bullhead\images\boot.img
fastboot erase cache
fastboot flash cache C:\bullhead\images\cache.img
fastboot flash recovery C:\bullhead\images\recovery.img
fastboot flash system C:\bullhead\images\system.img
fastboot flash vendor C:\bullhead\images\vendor.img
If you wish to you can also relock the bootloader with this command:
Code:
fastboot oem lock
(This command will wipe all user data from the device)
Important: do not lock the bootloader unless you have first flashed the stock images. Locking the bootloader while you have a custom recovery installed can result in a brick. Please also note that the locking procedure will wipe all data on an encrypted device.
Once all commands/flashes are complete you can reboot the device:
Code:
fastboot reboot
[SIZE=+1]11. How To Flash The Factory Images (Return To Stock But Leaving Internal Storage Intact)[/SIZE]
Prerequisites: unlocked bootloader (section 1), TWRP recovery (section 2). Note: Android 7.1.2 and newer factory images do not contain cache.img. Do not wipe the cache.img for this process when using or moving to Android 7.1.2 or newer. If you have wiped cache.img, download the most recent Android 7.1.1 factory image and flash the cache.img from that zip archive.
This section will explain how to return the phone to be like it was when it came out of the box, except it will not wipe any of your personal data (photos, music, etc) from the internal storage.
Download the appropriate factory images for your model here.
Unzip the bullhead-xxxxxx-factory-xxxxxxxx (x's replace variables) into a directory on your PC (for this guide we'll use C:\bullhead\).
Once unzipped you should have a folder named bullhead-xxxxxx (x's replace variables). Open it and move the following files to a new directory named C:\bullhead\images\:
bootloader-bullhead-bullhead-xx.xx.img
radio-bullhead-bullhead-xx.xx.img
(Please note that radio and bootloader naming changes from build to build so the filenames and below commands will change with them)
Within C:\bullhead\bullhead-xxxxxx\ you'll see another zip archive named image-bullhead-xxxxxx, unzip the contents of that zip into the C:\bullhead\images\ folder we created before. Now within C:\bullhead\images\ you should have the following files:
android-info.txt
boot.img
bootloader-bullhead-bullhead-xx.xx.img
cache.img
radio-bullhead-bullhead-xx.xx.img
recovery.img
system.img
userdata.img
vendor.img
Boot into TWRP recovery and enter the wipe menu, select advanced wipe, check only the data box and swipe to wipe.
Go to the TWRP main menu and enter the reboot menu, select bootloader. The phone will now boot into the bootloader, once it has you can connect your phone to your PC via usb cable.
Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here), enter these commands to flash:
Code:
fastboot flash bootloader C:\bullhead\images\bootloader-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash radio C:\bullhead\images\radio-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash boot C:\bullhead\images\boot.img
fastboot erase cache
fastboot flash cache C:\bullhead\images\cache.img
fastboot flash recovery C:\bullhead\images\recovery.img
fastboot flash system C:\bullhead\images\system.img
fastboot flash vendor C:\bullhead\images\vendor.img
Once all commands/flashes are complete you can reboot the device:
Code:
fastboot reboot
FAQ can be found in post #2!
Donate To Me
[size=+1]Frequently Asked Questions[/size]
1. How do I boot into the bootloader?
Power off your device. Once it's powered off hold power + volume down and the phone will boot into the bootloader. You can also use the following adb command:
Code:
adb reboot bootloader
You can also use an app called Quick Boot to boot into the bootloader directly from Android (root required).
2. How do I boot into recovery?
Boot into the bootloader (see above), use the volume keys to scroll through the options and use the power button to select the recovery mode option. You can also use the following adb command:
Code:
adb reboot recovery
You can also use an app called Quick Boot to boot into the recovery directly from Android (root required).
3. When issuing the fastboot flashing unlock command it doesn't work, I only get a list of possible commands. What's going on?
This is usually due to having an outdated adb/fastboot setup. If you installed adb/fastboot by any means other than via the Android SDK this is probably the cause. Visit the prerequisites section in the beginning of this guide to properly install adb/fastboot and ensure that it's up to date.
4. How do I take an OTA or update if I have root or other system modifications on the stock ROM?
You can't take an OTA update while you have root or any system modifications. You'd need to use fastboot to flash the system, boot, and recovery images. It's much easier to just flash the newer build with fastboot, see section 9 of this guide for full instructions.
5. Does taking an OTA update wipe my user data?
No, it doesn't.
6. Do I need to make an EFS backup?
Absolutely yes. An EFS backup is extremely important. If your EFS partition becomes corrupt, your IMEI will disappear and you will not be able to use the phone as a phone. Without a backup it can be extremely difficult (or impossible) to restore your EFS. See the next question for an EFS backup related issue and solution.
7. I have a bootloop after restoring my EFS backup in TWRP 3.0.2-1. What can I do?
TWRP 3.0.2-1 and 3.0.2-2 are the first official TWRP releases with Nougat 7.0 or newer compatibility. Unfortunately, there are separate bugs affecting TWRP 3.0.2-1 and 3.0.2-2. A member of the TWRP development team details these issues right here. This link redirects to a thread in the Nexus 6P forums but also applies to the Nexus 5X. Read the original post of that same thread to learn how to resolve this EFS restore bootloop. You must use ADB and the phone must be booted in TWRP to resolve this issue. These ADB commands work on the Nexus 5X and 6P.
8. Can I flash just the xxxxxx.img from the factory image without losing my data?
Flashing userdata.img will format your entire phone (personal data including SMS/MMS, pictures, downloaded files, etc). You can flash any combination of these partitions (boot, system, vendor, radio, or bootloader) and this will leave your personal data intact. However, any mods that you have installed into system, vendor, or boot will be overwritten and returned to the default factory image setup when you flash these partitions. Flashing recovery.img or a newer version of your custom recovery will replace your existing recovery.
9. After updating my ROM, I get this message on every boot: "There's an internal problem with your device. Contact your manufacturer."
This warning indicates a mismatched vendor and system partition. The vendor partition was formerly integrated in the system partition for previous Nexus devices but is now a separate partition that must be flashed for each Google security update. Download a factory image and update your vendor partition using fastboot so that it matches your rom's OS build and monthly security update. If you have a file explorer installed on your phone, you can determine which vendor.img is installed by navigating to /vendor/build.prop and clicking on the build.prop. The specific vendor installed will be a combination of six numbers and letters listed in all capitals (example: NMF26F) in the ro.vendor.build.fingerprint line. These will always match up with the factory image of the same Android build (six digit alphanumeric name) for this device.
Vendor.img is specific to each OTA and contains proprietary binaries for the phone that regularly receive updates to resolve security risks. If you are a custom rom user, make sure that you flash the vendor.img for the Google monthly security update that you are moving to. Be aware that sometimes AOSP roms utilize the AOSP master branch which has a newer Android build than the monthly security update for this device. You will still need to install that month's vendor.img.
The phone will fail to boot if you mismatch the vendor.img with a different Android version. For instance, a 6.0 Marshmallow vendor.img will not allow your phone to boot on 7.0 Nougat. The vendor.img is typically not included in the custom rom zip but is often available as a separate download in the custom rom thread's first post.
Reserved #2
Reserved #3
OSX, ADB and Fastboot commands!
So you use OSX and would like to use ADB/fastboot, unlock, root, or simply have a working knowledge of your phone. Welcome! Most of the information in the guide above applies to OSX, however there are a few key changes.
Google hosts ADB/Fastboot (platform-tools) for Windows, OSX, and Linux. This is a minimal download, however these links and file sizes may be updated periodically by Google. Download the OSX platform-tools. Note that clicking the link for platform-tools will immediately start a download.
*OSX: platform-tools.
Once you have downloaded the platform-tools zip, extract the file then transfer the platform-tools folder to your desktop. The platform-tools folder contains adb, fastboot, and several other files.
To make sure your ADB is installed correctly, open a terminal command prompt and issue this cd command (change directory) to the platform-tools folder:
Code:
cd /users/username/desktop/platform-tools
then issue this command to check your adb version:
Code:
./adb version
If it returns a version number for Android Debug Bridge then you're good to go.
Using ADB/Fastboot commands
OSX natively requires "./" to prefix any ADB or Fastboot commands. If following the guide in post #1, commands issued in OSX must be written as follows ./adb [command] or ./fastboot [command]. Below are example scenarios.
To check if your device sees ADB, enable USB Debugging from within Android in Settings/Developer options. Go into Settings/About Phone, scroll down and click on build number continuously until you see a toast notification telling you that you've enabled Developer Options. Go back to your Settings menu and enter Developer Options, scroll down and enable USB Debugging.
Code:
./adb devices
It should return your device serial number, if so, adb is working.
Reboot into the bootloader:
Code:
./adb reboot bootloader
Reboot into the recovery:
Code:
./adb reboot recovery
Fastboot commands must be performed while in the bootloader. Power off your phone then boot into the bootloader (power + volume down). Below are some example OSX fastboot commands that can be used throughout the guide:
Check if your device sees fastboot:
Code:
./fastboot devices
Install a factory image:
cd into the platform-tools folder with the following command:
Code:
cd /users/username/desktop/platform-tools
Now enter commands to flash a factory image:
Code:
./fastboot flash bootloader /users/username/desktop/bullhead/images/bootloader-bullhead-bullhead-xx.xx.img
./fastboot reboot-bootloader
./fastboot flash radio /users/username/desktop/bullhead/images/radio-bullhead-bullhead-xx.xx.img
./fastboot reboot-bootloader
./fastboot flash boot /users/username/desktop/bullhead/images/boot.img
./fastboot erase cache
./fastboot flash cache /users/username/desktop/bullhead/images/cache.img
./fastboot flash recovery /users/username/desktop/bullhead/images/recovery.img
./fastboot flash system /users/username/desktop/bullhead/images/system.img
./fastboot flash vendor /users/username/desktop/bullhead/images/vendor.img
@Heisenberg you mind if i create an index thread?
reyscott1968 said:
@Heisenberg you mind if i create an index thread?
Click to expand...
Click to collapse
Go right ahead, first in best dressed as far as I'm concerned. It is a fair bit of work to keep an index maintained though, as long as you're aware. There's a new template for indexes too, using your Google goggles you should be able to track it down pretty easily.
Heisenberg said:
Go right ahead, first in best dressed as far as I'm concerned. It is a fair bit of work to keep an index maintained though, as long as you're aware. There's a new template for indexes too, using your Google goggles you should be able to track it down pretty easily.
Click to expand...
Click to collapse
il take note.. il update the thread once im back on my pc.. now still at work ...
Deleted...
Should have read the first lines in the OP
Cant wait, should have mine around october 30th.
Might want to point out the cable /adapter required to connect to pc. (I just saw that it's not included with the phone.)
AquilaDroid said:
Might want to point out the cable /adapter required to connect to pc. (I just saw that it's not included with the phone.)
Click to expand...
Click to collapse
I picked up a few of these to get me by for now until the price of Type-C goes down a bit http://www.ebay.com/itm/381344035966
I ordered one along with my phone, will be helpful for flashing.
Thanks, a friend of mine pre order this phone, I'll follow these steps
Thanks for starting this, these were some of the most helpful threads in the N5 forum.
For Mac users who have upgraded to El Capitan, the adb/fastboot installation doesn't necessarily work perfectly right now. I'm sure the Android SDK package will update for this, but in the mean time:
Install adb/fastboot as usual similar to this thread, or for specifics:
http://forum.xda-developers.com/showthread.php?t=1917237
but, once you test this with [adb devices] or [fastboot devices] you'll most likely get a command not found error.
You'll need to add a line to your ~/.bash_profile, per this reddit thread
add the following line to your ~/.bash_profile, changing username to your mac username
Code:
export PATH="/usr/local/lib/node_modules:/usr/local/apache-maven-3.0.3/bin:/Users/[B]username[/B]/.composer/vendor/bin:/Users/[B]username[/B]/Library/Android/sdk/platform-tools:$PATH"
exit, save, then run
Code:
source ~/.bash_profile
then adb/fastboot should be good to go like before!
OP has best username ever
Sent from my Nexus 5 using Tapatalk
Doesn't work!
Code:
C:\Users\Kevin\Downloads\Nexus 5x>fastboot oem unlock
...
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.017s
C:\Users\Kevin\Downloads\Nexus 5x>fastboot flashing unlock
...
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.014s
C:\Users\Kevin\Downloads\Nexus 5x>fastboot flashing unlock_critical
...
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.011s
C:\Users\Kevin\Downloads\Nexus 5x>fastboot flashing get_unlock_ability
...
(bootloader) get_unlock_ability: 0
OKAY [ 0.020s]
finished. total time: 0.022s
The-Kevster said:
Doesn't work!
Click to expand...
Click to collapse
Did you allow OEM Unlock in developer options?
Go into Settings/About Phone, scroll down and click on “build number” continuously until you see a toast notification telling you that you've enabled Developer Options. Go back to your Settings menu and enter Developer Options, scroll down and click on the “Enable OEM Unlock” checkbox, also make sure you enable USB Debugging while you're in the Developer Options menu.
Click to expand...
Click to collapse
Does the 5X have the hardware QFuse that that pops when you unlock the bootloader like the 6P?
KidWave said:
Does the 5X have the hardware QFuse that that pops when you unlock the bootloader like the 6P?
Click to expand...
Click to collapse
They both use Qualcomm based chips so yes the same thing would happen on the 5X.

Categories

Resources