Tip: How to resize system partition

9 18608
ChrisP  
Edited by ChrisP at Wed Oct 29, 2014 10:40

I was wondering how to that that in a simple way, and was looking a little deeper in the various files generated by DragonFace.

When DragonFace is opening an img, it put various thing in 3 main folders:

DragonFace\fsop
DragonFace\CPFOP
temporary folder, usally found by typing %temp% in the adress bar of windows explorer.

To modify the partition sets of an image, finally it's pretty simple.

1 - With DragonFace, open the image you want to resize.
2 - Edit the file sysconfig.lhs in temp folder with your favorite text editor (mine is notepad++)
3 - Modify the content of the file in that way:
  • Locate the following section:
[partition]
name =data
size =2097152

  • Actually, this one is where android will write most of his data, and the most important one to increase.. I tried to set the new value to:

size= 4194304 (Which mean 2 GB)

  • Locate the following section:
[partition]
name =system
size =1048576

  • This is the size of the system partition, which is read only, I resized it to 1GB for testing but it's only needed to increase that if you plan to add additionnal data in system, by copying additionnal files in DragonFace\fsop\system :

size= 2097152

4 - Save the modified file from text editor
5 - Save the tweaked img from DragonFace to a new img file
6 - Burn it with Phoenix card, and boot your BPi on it

Once Android booted, go to Settings, Storage, and tadam, internal storage is now 1.97 GB. This is the size of /data partition

Of course the remaing size of the FAT partition you can use to put files when monting on windows is reduced, so you should do some adjustement that fit with your SD size and your usage, if you want to put movies on your SD Card.

Now it's up to you to do tests and give feedbacks.
afcajax  
Edited by afcajax at Tue Oct 28, 2014 06:47

Thank you for your help . I finally managed to get it working. Somehow, Dragonface doesn't work well on windows 8 and therefore android is stuck in the boothing process. However, I didn't manage so far to increase the size to 16GB, but the 4G is working.

ChrisP  
Yes, I had to make a Windows 7 virtual machine on the Hyper-V provided with Windows 8.1 to have a working DragonFace. I also made a ubuntu VM to try some stuff, without any success for now ...

Glad it worked for you at least for 4G. Did you make the "data" size greater than the "system" size ?

afcajax  
Yes of course. I actually followed your manual.

ChrisP  
I just realized that the size numbers are numbers of 512 bytes blocks. So the numbers are half the size in GB.

dlanor  
Edited by dlanor at Tue Oct 28, 2014 16:39

Great work ChrisP!

I also saw your other thread with the detailed analysis of the card structure, and I've saved that HTML page for future reference (too much for just a screenshot ;) ).

I'm going to try the methods you've described here so as to modify my next Android setup.
I've gotten as far as I can with the limits of my current setup, so it is time to replace it.

For my new setup I'm still going with Android 4.2, for two significant reasons, the main one being that the only Android 4.4 images available are non-rooted, making them useless for my purposes. The other reason is that they also have a handicapped mouse implementation, interpreting all mouse buttons as a single button, apparently in a non-replacable low-level driver. And for any GUI with mouse as main input method, having it reduced to single-button mode is a showstopper.

The main limitation of my old setup has been the tiny storage space in /data, which has to house the storage of all apps that are not movable to /sdcard. So I'm going to try for a 4GiB /data, but will increase the /system size only slightly (maybe 1GiB, since the original is just half a GiB). Another limitation I will change is to switch from a 16GB card to 32GB card, so that I can also increase my /sdcard space, despite the growth of the other partitions.

Thanks a lot for the effort you've clearly spent on these investigations.

Best regards: dlanor

afcajax  
By the way. I just found out I made a mistake. I managed to make it 2GB. The actual value for the data partition was: 4194304. I haven't been able yet to successfully higher these values even more.

liab  
Edited by liab at Tue Oct 28, 2014 22:11

Thanks, it works well, better than my old method with fdisk. I tried it with android 4.4. Now I have sdx7, sdx8 and sdx11 with exact 2,0 GB.

The only I have to do, is to burn with phoenix a standard card and than run on a linux pc my script, which formats the partition sdx8 and than copies my saved good image in sdx1, sdx7 and sdx8.

No more make all new, with the whole work like registration, install apps and to configurate them and the system!

afcajax  
Using this method, I managed to create a data partition of about 28gb! I kept the system partition small, as suggested by Dlanor.

ChrisP  
Edited by ChrisP at Wed Oct 29, 2014 13:32

Thanks for the feedbacks dlanor, I see I made some wrong assumptions: data is not a container at all, it's the place where write activities is done by, and system mostly just need to be increased to be able to host additionnal preinstall apk and additionnal dirvers/modules. I will correct the initial post.

In addition please be aware the the android image structure post is my reference post that I update on the fly anytime I find somethin to be added / corrected. So your local backup is probably allready outdated ;)

You have to log in before you can reply Login | Sign Up

Points Rules