It seems there’s some issue with Google’s batch script included in the Android 5.0 Lollipop factory images. Users are reporting that upon flashing the Lollipop factory image using flash-all.bat file the command window fails to install the factory image and shows the following error: “error: update package missing system.img”.
Google’s Conley Owens acknowledged this issue and recommended to use the latest Fastboot from the SDK. However, even after using the latest SDK, the problem seems to persist. Here’s the whole message Conley put up on Google groups [Android building]:
We’re hearing from users who are getting a “missing system.img” error when trying to flash a device. If you are seeing this issue, please use the latest fastboot.
You can get it from the SDK at https://developer.android.com/sdk/index.html or you can build it in the AOSP source tree by running `make fastboot`.
So how do you fix the missing system.img error?
Using the latest Fastboot doesn’t helps, so to get rid of the missing system.img error you gotta flash the files manually, without using the included batch script in the factory image as it’s failing to find the system.img file.
Follow the simple steps below to see how to install the factory image manually:
- Assuming you’ve already extracted the factory image, look for the image-xxx-xxx.zip file inside the factory image.
- Unzip/extract the image-xxx-xxx.zip file to a separate folder on your PC, you’ll get the following files:
- Copy/paste the bootloader and radio image too from the factory image to the folder where you extracted files in Step 2 above.
- [Skip this step if you already have a working adb/fastboot setup!] Copy/paste the contents of this adb_and_fastboot_files.zip file to the same folder again from Step 2 above.
- Open the folder where all your files are now present, it should look like this:
└ If you skipped the Step 4 above, then ignore the highlighted files in the screenshot above. Rest of files, though, should be present in your folder.
- Open a command window inside the folder where all your files are. For this “Shift + Right click” on any empty white space inside the folder and select “Open command window here” from the context menu.
- Now issue the following commands one by one to install/flash Android 5.0 Lollipop factory image manually on your Nexus device:
fastboot flash bootloader bootloader.img
└ Use the file name of bootloader image instead of bootloader.img. For example, Nexus 5’s bootloader will have the name “bootloader-hammerhead-hhz12d.img”
fastboot flash radio radio.img
└ Use the file name of your radio image. For Nexus 5, it’s “radio-hammerhead-m8974a-22.214.171.124.21.img”
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
└ Be patient with the system.img file, it’s the biggest file of all so will take time installing.
- Once system.img is flashed successfully. Reboot your device by issuing the following command:
- Your device will now reboot with the latest and greatest Android update of all, Android 5.0 Lollipop. Be extremely excited for this!
This will be your device’s first boot on Android 5.0, so be patient if takes long to boot.