Getting “error: update package missing system.img” OR “error: update package missing boot.img” error on your Nexus device while trying to install Android 6.0 Marshmallow factory image? Well, you’re not alone and this error isn’t new.

We’ve seen this error back when Lollipop factory images released, and even though Google promised a fix for this in later updates to Lollipop, it seems like it’s still an issue with Google’s script for flashing factory images.

Anyway, the fix for this is pretty simple and straightforward. Instead of using the one-click flash-all script that Google provides inside factory image to flash all partitions automatically, you need to manually flash each partition on the device.

Fixing “missing system.img” error for Marshmallow factory images
  1. Setup ADB and Fastboot on your PC.
  2. Assuming that you’ve already extracted the factory image to the point where flash-all script is found. Now extract/unzip the image-xxx-xxx.zip file that lies in the same folder.
  3. Now copy and paste the bootloader-xxx-xxx.img and radio-xx-xx-xx.img file from the folder where flash-all script lies to the folder where you extracted files in Step 2 above. You should have all these files in the same folder:
    bootloader-xxx-xxx.img
    radio-xx-xx-xx.img
    boot.img
    cache.img
    recovery.img
    system.img
    userdata.img
  4. Open a command window inside the folder where all your .img files are. To do so, “Shift + Right click” on an empty white space inside the folder and select “Open command window here” from the context menu.
  5. Boot your Nexus device into bootloader mode and connect it to PC.
  6. Now issue the following commands one-by-one in the command window you opened in Step 4:
    fastboot flash bootloader bootloader-xxx-xxx.img
    fastboot reboot-bootloader

    └ Replace bootloader-xxx-xxx.img with the original file name.

    fastboot flash radio radio-xx-xx-xx.img
    fastboot reboot-bootloader

    └ Replace bootloader-xxx-xxx.img with the original file name.

    fastboot reboot-bootloader
    fastboot flash boot boot.img
    fastboot flash cache cache.img
    fastboot flash recovery recovery.img
    fastboot flash system system.img

    └ This may take several minutes.

    fastboot flash userdata userdata.img
  7. Once you’ve successfully flashed all the system partitions, reboot your device by issuing the following command:
    fastboot reboot

That’s all. The “error: update package missing system.img” error should not occur when you manually flash the Marshmallow factory image using the instructions above.

Happy Androiding!