How to resize /data partition after download userdata.img

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to resize /data partition after download userdata.img

4,681 Views
david5icp
Contributor III

Hi 

  I had refer How to generate userdata.img and flashing into eMMC? via MFG tool. But after that the data partition size is equal to "BOARD_USERDATAIMAGE_PARTITION_SIZE", It's meas i can't use whole emmc.

For example, my emmc size is 16GB and I set image size on BoardConfigCommon.mk:

# 350 MB
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 367001600

# 2GB
BOARD_USERDATAIMAGE_PARTITION_SIZE := 2147483648

 

after boot, i check my partition table the size of data partition is 2 GB, but actually we have more than 10 GB not allocate.

How to resize data partition after download userdata.img ?

Thanks.

David 

Labels (2)
0 Kudos
Reply
3 Replies

3,296 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello David Wu,

The easiest way would be changing the size of this partitions from the BoardConfigCommon.mk and then creating the userdata.img again.

The second alternative would be resizing the userdata.img file prior to loading it on the eMMC. There are a couple of linux tools you may use like for example truncate which would look something like this:

$ truncate –s 10g userdata.img

The final alternative would be changing the actual partition size from the eMMC but I think this would be a bit more cumbersome and changing the actual .img file would make writing the eMMC again easier.

I hope this helps!

Regards,

0 Kudos
Reply

3,296 Views
david5icp
Contributor III

Hi gusarambula,

 I can resize  userdata.img, but MFG tool seams reject any *.img large than  2GB or 3GB .  It's possible to build-in resize  command (e2fsck  resize2fs) into MFG tool to auto adjust partition size ? 

Thanks.

David Wu

0 Kudos
Reply

3,296 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello David Wu,

I'm not aware of existing commands available for resizing the partition size using the manufacturing tool. I would recommend trying editing the mksdcard-android script instead. The eMMC profile of the manufacturing tool calls this script for creating the partitions inside the eMMC card so that should do the trick although I haven't tried it myself.


I hope this helps!

Regards,

0 Kudos
Reply