Fastboot flash system.img error
Asked Answered
K

4

7

When I try to flash via fastboot system.img (from my custom AOSP build) to Sony Xperia Z3 I get the following error:

# fastboot flash system system.img 
sending 'system' (584106 KB)...
OKAY [ 18.294s]
writing 'system'...
FAILED (remote: size too large)
finished. total time: 18.297s

Z3 has about 2GB system partition and I have no idea why flashing fails.

Kamala answered 15/12, 2015 at 20:57 Comment(0)
K
2

I have finally found the solution:

BOARD_SYSTEMIMAGE_PARTITION_SIZE

in BoardConfig.mk was larger than it should be. Changing it fixed the issue.

Kamala answered 16/12, 2015 at 22:18 Comment(6)
May i ask what exactly is BoardConfig.mk ? I don't find this kind of file in my computer.Heresy
BoardConfig.mk is configuration file used when you compile your own Android ROM.Kamala
Ok, i face the exact same problem as you. I have Asus Zenfone Selfie. I can't find such file in my computer. Can you provide me with something relevant, eg some other file, so i can edit that and increase partition size ?Heresy
By editing BOARD_SYSTEMIMAGE_PARTITION_SIZE you only give the compiler information how big is your device's system partition so that it can build system.img with appropriate size.Kamala
Ok. How do i edit BOARD_SYSTEMIMAGE_PARTITION_SIZE ?Heresy
Assuming that you build your own ROM, the file is located upon your_aosp_source/device/your_device_vendor/your_device/BoardConfig.mkKamala
C
10

This forces fastboot to automatically sparse files to a given range in size K | M | G, in this case 256M

fastboot flash –S 256M system PATH_TO_SYSTEM.img
Capuchin answered 16/12, 2015 at 3:15 Comment(2)
This method also does not work. It gives the following output: sending sparse 'system' (259493 KB)... OKAY [ 8.138s] writing 'system'... FAILED (remote: size too large) finished. total time: 8.141sKamala
Faced the same issue @Kamala specifying the -S parameter didnt change my situationDubuffet
R
4

Use newer fastboot version that allow sending packages sperated.

Royalty answered 1/4, 2017 at 11:14 Comment(0)
K
2

I have finally found the solution:

BOARD_SYSTEMIMAGE_PARTITION_SIZE

in BoardConfig.mk was larger than it should be. Changing it fixed the issue.

Kamala answered 16/12, 2015 at 22:18 Comment(6)
May i ask what exactly is BoardConfig.mk ? I don't find this kind of file in my computer.Heresy
BoardConfig.mk is configuration file used when you compile your own Android ROM.Kamala
Ok, i face the exact same problem as you. I have Asus Zenfone Selfie. I can't find such file in my computer. Can you provide me with something relevant, eg some other file, so i can edit that and increase partition size ?Heresy
By editing BOARD_SYSTEMIMAGE_PARTITION_SIZE you only give the compiler information how big is your device's system partition so that it can build system.img with appropriate size.Kamala
Ok. How do i edit BOARD_SYSTEMIMAGE_PARTITION_SIZE ?Heresy
Assuming that you build your own ROM, the file is located upon your_aosp_source/device/your_device_vendor/your_device/BoardConfig.mkKamala
N
1

Just use a newer fastboot version. New bootloaders support downloading system.img in parts.

Nucleonics answered 30/12, 2015 at 23:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.