Lawiusz
Lawiusz

Reputation: 1240

Fastboot flash system.img error

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.

Upvotes: 7

Views: 48958

Answers (4)

Jami Liang
Jami Liang

Reputation: 41

Use newer fastboot version that allow sending packages sperated.

Upvotes: 4

tiger.meng
tiger.meng

Reputation: 111

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

Upvotes: 10

skoperst
skoperst

Reputation: 2309

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

Upvotes: 1

Lawiusz
Lawiusz

Reputation: 1240

I have finally found the solution:

BOARD_SYSTEMIMAGE_PARTITION_SIZE

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

Upvotes: 2

Related Questions