No announcement yet.

Resizing image files.. best method ?

  • Filter
  • Time
  • Show
Clear All
new posts

    Resizing image files.. best method ?


    I am looking to resize image file I dumped through RKAndroidtools 2.3 . (discussed here)
    Please tell me which method is appropriate because using dd in linux, some says you have to create raw image and then clone current android images files into it. Some case you can use directly resizefs directly. Even there some says that simply add desired MBs of space to image using dd command and append operator.

    Anyone who have done this please suggest most appropriate method.


    Question is do you want to have a Bigger Sized system.img or also more Space for Apps after Install?
    For a bigger system.img do the follow in Linux:

     +128M space dd if=/dev/zero bs=1M count=128 >> system.img e2fsck -f system.img resize2fs system.img
    When you have done this you also have to change the parameter file.
    If you have any Question feel free to ask.



      Well, I want to increase system.img size as well as userdata.img size.
      That also means that have to decrease size of user.img .

      Actually I have mk8094K tv stick with only 1024MB of internal storage however user.img ie. internal SD card image is 5GB+. Using Rk3xxx firmware tool , I can edit parameter file.

      Now what I need is that resize affected partitions ie.
      system.img (make it 1.5 GB from 768 MB)
      userdatea.img (make it 4.5 GB from 1GB)
      user.img (reduce to about 1.3GB from 5.2 GB (approx))

      Now as you said, we basically appending 128mb space to system.img using dd
      dd if=/dev/zero bs=1M count=128 >> system.img
      Then check file system integrity :
       e2fsck -f system.img
      Then resize filesystem
      resize2fs system.img
      I will try it and let you,however, what shrinking size of user.img , I guess I can simply create raw image of desired size, copy content of current user.img into it by mounting as loopback device. What do you advice ?