I am trying to update my Nexus 9 to the M developer preview 2, and when I try to run the command fastboot flash system system.img, I get the error

error: cannot load 'system.img'

I've tried re-downloading the image from Google and reflashing many times, but it gives the same error. I am able to flash other system images from Google, but not this one. I didn't see this listed as a known issue on Google. Anyone else see this issue or have any suggestions?

  • This reddit thread might be related. Some of worth mentioning: flash using Ubuntu, update ADT (I didn't test any) – Andrew T. Jul 20 '15 at 3:31

I faced the same error. Error cannot load system.img. I figured it out after few attempts and a few images. It turns out I had an older version of ADB and I could only install old factory images.

If you want to install Android Marshmallow, make sure to install the latest ADB version.

| improve this answer | |
  • I hit the same problem flashing Nougat (7.0.0). Fastboot does not seem to report a version number, and I can't find a way to get the version of the SDK, but for reference, the version of ADB which comes with the right version of Fastboot is 1.0.32. (1.0.31 does not work.) – Mark Smith Oct 11 '16 at 12:23

Of course, it's not guaranteed that the reason for your "cannot load" error is the same as the one I experienced (fastboot's error reporting isn't very detailed, so I wouldn't know), but if it is, applying the adjustment described below should solve your problem.

For whatever fastboot flashing command is giving you a "cannot load" error, use fastboot's -S file-sparsing option (along with a size argument to that option that is smaller than the size of the largest image being flashed).

So, using your example, I would suggest trying the following:

fastboot -S 512M flash system system.img

The size I chose (512M) equates to roughly half the size of the image you attempted to flash.

| improve this answer | |

To be honest, this is a bit of a mystery! Here are a couple of things to try from around the web:

  • Run 'adb kill server' and then 'adb start server' and try again.
  • Make sure you're using the latest version of adb and fastboot and try again.

Someone over on XDA also mentioned that this issue is to do with device encryption and that erasing and formatting the data partition would help (this will wipe all your data). This doesn't quite seem to link up but you never know...

| improve this answer | |

Note: If you don’t have either one of the bootloader or radio .img files, don’t worry, not all devices need them **You must go in this exact order

1) type fastboot flash bootloader [name of your file].img

2) type fastboot flash radio [name of your file].img

3) type fastboot reboot-bootloader

4) type fastboot flash recovery recovery.img

5) type fastboot flash boot boot.img

6) type fastboot flash system system.img

Source : http://www.talkandroid.com/guides/beginner/how-to-install-the-lollipop-factory-image-on-your-nexus-device/

Works fine on Marshmallow too!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.