If you're trying to flash your Nexus 5, 7, or 10 to Android 5.0 now that the factory images are out, there's nothing more infuriating than running into an error in the process. The most common error we're seeing today as part of the flashing process is the dreaded "missing system.img" dialog, which aborts the update process on the target device.

The reason this happens is because the flash-all script that comes in the image package, which most of you are undoubtedly trying to use, is attempting to flash the .img files in the update using the 'fastboot update' method, which appears to be failing for some reason for some users. Fear not, though, there is a simple workaround, just follow these instructions.

To get around the "missing system.img" error when trying to flash a factory image, you simply need to flash the .img files manually one by one. It's pretty easy.

First, instead of leaving the update zip file in your working directory compressed, you need to unzip that package. Inside, there will be between four and six .img files. In addition to those files, the tgz package you initially downloaded contains the .img files for the bootloader and radio (where applicable, not all devices have this) - place those in this directory as well.

Get in the command line using this as your working directory, and get your device into fastboot mode, as we discuss in this post, like you normally would when flashing a factory image.

Once you're there and your device is connected, the process is exceptionally simple. Just enter these commands, one by one. For the bootloader and radio, the order does matter - the bootloader and radio must be flashed first, and the bootloader restarted after flashing them. Here are the steps:

Flash bootloader and radio (radio does not appear on all devices, if it's not in your tgz, you don't need it) fastboot flash bootloader <bootloader file name here>.img

fastboot flash radio <radio file name here>.img After flashing the bootloader/radio, you need to reboot the bootloader as shown below, don't skip this step! fastboot reboot-bootloader Now you can move on to the rest of the files fastboot flash recovery recovery.img

fastboot flash boot boot.img

fastboot flash system system.img NEXUS 9 ONLY - flash this as well fastboot flash vendor vendor.img If you want to wipe cache and user data (full wipe), flash these fastboot flash cache cache.img

fastboot flash userdata userdata.img Finally, just reboot your device, and Android should start up. fastboot reboot

The vendor.img file only appears on images for the Nexus 9, because this is where the drivers are stored. No other Nexus devices yet have this, so don't worry about it if it's not in your update's zip file.

The radio and bootloader images are not strictly necessary to flash if you have already failed to update using the flash-all script method, because these files are flashed before the failure message appears and the process aborts. Still, it can't hurt to put them in there, they flash pretty quickly. Here's an example of the feedback you'll get from the command line doing the flash.

Finally, a warning: this "dirty" flash may cause you to experience the missing back / recents menu bug, where upon booting your device will have no back or recent apps navigation buttons. At this time, the only solution we are aware of is wiping the device. The old fix no longer works reliably. If anyone has a workaround, let us know.

Anyway, happy flashing everyone! This should get you on L pretty reliably.

Update: If flashing userdata results in your device's internal storage being downgraded to 16GB according to the OS, just do a full wipe in recovery, that should fix it. This is a bug caused by the userdata.img file being distributed by Google.