Why system.img/system filesystem size is always fixed?

377 views
Skip to first unread message

mansoor vm

unread,
Mar 11, 2014, 6:45:55 AM3/11/14
to android...@googlegroups.com

i am trying to build a custom rom, in which system.img size is always 550mb i know we can change that in board config using "BOARD_SYSTEMIMAGE_PARTITION_SIZE := 576716800" but to how much?From some post i read we can see exact size by following command in adb shell

cat proc/mtd

mtd0: 22600000 00008000 "system" 

mtd1: 0c800000 00008000 "userdata" 

mtd2: 04200000 00008000 "cache"

the above output is always same even i removed some packages in successive builds .. Please help

Vishveshwar

unread,
Mar 13, 2014, 5:47:36 AM3/13/14
to android...@googlegroups.com

That output is the MTD (NAND/emmc) partitions and their size as defined in the kernel/bootloader. This does not correspond to the actual used area but rather the maximum available size.
In your case system partition is size 0x22600000 = 576716800

I don't recall offhand if system.img uses the sparse image format. If it does not then you would always have system.img size == system partition size on mtd. This is because the img also contains the 'empty' area of the partition.

-Vishveshwar

David

unread,
Mar 13, 2014, 6:05:01 AM3/13/14
to android...@googlegroups.com

As far as I know, the image is a sparse so the size depends on its actual content. (which means the free space will not 1:1 mapping to the image)

BOARD_SYSTEMIMAGE_PARTITION_SIZE is the size when image file is written to the real storage.

mansoor vm於 2014年3月11日星期二UTC+8下午6時45分55秒寫道:

Rohit Kumar

unread,
May 13, 2014, 4:14:04 PM5/13/14
to android...@googlegroups.com
I second David. You can increase the size of system image partition, but you need to account the buffer size available while writing the image. You need to check your u-boot mmc configuration for it.
Reply all
Reply to author
Forward
0 new messages