Android Porn – How to break and restore a Nexus 7 to stock Android

Hello,

I just tested Ubuntu 13.10 Touch (current stable channel) on my Nexus 7 (first edition) and it was performing horribly. Constant freezes and lockups…

When I tried to restore Android Stock I got the device in a state where it just showed failed boot and no adb connections possible.

After some heavy googleing I could restore it like this:

  • downloaded and installed android sdk: http://developer.android.com/sdk/index.html
  • export platform-tools directory to path (only for unix oses)
  • boot Nexus7 into “fastboot” screen (with big green start box)
  • verified osx did detect the device “fastboot devices” -> should list a device with status “fastboot”
  • downloaded 4.3 factory image from https://developers.google.com/android/nexus/images#nakasi
  • extracted tgz file (do not extract the zip file that lies beside the flash scripts
  • executed “flash-all.sh” (Edit: the flash-all script is located in the nexus firmware tgz!)

During all of this I also saw an inconsistent reliability of the adb/fastboot connection. Sometimes I needed to unplug and replug the nexus 7 a couple of times until it got recognized by adb/fastboot and could successfully be flashed.

Maybe this helps someone…

Regards
Sebastian

Advertisements

About SebastianB

read it in my blog
This entry was posted in miscellaneous and tagged , , , , , , , . Bookmark the permalink.

24 Responses to Android Porn – How to break and restore a Nexus 7 to stock Android

  1. Hi Sebastian,
    I am having this problem right now, and I am very happy that you found a solution.
    However, could you explain how you execute “flash-all.sh” from the eclipse interface of the SDK?

    thanks alot!

    • SebastianB says:

      Hi,

      the flash-all.sh/.bat are included with the nexus7 firmware you get from the google.com link above.

      Regards
      Sebastian

    • FYI:
      1) I copied everything (fastboot, img-file, zip-image-file, …) in the same directory and started a command prompt from within this directory (windows7)
      2) I opened the script in notepad so I could read the different steps
      3) and entered the commands in the command prompt

      REMARK:
      1) bootloader-grouper-4.23.img is NOT OK in the original nakasi-jw66y from google (!)
      2) after copying the one from nakasi-jwr66v (V!) everything went fine

      Hope this helps someone too :-)

  2. Peter says:

    Thanks, this is worked great. I have my N7 back. :)

  3. Same problem, was trying to install 4.4 onto my 3G nexus. Now stuck saying bootloader failed. Can you give a little more detail on this?? Got all the files but how do you run the .bat file?

    • SebastianB says:

      well on windows you run a .bat (batch file) by just doubleclicking it. Alternatively you can run it from a cmd window.

      If you are on linux or mac you have to run the .sh file.

      Whats your exact problem with running the flash-all.bat?

  4. damurray616 says:

    Im having the same issue with my nexus 7. I’ve downloaded everything needed but im confused as to how i flash it all back to my tablet. I’m a little new to this and would love a little more step by step and explaining on what to do. Any help is great and thanks in advance for any help.

    • SebastianB says:

      Hey,

      you need to give some more information at what point you are stuck or what you do not quite understand.

      Im guessing that you are on a windows platform:

      1. downloaded and installed android sdk: http://developer.android.com/sdk/index.html
      (that step shouldnt be harder than installing any other software)

      2. boot Nexus7 into “fastboot” screen (with big green start box)
      (turn it off, connect it to your pc and press and hold the Volume Up, Volume Down, and the Power Button at the same time for about three seconds)

      3. downloaded 4.3 factory image from https://developers.google.com/android/nexus/images#nakasi

      4. Extract the downloaded tgz file (www.7zip.org should do the job).
      (Do only extract the downloaded tgz file, inside the decompressed data there is another compressed file, do not extract that -> only 1x decompression with 7zip!)

      5. Run the flash-all.bat file that you decompressed in step 4
      (Doubleclicking should work, however on error the window might disappear right away. You can also go “Start -> run -> cmd” to open the command shell and navigate to where you extracted the firmware. When you run the flash-all.bat from there the window will not disappear on completion or failure so you can read error messages.

      So this is a bit more detailed rundown. Don’t hesitate to ask questions if it does not work for you but make sure you describe your exact problem/error message the next time!

      Regards
      Sebastian

  5. Bryce Bosset says:

    I just wanted to say thanks, this worked perfectly. Right about the time I was about to say to hell with it. Thanks a lot.

  6. Aaron Zwas says:

    Hi Sebastian- I’m very happy I found this post. Unfortunately, the command prompt returns this message when I run flash-all.bat: ” ‘fastbook’ is not recognized as an internal or external command, operable program, or batch file.”

    If helpful, I’m doing this through windows 7. In the Device Manager, my Nexus 7 is listed as “Google Nexus 7 Bootloader Interface”.

    Thanks for any other thoughts you might have. Really appreciate it!

    • SebastianB says:

      Hi,

      the “fastboot” command is part of the android sdk!
      Have you downloaded and installed this?

      I have just downloaded the adt-bundle-windows-x86-20131030.zip from http://developer.android.com/sdk/index.html and verified that the fastboot.exe is under extractpath/sdk/platform-tools.

      If you did not grab the sdk installer but a zipfile you just have to make sure that the fastboot.exe is “in path” with means that it can be run and found from every location. So you have to export the path to fastboot.exe as a system Path.

      Other posibility would be to copy all the extracted files from the nexus7 firmware to the platform-tools directory and run flash-all.bat from there. As it would lie right beside the fastboot.exe your command shell would find it.

      So in short the problem you have is that your system does not know where the fastboot.exe is located on your harddrive and you either have to teach it to your system (by exporting to path) or by putting the files in the same folder.

      Hope this helps.
      Regards
      Sebastian

    • SebastianB says:

      you can also look here: http://wiki.cyanogenmod.org/w/Doc:_fastboot_intro
      Under “Troubleshooting fastboot” they tell the steps to export to path on windows.

      regards
      Sebastian

  7. sai says:

    hi..im getting boot loader failed on my google nexus 7 2012 start up screen.i tried nexus toolkit.can u plz explain step by step..plzzz..

  8. matt says:

    can you explain how to do this in linux?

  9. david woodward says:

    Sebastian,

    Seem like you have helped others in the past, I was hoping you could also lend me a hand.

    I have a nexus 7 2112 nexus 7 rooted.

    Installed is a recent nightly of cm. I turned it on and now it is stuck in a boot loop.

    Unable to use cwm 6.0.43 in recovery to install a M7 image:
    it seems to install – but locks up and reboots.

    Have looked all over the intertubes and tried a few things – but nothing works, used wugz and android tool kit.

    Thanks in advance

    David

    • SebastianB says:

      Hey mate,

      im not really an android expert but i would try to get into fastboot and follow the same steps as posted in my inital post.

      Are you able to boot into fastboot?

      Regards
      Sebastian

  10. david woodward says:

    I have tried your steps above, but only appears to work.

    when i reboot into fastboot it is listed as a previous version.

    I can get into fast boot and adb.

    ty

  11. TonyH says:

    Was trying to get my nexus 7 to uprgade over the air,,, no matter what, wouldn’t,,, eventually tried nokia root toolkit and totally bricked it up…
    Glad I found this post.. Back in order now,,,, The instructions are a little vague tho’ So here are some simple steps for neebies alike…
    Download adt bundle as stated above in post by sebastianb….
    Download relavent nakasi file version for your nexus 7 as stated above in same post by Sebastianb…
    Install eclipse onto your pc(win7), install java (32/64 bit as required if not already installed), run eclipse – accept default workspace folder…
    Extract and copy all nakasi files to the workspace folder…
    Copy all files from the ‘adt-bundle\sdk\platform-tools’ folder to the workspace folder..
    Connect your nexus 7 as stated (green start box showing)…
    From a dos prompt, navigate to the workspace folder and run the command ‘flash all’….
    Sit back and wait…

  12. Anonymous says:

    thank you so mutch you have just saved my life

  13. Anonymous says:

    Thank you so much, Sebastian.
    btw it worked only after second atempt

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s