Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Fix Missing System.img Error on Marshmallow Factory Image

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

If you're flashing a Marshmallow factory image and hit a "missing system.img" error, the fix is usually one of two things: your download is incomplete or corrupted, or the file was renamed incorrectly. Below is the exact process to resolve it.

What You'll Need

  • A computer with the Android SDK platform-tools installed (adb and fastboot).
  • The correct Marshmallow factory image for your exact device model, downloaded from the official Google Developers page.
  • An unlocked bootloader on your device (required for flashing).
  • A USB cable and the device's drivers installed on your computer.

Step-by-Step

  1. Re-download the factory image. The most common cause is a corrupted or incomplete download. Go to the official Google Developers factory image page, select your device model, and download the Marshmallow build (e.g., MRA58K, MMB29K). Ensure the file size matches the one listed on the page.
  2. Verify the SHA-256 checksum. After downloading, verify the file integrity. On Windows, open Command Prompt and run certutil -hashfile downloaded_file.zip SHA256. On macOS/Linux, use shasum -a 256 downloaded_file.zip. Compare the output to the checksum shown on the download page. If it doesn't match, delete and re-download.
  3. Extract the zip file. Right-click the downloaded zip and choose "Extract All" (Windows) or double-click to unzip (macOS). Do not extract inside another zip—use a fresh folder on your desktop or C:\Users\YourName\Downloads.
  4. Check the extracted contents. Inside the extracted folder, you should see a file named image--.zip (e.g., image-shamu-mmb29k.zip) and a flash-all.bat (Windows) or flash-all.sh (Mac/Linux) script. The "missing system.img" error often occurs because this inner zip wasn't extracted properly.
  5. Extract the inner image zip. Right-click the image-*.zip file and extract it into the same folder. You should now see files like system.img, boot.img, recovery.img, and others.
  6. Run the flash script. Open a command prompt or terminal in that folder. On Windows, Shift+Right-click and select "Open command window here". Then run flash-all.bat. On Mac/Linux, run chmod +x flash-all.sh then ./flash-all.sh. The script will flash all images, including system.img.
  7. If the script fails, flash manually. If the script still reports missing system.img, you can flash manually. Boot your device into bootloader mode (usually by powering off, then holding Volume Down + Power). Then run the following commands in order:
    fastboot flash bootloader bootloader-*.img
    fastboot reboot-bootloader
    fastboot flash radio radio-*.img (if present)
    fastboot reboot-bootloader
    fastboot flash recovery recovery.img
    fastboot flash boot boot.img
    fastboot flash system system.img
    Wait for each command to finish. The system.img flash can take a few minutes.
  8. Reboot. After all images are flashed, run fastboot reboot. Your device will boot into Marshmallow.

Common Mistakes

  • Not extracting the inner zip. Many users only extract the outer zip and then try to flash, but the system.img is inside the second zip. Always extract both levels.
  • Using the wrong factory image. Flashing a Marshmallow image meant for a different device model (e.g., Nexus 5 image on a Nexus 6) will cause errors. Double-check your device model in Settings > About phone or on the bootloader screen.
  • Corrupted download. Interrupted downloads are common. Always verify the SHA-256 checksum before proceeding.
  • Running the flash script from the wrong directory. The script expects the inner zip to be in the same folder. If you moved files around, the script may not find them.

Tips

  • Use a USB 2.0 port if possible, as USB 3.0 can cause flaky fastboot connections.
  • Ensure your device has at least 50% battery before flashing.
  • If you're on Windows, install the latest Google USB driver from the Android developer site.
  • Keep the original downloaded zip in case you need to re-extract.
  • If you're downgrading from a newer Android version, you may need to wipe data (factory reset) first to avoid bootloop.

Troubleshooting

If the error persists after re-extraction:

  • Re-download the factory image from scratch, preferably using a different browser or download manager.
  • Try extracting with a different tool (e.g., 7-Zip on Windows, The Unarchiver on Mac).
  • Check if your antivirus software is quarantining the system.img file. Temporarily disable it during extraction and flashing.
  • If fastboot says "cannot load 'system.img'", make sure the file is in the same directory as your command prompt. You can also type the full path, e.g., fastboot flash system C:\Users\Name\Downloads\system.img.
  • If the flash script fails with a partition size error, it may be because your device has a different partition layout (e.g., Nexus 9 vs. Nexus 5X). Ensure you have the correct image for your exact model.

If flashing completes but the device bootloops:

  • Boot into recovery (Volume Up + Power while off) and perform a factory reset (wipe data/factory reset). This is necessary when downgrading or switching between major versions.
  • If the bootloop continues, re-flash the factory image again, ensuring you also flash the bootloader and radio.

Frequently Asked Questions

Why does the error say "missing system.img" even though I see the file?

This usually means the system.img file is not in the same folder as the fastboot command, or the file is corrupted. Re-extract the inner zip and run fastboot from that exact folder.

Can I manually flash just system.img without the other images?

Yes, you can run fastboot flash system system.img alone. However, if you're coming from a different Android version, you may also need to flash boot.img and recovery.img to avoid a bootloop.

I downloaded the factory image, but there's no system.img inside. What's wrong?

You likely only extracted the outer zip. The system.img is inside the image-*.zip file. Extract that second zip.

Does this error occur only on Marshmallow?

No, it can happen on any factory image if the inner zip isn't extracted or the download is corrupted. The fix is the same.

Will flashing a factory image erase my data?

Yes, the flash-all script wipes user data by default. If you want to preserve data, you can manually flash system.img and boot.img without wiping, but you may encounter instability.

My device is not recognized by fastboot. What should I do?

Install the correct USB drivers, enable USB debugging in Developer options, and ensure your device is in fastboot mode (screen shows "Fastboot" or a similar message). Try a different USB port or cable.