yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
It's a similar situation with Fedora, but from where you're at all you need to do is to sudo the fastboot commands:

sudo fastboot devices

that should get you what you need.
[Nexus 7 Q&A, Help & Troubleshooting] brainvision:
thanks man! it works!!

so happy!! now I can go on exploring your how-to.. I want to understand the basics stuff..

with my smartphone, a Galaxy 5 GT-I5500, an entry-level smartphone, it's all so simple: Odin, CWM and ROM.. when you come from stock, but if you already flashed a custo you can use MadManager.. no bootloader.. :D :D
[Nexus 7 Q&A, Help & Troubleshooting] Leonhan:
Please help me! I did not have this problem before so I don't know why it just happened. Anyway, I recently reformatted my machine due to an infection, and I went on to install nexus adb and fastboot drivers. I used the google_usb drivers via the device manager; but every time I update driver, it says "The best drivers are already installed", and its Android Composite Adb interface and not ADB interface. So I checked via adb devices to see if it was indeed installed correctly, but to my dismay, no adb devices were found. I tried using wugs toolkit(1.6.3) and did the pdanet and raw driver installations, and still the outcome is the same. I uninstalled, used usbdeview to delete usb drivers. reinstalled again, and still the same. Please help.T_T
[Nexus 7 Q&A, Help & Troubleshooting] antz123:
I am facing problem that suddenly I have NO SERVICE error.

Strangely it shows Vodafone, or Dolphin which are my network providers, their names get shown. like on main lock screen it shows

Vodafone - No Service, Dolphin- No Service error.

I last night did a successful factory image rest also, still problem persisits, and I am since start on official ROMs.

This is on from last 4-5 days. Nor I can save APN manually, the data just doesnt get saved. Any help would be great, thanks a lot
[Nexus 7 Q&A, Help & Troubleshooting] toly084:
Hi all. Is it possible by this method to restore Kindle Fire?
[Nexus 7 Q&A, Help & Troubleshooting] yanic123:
EDIT: I am stupid and don't read instructions in full - this works fine now - sorry.

Hi I followed the guide in full thankyou very much for your help.

I am unfortunatly not able to boot back in to the nexus 7 now. It is stuck at the screen where it says Start in the top right, I press the power button to make it restart but it doesnt do anything.

It says booting failed.

I was trying to flash 4.1.2 back on to the device.

It is a wifi only device

I got the data from the link you gave. Every step worked without hitch so I am unsure of what I should do now.

There was 2 more lines of code at the bottom of the sh file that you didnt have listed:

fastboot erase boot

fastboot erase cache

fastboot erase recovery

fastboot erase system

fastboot erase userdata

fastboot flash bootloader bootloader-grouper-3.41.img

fastboot reboot-bootloader

sleep 10

fastboot -w update image-nakasi-jzo54k.zip

Should I do the last 2 as well?
[Nexus 7 Q&A, Help & Troubleshooting] pjacobs76:
Just wanted to say thank you for this. I need to send mine into Asus for an RMA and needed to get back to stock and locked. I was having some trouble getting it to work. Kept getting an error saying that it couldn't find system.img. After reading through some of the post, I found out that it was the PC that I was using. Once I connected it to another PC and went through the process again, it worked! THANK YOU!!!
[Nexus 7 Q&A, Help & Troubleshooting] microzee:
i think you should update the guide with instructions on how to return to stock without clearing the userdata, as long as they were previously unlocked. in case you guys were wondering, heres how i did it. skip the unlocking and re-locking steps, skip the line that says fastboot erase userdata, and remove the -w in the line that says fastboot update -w xxx.zip. that is how i did it for mine, hopefully i didn't miss something. This is useful if you want to get rid of root, return to stock, start with a clean rooting slate, and all while keeping your data. just make sure you are unlocked.

Also yanic123,

the sleep 10 line is not necessary, but this line is essential

fastboot -w update image-nakasi-jzo54k.zip

Edit: before trying to "not erase userdata", let me make sure mine works.. currently it seems to be stuck at sending system.

update: it worked, something happened to my usb cable, and it disconnected for a second. no worries just exit everything, reboot into fastboot and redo last line.

Cheers,

-Micro;)
[Nexus 7 Q&A, Help & Troubleshooting] silverspur:
How you manage to did that?cause im trying hard to flash stock image using WUGs kit..it goes well..but when the flashstock window appear,all i get was `sending `bootloader' <2096 kb> n it just stuck there 4 half an hour now.,please reply or anyone that can help me with these?
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
I'd suggest you not use a toolkit. But if because of reasons you do wish to use a toolkit and you want help with that toolkit, you should go to the appropriate forum and ask there.
[Nexus 7 Q&A, Help & Troubleshooting] Ciphersbak:
Thanks comminus for sharing!!!

Really helpful

Not a big fan of toolkits

I prefer the old fashioned command line way

Going to explore the grouper further

Cheers
[Nexus 7 Q&A, Help & Troubleshooting] kEvinErd:
This thread has been the most useful and clearest guide I've seen. Fully recommended for newbies like me! :D
[Nexus 7 Q&A, Help & Troubleshooting] jpark3711:
Thanks for these instructions, super helpful.

I did have a problem and I was hoping someone could help.

I followed these instructions, but didn't oem lock. I've loaded TWRP and SuperSU on my Nexus. I ran a root checker and it says I'm rooted, but every time I try to flash a ROM it fails.

Has anyone else had this problem? Is there a setting in TWRP that I need to enable?
[Nexus 7 Q&A, Help & Troubleshooting] elo1338:
Hello everyone,

just a quick question: When Key Lime Pie comes out i want to get the official OTA update on my Nexus 7.

After flashing this factory image etc. would i get the OTA updates as well?

Greetings
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
Yes, you will receive any available OTA updates.

Sent from my Nexus 4
[Nexus 7 Q&A, Help & Troubleshooting] vin31189:
Last step 'Sending userdata' taking a long time....what should i do now ? PLEASE

Please reply urgent !!! NOW ...Please its there on bootloder screen for last 5 min
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
No one can begin to help you without knowing the specifics of the problem. Please be specific about what you're trying to accomplish, what you've done, and how the device is responding.

Sent from my Nexus 4
[Nexus 7 Q&A, Help & Troubleshooting] Igor33:
Hi,

First of all, thank you for this.

A note that you may add for the stepp 4 of flashing, now in the factory image archive (mine was the nakasi-jdq39-factory-c317339e, i don't know about the others) , there is a "flash-all.bat" file that does the complete Step 4 all by itself. ;)
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
Thanks, Igor and welcome to xda!

I intentionally listed the commands on-by-one for two reasons:

to educate the user about the involved steps

to know precisely which command a user is having difficulty with

If one understands the steps there is no reason they can't use the batch files! :good:
[Nexus 7 Q&A, Help & Troubleshooting] brainvision:
hi..

first thanks for this thread, I found it very useful and I learn how to flash ROMs for my tilapia just here!!

Now I would like to try again he stock ROM.. my question is about the botloader flash section.. is it really useful? I mean, I unlock the bootloader but I don't remove it when I flash the TWRP recovery.. I already had the last bootloader and I only unlock it, first time I flash a custom ROM..

Why are those step necessary?

thanks a lot! ;)
[Nexus 7 Q&A, Help & Troubleshooting] cptsashimi:
I would think if you wanted to return to a completely stock condition it wouldn't hurt to do all steps. As comminus said, he created this as a guide to fully return to stock, if you left out steps you wouldn't necessarily get the same level of support if something were to go wrong. But yeah, if you understand all the steps you can pick and choose what you need when you need it. Just don't count on assistance .
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
Just to reiterate what cptsashimi said, if you understand the steps just pick the ones you need!

Here's some quick tips:

if you device is currently running a custom rom then your bootloader is most likely unlocked, so no need to run the oem unlock fastboot command. From this state you can just run the erase commands and the flash commands.

If the bootloader version you are running is the same as the version in the factory image that you're flashing, there is no need to reflash the bootloader. The same applies for the radio on the 3G variants.
[Nexus 7 Q&A, Help & Troubleshooting] brainvision:
that's exactly the point I wanted to clarify!!

thanks very very much, I really appreciate t! ;)
[Nexus 7 Q&A, Help & Troubleshooting] hitony:
InvalidState error when fastboot flash bootloader

Thanks for these detailed instructions. I wonder how to delete my post.

I fixed the "InvalidState/signature mismatch" error.
[Nexus 7 Q&A, Help & Troubleshooting] HRandev:
Oem stock with TWRP

Hi,

I urgently need help for my nexus 7 that has stopped charging or recognising even the original ASUS usb cable (have tried many others as well, same result). I'm currently charging it via the method of powering it of and plugging it in without the android os running. I have even tried to connect it to my PC in bootloader mode. I have the custom trinity kernel install and want to return my device to stock kernel and os state. However I do have TWRP and need help from there to install the stock image. I have previously tried many thing such as completely wiping the system and clearing any caches in TWRP. Also I have seen that in TWRP it recognises my usb (connected via OTG cable).

So could anyone please help me with returning my nexus 7 back to oem stock state by just using TWRP.:crying:

Thanks in advance.
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
This sounds like either a cable, port, or driver issue. Have you tried a different USB cable and/or a different port on your computer? Maybe try removing the existing drivers and installing the universal naked driver.
[Nexus 7 Q&A, Help & Troubleshooting] HRandev:
Yes my port is faulty. I have tried many different USB and tried with universal driver, it doesn't work. Is it possible if you could please send me a nandroid backup of android stock rom that I can restore with in TWRP my system?
[Nexus 7 Q&A, Help & Troubleshooting] Daltonyx:
In all honesty, when my tablet was in that state I moved to my Ubuntu and manually flashed the stock update package. Ubuntu doesn't need drivers to adb into the tablet, or anything for that matter. I would say use this method with Ubuntu. Windows doesn't seem go like recognizing soft bricked n7's. If you have a linuxbox that is. You could just use virtual box I suppose. Anyways, best of luck! I remember when that happened to me, and I know it sucks!

---------- Post added at 12:18 PM ---------- Previous post was at 12:13 PM ----------

http://forums.androidcentral.com/ne...1477-guide-nexus-7-factory-image-restore.html

Sorry, forgot the link!

---------- Post added at 12:53 PM ---------- Previous post was at 12:18 PM ----------

I use CWM, so I can't help you there. Your computer should have more than one port, just try to adb via the others I suppose.
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
Use a different port.

I don't keep backups of the stock rom... that's what the Google-provided factory images are for. You should try a different PC or OS (like Daltonyx suggests) if you can't get yours to work.
[Nexus 7 Q&A, Help & Troubleshooting] EvoRocker:
Perfect guide, thank you!
[Nexus 7 Q&A, Help & Troubleshooting] HRandev:
tried different ports on PC, doesn't work.
[Nexus 7 Q&A, Help & Troubleshooting] Remcotjuuh:
Thanks for the guide, was done in no time :). One question: can't I just extract the archive and run flash-all.bat? Doesn't that do the same as your guide tells us?
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
You definitely can. The guide is intentionally verbose.

Sent from my Nexus 4
[Nexus 7 Q&A, Help & Troubleshooting] Remcotjuuh:
Thank you :). Still very good to read it instead of running the bat though: then you actually know what's happening.
[Nexus 7 Q&A, Help & Troubleshooting] Remcotjuuh:
One more question: what is the difference between erasing and formatting? I thought that format deleted a partition and created a new one and that erase just "emptied" a partition.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
As far as fastboot is concerned:

No "partitions" are ever deleted or changed - ever. But "format" means to re-create a new ext4 filesystem within the named partition. This has the effect of destroying evidence of the old filesystem, but presumably leaves old file data in unallocated blocks.

Erase could mean either "write zeros (or garbage) to the entire partition which will destroy everything including the filesystem", or it could mean "delete all files in the existing ext4 filesystem, but leave the filesystem intact (but empty)".

Judging from the "did you mean to use 'fastboot format'?" message that newer versions of fastboot emit when you perform the "fastboot erase" task, I take it to mean that "erase" destroys everything in the named partition including the filesystem when you use the "fastboot erase" option. Possibly it also notifies the eMMC chip via TRIM about the erasures so it (the eMMC controller) is free to do whatever it wants with wear-leveling.
[Nexus 7 Q&A, Help & Troubleshooting] WiseManWhite:
Thank you SO much for this! Easy to follow, straight forward and saved me just in time to send my Nexus 7 back (had some light bleed).
[Nexus 7 Q&A, Help & Troubleshooting] Daltonyx:
What OS are you using?
[Nexus 7 Q&A, Help & Troubleshooting] fushla:
So, I can extract the "image-nakasig-jdq39.zip" and flash system,userdata, boot & recovery by my self without problems? (The old galaxy nexus way ^^)
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
Correct.

Sent from my Nexus 4
[Nexus 7 Q&A, Help & Troubleshooting] scrack26:
Hi Guys, i just got a hands on my Nexus 7 - so if ever i have overlook something on this thread forgive me, here's my question - when i bought my nexus 7 the stock firmware is 4.1.2 - so i upgraded it to 4.2.2 and rooted it. now, should i ever return to stock factory - what will i download? the 4.1.2 or 4.2.2 ? thanks guys!
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
4.2.2 or whatever the latest version is at that time.

Sent from my Nexus 4
[Nexus 7 Q&A, Help & Troubleshooting] Mach3.2:
If you have the 16 or 32gb variant, you have to flash the whole zip together or the partition info won't be written properly resulting in only 5gb+ usable.

Beamed from my Maguro.
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
The 5GB+ of usable space is the result of erasing the userdata partition and not formatting it. The reason this is not a problem when the zip is flashed is because of the -w option passed to the fastboot command which causes the cache and userdata partitions to be erased and formatted. So if one decides to erase userdata and/or cache they should then format it as well.
[Nexus 7 Q&A, Help & Troubleshooting] Mach3.2:
I see, thanks!:good:
[Nexus 7 Q&A, Help & Troubleshooting] HRandev:
cyanogen 10.0
[Nexus 7 Q&A, Help & Troubleshooting] wolfwatcher81:
Thanks

Thank you so so much :laugh:
[Nexus 7 Q&A, Help & Troubleshooting] StuMcBill:
Which of these fastboot commands should I leave out to keep the contents of my SDCard partition?

My N7 ran out of battery and now (after charging) it won't get past the boot animation when turning back on?

I have tried reflashing my ROM but no joy, and I want to go back to stock, but keep my data if possible!
[Nexus 7 Q&A, Help & Troubleshooting] Mach3.2:
Remove the -w tag when flashing the .zip..

Beamed from my Maguro.
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
First, extract the .img files from the zip.

Then

fastboot erase boot
fastboot erase cache
fastboot format cache
fastboot erase recovery
fastboot erase system
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img

That will avoid touching the userdata partition, however you may run in to issues if you are returning to stock from a custom rom AND trying to keep your data.
[Nexus 7 Q&A, Help & Troubleshooting] fc_emilio:
Hi guys, I ran into a little problem during my attempt to update to the 4.2.2. I have a N7 3G version and I followed the instructions correctly.. or so I think. The issue is the radio image. When I try to flash the radio image it says: FAILED <remote: <BadParameter>>

in other words, I can't do anything now. I can't get to the recovery mode, fastboot is my only option. Basically, it's almost bricked :( How can I resolve this bad parameter thing with the radio?
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
You left a bit up to our imagination. Add the following details.

- is your current bootloader now showing v4.18?

- what version of android were you on beforehand?

- when you say "the instructions" do you mean these (from the OP) :

> fastboot erase boot
> fastboot erase cache
> fastboot erase recovery
> fastboot erase system
> fastboot erase userdata
> fastboot flash bootloader bootloader-tilapia-4.18.img
> fastboot reboot-bootloader
> fastboot flash radio radio-tilapia-1231_0.17.0_1025.img
> fastboot reboot-bootloader
> fastboot -w update image-nakasig-jdq39.zip

The radio image is a single partition that does not affect other partitions - under most circumstances, android phones will still boot a new ROM even when the old radio firmware is present.

Taking all of that into consideration, I am going to *guess* that:

you completed the initial flashing steps, including flashing of the stock recovery, but may not have done

fastboot -w update image-nakasig-jdq39.zip

Did you stop on first failure rather than completing additional flashing steps following the radio flashing attempt.?

if your bootloader is unlocked, you can put the custom recovery back by flashing it:

fastboot flash recovery name-of-custom-recovery-image-file.img

So, add a little detail and we'll see if we can help. The Bad Parameter message doesn't signify any particular syndrome to me - but the first thing to check for are probably the integrity of the radio image file and/or communications problems on the USB link (have you tried repeating the radio flash operation with a different USB port on the PC?)
[Nexus 7 Q&A, Help & Troubleshooting] fc_emilio:
Yep, by instructions I'm referring to the OP. What comes to the bootloader, it's unlocked and I can flash what ever I want. In other words, everything works fine until flashing the radio image. When I try to flash it, I receive the message mentioned before. And because there is no radio image there now (radioband: N/A), I can't flash the stock rom because it requires the radioband image. My laptop has three USB ports and I have tried all three with the same result.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
Does the Bad Parameter message appear immediately after hitting the Enter key, or does it seem as if there is a (data transfer) delay first?

(A cut-n-paste of the session might be helpful, btw)

When you say

are you saying that this subsequent step fails?

fastboot -w update image-nakasig-jdq39.zip

Also, does the extracted radio image file you are using have the same length as that reported by the archive you pulled it from?

Obviously, you would want the radio firmware to work - but I guess what I am asking is whether you are now somehow prevented from flashing other partitions, etc.

If the -w update fails, individual partitions can be flashed by:

- unpacking the .zip file

fastboot format system

fastboot flash system system.img

fastboot flash boot boot.img

fastboot format cache

fastboot format userdata

(optionally: fastboot flash userdata userdata.img)

Obviously this doesn't address the issue with the radio image. I'm not sure what to tell you there, except to check all possibly relevant details (including typos of filenames given on the fastboot command line). fastboot version? Do you get the same result trying to flash a different (4.1.2) factory image? Did you verify the original download MD5 signature? Were there any other failure messages you didn't mention?
[Nexus 7 Q&A, Help & Troubleshooting] boroboy69r:
Seems people are helping in here i am tryin to get to stock im on smoothrom at the moment when i try to flash all together my n7 wont flash system it says cant allocate space for it what can i do even tried to flash stock rom thats floating around here and that wont flash system but i can reflash smoothrom says the same when i try to fastboot flash

Sent from the renovated faux powered 1
[Nexus 7 Q&A, Help & Troubleshooting] Punchlinegott:
Hello,

my device automatically tries to boot TWRP everytime i turn it on but it gets stuck at teamwin logo. Now when I try to use adb like in step 3

> 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

In my case it says <123456789ABCDEF> recovery

adb reboot-bootloader won't work also. any suggestions?
[Nexus 7 Q&A, Help & Troubleshooting] netsuga:
N7 32gb wifi+3g

I already unlocked and rooted my device and it run smoothly. next thing was i downloaded a flash to change the ui of my n7, the result is bad. so i decided to switch back to the old UI which I also downloaded from that tutorial, but then after installed that flash it stucks on X logo.

1.Bad thing was I never did backup before that.

2.I can access bootloader but its useless because of reason #1.

3.I cant do Hard Reset using power and volume buttons.

Question:

1. How can I do your steps if I cant access USB debugging because Im stuck on X logo?

2. I already installed the driver utility and when i plug the n7 to my computer it would detect the driver but I cant see the storage drive of N7?

Pls. Help.
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
ADB and USB debugging is not an absolute requirement. Boot the device in to fastboot - turn off the device. Press and hold Power until the device powers on, then immediately press and hold Volume Down (while still pressing Power). You will see the word Start with an arrow drawn around it. Now, you're in fastboot. Read the guide, follow the steps, and you'll be back up in no time.
[Nexus 7 Q&A, Help & Troubleshooting] comminus:
Boot the device in to fastboot manually: turn off the device. Press and hold Power until the device powers on, then immediately press and hold Volume Down (while still pressing Power). You will see the word Start with an arrow drawn around it.
[Nexus 7 Q&A, Help & Troubleshooting] Punchlinegott:
already tried that but this won't work. it automatically tries to boot twrp and again gets stuck at teamwin screen.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
With the recovery (partially) running, do *any* adb commands that involve getting a shell on the device work? For instance, something trivial like

adb shell ls

What custom recovery (TWRP/CWM & version number) did you install, and is this a grouper (WiFi only) or a tilapia (WiFi+3G) Nexus 7?
[Nexus 7 Q&A, Help & Troubleshooting] Punchlinegott:
Hello when i type adb shell ls i get:

C:\Users\Chev\AppData\Local\Android\android-sdk\platform-tools>adb -d shell ls

boot fstab.qcom sd-ext

cache init sdcard

data init.rc supersu

datadata initlogo.rle sys

default.prop internal_sd system

dev proc tmp

emmc recovery ueventd.goldfish.rc

etc res ueventd.grouper.rc

external_sd root ueventd.rc

fstab.grouper sbin

My device is grouper and i used twrp 2.5.0.0 from nexus toolkit.