Sunday, August 25, 2013

Journey of bringing JellyBean 4.3 to Nexus 7 gen 1

I was (and still am) pretty darn frustrated when I realized that OTA Jelly Bean 4.3 failed to install on my Nexus 7 generation 1.  It's like some hidden problem in my Nexus 7 and I need to resolve it.  I knew it's going to a long journey to investigate the issue and eventually resolve it, so I tried to push it til weekend.  And this is that weekend, so here we go.

My very last resort is to wipe out my Nexus 7 and start everything from new, I was ALMOST OK to do that except that I have a Puzzle & Dragon game on that device, and I have quite some progress on it and didn't want to lost those.  Fortunately, Gunho provides a solution, although I haven't tested out it yet.

So now that I have it taken care of, I am now ready for the worst case.

When OTA installation failed, my logical next step is to think about side loading the update .  That approach brought me into some trouble as I found that the Android SDK I had didn't seemed to be working.  So I had to use Eclipse, and then [Andorid SDK Update] to update it.  After I had it updated, I found that on my Dell XPS desktop, I am not able to get the full drive view (14+ Gb) of my Nexus 7.  So I switched to the Windows side of my MacMini.  Now I got trouble because the Nexus 7 Windows driver did not see the Nexus 7 after Nexus 7 got into Recovery ADB mode.  There is a hack to fix that problem, But that hack doesn't work with my MacMini since it can't boot to allow F8 getting into safe mode.  So now I am on my S12 netbook running Windows 7, hoping that this would help solving the problem.

And then I found that the stupid command prompt on this S12 piece of shit netbook doesn't recognize the Z Drive I mapped for access the adb command line.  So I have to explicitly map it on command line.

Now I need to get to:
Z:\_Apps\AndroidMobileDev\android-sdk\platform-tools
and then example what I have:

Adb devices  : shows me the device.  So it's a good start. Now I do this:

adb reboot recovery

And trying to do "adb devices" and found that no device is connected.

Same as what a lot of people complain about.  It's time to give this fix a try.

Eventaully, I got the sideloading working using the fix mentioned above.  It worked exactly as stated, but then I need to do it this way (instead uninstall the previous "Android Composite ADB Interface"):

- Right click on "Android Composite ADB Interface"
- Select "Update Driver Software ..."
- Click "Browse my Computer for driver software."
- After you tried to install, you may get a message saying that a better driver already exist.  If that is the case, you need to force to system to use your hacked driver by:

- select "Let me pick from a list of device drives on my computer".  And in there pick the one your hacked.
- You will then get a warning saying that the driver is not certified.  Just say OK.

This works on Windows 7.  On Windows 8 you need to reboot in a mode that ignore driver certification using [F8].

Now I get sideloading working, but then, I got "assert failed" and then "installation aborted".

So I have a feeling that I might need to go extreme by restoring the system into fresh factory mode.  The senario 2 of this seemed to explain my exact situation. But then I am stuck with the problem which the bootloader step giving me this:

sending bootloader ... okay
'writing bootlader'.... failed (remote: (invalid state))

Just like 
Just like what have been mentioned here.  Now I feel stuck.

So I installed "Wug's Nexus Root Toolkit v1.7.1", and then did both backup on all apps and specific app (the only one I care) using [Backup].  And then I use [Flash Stock + Unroot] to flash the device to stock JWR66Y (4.3).

But I still got problem.  It was the same "invalid state" issue.

Finally I found out the solution.

All is need is to restore back to Android 4.2 (nakasi-jdq39-factory-c317339e.tgz) instead of 4.3.  Once done (and connect to WiFi), the system will kick off the 4.3 update.  And I got it completed successfully.

Then I used Wug's Nexus Root Toolkit v1.7.1 to restall the data for the only game that I care by:


Now I have a clean Nexus 7, with latest Andorid 4.3.

Next time if I got problem updating the later OS (like 4.4), for the worst case, I will have to do these:

  • Use Nexus Root Toolkit to backup all data
  • Use [Flash Stock + Unroot] in Nexus Root Toolkit to roll back to stock Andorid 4.3.
  • Apply official OTA update
  • Restore apps
  • Restore app data.


After all these, I suddenly realize the value of keeping my Lenovo S12 netbook running Windows 7 Home edition: for all the dirty hacking tasks.