Note: This is an adaptation of my Nexus 4 update/root post, so it has some duplicate content, but all the instructions and images are specific to the Nexus 7.

Android 4.3 was officially unveiled and released yesterday to the Android Open Source Project. In a surprisingly timely fashion, Google also released both the factory images and OTAs to the Nexus 4, 7, 10, and the Galaxy Nexus.

[android43]

In this post, I will show you how to easily update your Nexus 7 to Android 4.3 JWR66V without losing data or needing root, whether because you are having trouble flashing the OTA, because one is simply not available to you yet (these notoriously take weeks to propagate to everyone), or because you're running something else and want to return to stock. You can root your Nexus 7 in the last step if you want.

One Android 4.3 feature that the Nexus 4 doesn't have is restricted user profiles. Once you flash 4.3, you will be able to create new users as restricted, like I have below. It doesn't look like you can edit existing users and convert them to restricted ones, however. Bummer.

[disclaimer1]

Prerequisites

In order to complete the steps below, you need to have the Android SDK installed. The SDK contains the latest version of adb and fastboot, which you will need for flashing. You will also need a MicroUSB cable to execute adb sideload, fastboot flash, and other commands. You don't need a USB cable if you're just planning to download the OTA zip directly to your device and flash it from recovery.

Note #1: You will not lose your data in either scenario. The first one is the same as applying the OTA. In the second one, we'll skip wiping data and upgrade just the bootloader, radio, kernel, and system images manually.

Note #2: You will be able to easily gain root in the last step.

Scenario 1

In this scenario, you're running Android 4.2.2 JDQ39 and haven't modified the system files, which basically means you can cleanly apply the OTA update without getting any errors. If you get errors and can't fix them or run a custom ROM, move on to Scenario 2.

In order to avoid repeating the steps, download the official JDQ39->JWR66V OTA zip from here for the nakasi Wi-Fi version or here for the nakasig 3G version and then adb sideload it by following my earlier guide here. If something fails, try to fix it by restoring the system files you've changed or proceed to Scenario 2.

Update #1: The OTA file for the 3G Nexus 7 (nakasig) has been discovered now.

Update #2: nakasi JDQ39B->JWR66V.

Note: To flash the update via adb sideload, you don't need to unlock the bootloader and have your data wiped if yours is still locked .

adb sideload is painless and fast

Scenario 2

Scenario 2 is what I would call plan B. You're here because the OTA failed, you screwed up your device and it's not booting, you're not on 4.2.2 JDQ39, or you're running a custom ROM. Don't worry - you won't lose data, even though the default factory image installation method (the bundled flash-all script) does wipe it.

The idea of this method is:

  1. Download the full nakasi factory image (Wi-Fi only Nexus 7) or nakasig factory image (3G Nexus 7), which include the full system, bootloader, recovery, kernel (boot.img), and radio (radio only included for the 3G variant). It's a clean slate for these components - they'll flash cleanly over anything you have now.
  2. Instead of using the bundled script called flash-all, you will unpack the tgz (tar/gz) archive, and then the zip contained within as well. This will put all the components into one folder:
    image
  3. Follow the excellent guide over here and make sure to omit step D10, which overwrites userdata. While the guide is for the Nexus 4, it's very detailed and applies just as well to the Nexus 7. Note: Only the 3G Nexus 7 has a radio you need to flash. For the Wi-Fi version, you will see no radio. Here are the correct commands you will be executing, for reference: adb reboot bootloader fastboot flash bootloader bootloader*.img fastboot reboot-bootloader (ONLY nakasig 3G Nexus 7) fastboot flash radio radio-tilapia-1231_0.18.0_0409.img (ONLY nakasig 3G Nexus 7) fastboot reboot-bootloader fastboot flash system system.img fastboot flash boot boot.img fastboot format cache fastboot reboot

Note: Instead of unpacking the image*.zip and flashing system and boot manually, you can actually do fastboot update image*.zip - this won't delete data (you would pass a -w flag if you wanted that to happen), but it will re-flash recovery back to stock if you were running a custom one. You can then flash it back, or just use the commands above instead. Either way, the result will be the same.

Bootloader in fastboot mode

Rooting

Rooting a Nexus 7 is very easy but requires an unlocked bootloader and a custom recovery. I recommend using TWRP.

  1. Flash TWRP from here (fastboot flash recovery FILENAME.img).
  2. Reboot into recovery (adb reboot recovery or hold Power+VolDn, then select Recovery).
  3. Flash SuperSU from this post. I've seen some people complain that doing so via CWM doesn't work, but flashing through TWRP and selecting Fix Superuser Permissions at the end does the trick.
  4. You should be rooted.

Enjoy 4.3 and don't forget to see what's new!