[Q] Back to stock help???

Search This thread

Crossvxm

Senior Member
May 26, 2013
598
144
30
New York
So I recently grabbed me a Grouper recently to *cough* remember my first Android powerhouse (before I met the Optimus G) and decided to tinker with it as usual. I've owned 6 (now 7) different Groupers in this lifetime and have great experience with it, how to get those pesky drivers working, etc. This is my first 32GB model ever. Anyways, I unlocked the BL, rooted and flashed TWRP (thanks to WugFresh's toolkit) and decided to play with the newer roms (last time I owned one, KitKat was a rumor) and kernel combos. Anyways, I decided I prefer its stock performance and battery, and that maybe I'd use Xposed to tweak apperance instead. My mistake was, I should have flashed a flashable stock rom. But NOOOOO...I decided to flash it back to stock with the fastboot method (which we have various threads on, and toolkits including WugFresh's). Trying the manual method, I followed the following guide using a 4.4 image zip file:

http://xdaforums.com/showthread.php?t=1907796

Claims that the sysem.img doesnt exist when it gets to that part. I extracted the entire file and it DOES exist. Anyways, I tried WugFresh's tk and sort of gives me the same ending (after literally almost an hour of waiting TWICE due to my old PC).

THERE WAS A GUIDE I SAW SOMEWHERE while Googling "how to" get back to stock on Google which actually point ou how to MANUALLY flash each .img yourself one by one via fastboot, which I really intended on doing instead of the above methods (DIY anyone?) but I can't find that guide and I'm not even sure if the post was here on XDA or Android Central. I should have done all Google search on the PC instead but ATM the tablet seemed more convenient for a search.

Anybody know the guide I am mentioning or know what I am talking about? I am assuming that method will solve my dilemma, and I like doing these things manually at times anyways....

EDIT: To my disappointment, found the post, but no good:

http://www.androidbeat.com/2013/11/flash-factory-image-nexus-device/

Apperantly everything flahes fine until it gets to the system.img part...adb/fastboot just freezes there and wont budge at all. Since I noticed that it did flash things, I've decided to flash TWRP and just flash a rom from my flash drive (thanks to a USB OTG) but I would still like to actually FIX the thing properly and return it 100% stock. Any ideas?
 
Last edited:

crache

Member
Aug 15, 2012
16
1
Calais
I should have flashed a flashable stock rom. But NOOOOO...I decided to flash it back to stock with the fastboot method

I'm not sure what you mean by stock. Are you trying to flash a "Stock" rom from the community or the stock images provided by google?

If you are using nakasi-ktu84p image, the flash script contains:
Code:
fastboot oem unlock
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
sleep 10
fastboot -w update image-nakasi-ktu84p.zip

You can see here the exact process of getting back to stock.
The boot, cache, recovery, system, and userdata are erased.
Then an attempt to flash the bootloader. This will fail on nakasi-ktu84p and several images back.
Google has been negligent in addressing this issue.

I was able to find success with bootloader-grouper-4.23.img which I extracted from nakasi-krt16s.
You could save time and bandwidth from acquiring it here.

This bootloader also failed to flash for me!
If you have flashed a custom bootloader in the past, you may need to go all the way back to JDQ39 bootloader-grouper-4.18.img.
fastboot flash that, and then you will be able to flash 4.23 from krt16s.

Once you have passed this small ordeal you should be able to install the latest ROM.

In summary, you should be able to do the following from a system that has the fastboot binary:

Code:
EXTRACT nakasi-ktu84p-factory-76acdbe9.tgz
OVERWRITE bootloader-grouper-4.23.img with one acquired from krt16s
Code:
nakasi-ktu84p bootloader-grouper-4.23.img 
MD5 = 5bdb2e87370cdb1a7ea14bb0c3e21390

krt16s bootloader-grouper-4.23.img 
MD5 = df53028033c9eccf4fe5ba7bc198ce24
Code:
run flash-all.sh or flash-all.bat

PS.

I have been lured by the idea of stock stability, performance, and battery life. Something about Xposed seems dirty to me.
Battery life and Performance have always been better on a custom ROM / Kernel in my experience.
Stability can be rock solid when you've got a good system.

My favourite solution is to have the stock image installed and stripped down for size. This always you to boot in and update your apps from playstore.
I then install a custom ROM alongside via multiRom. This rom also has extras stripped out and no gapps installed.
From Rom 1 you can copy your apks into Rom 2 as needed.
I tend to avoid any apps that would be incompatible with this method!
 

Crossvxm

Senior Member
May 26, 2013
598
144
30
New York
I'm not sure what you mean by stock. Are you trying to flash a "Stock" rom from the community or the stock images provided by google?

If you are using nakasi-ktu84p image, the flash script contains:
Code:
fastboot oem unlock
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
sleep 10
fastboot -w update image-nakasi-ktu84p.zip

You can see here the exact process of getting back to stock.
The boot, cache, recovery, system, and userdata are erased.
Then an attempt to flash the bootloader. This will fail on nakasi-ktu84p and several images back.
Google has been negligent in addressing this issue.

I was able to find success with bootloader-grouper-4.23.img which I extracted from nakasi-krt16s.
You could save time and bandwidth from acquiring it here.

This bootloader also failed to flash for me!
If you have flashed a custom bootloader in the past, you may need to go all the way back to JDQ39 bootloader-grouper-4.18.img.
fastboot flash that, and then you will be able to flash 4.23 from krt16s.

Once you have passed this small ordeal you should be able to install the latest ROM.

In summary, you should be able to do the following from a system that has the fastboot binary:

Code:
EXTRACT nakasi-ktu84p-factory-76acdbe9.tgz
OVERWRITE bootloader-grouper-4.23.img with one acquired from krt16s
Code:
nakasi-ktu84p bootloader-grouper-4.23.img 
MD5 = 5bdb2e87370cdb1a7ea14bb0c3e21390

krt16s bootloader-grouper-4.23.img 
MD5 = df53028033c9eccf4fe5ba7bc198ce24
Code:
run flash-all.sh or flash-all.bat

PS.

I have been lured by the idea of stock stability, performance, and battery life. Something about Xposed seems dirty to me.
Battery life and Performance have always been better on a custom ROM / Kernel in my experience.
Stability can be rock solid when you've got a good system.

My favourite solution is to have the stock image installed and stripped down for size. This always you to boot in and update your apps from playstore.
I then install a custom ROM alongside via multiRom. This rom also has extras stripped out and no gapps installed.
From Rom 1 you can copy your apks into Rom 2 as needed.
I tend to avoid any apps that would be incompatible with this method!

Your on the right track that's exactly what I was looking for, but to me it doesn't work on the system.img flashing part, it stays stuck there forever without a hint of movement at all. I left it flashing from 4am to 7am with no progress. I though it was working as the Windows Task Manager was showing fast boot constantly changing in CPU usage as it does when its at work. But sadly, it gets stuck there for good. Then closing fast boot won't work, I have to shut down the PC in order for it to leave
 

crache

Member
Aug 15, 2012
16
1
Calais
Your on the right track that's exactly what I was looking for, but to me it doesn't work on the system.img flashing part, it stays stuck there forever without a hint of movement at all. I left it flashing from 4am to 7am with no progress. I though it was working as the Windows Task Manager was showing fast boot constantly changing in CPU usage as it does when its at work. But sadly, it gets stuck there for good. Then closing fast boot won't work, I have to shut down the PC in order for it to leave

I'm not familiar with the tools you are using. Have you used the commands directly from the command line, and what is the output?
 

Crossvxm

Senior Member
May 26, 2013
598
144
30
New York
I'm not familiar with the tools you are using. Have you used the commands directly from the command line, and what is the output?

WugFresh is a toolkit made to root, unlock boot loader, relock, restore to stock, etc. And yeah I used the fastboot erase and fastboot flash commands via ADB/fast boot and as I said, everything goes well except the part where its time to flash the system.img, it just hangs there doing nothing. Tried and left it for several hours and still nothing
 

GedBlake

Senior Member
Jan 5, 2013
888
606
Ashton-under-Lyne, Manchester, UK
Try a different USB port on you computer or a different USB cable... or both.

...
....it doesn't work on the system.img flashing part, it stays stuck there forever without a hint of movement at all.
...

Hi, Crossvxm...

This seems to be a relatively common problem, and I always seem to have it myself when fastboot flashing factory stock.

I've no idea why, but the fastboot connection seems to 'time-out' when fastboot flashing 'system.img'.

Now normally, and just prior to running any fastboot flash commands, you should run this command...

Code:
fastboot devices

This command doesn't actually do anything; it's essentially just diagnostic and is used to confirm you have a viable fastboot connection prior to flashing anything. If do you have a fastboot connection, you should see something like this (with the N7 booted into the bootloader)...

Code:
015d2d42xxxxxxxx                        fastboot

This is the Nexus 7's unique serial number followed by the word 'fastboot'. If you don't see this, then you likely have a driver problem...

...BUT HOWEVER, I KNOW I DON'T HAVE A DRIVER PROBLEM.. so when having problems with 'sending system', and upon opening a second command prompt window on my Windows laptop, and typing fastboot devices again, the Nexus 7's serial number now no longer appears... and this is AFTER the bootloader and boot img's have been sent and written successfully.

At this point, I can only conclude, and that for unknown reasons, my fastboot connection has 'died'... and 'sending system' is now permanently 'stuck':(.

And the fastboot flash attempt has failed:(.

-----------------------------------------------------

The solution for me, was to change to a different USB port on my laptop. Another possibility might be to try a different USB cable... I haven't tried this... just a change of USB port on my laptop was sufficient, and the problem with flashing system.img was resolved.

Either way, reboot the N7's bootloader using a differerent USB port on your computer or a different USB cable... and attempt the flash again.

One final point... 'sending system' does take longer than the other .img's, probably due to it's size... but it really should take no longer than around 5 minutes... 10 minutes maximum.

Hope this helps... and good luck.

Rgrds,
Ged.
 
Last edited: