Fix for “error: update package missing system.img” on Android 5.0 Factory Images for Nexus devices

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:

  1. Assuming you’ve already extracted the factory image, look for the image-xxx-xxx.zip file inside the factory image.
  2. Unzip/extract the image-xxx-xxx.zip file to a separate folder on your PC, you’ll get the following files:
    • boot.img
    • cache.img
    • recovery.img
    • system.img
    • userdata.img
    • system.img
  3. Copy/paste the bootloader and radio image too from the factory image to the folder where you extracted files in Step 2 above.
  4. [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.
  5. Open the folder where all your files are now present, it should look like this:
    All files in one folder
    └ 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.
  6. 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.
  7. 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-2.0.50.2.21.img”

    fastboot reboot-bootloader
    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.

  8. Once system.img is flashed successfully. Reboot your device by issuing the following command:
    fastboot reboot
  9. 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.

21 Comment

  1. Connor says: Reply

    Thanks for this!

  2. JT says: Reply

    Thanks, worked perfectly on my Nexus 7 2013 version, really appreciate it

  3. Rafa la Mancha says: Reply

    During the installation of system.img this error is showing “FAILED (data transfer failure (Too many links))” Help please!

  4. Rafa la Mancha says: Reply

    During the installation of system.img this error is showing “FAILED (data transfer failure (Too many links))” Help please!

  5. Rahul Patil says: Reply

    Thank you! worked perfectly on Nexus 5.

  6. sc456a says: Reply

    Thanks so much for this. Worked perfectly on my Nexus 4!

  7. sc456a says: Reply

    Thanks so much for this. Worked perfectly on my Nexus 4!

  8. KJ says: Reply

    my screen is black with the back button in the bottom left corner, don’t know what to do

    1. Shivam says: Reply

      Looks like you didn’t flash the userdata.img file. Anyway, boot into recovery mode and do a “wipe data/ factory reset”.

  9. milad says: Reply

    hi
    i cant download adb and fastboot files , the link doesnt work
    if its possible upload it again
    tnx

    1. Shivam says: Reply

      The link is working fine. It’s directly from our servers so you shouldn’t have any trouble with it, try again.

      1. milad says: Reply

        tnx for your answer shivam . i downloaded it .

        but i have other problem , in cmd when i type : fastboot flash system system.img it syas : cannot load system.img

        1. Shivam says: Reply

          That means the system.img file isn’t the same folder where your fastboot files are. Make sure all your .img files and fastboot files are in one folder (as shown in a screenshot in the post above).

        2. Shivam says: Reply

          That means the system.img file isn’t the same folder where your fastboot files are. Make sure all your .img files and fastboot files are in one folder (as shown in a screenshot in the post above).

        3. Shivam says: Reply

          That means the system.img file isn’t the same folder where your fastboot files are. Make sure all your .img files and fastboot files are in one folder (as shown in a screenshot in the post above).

          1. Marko says:

            I have the same problem…..cannot load system.img but I`m certain that all the files are in the platform-tool folder. what should I do?

  10. Shanaka says: Reply

    Thank you very much this worked perfectly on Nexus 5. I thought I’ll have to stop from 4.4.4 cos of this error but great thanks to you I’m enjoying LOLIPOP now :)….

  11. Nelmix Guerrero says: Reply

    gracias por el aporte, realmente me sirvió. por fin lollipop!!

  12. Ankur says: Reply

    very helpfull!!! cheers!!!

  13. Matthew says: Reply

    thanks for this great tutorial now i have moved onto android L

  14. SoGrumpy says: Reply

    thank you, excellent tutorial

Leave a Reply