Android 6.0 Marshmallow
How to fix ‘cannot load system.img: not enough space’ error with Android 6.0 Marshmallow update Google

Several Nexus users have been running into a couple of unexpected errors in Google's batch script file that is apparently failing the installation of Android 6.0 Marshmallow update on Nexus devices. One of the errors reads 'cannot load system.img: not enough space', while the other says: 'missing boot.img' or 'missing system.img'.

It is confirmed that the errors are mostly triggered by the inability to recognise the Marshmallow factory image, due to a bug in Google's batch script file for Nexus devices. Consequently, the flash commands fail to initiate or complete the installation process.

However, this issue can be fixed by flashing the update files manually or without using the batch script file in the factory image. Here are the steps to complete the factory image installation on Nexus 5, 6, 7 and 9 manually if you encountered any of these errors:

Download Android 6.0 Marshmallow factory image

How to fix errors by manually flashing Android 6.0 Marshmallow update on Nexus devices

Step 1: Download the specific Marshmallow factory image for your Nexus device from the links provided

Step 2: Extract the .tgz file you downloaded to a desired folder on your computer to get three files: radio, bootloader and a huge image file xxx.zip

Step 3: Once again unzip the .zip file to a new folder and rename it as update6

Step 4: Copy and paste the radio and bootloader files from step 2 to the new folder update6, which you created in step 3

Step 5: Now you must be seeing the following files in update6 folder:

  1. userdata.img
  2. system.img
  3. recovery.img
  4. cache.img
  5. boot.img
  6. radio*.img
  7. bootloader*.img

Please note that the "*" denotes long filenames for radio and bootloader files above. Proceed to the next step once you have confirmed that all the seven files are present in the same folder.

Step 6: Disconnect the Nexus device from computer, before you proceed

Step 7: Install ADB and fastboot drivers on the computer

Step 8: Boot the Nexus device into bootloader/fastboot mode:

  • Turn off the device
  • Press and hold Volume Down and Power buttons together until the display comes on with Fastboot logo on it

Step 9: Connect your Nexus device to computer with original USB cable

Step 10: Launch a command window by holding shift and right-clicking inside the update6 folder where the files are present. Then select "Open command window here" from the context menu.

Alternatively, open the update6 folder, click on Address bar, erase the text and just type 'cmd'. Now, a command window should open within the update6 folder.

Step 11: Type in the following command to test fastboot functionality and if it is functional you will receive a serial number:

fastboot devices

Step 12: Download the flash-manually.bat file and copy it to the update6 folder which has all other files including system.img

Step 13: Proceed with installation of Marshmallow update by double-clicking the flash-manually.bat file. Now, all the seven .img files should get flashed one-by-one using the automatic flash commands, except for the userdata.img file to prevent loss of data through factory reset. Alternatively, you can manually flash these files one-by-one via the cmd window.

Step 14: Once the flashing process completes, just reboot the device. You can either choose the reboot option using volume buttons on the device or run the command fastboot reboot in the cmd window.

Your Nexus device should now be running Android 6.0 Marshmallow MRA58K build

[Source: Android Soul]