I am not taking credit for this in anyway. But since i had to to it and had never done it before i had to look around on how to do it.
This is pulled from
http://www.droid-life.com/2011/12/1...the-bootloader-and-return-to-a-factory-state/
1. Download the Android 4.0.2 factory images to your PC. Download
2. Unzip the file and its contents into your SDK/Tools folder (wherever your adb.exe and fastboot.exe files
are).
*Make sure they are not in their own folder, but have all been extracted to Tools.
3. From within your Tools folder, open a command prompt (SHIFT + right click – “open command prompt here”):
4. Type the following commands, allowing each to finish before moving onto the next:
adb reboot bootloader
fastboot flash bootloader bootloader-toro-primekk15.img
fastboot reboot-bootloader
fastboot flash radio radio-toro-i515.ek02.img
fastboot reboot-bootloader
fastboot flash radio-cdma radio-cdma-toro-i515.ek05.img
fastboot reboot-bootloader
fastboot -w update image-mysid-icl53f.zip
fastboot reboot-bootloader
fastboot oem lock
5. Reboot your phone by highlighting “Start” and pressing the lock switch.
6. It really is as simple as that. Your phone is now back to a 100% stock, unrooted and locked state.
thanks.. nice work
Eh... All I'd want is the back cover with just a Google logo, at this point in time I don't even care if there's bloat. Great guide though, might do it if I'm bored.
Would the files being extracted into tools have anything to do with the files used to root if i decided to re-root? Also my adb.exe and fastboot.exe are in the /platform-tools folder is that ok?
this should get sticky'd in case it becomes an "emergency" in the future and the thread's gotten burried.
how do i get the zip format
i can download the file but it doesnt come as a zip file? im on windows vista.
mikedfromaz said:
i can download the file but it doesnt come as a zip file? im on windows vista.
Click to expand...
Click to collapse
Popular tools like winrar and 7zip will still be able to extract it.
7zip
so i got 7zip to load but the second prompt in the sequence says error cant load bootloader-prime image??
i couldnt see the folder with all the files using winrar, i recommend using 7zip only
I tried these steps 3 times now. Everything seems to go just fine until I'm booted. Cant get a data signal on 3g/4g. Calls/text messages come through fine just missing something with the radios. Anyone else have this problem?
Same issue here. I've tried recovering to a different back up. Also updated radio to the newer leaked ones. Eventually reverted everything back to stock and I am STILL without any data connection.
Rageful said:
Same issue here. I've tried recovering to a different back up. Also updated radio to the newer leaked ones. Eventually reverted everything back to stock and I am STILL without any data connection.
Click to expand...
Click to collapse
I am in NYC and I do not have any data connection either....
I think (hope) it is a Verizon Network issue!!!
Verizon is having a nationwide outage, it affects everyone differently so no worries about loss of data access.
http://phandroid.com/2011/12/21/yes-verizons-data-network-is-experiencing-nationwide-outages-again-new-radios-for-galaxy-nexus-leak-in-the-meantime/
i did all of this this morning, but now everey time i do fastboot reboot-bootloader. i get a waiting for device. prior to this i was able to reboot the bootloader through adb just fine. both of my pc's have the same problem. Is there a problem with the bootloader on the image uploaded versus the one the phone came with? iknow i can boot to the bootloader with vol+ vol- and power. but its just better to doit trough adb. please advice.
Does this also restore the stock recovery? I don't see any fastboot commands to flash recovery. Or is that included in the stock img?
It's in the zip file when you run "fastboot -w update image-mysid-icl53f.zip"
Thank you so much for this! I was trying to root my phone and somehow managed to screw something up and wound up with an infinite boot loop. Followed these simple steps and was able to successfully get out of that mess.
So this puts the stock kernel back on there as well right?
GazaIan said:
Eh... All I'd want is the back cover with just a Google logo, at this point in time I don't even care if there's bloat. Great guide though, might do it if I'm bored.
Click to expand...
Click to collapse
Same here man. I'm coming from a Nexus One on at&t and I hate how Verizon has to put their branding on everything.
Does this still work if I have cwm and a different rom installed or are there more steps to do?
Sent from my Galaxy Nexus using xda premium
I have rooted my device using towel root which doesn't unlock the boot loader. I then used the twrp manager to install custom recovery. I am wondering how to restore everything back to factory as all the tutorials I have seen so far require an unlocked boot loader. Any help will be appreciated, thank you.
Flash a stock r for your phone
swagg blasted from TMO LG G3
jailbreakkid23 said:
Flash a stock r for your phone
swagg blasted from TMO LG G3
Click to expand...
Click to collapse
If I download a stock image from google and flash it from my nexus 7 using twrp will everything be restored to factory settings?
If the boot loader is locked does that mean I can just do a normal factory reset on the device and it will remove the recovery and root?
fastboot
Jordydaman said:
If the boot loader is locked does that mean I can just do a normal factory reset on the device and it will remove the recovery and root?
Click to expand...
Click to collapse
you have to install stock ROM by adb mode using fastboot command
you can't flash stock ROM via custom recovery.
@SidDev said:
you have to install stock ROM by adb mode using fastboot command
you can't flash stock ROM via custom recovery.
Click to expand...
Click to collapse
Would you mind finding a link for me ? I have never encountered this before as I have always unlocked the bootloader to root but this time I used towel root which was different as explained above.
Doesn't the boot loader have to be unlocked to flash a ROM via adb?
try this and press thanks
Jordydaman said:
Doesn't the boot loader have to be unlocked to flash a ROM via adb?
Click to expand...
Click to collapse
nope,
Step 1: Download the ADB/Fastboot files and the
USB drivers for Windows based PC first. The the
latest factory image for your Nexus device can be
downloaded directly from Google’s website .
ADB/Fastboot – Mac , Windows
USB drivers for Windows
Extract the contents of the ADB/Fastboot ZIP file
inside a new folder called ‘google’ on your desktop.
Extract and transfer the contents of the factory
image inside this folder as well. The list of files will
include a ZIP file containing the codename of your
Android device, two files with “flash-all” names, and
a bootloader image file. All the extracted contents of
the factory image should be inside the same folder
as the ADB and Fastboot file, otherwise you will get
a file not found error.
Make sure to install the ADB drivers as well if you
are running a Windows based PC.
Step 2: Now, reboot your Nexus device in bootloader
mode. This is usually done by switching off the
device, and pressing the Volume down + Volume Up
+ Power button simultaneously. If that does not
work, try the Volume down + Power button
combination.
After the device has booted into bootloader mode,
connect it to your PC.
Step 3: Open a new Terminal or Command Prompt
window, and navigate to the ‘google’ folder that you
created in Step 1. Before we start flashing the
factory image, we need to make sure that your
Nexus device is being detected by the PC.
fastboot devices
If you are using a Mac, then you need to prefix a “./”
before every Fastboot command. So, the above
command will look something like this on a Mac -:
./fastboot devices
The above command should confirm if your device is
indeed being detected by your PC or not. If it is,
then proceed to the steps below. If not, repeat the
steps above again. Make sure that you have properly
installed the drivers and are inside the correct
folder.
If you are running Windows, copy-paste the following
command in the command prompt window -:
flash-all.bat
On a Mac, copy-paste the following command -:
./flash-all.sh
The script will then automatically flash the full
factory image on your Nexus device. Once the
factory image has been flashed, your device will
automatically reboot. Keep in mind that the first boot
might take some time so please be patient.
If the flash-all.sh script gives you a fastboot not
found error on your Mac, open up the file in Text Edit
and add a “./” before every fastboot command.
The flash-all script included in the factory image
might not work for all. It has always been pretty
unreliable and has only worked once for me in the
last 2 years. If you are in the same boat as me, you
will have to flash each partition manually on your
device. This is slightly cumbersome though.
The command to manually flash a partition via
fastboot is “fastboot flash partition filename.img”. In
the factory image that you extracted in Step 1, you
will notice there is another ZIP file. Extract the
contents of that ZIP file inside the ‘google’ folder.
Now, its time to manually flash the partitions to your
Nexus device. We will first begin with the bootloader.
fastboot flash bootloader filename.img
Then, we will flash all other partitions. They don’t
necessarily need to be in the same order as I have
listed them below. The names of the image files in
the factory image will clearly indicate the partition
they are intended for as well.
fastboot flash boot filename.img
fastboot flash radio filename.img
fastboot flash recovery filename.img
fastboot flash userdata filename.img
fastboot flash system filename.img
Thank you very much I will try this today.
I couldn't flash all and when I flashed the bootloader it came up with failed bootloader is locked?
Enter this command to unlock the bootloader:
fastboot oem unlock
After unlocking, you can run flash-all.bat (or run manual fastboot commands to flash).
Earlier today I used the Nexus Root Tool Kit to flash stock and flash the factory image for 5.0.
At erasing User Data it seemed to get stuck, it was there for over 40 minutes. While looking at the device I accidentally knocked the USB cable out and it said failed. Upon rebooting the device I got the Google logo and the bootloader unlocked icon and then the bugdroid with the gear like it's doing an update (THIS: http://scottiestech.info/wp-content/uploads/2013/03/Android_Update_Screen.jpg[1] ). It stayed like this for another 40 minutes. I forced it to shut down and tried to get into the bootloader but holding down vol up+vol down+power for almost 60 seconds did nothing.
I then booted it up normally again to the gear bugdroid and left it like that before I went out for almost 6 hours. When coming home it was the same and still stuck on that.
I rebooted again and held down to boot into the bootloader but again it did not boot in over 60 seconds.
So am I hard bricked and should toss this out with the trash tonight or can this be restored somehow.
Are you able to connect to your device using fastboot?
Assuming you have fastboot installed and the drivers installed, open a command prompt and from the directory where your SDK files are (unless you added the directory to your system PATH), type "fastboot devices" without the quotes. What do you get back? If you get back a serial#, you should be able to flash the individual files manually
(Download the factory image from google's site, and extract the files into a folder, and run the flash-all.bat This will wipe all your data out, and assumes your bootloader is already unlocked)
Edit: follow the instructions here - http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
These are for Nexus 5, but the same steps apply for Nexus 7 as well. Just make sure you download the right factory image for your Nexus 7. Use Method 1
jj14 said:
Are you able to connect to your device using fastboot?
Assuming you have fastboot installed and the drivers installed, open a command prompt and from the directory where your SDK files are (unless you added the directory to your system PATH), type "fastboot devices" without the quotes. What do you get back? If you get back a serial#, you should be able to flash the individual files manually
(Download the factory image from google's site, and extract the files into a folder, and run the flash-all.bat This will wipe all your data out, and assumes your bootloader is already unlocked)
Edit: follow the instructions here - http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
These are for Nexus 5, but the same steps apply for Nexus 7 as well. Just make sure you download the right factory image for your Nexus 7. Use Method 1
Click to expand...
Click to collapse
Well I can get it into fastboot but I'm getting errors when it tries to flash the bootloader or boot.
what's the error message?
jj14 said:
what's the error message?
Click to expand...
Click to collapse
originally there was none, it just said failed and completed. now i'm getting invalid arguments.
I'm still in fastboot mode but literally nothing will flash.
*edit* just tried to use tookit again and
writing 'bootloader'
FAILED <remote: flash write failure>
finished.
Seeing a couple people mention that they fixed errors like this just from using a different usb port or cable. going to try that.
Why didn't you use adb to flash factory image from the get-go? It's the safest way to flash. I would be so mad on your place if device would render useless. But that might be just me since i'm poor. I really hope you manage to fix it.
neo5468 said:
Why didn't you use adb to flash factory image from the get-go? It's the safest way to flash. I would be so mad on your place if device would render useless. But that might be just me since i'm poor. I really hope you manage to fix it.
Click to expand...
Click to collapse
I knew of that way but the Nexus Tool Kit has always been perfect and I've never had any issues with it so I figured I'd just do it that way to make it easier and well, it didn't happen.
I'm hoping because I can get into fastboot that it's not actually bricked yet but if so then oh well i guess.
Long story short, I bought my awesome Pixel 2 XL back in December, right away I unlocked the bootloader, installed TWRP Recovery and rooted it. Since then I have done nothing to the phone , besides app updates, but never updated top the latest security patches pr anything. Partly because being rooted can't take OTA updates, and didn't want to wipe anything flashing new updates.
Tonight, I wanted to get on the latest, I was currently on 3.2.1.0, so I downloaded the 3.2..1.2 zip, rebooted into Recovery, and flashed the zip, and rebooted into Recovery again, all good, on the latest current TWRP version.
I press reboot system, but it keeps going back into Recovery, every time, always reboots back into Recovery for some strange reason ? Doesn't load the system. So I select the other partition A, I was on B, I put it in A, select reboot system, and it just hangs on the white Goggle screen FOREVER. I then get back into Recovery, now I can't even get into Recovery, the swipe right feature not working, acting like it's not registering my input, I can't swipe the arrow to move it. Now it's just stuck on the opening page in Recovery.
Now what ?
Zorachus said:
Long story short, I bought my awesome Pixel 2 XL back in December, right away I unlocked the bootloader, installed TWRP Recovery and rooted it. Since then I have done nothing to the phone , besides app updates, but never updated top the latest security patches pr anything. Partly because being rooted can't take OTA updates, and didn't want to wipe anything flashing new updates.
Tonight, I wanted to get on the latest, I was currently on 3.2.1.0, so I downloaded the 3.2..1.2 zip, rebooted into Recovery, and flashed the zip, and rebooted into Recovery again, all good, on the latest current TWRP version.
I press reboot system, but it keeps going back into Recovery, every time, always reboots back into Recovery for some strange reason ? Doesn't load the system. So I select the other partition A, I was on B, I put it in A, select reboot system, and it just hangs on the white Goggle screen FOREVER. I then get back into Recovery, now I can't even get into Recovery, the swipe right feature not working, acting like it's not registering my input, I can't swipe the arrow to move it. Now it's just stuck on the opening page in Recovery.
Now what ?
Click to expand...
Click to collapse
Fastboot the boot.img from whatever build your on now and let it boot up. That will remove twrp, then you can go back and fastboot twrp again.
[delete
Badger50 said:
Fastboot the boot.img from whatever build your on now and let it boot up. That will remove twrp, then you can go back and fastboot twrp again.
Click to expand...
Click to collapse
Where do I get the December boot.img ?
Zorachus said:
Where do I get the December boot.img ?
Click to expand...
Click to collapse
Go here....https://developers.google.com/android/images
Download the December factory image, extract it, then extract the other zip you'll find, and in there you'll find the boot.img. Then place that in your platform-tools folder and run...fastboot boot boot.img
Then type fastboot reboot, and let the phone boot up. Then go back and fastboot the twrp.img
Once in twrp, flash the twrp installer zip, then custom kernel if you want, and then magisk for root if you want. Question, why are you still on the December build???
I think if you just flash magisk it will boot again. If you were rooted. Someone posted on the twrp thread. To get touch back on twrp just have to adb reboot recovery. Might worth a try.
Sent from my Pixel 2 XL using Tapatalk
Badger50 said:
Go here....https://developers.google.com/android/images
Download the December factory image, extract it, then extract the other zip you'll find, and in there you'll find the boot.img. Then place that in your platform-tools folder and run...fastboot boot boot.img
Then type fastboot reboot, and let the phone boot up. Then go back and fastboot the twrp.img
Once in twrp, flash the twrp installer zip, then custom kernel if you want, and then magisk for root if you want. Question, why are you still on the December build???
Click to expand...
Click to collapse
Ok I am downloading the 1.6GB December file. I will then extract that, and only need to grab the boot.img file from there ? What do you mean when you say "then extract the other zip you'll find" ?
And then connect my phone to my PC, and open Command Prompt, and run these lines. I need to be in fastboot mode I assume ?
"
Zorachus said:
Ok I am downloading the 1.6GB December file. I will then extract that, and only need to grab the boot.img file from there ? What do you mean when you say "then extract the other zip you'll find" ?
And then connect my phone to my PC, and open Command Prompt, and run these lines. I need to be in fastboot mode I assume ?
"
Click to expand...
Click to collapse
There's another large zip that you'll find after you extract the factory image. It is in that zip that you'll find the boot.img. And yes, you'll need to be in fastboot mode to install the boot.img :good:
Badger50 said:
There's another large zip that you'll find after you extract the factory image. It is in that zip that you'll find the boot.img. And yes, you'll need to be in fastboot mode to install the boot.img :good:
Click to expand...
Click to collapse
Ok so I extracted that 1.6gb December file. Inside the file I see the large 1.5GB file, I open that and see the boot.img, only like 40mb. or do I need to extract this 1.5GB file too ?
Zorachus said:
Ok so I extracted that 1.6gb December file. Inside the file I see the large 1.5GB file, I open that and see the boot.img, only like 40mb. or do I need to extract this 1.5GB file too ?
Click to expand...
Click to collapse
Yes, extract that file, then you can move the boot.img out of it :good:
Badger50 said:
Yes, extract that file, then you can move the boot.img out of it :good:
Click to expand...
Click to collapse
In Command Prompt I am typing " fastboot boot boot.img " and it says cannot load 'boot.img' : No such file or directory
Zorachus said:
In Command Prompt I am typing " fastboot boot boot.img " and it says cannot load 'boot.img' : No such file or directory
Click to expand...
Click to collapse
Ah crud, I messed up. How bout..fastboot flash boot boot.img
Does that work? And, is that boot.img in the platform-tools folder?
Badger50 said:
Ah crud, I messed up. How bout..fastboot flash boot boot.img
Does that work? And, is that boot.img in the platform-tools folder?
Click to expand...
Click to collapse
I moved that boot.img file into the Downloads section of my PC, and in Command Prompt typed cd Downloads, then once there the "fastboot boot boot.img" line, which that worked, and finished in 1.023s, and the phone rebooted, but now I'm back on that white G screen, and still just sitting there.
I have the "platform-tools" folder inside the Downloads folder, but now sure how to direct the Command Prompt to go there ?
EDIT: Silly me, easy to get Command Prompt to the platform-tools, just typed ' cd platform-tools ' and it's there. LOL. So I did that, and then 'fastboot boot boot.img' and the phone rebooted, but it's still hanging in that white G screen
Badger50 said:
Ah crud, I messed up. How bout..fastboot flash boot boot.img
Does that work? And, is that boot.img in the platform-tools folder?
Click to expand...
Click to collapse
Make sure your boot.img is in Android Tools folder along with fastboot.exe.
Then with phone in bootloader, type:
fastboot flash boot boot.img
---------- Post added at 07:31 PM ---------- Previous post was at 07:26 PM ----------
Zorachus said:
I moved that boot.img file into the Downloads section of my PC, and in Command Prompt typed cd Downloads, then once there the "fastboot boot boot.img" line, which that worked, and finished in 1.023s, and the phone rebooted, but now I'm back on that white G screen, and still just sitting there.
I have the "platform-tools" folder inside the Downloads folder, but now sure how to direct the Command Prompt to go there ?
EDIT: Silly me, easy to get Command Prompt to the platform-tools, just typed ' cd platform-tools ' and it's there. LOL. So I did that, and then 'fastboot boot boot.img' and the phone rebooted, but it's still hanging in that white G screen
Click to expand...
Click to collapse
This should cure your sticking at white screen: (wipes phone)
https://forum.xda-developers.com/pi...ol-deuces-bootloop-recovery-flashing-t3704761
Zorachus said:
I moved that boot.img file into the Downloads section of my PC, and in Command Prompt typed cd Downloads, then once there the "fastboot boot boot.img" line, which that worked, and finished in 1.023s, and the phone rebooted, but now I'm back on that white G screen, and still just sitting there.
I have the "platform-tools" folder inside the Downloads folder, but now sure how to direct the Command Prompt to go there ?
Click to expand...
Click to collapse
What happens if you do a hard restart using the power button?
Your platform-tools folder is where? I just leave mine in the SDK folder, then move my stuff from my files from the download folder. But hey, if it works, that's cool :good:
michaelbsheldon said:
Make sure your boot.img is in Android Tools folder along with fastboot.exe.
Then with phone in bootloader, type:
fastboot flash boot boot.img
Click to expand...
Click to collapse
Ok the boot.img is in there, in my CD:\Downloads section in the folder named "platform-tools" , in that folder is all the fastboot.exe, and boot.img, adb stuff, etc...
I go back to Command Prompt typed in 'fastboot flash boot boot.img; phone rebooted, and still hanging in the white G screen
Ran that [TOOL] Deuces thing, unlocked bootloader and erased data, and other stuff, it does all this in fastboot mode it seems.
So after it's done, I am in fastboot mode still, I press the power button on the Green Start arrow. It boots up, then a black screen and bright circle animation and underneath says erasing, it reboots and goes to the white G screen, then reboots again, and I am in some weird screen now ?
Android Recovery, but this sure the hell isn't TWRP Recovery. It's some strange super tiny lettering hard to barely read, gives me two options;
-Try again
-Factory data reset
Above that it says "Can't load Android system. Your data may be corrupt. If you continue to get this message, you may need to perform a factory reset, and erase all your data stored on this device"
Zorachus said:
Ran that [TOOL] Deuces thing, unlocked bootloader and erased data, and other stuff, it does all this in fastboot mode it seems.
So after it's done, I am in fastboot mode still, I press the power button on the Green Start arrow. It boots up, then a black screen and bright circle animation and underneath says erasing, it reboots and goes to the white G screen, then reboots again, and I am in some weird screen now ?
Android Recovery, but this sure the hell isn't TWRP Recovery. It's some strange super tiny lettering hard to barely read, gives me two options;
-Try again
-Factory data reset
Above that it says "Can't load Android system. Your data may be corrupt. If you continue to get this message, you may need to perform a factory reset, and erase all your data stored on this device"
Click to expand...
Click to collapse
I don't mess with tool kits, so may want to post it in that thread. That's the stock android recovery. Your best bet is to factory reset. Then hopefully it'll boot up.
Looks like I'm ****ed. I pressed Factory Data Reset, it rebooted, went to the white G screen, then rebooted back again to that stock Android recovery, with the same options.
Zorachus said:
Looks like I'm ****ed. I pressed Factory Data Reset, it rebooted, went to the white G screen, then rebooted back again to that stock Android recovery, with the same options.
Click to expand...
Click to collapse
That sounds like outdated Android Tools.
Have you tried to flash the March image from Google yet?
If not, download newest Tools, https://dl.google.com/android/repository/platform-tools-latest-windows.zip
Then download March image and follow these instructions: https://developers.google.com/android/images#taimen.