[HOW-TO] Return to Factory Stock using fastboot commands - Nexus 7 (2013) General

DISCLAIMER: I am not responsible for what you do to your tablet. I've done these steps dozens of times without issue on Windows and Linux. PLEASE READ THIS ENTIRE THREAD FIRST TO UNDERSTAND IT BEFORE ACTUALLY PERFORMING THEM ON YOUR DEVICE!!!
This is done using the Android SDK, the command incorporated in that called fastboot. No toolkit, I don't do them, never have, so I cannot support anyone trying anything from a toolkit. Doing this process will take you from start to finish no more than two minutes.
I haven't seen a "How-To" on returning to 100% out-of-the-box stock using fastboot commands and Google's factory N7 2013 images. If I've overlooked this, I apologize in advance. I've seen a lot of people asking how to do this in the forums, so I thought this may help.
This will work on Linux or Windows. I use Windows 7 x64 for work, Linux Mint 15 x64 otherwise. With Linux you will need to add permissions for the USB device in /etc/udev/rules.d. I had to do this on my Linux Mint 15 x64 laptop, you may not. If you get an error stating something to the effect of "insufficient permissions...", you'll want to Google "android udev rules setup". I won't cover that here.
This guide should work for the LTE N7 2013, but I don't have one to test.
Before we begin, back up anything on your internal /sdcard partition you want saved. This will 100% wipe your device to what it was when you first unboxed it. I warned you. You'll be erasing everything, and it will be reloaded. Stock Android recovery will be loaded, and you will not be rooted.
What you'll need:
Android SDK - specifically fastboot working
Google factory images from here.
Unlocked Nexus 7 tablet
Here we go (this will be based off of the N7 2013 Wifi-only device, JSS15R image):
1. Extract from the compressed image from the .tgz/.tar, you'll want to extract the folder called razor-jss15r. Extract this folder to your SDK/platform-tools location. My SDK is on my C:\, so my path to it on Windows is C:\sdk\platform-tools. Linux it would be at /home/ryan/sdk/platform-tools. Once extracted, you should have a folder called: razor-jss15r. There should be 5 files in there, 1 is a zipped folder called image-razor-jss15r.zip. DON'T UNZIP IT!
2. Open command prompt, and change directories to your SDK/platform-tools location. Boot your tablet to the bootloader, and plug it into your computer. We're ready to issue commands now.
3. After each command, hit Enter. I'm not going to state that to make sure people don't get confused. Each line is it's own command. I recommend copy then pasting each command below, one by one, into the command prompt window.
Code:
fastboot erase boot
Code:
fastboot erase cache
Code:
fastboot erase recovery
Code:
fastboot erase system
Code:
fastboot erase userdata
Code:
fastboot flash bootloader razor-krt16o/bootloader-flo-flo-03.14.img
Code:
fastboot reboot-bootloader
Code:
fastboot -w update razor-krt16o/image-razor-krt16o.zip
NOTE: You can remove the -w in the above to prevent internal sdcard from getting wiped.
After the last command, the tablet will automatically reboot itself.
Go through setup, hook up the device to your computer and copy anything you'd like on your device, I recommend a SuperSU flashable zip if you want to root. Download a custom recovery image, and place it into your SDK\platform-tools folder. You can then boot back into the bootloader and flash the custom recovery of your choice (fastboot flash recovery recoveryfilename.img). At that point you can reboot into that custom recovery, and flash the SuperSU zip to have root. Reboot. Done.
Some of the commands may take up to 30 seconds or so, just let them run. The ones that will take that time are erasing system and userdata, and the last command will take time.
OPTIONAL:
If you want to re-lock your bootloader, which is usually ONLY done if you are returning for warranty purposes (and WILL erase your internal sdcard!), boot back to the bootloader and run:
Code:
fastboot oem lock

RMarkwald said:
Code:
fastboot -w update razor-jss15r/image-razor-jss15r.zip
Click to expand...
Click to collapse
If you omit the -w from this step, doesn't it leave your sdcard intact?

Possibly I don't actually know as I've never run it without the -w.
- Sent from my Galaxy S3

meekrawb said:
If you omit the -w from this step, doesn't it leave your sdcard intact?
Click to expand...
Click to collapse
Yes, that is correct.

Updated for Android 4.4 krt16o images.

Related

[GUIDE] Flashing a Factory Image with fastboot / return to stock

Notice: If you are going to flash the nakasi android 4.3 JWR66Y factory image, you will need to download the bootloader from JWR66V and replace the one from the factory image. The bootloader in JWR66Y will fail flashing with a signature mismatch error on the device and InvalidState on fastboot.
The objective of this thread is to provide detailed instructions on flashing a factory image using fastboot rather than a toolkit. As good as toolkits can be, I recommend using adb and fastboot directly. This will allow you to see what is happening every step of the way and is a good opportunity to learn about the process. The following instructions assume some basic Windows command prompt skills.
Read all the directions before you begin and perform the steps at your own risk.
Overview
This will restore your Nexus 7 to it’s factory state. All user data will be deleted, so now is a good place to stop and backup anything you don’t want to lose.
This guide is in three parts - basic knowledge and obtaining the required software, driver installation, and flashing the factory image. This and any following verbosity is not to be condescending, but rather not to assume anything.
Basic Knowledge
This guide assumes some basic Windows command prompt skills - changing directories, etc and is written primarily for Windows users. Make sure that you have file extensions enabled in Windows Explorer.
Software Requirements
Android SDK - adb, fastboot, usb drivers
Java SE Development Kit - required by Android SDK
A Nexus 7 factory image
7-Zip - used to extract factory images from a .tgz file
Download and install 7-Zip - http://www.7-zip.org/download.html
Download the Nexus 7 factory image - https://developers.google.com/android/nexus/images#nakasi and save it somewhere you can easily retrieve it.
Make sure to download the correct image for your device variant (Wi-Fi vs GSM/HSPA+; nakasi vs nakasig)
Download and install the Java SE JDK - http://www.oracle.com/technetwork/java/javase/downloads/index.html
Download and install the Android SDK - http://dl.google.com/android/installer_r21-windows.exe
NOTE: Notice the install location. This defaults to C:\Users\<user name>\AppData\Local\Android\android-sdk the platform tools (adb, fastboot) and usb drivers will be downloaded to this location. This will be referred to from here on as your sdk directory
Run the SDK Manager
Under Tools, check the box labeled "Android SDK Platform-tools" - this provides adb and fastboot
Under Extras, check the box labeled "Google USB Driver"
Press the "Install # packages..." button and follow the on-screen instructions.
The platform tools will be installed at <your sdk directory>\platform-tools and the usb drivers will be in <your sdk directory>\extras\google\usb_driver
Driver Installation
This seems to be the most confusing part for many people. Be patient and thoroughly read all the instructions.
Huge thanks to @tetakpatak for taking the time to put together a video showing this process! http://www.youtube.com/watch?v=bhA5CN4335U&feature=player_detailpage..
Enable usb debugging on your device (found under Settings > Developer Options)
NOTE: Since Android 4.2 the Developer Options are hidden by default.
To enable them, go to Settings > About Phone, and tap on build number around seven times. A small dialog will appear letting you know "You are now a developer!"
Install the abd driver - detailed instructions for installing or upgrading and existing driver on your version of Windows can be found at http://developer.android.com/tools/extras/oem-usb.html
Once the driver is installed open a command prompt and change directories to <your sdk directory>\platform-tools (see #2). From the command prompt run "adb devices". This will list any adb-capable devices that are connected to the computer by their serial number assuming your drivers are installed correctly. Recap:
Code:
> cd \Users\<user name>\AppData\Local\Android\android-sdk\platform-tools
> adb devices
# the following output should be returned
List of devices attached
<device serial number> device
Use adb to boot the device to the bootloader:
Code:
> adb reboot-bootloader
The device should now be in fastboot mode and Windows should be attempting to install the fastboot driver. NOTE: if you had drivers previously installed, you may need to upgrade them. This is the same procedure described at http://developer.android.com/tools/extras/oem-usb.html
You can verify that the driver has been installed by running the following command:
Code:
> fastboot devices
# the following output should be returned
<device serial number> fastboot
Do not proceed further if fastboot can not recognise your device. You are in driver hell and this must be resolved before continuing.
Extract the Factory Image
In order to extract the necessary files from the factory image archive, we will use 7-Zip because it can do this reliably. At this point you should have already installed 7-Zip and downloaded the factory image archive.
Use 7-Zip to open the factory image .tgz file. You should see a single .tar file. Open this file with 7-Zip as well.
Inside the .tar file is a directory that will resemble “nakasi-jwr66y”. Open that directory and extract the contents to <your sdk directory>\platform-tools.
The extracted files should be as follows: bootloader-grouper-4.23.img, image-nakasi-jwr66y.zip, flash-all.sh, flash-base.sh
Flashing the Factory Image
Put the device into fastboot mode by running the following adb command:
Code:
> adb reboot-bootloader
In order to do anything useful in fastboot, the bootloader must be unlocked. To do this, run the following fastboot command:
Code:
> fastboot oem unlock
Follow the directions on the device, using the volume and power buttons to select "Yes". NOTE: this will wipe all personal data.
In fastboot with your device's bootloader unlocked, run the commands listed in flash-all.sh in sequence, waiting for each command to finish.
Follow the commands for your device variant - Wi-Fi (nakasi) or GSM/HSPA+ (nakasig). For convenience I have them here:
NOTE: you will see some messages about the archive not containing boot.sig, recovery.sig and system.sig. That is normal, dont worry.
Wi-Fi devices (nakasi)
Code:
> fastboot erase boot
> fastboot erase cache
> fastboot erase recovery
> fastboot erase system
> fastboot erase userdata
> fastboot flash bootloader bootloader-grouper-4.23.img
> fastboot reboot-bootloader
> fastboot -w update image-nakasi-jwr66y.zip
GSM/HSPA+ devices (nakasig)
Code:
> fastboot erase boot
> fastboot erase cache
> fastboot erase recovery
> fastboot erase system
> fastboot erase userdata
> fastboot flash bootloader bootloader-tilapia-4.23.img
> fastboot reboot-bootloader
> fastboot flash radio radio-tilapia-1231_0.18.0_0409.img
> fastboot reboot-bootloader
> fastboot -w update image-nakasig-jwr66y.zip
After the final command completes, the device will reboot.
If you are sending the device in for warranty work, you may want to re-lock the bootloader
Code:
> fastboot oem lock
Finally, reboot the device
Code:
> fastboot reboot
Fantastic work!
Thank you for this tutorial! It allows us to learn how to do things via adb and learn how not to depend on a toolkit. I hope everyone that does not know how to flash things manually read this thread! Thank you for taking the time to help us learn!
comminus said:
Overview
This will restore your Nexus 7 to it’s factory state. All user data will be deleted, so now is a good place to stop and backup anything you don’t want to lose.
This guide is in three parts - basic knowledge and obtaining the required software, driver installation, and flashing the factory image. This and any following verbosity is not to be condescending, but rather not to assume anything.
Click to expand...
Click to collapse
Could I suggest adding a fourth section to you guide that you only alluded to. Backing up and restoring "anything you don’t want to lose." Detailed as your guide is, you've started with the assumption that a user knows how it back and reinstall the data they would likely want to save.
I don't even know how to do this so I'm stymied even before starting your guide.
Pariah3000 said:
Could I suggest adding a fourth section to you guide that you only alluded to. Backing up and restoring "anything you don’t want to lose." Detailed as your guide is, you've started with the assumption that a user knows how it back and reinstall the data they would likely want to save.
I don't even know how to do this so I'm stymied even before starting your guide.
Click to expand...
Click to collapse
You can always hook your phone up to your PC and copy your folders before this process. You can also make a nano back up and copy it to your computer and then drag it to the SD of your replacement phone and restore it after you get set up and rooted. Titanium back up is another good app to save your apps and data but you will still need to copy that folder to your pc before performing this and then re root your phone so you can restore from titanium back up. Best bet if you are happy with your set up is do a nano back up save that to your PC and now you have a back up to get back to where you were before.
Pariah3000 said:
Could I suggest adding a fourth section to you guide that you only alluded to. Backing up and restoring "anything you don’t want to lose." Detailed as your guide is, you've started with the assumption that a user knows how it back and reinstall the data they would likely want to save.
I don't even know how to do this so I'm stymied even before starting your guide.
Click to expand...
Click to collapse
The backup and restore of user data was intentionally left out because it is out-of-scope for this guide. You bring up a valid point about users needing direction for backing up and potentially restoring user data and files. I'd be more than happy to link to some existing guides that cover this topic in detail. I'll take a look around to see what I can find.
Sent from my Nexus 7 using Tapatalk 2
Thank you very much for this! Worked perfect and this gave me the confidence to do it manually and stay away from toolkits. Back to stock and locked bootloader ready to go back to the store.
sikagoon7 said:
I'm surprised this is just coming up. Thanks though!
Click to expand...
Click to collapse
I know I read your thread sorry about your loss. These tutorials help us learn how to do things manually and safe from making mistakes. Thanks again to the OP.
Excellent work comminus.... very well written!
Help help help!!! Lol
im running into problems..... fastboot wont work.... i have unlocked using fastboot no problem and can also use erase commands no problems.
however when it comes to " flash" or "update" commands, all i get is sending data and the size of what it is sending, but nothing happens. it just hangs there and nothing flashes up on my tablet either. the device hasnt hung as can still use vol keys to change options.
can anybody help me out with a solution here because im going insane!!
---------- Post added at 02:46 PM ---------- Previous post was at 02:31 PM ----------
im running into problems..... fastboot wont work.... i have unlocked using fastboot no problem and can also use erase commands no problems.
however when it comes to " flash" or "update" commands, all i get is sending data and the size of what it is sending, but nothing happens. it just hangs there and nothing flashes up on my tablet either. the device hasnt hung as can still use vol keys to change options.
can anybody help me out with a solution here because im going insane!!
Thanks for this guide I am following it for installing stock image. I'm getting until the last stage but when doing the fastboot -w update xxx.zip file I'm getting error messages saying 'image does not contain recovery.sig, image does not contain system.sig, image does not contain boot.sig' and then it fails to install.
Any idea what I'm doing wrong here?
Thanks
Edit: got it to work using a different windows machine - probably a driver issue somehwere it must have been
Glad to hear you got it working. Those sort of issues are almost always related to drivers.
Sent from my GT-I9100 using Tapatalk 2
Thanks for the excellent explanation. Got my N7 working again. (messed up the upgrade to 4.1.2)
Also got the error 'image does not contain recovery.sig, image does not contain system.sig, image does not contain boot.sig' but installation still worked.
Eeprom78 said:
Thanks for the excellent explanation. Got my N7 working again. (messed up the upgrade to 4.1.2)
Also got the error 'image does not contain recovery.sig, image does not contain system.sig, image does not contain boot.sig' but installation still worked.
Click to expand...
Click to collapse
I will update the instructions to mention that this is normal. Glad to hear you were able to get you N7 working again!
Great Sticky..
Thanks for the work on this.. my N7 was acting strange with one of the installed ROMs and
this guide helped me restore the device easily. :good::good::good::good::good::good:
This guide is great, I did a factory flash some weeks ago just to see how the procedure works and it is pretty easy if you know this stuff, but as a galaxy S3 owner I wonder why there's nothing equivalent to odin for the nexus 7? Afaik odin works for the gnexus. Odin makes reflashing stock images ridiculously easy.
Sent from my Nexus 7 using xda app-developers app
mertzi said:
This guide is great, I did a factory flash some weeks ago just to see how the procedure works and it is pretty easy if you know this stuff, but as a galaxy S3 owner I wonder why there's nothing equivalent to odin for the nexus 7? Afaik odin works for the gnexus. Odin makes reflashing stock images ridiculously easy.
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
Thanks for the comments. Once someone has their computer set up to work with fastboot the process is just as simple as using Odin. The factory image archive contains batch and shell scripts which allow you to flash the images in one command - arguable just as easy as using Odin or Heimdall. But then, it's all personal preference anyway
do i have to do the erase commands before the flashing
I suppose its not technically required but I recommend you follow the steps as they've been laid out.
Sent from my GT-I9100 using Tapatalk 2
What if I can't go to fastboot because my nexus now only can be booted in cwr . Do you have any solutions regarding my matters?
Thanks,

Updating to 4.3 Image with fastboot failed.

Hi guys
I was trying to update to 4.3 using fastboot and after finishing i got stuck with the google on the screen. So i went on to try it again, this time installing each .img in the zip manually. While i was sending the System.img the usb connection broke and i tried again to no avail. So i was like lets do this again. So i went i started all over again with erasing boot, now the terminal is stuck on that and not going forward. Im out of options. Really need help, im helpless here. Please.
Thank You
Cantacid said:
Hi guys
I was trying to update to 4.3 using fastboot and after finishing i got stuck with the google on the screen. So i went on to try it again, this time installing each .img in the zip manually. While i was sending the System.img the usb connection broke and i tried again to no avail. So i was like lets do this again. So i went i started all over again with erasing boot, now the terminal is stuck on that and not going forward. Im out of options. Really need help, im helpless here. Please.
Thank You
Click to expand...
Click to collapse
Is that a Mac? There is another thread with a guy having issues flashing system.img using a Mac. Not sure if he was able to fix it or not. He was able to flash all the other images just not system.img.
For reference from Efrant's thread on flashing image files if your phone hangs during first boot try this:
Note that some users indicate that they can't get past the X on boot. If this happens to you, reboot into the bootloader and select recovery. Then, when you see the Android with the red exclamation mark, hold power and press volume up to take you to the menu. Wipe cache. If that still doesn't work, boot back into recovery and do a factory reset.
http://forum.xda-developers.com/showthread.php?t=2010312
I had the boot issue when I first flashed the images and just formatting the cache fixed it for me. I later had to do a factory reset as the phone was reporting the wrong storage size, 8 GB instead of 16 GB and the reset fixed it.
Here is the other guys Mac thread, not sure it will help you or not.
http://forum.xda-developers.com/showthread.php?t=2377647
kzoodroid said:
Is that a Mac? There is another thread with a guy having issues flashing system.img using a Mac. Not sure if he was able to fix it or not. He was able to flash all the other images just not system.img.
For reference from Efrant's thread on flashing image files if your phone hangs during first boot try this:
Note that some users indicate that they can't get past the X on boot. If this happens to you, reboot into the bootloader and select recovery. Then, when you see the Android with the red exclamation mark, hold power and press volume up to take you to the menu. Wipe cache. If that still doesn't work, boot back into recovery and do a factory reset.
http://forum.xda-developers.com/showthread.php?t=2010312
I had the boot issue when I first flashed the images and just formatting the cache fixed it for me. I later had to do a factory reset as the phone was reporting the wrong storage size, 8 GB instead of 16 GB and the reset fixed it.
Here is the other guys Mac thread, not sure it will help you or not.
http://forum.xda-developers.com/showthread.php?t=2377647
Click to expand...
Click to collapse
And the thing about cleaning caches is locking and unlocking bootloader does the same. Tried, i cant install recovery and system .img for some reason.
Thank you for the quick reply, seems the like the guy is having the same issue. Will post it there as well.
The issue is to fastboot the system.img
Cantacid said:
And the thing about cleaning caches is locking and unlocking bootloader does the same. Tried, i cant install recovery and system .img for some reason.
Thank you for the quick reply, seems the like the guy is having the same issue. Will post it there as well.
The issue is to fastboot the system.img
Click to expand...
Click to collapse
I see you are in the other thread too but I will post this here also.
According to this thread when using a Mac you don't flash the system or kernel (boot) images.
http://forum.xda-developers.com/showthread.php?t=2377691
kzoodroid said:
I see you are in the other thread too but I will post this here also.
According to this thread when using a Mac you don't flash the system or kernel (boot) images.
http://forum.xda-developers.com/showthread.php?t=2377691
Click to expand...
Click to collapse
Yeah you do. I just did this on my Mac for my Nexus 4 and Nexus 7 last night with absolutely no issues.
The procedure I used is as follows...
1.1) Download the factory image and ensure all .img files are extracted to the "platform-tools" folder
1.2) Boot phone into fastboot mode by powering it down then holding volume down/power at the same time until the fastboot screen appears
2) Plug the phone into the computer via USB cable
3) Open terminal and type: fastboot devices (if it recognizes your phone's serial number you are ready to move forward)
4) Reboot by typing: fastboot reboot-bootloader (I do this just to test the connection but it's not 100% necessary)
5) Flash the bootloader: fastboot flash bootloader /Users/kevin/Desktop/Android/sdk/platform-tools/bootloader.img
6) Reboot: fastboot reboot-bootloader
7) Flash the radio: fastboot flash radio /Users/kevin/Desktop/Android/sdk/platform-tools/radio.img
8) Reboot: fastboot reboot-bootloader
9) Flash the system partition: fastboot flash system /Users/kevin/Desktop/Android/sdk/platform-tools/system.img
10) Flash the data partition: fastboot flash userdata /Users/kevin/Desktop/Android/sdk/platform-tools/system.img (Note: this command will wipe your device)
11) Flash the kernel/ramdisk: fastboot flash boot /Users/kevin/Desktop/Android/sdk/platform-tools/boot.img
12) Flash the recovery partition: fastboot flash recovery /Users/kevin/Desktop/Android/sdk/platform-tools/recovery.img
13) Erase the cache partition: either a) fastboot erase cache OR b) fastboot format cache <<== (the second option seems to work better for most people and it's what I used)
14) Reboot: fastboot reboot
After completing step 14 your phone should reboot to the initial setup screen. If you follow those steps vigorously you won't have any issues. If it doesn't work you did something wrong and should start over. If it doesn't work on a second try then I'd re-download the system image from HERE again just to be sure the .img files you are ultimately trying to use aren't corrupt somehow.
sn0warmy said:
Yeah you do. I just did this on my Mac for my Nexus 4 and Nexus 7 last night with absolutely no issues.
The procedure I used is as follows...
1.1) Download the factory image and ensure all .img files are extracted to the "platform-tools" folder
1.2) Boot phone into fastboot mode by powering it down then holding volume down/power at the same time until the fastboot screen appears
2) Plug the phone into the computer via USB cable
3) Open terminal and type: fastboot devices (if it recognizes your phone's serial number you are ready to move forward)
4) Reboot by typing: fastboot reboot-bootloader (I do this just to test the connection but it's not 100% necessary)
5) Flash the bootloader: fastboot flash bootloader /Users/kevin/Desktop/Android/sdk/platform-tools/bootloader.img
6) Reboot: fastboot reboot-bootloader
7) Flash the radio: fastboot flash radio /Users/kevin/Desktop/Android/sdk/platform-tools/radio.img
8) Reboot: fastboot reboot-bootloader
9) Flash the system partition: fastboot flash system /Users/kevin/Desktop/Android/sdk/platform-tools/system.img
10) Flash the data partition: fastboot flash userdata /Users/kevin/Desktop/Android/sdk/platform-tools/system.img (Note: this command will wipe your device)
11) Flash the kernel/ramdisk: fastboot flash boot /Users/kevin/Desktop/Android/sdk/platform-tools/boot.img
12) Flash the recovery partition: fastboot flash recovery /Users/kevin/Desktop/Android/sdk/platform-tools/recovery.img
13) Erase the cache partition: either a) fastboot erase cache OR b) fastboot format cache <<== (the second option seems to work better for most people and it's what I used)
14) Reboot: fastboot reboot
After completing step 14 your phone should reboot to the initial setup screen. If you follow those steps vigorously you won't have any issues. If it doesn't work you did something wrong and should start over. If it doesn't work on a second try then I'd re-download the system image from HERE again just to be sure the .img files you are ultimately trying to use aren't corrupt somehow.
Click to expand...
Click to collapse
In the other walk through flash system image and boot image is replaced by "./fastboot update image-occam-jwr66v.zip". This could help those who are having problems flashing the system image file. I've also seen this method used for windows in that all you flash is the bootloader image then the update image and your done.
-w is to clear the userdata, but the problem is its not pushing the system.img on the phone! Tried without -w and yet the same issue! I have restored my previous rom and madea nandroid for 4.2.2 stock! Might go back to that and try updating ota! Can somebody confirm if i have to lock bootloader and lose root to get an update!
I have no clue why the same steps work for 4.2.2 but not 4.3 image files!
Sent from my Nexus 4 using Tapatalk 4 Beta
One thing I don't think anyone has mentioned (which may actually be the core solution to this problem for everyone) is that you need to update your SDK Platform from 17 to 18 and you need to install "Android Support Repository" in order for 4.3 to properly flash. To do this open terminal and paste the path to the "android" executable file found under sdk/tools. My path was:
/Users/kevin/Desktop/Android/sdk/tools/android
After pasting the appropriate path into terminal hit enter. This will open the SDK Manager. Once SDK Manager is open it will ask to update outdated drivers. One of the drivers being updated is SDK Platform. Before hitting the update button scroll down to the 'Extras' folder and check the box next to "Android Support Repository". Now hit the update button.
After doing this, reboot the computer (may or may not be necessary) and try flashing again by following the steps I provided in post #5. Let me know if that solved it.
Well, i may try that! But as if now, went to bootcamp, installed drivers and sideloaded 4.3. I may still try updating sdk, just in case i may neeed to do this again!
Where is this sdk/tools?
Sent from my Nexus 4 using Tapatalk 4 Beta
Cantacid said:
Well, i may try that! But as if now, went to bootcamp, installed drivers and sideloaded 4.3. I may still try updating sdk, just in case i may neeed to do this again!
Where is this sdk/tools?
Sent from my Nexus 4 using Tapatalk 4 Beta
Click to expand...
Click to collapse
sdk/tools is located wherever you extracted the .zip file to. In my case I just put it all in a parent folder on the desktop called "Android".

Using System Image to Update your Nexus 6 (no data loss)

Tired of waiting for the OTA? Can't use it because you're rooted? Don't want to wipe your entire phone? No problem! Here's how you can upgrade with Google's Nexus factory images without wiping your apps or sdcard.
NOTE: You must have your bootloader unlocked. If you've never unlocked your bootloader, I don't think there's any way to do this without wiping your data.
STEP 1: Install fastboot
Fastboot is Google's utility for flashing factory images. You can also use it to flash custom recoveries like TWRP and CWM. The standard way to get is is through Google's Android SDK, but that's a bit heavy-duty, so you can also download just the most important tools (fastboot and adb) separately, packaged by users. Here are some links:
Official Google Android SDK (cross-platform): http://developer.android.com/sdk/index.html#Other[1]
Unofficial for Windows: http://developer.android.com/sdk/index.html#Other[2]
Unofficial Mac/Linux: http://code.google.com/p/adb-fastboot-install/[3]
Windows users might also need to install drivers: http://developer.android.com/sdk/win-usb.html[4] (can any Windows users confirm whether it's necessary?)
STEP 2: Prepare factory image
Download the latest Nexus 6 factory image at https://developers.google.com/android/nexus/images#shamu[5]
Unzip it and open the resulting folder
Unzip the "image-shamu-*.zip" file in there
You should now be looking at something like this: http://i.imgur.com/mzrfwrP.png [6]
STEP 3: Flash! (Ah-ahhhhh! [7] )
Connect your phone to your computer via USB, and enter the bootloader. You can enter the bootloader by holding down the power and volume-down buttons to boot. Once you see the bootloader, you can release the buttons.
Open a terminal/command prompt. The syntax might be slightly different on Windows than on Mac or Linux, but basically the same. Anything you see in <> you need to replace, e.g. with the actual path to your factory image folder. The rest you should be able to copy and paste. (Tip: you can easily enter a folder path into your terminal/command prompt by simply dragging the folder onto your terminal window. This works on Mac, Windows, and the vast majority of Linux GUIs.) Enter these commands:
cd </path/to/shamu-lmy47d>
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
Reboot the bootloader.
fastboot flash radio radio-shamu-d4.0-9625-02.95.img
cd <image-shamu-lmy47d>
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash system system.img
If you DO NOT use a custom recovery (like TWRP or CWM), then also: fastboot flash recovery recovery.img
Don't worry if you see messages like "target reported max download size of 1073741824 bytes". Just wait and let it finish.
Reboot your phone and enjoy. It's normal for the first boot to take a while. Going from Kitkat to Lollipop took about 20 minutes. Going from 5.0 to 5.0.1 took 5-10, I think. YMMV.
A WORD OF WARNING: If you're moving between ROMs, you generally should do a complete reset, including wiping data. Many users have reported problems going from KitKat to Lollipop without wiping data and recommend a factory reset anyway. If you're okay with wiping everything, you can simply use Google's included flash-all scripts, or flash the userdata.img file yourself. Personally, I'm not going to bother wiping adta for an incremental update like 5.0.1->5.1. As always, be sure to back up your data!
Shamelessly stolen from: http://www.reddit.com/r/Nexus5/comments/2phqy7/howto_upgrade_android_using_nexus_factory_images/
Shouldn't you also fastboot reboot bootloader after radio flash?
This is the scenic route.
I tried to update using wugz, without unlocking the bootloader. failed. Oh well, I'll wait to receive ota
Unless this method doesnt require unlocking?
If you have an OTA zip file, this is different than using a System Img?
I do not think you need to lose data or unlock your bootloader?
Found a link for the OTA zip file.
If I remember right you can copy the zip to you phone with a USB cable.
Go into the bootloader, Volume Down and Power.
Select the zip.
I did not think you needed a terminal and all the commands if you had the OTA zip on your phones SD card.
Am I wrong does something like this not work?
or
I can just wait.....
This worked great.
I was unbranded with VZ sim, unlocked, rooted with TWRP recovery. Didn't want to lose all that nor my apps or data. This method upgrades to 5.1 without any loss.
When I was done with the flashing, I rebooted to TWRP recovery (not system) in order to wipe dalvik and cache (just to be certain). I wiped and then rebooted to system. TWRP noticed I didn't have SuperSU installed so it installed it for me. Meaning, once I got my system rebooted, I still had root too.
All in all, this process worked great for me. Thanks.
I run the first two commands
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
fastboot reboot-bootloader
they worked, then i moved to the radio
fastboot flash radio radio-shamu-d4.0-9625-02.95.img
but it failed.
Any idea?
---------- Post added 14th March 2015 at 12:17 AM ---------- Previous post was 13th March 2015 at 11:53 PM ----------
Nikos2k said:
I run the first two commands
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
fastboot reboot-bootloader
they worked, then i moved to the radio
fastboot flash radio radio-shamu-d4.0-9625-02.95.img
but it failed.
Any idea?
Click to expand...
Click to collapse
This is the message after the radio flash command:
fastboot flash radio radio-shamu-d4.0-9625-02.95.img
target reported max download size of 536870912 bytes
sending 'radio' (85422 KB)...
OKAY [ 2.697s]
writing 'radio'...
(bootloader) flashing modem ...
(bootloader) flashing modem ...**☺
FAILED (unknown status code)
finished. total time: 3.721s​
Why the failed message?
I'm decrypted. Will this re encrypt my Nexus or do I have to flash a non enforce img?
Thank you, this really helped.
Since my bootloader was locked i had to unlock it as well.
Had a bit of a scare with the whole erasing screen staying on for too long.
Went back and redid the process, and went downstairs for 5 minutes, came back and phone was booted.
Anyway, thank you again
Will this work on an encrypted phone?
mikeadamz said:
Tired of waiting for the OTA? Can't use it because you're rooted? Don't want to wipe your entire phone? No problem! Here's how you can upgrade with Google's Nexus factory images without wiping your apps or sdcard.
<<snip>>
Click to expand...
Click to collapse
I don't suggest that anyone read and follow someone else's instructions when doing something like this. Not because the instructions are wrong or anything, but because blindly following instructions doesn't involve *understanding* anything.
So rather than reading and following instructions, read and UNDERSTAND the process of installing factory images as delivered with the factory images (flash-all.sh). If you UNDERSTAND the process and what everything does, then (a) you *already know* what needs to be adjusted to do what you want, and (b) if something starts going wrong in the middle of it, you will understand why, and what to do to correct it.
mikeadamz said:
cd </path/to/shamu-lmy47d>
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
Click to expand...
Click to collapse
First, thanks for the write up, I do greatly appreciate it. Second, thanks for the tip on dragging file locations into the command prompt. Very helpful.
Now my question. When I did this I tried using exactly the steps above and had no luck whatsoever. I'd cd to the location of the img files as noted and it would say fastboot is unrecognized as an internal or external command. I moved the file into the fastboot location and got the same issue. I finally ran the fastboot from the adb folder location and just referenced the full file path for each img file (using the drag and drop method) and everything went swimmingly. My question is just about using fastboot. Should it have worked when I used cd to go to the img file location? Is there something I need to do to make it work as you described?
Thanks!
Nick
Nick D said:
First, thanks for the write up, I do greatly appreciate it. Second, thanks for the tip on dragging file locations into the command prompt. Very helpful.
Now my question. When I did this I tried using exactly the steps above and had no luck whatsoever. I'd cd to the location of the img files as noted and it would say fastboot is unrecognized as an internal or external command. I moved the file into the fastboot location and got the same issue. I finally ran the fastboot from the adb folder location and just referenced the full file path for each img file (using the drag and drop method) and everything went swimmingly. My question is just about using fastboot. Should it have worked when I used cd to go to the img file location? Is there something I need to do to make it work as you described?
Thanks!
Nick
Click to expand...
Click to collapse
Install this:
http://forum.xda-developers.com/showthread.php?t=2588979
Now ADB and fastboot are installed system wide. Put your files anywhere, I use the desktop. Hold shift and right click on wherever your files are and select "open command prompt here" and flash away. Simplified, no more dragging and dropping.
Will try with the new update (5.1.1 (LMY48M)) to ensure it works. Thanks!
[/COLOR]
handyarrow said:
Will this work on an encrypted phone?
Click to expand...
Click to collapse
Have been flashing this zip in twrp after the fastboot stage without an issue for the last few updates - http://forum.xda-developers.com/nexus-6/development/mod-disable-force-encryption-rom-kernel-t3000788
Flashed LMY48M with fastboot method and it works great.
My phone is encrypted.

[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.

OnePlus 8 TMO Magisk boot image IN2017_11_C.43

It took a bit of work to root OnePlus 8 T-Mobile version on the latest Android 12 update. I am a long time lurker and simply I wished someone else had posted the boot image to save me time. Can be simply flashed using fastboot commands.
Please check to make sure you are on the latest update from T-Mobile and that software version is: IN2017_11_C.43 Android 12 Security update November 5, 2022.
Installation instructions:
*You must have your phone unlocked for any carrier otherwise OEM unlocking will be unable to set.*
#1 go to settings, about device. TAP software version five times to enable developer options under system settings. Go to developer options and tick the following options:
a OEM Unlocking
b Enable USB debugging
#2 Download the OnePlus 8 Windows drivers and ADB fastboot drivers if your using a PC or Termux from F-Droid if using another rooted phone.
PC instructions:
Go to the directory you installed ADB and Fastboot. Open the command prompt by either right click on an empty space in that folder and finding command prompt or going to the directory tree and typing cmd and hit enter. Inside the Windows command prompt the root directory should be the same folder as your ADB and fastboot executables. Move the attached boot image to the same folder as your ADB and fastboot executables and rename it boot.img. Attach your phone to your PC and run the following commands:
adb devices
This command is so you can check to see if your PC is correctly configured and it should send you a notification on your phone to allow debugging from your PC, make sure you will allow it always.
adb reboot fastboot
This command will reboot your phone into fastboot mode. Do not select any you on your phone and only type in the following commands on your PC.
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
This command will flash the magisk modified boot image which will grant you root access to your phone.
fastboot reboot
This command will reboot your phone. Congrats, your now rooted on the latest Android 12 update for your T-Mobile Oneplus 8!
what attached boot img?
zeromonarch said:
what attached boot img?
Click to expand...
Click to collapse
I must've somehow missed it too. I cant find any boot image to download
If only there were the elusive boot image...
It could have saved my ass from the current double-slotted brick I sit upon!
Does anyone have the boot image for the latest T-Mobile update?
IN2017_11_C.45
in fact this isn't even the latest as there is a new update waiting for me with the new security release or security update but I haven't updated yet also does this wipe data?

Categories

Resources