Jump to content


Photo

[Guide] Changing the size of your Partitions!

- - - - -

  • Please log in to reply
19 replies to this topic

#1
mankian

mankian

    Enthusiast

  • Members
  • PipPipPip
  • 186 posts
  • Location:Macclesfield
  • Devices:LG Optimus X2
I managed to change the size of my partitions today by quite a simple hack, and thought it might be useful to others.

I guess it opens up a lot of possibilities for those who can be bothered with it.

All data will be lost doing this.


The partitions I have modified successfully are:

/data: Increased to 2GB (broke clockworkmod) 1.85GB Useful if you can't be arsed with A2SD.
/system: Increased to half a gig. Useful if you want a big OS, I just did it to see if I can!
/cache: Big increase to a gig! (probably overkill, but I then modified build.prop in CM7 to put the dalvik-cache there!) I know my cache will always have MORE than enough space and I could download as big as APK ever from the market!
/(recovery partition): Increased from 20mb to 50mb. Again, just to see if I can. Would give the possibility of a bigger recovery with more options I suppose.

As a result, my internal memory card is now only 3.88 GB. Hence I would recommend this mod with Cyanogenmod that uses your external SD card as primary rather than stock, that uses the internal card as primary (/sdcard).

Now the important bit:
I have only done this ONCE and it worked. I do not know if or not it will work for YOU. If you brick your phone, then I am sorry however you have been warned!

I do however think if it all goes wrong, you can get your phone working using NVFlash with a default config. I have not tried and I am not sure!



The Guide
Sort out NVFlash
You need to download NVFlash from here: http://android.modac...66062-15032011/
And then follow instructions from here: http://android.modac...s-links-active/

Read the instructions, install the drivers. Test using "nvflash --sync" but do not run flash.bat yet!

Right now you should have NVFlash, the APX-Mode driver installed and "nvflash --sync" has given a promising output.

IF you have having trouble with NVFlash, use a proper LG cable. The cheap Chinese ones are CRAP. Mine was not supplying enough power and causing NVFlash to drop out at random points with all sorts of weird and wonderful messages. Use the cable that came with your phone!


Configure NVFlash
Make a backup of android_fastboot_emmc_full.cfg. This is your "stock" layout. After backing up, open in Notepad++ or similar Linux-Friendly text editor (NOT windows Notepad!)

This is your partition layout. Partitions of interest are:
ID - 6, Name: APP, this is /system
ID - 7, Name: CAC, this is /cache
ID - 14, Name: SOS, this is Recovery
ID - 16, Name: UDA, this is /data
ID - 18, Name: UDB, this is Internal SD

Basically, you just need to change the size to suit your needs. The size are in bytes. Make sure you follow the notes:

1. I read somewhere these must be multiples of 2048. I would use nice round figures such as 2 gigabytes (size=2147483648)

2. UDB has size: size=0xFFFFFFFFFFFFFFFF I guess this means "all of the rest".

3. I would not remove UDB COMPLETELY!

4. Make sure you don't over allocate. Im sure I dont need to say it but you can't have a 20gb /data ;)


Applying the update
Run "flash.bat". You will loose EVERYTHING. After this is complete I just SuperOneClicked, got ClockworkMod installed, got the Baseband installed and flashed back to CM7. Job done.



Update / Related Stuff
Could use being in Post 2 really but anyway...

Sample Partition Sizes
Currently I am using:
/system (512 MB): size=536870912
/cache (1 GB): size=1073741824
/data (about 1.85 GB): size=1986420736
Recovery (50 MB): size=52428800

/cache is 60mb Stock. Unless you are going to hack CM to dump its dalvik-cache (covered here: http://android.modac...r-dalvik-cache/) on the Cache partition, you won't need it too big. Suggested Sizes:
128MB: size=134217728
256MB: size=268435456
512MB: See Above
1 GB: See Above

/system you might as well leave stock or change to half a gig (see above). Not sure there is a point increasing past this unless you want to push a lot of apps using ADB. I guess it has the same restriction as /data, so can't be much more than 1.75.

/data is 1.5GB stock. Suggested values:
1.75GB: 1879048192
~1.80GB: size=1932734464
~1.85GB: size=1986420736
(Not sure if the limit is 2GB or 2000000000 bytes so this one is really experimental)
~1.99GB: size=2136745984


ClockworkMod
If you want NVFlash to automatically put ClockworkMod on your recovery section rather than stock, then do this before flashing:

- Backup your old recovery.img file.
- Download: http://download.cloc....0.2.0-p990.img
- Rename to recovery.img and put in nvflash folder.

CyanogenMod: Putting the dalvik-cache for System apps on /cache instead of /data
Link: http://android.modac...r-dalvik-cache/

Edited by mankian, 02 November 2011 - 04:11 PM.

  • 2

#2
Rusty!

Rusty!

    Diehard

  • Members
  • PipPipPipPip
  • 409 posts
  • Gender:Male
  • Location:Pompey
  • Devices:Nexus 5 16GB
  • Twitter:@RussUnderhill
That's a damn good find that, nice one.

  • 0

#3
mankian

mankian

    Enthusiast

  • Members
  • PipPipPip
  • 186 posts
  • Location:Macclesfield
  • Devices:LG Optimus X2
I cant stress how "dodgy" this is. Developers only I think ;) Just had a really odd issue where the /data partition became read-only in clockworkmod, and formatting it gave an error. I have now decreased it to 1.75GB see if that helps...

  • 0

#4
mankian

mankian

    Enthusiast

  • Members
  • PipPipPip
  • 186 posts
  • Location:Macclesfield
  • Devices:LG Optimus X2
Yep. A decrease to 1.75 has sorted that. I guess it can only be pushed so far...

  • 0

#5
Rusty!

Rusty!

    Diehard

  • Members
  • PipPipPipPip
  • 409 posts
  • Gender:Male
  • Location:Pompey
  • Devices:Nexus 5 16GB
  • Twitter:@RussUnderhill
Stick it on XDA Devs, some crazy bastard will run with it :lol:

  • 0

#6
orlox

orlox

    Regular

  • Members
  • PipPip
  • 114 posts
  • Devices:optimus 2x
Wow! I was looking for that like crazy. I will test a 4gb partition. In my understanding I won't be able to restore I data with cwm but who cares as Long as titanium backup works. Right?
Thank you!

  • 0

#7
Rusty!

Rusty!

    Diehard

  • Members
  • PipPipPipPip
  • 409 posts
  • Gender:Male
  • Location:Pompey
  • Devices:Nexus 5 16GB
  • Twitter:@RussUnderhill
CWM should still work, I think.

It does on the Desire when changing partition sizes.

  • 0

#8
mankian

mankian

    Enthusiast

  • Members
  • PipPipPip
  • 186 posts
  • Location:Macclesfield
  • Devices:LG Optimus X2
Orlox let me know how you get on please...

I know when I had mine set to 2GB every time I re-created filesystems (mke2fs) they would stay the same! (ie, not re-create!) and when I formatted /data using the CWM menu it just errored every time.

I am going to run with 1.75 data, 1 GB cache and 512mb System. Just got CM loaded on and everythings looking good!

  • 0

#9
CLR

CLR

    Newbie

  • Members
  • Pip
  • 5 posts
  • Gender:Male
  • Location:Bondoufle in France
  • Devices:HTC HD2, LG O7 and LG O2X
  • Twitter:@CLR2227
@ mankian : Thank you for this mod.
Can you post the exact value of your change please?

Enjoy :D

Cyrille

  • 0

#10
mankian

mankian

    Enthusiast

  • Members
  • PipPipPip
  • 186 posts
  • Location:Macclesfield
  • Devices:LG Optimus X2
Will post when I am at home and have access to the file

  • 0

#11
CLR

CLR

    Newbie

  • Members
  • Pip
  • 5 posts
  • Gender:Male
  • Location:Bondoufle in France
  • Devices:HTC HD2, LG O7 and LG O2X
  • Twitter:@CLR2227
Ok thanks ^^

Enjoy :D

Cyrille

  • 0

#12
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 36,219 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:All the Nexus!
  • Twitter:@paulobrien
Very nice! :)

P

  • 0

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#13
orlox

orlox

    Regular

  • Members
  • PipPip
  • 114 posts
  • Devices:optimus 2x
how did you tell cm to mount dalvic @ cache?

  • 0

#14
mankian

mankian

    Enthusiast

  • Members
  • PipPipPip
  • 186 posts
  • Location:Macclesfield
  • Devices:LG Optimus X2
@ orlox
http://android.modac...r-dalvik-cache/

Made a new thread as the first post of this one is becoming a book.

  • 1

#15
75markus

75markus

    Regular

  • Members
  • PipPip
  • 123 posts
  • Devices:LG Optimus 2X
fine, working great !

only system partition didn´t change for me, but i set same value as for cache ... strange...

after NVFlash, i directly restored CM backup.

included cwm-5.0.2.6 recovery in NVFlash, worked like a charm. no need for SuperOneClick, just restored backup, baseband 0823 was keeped !

thanks for sharing.


Posted ImagePosted ImagePosted Image

Edited by 75markus, 12 October 2011 - 08:10 AM.

  • 0

#16
75markus

75markus

    Regular

  • Members
  • PipPip
  • 123 posts
  • Devices:LG Optimus 2X
here is pre-build Partitons File & Quick Guide in my MediaFireShareFolder :


->


System : 0.50 GB
Cache : 1,0 GB
Recovery : 50 MB
Data : 1.75 GB

http://www.mediafire...kzno9z45so5sj,1

Edited by 75markus, 15 October 2011 - 09:36 AM.

  • 0

#17
orlox

orlox

    Regular

  • Members
  • PipPip
  • 114 posts
  • Devices:optimus 2x
My new setup
/cache=134217728
/data=2136745984
/misc=536870912
Then I moved dalvic to /misc



So i dont need to relink every time I clear cache and I have more room for apps :)
It would be cool though if we could do more that 2gbs for /data

Edited by orlox, 02 November 2011 - 09:17 AM.

  • 0

#18
ALF@be

ALF@be

    Newbie

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Belgium
  • Devices:LG Optimus 2X

My new setup
/cache=134217728
/data=2136745984
/misc=536870912
Then I moved dalvic to /misc



So i dont need to relink every time I clear cache and I have more room for apps :)
It would be cool though if we could do more that 2gbs for /data


how did you move the dalvik partition?

  • 0
Device: LG Optimus 2X ROM: Modaco GR4 KERNEL: HP RC3 Radio: BB 725

Posted Image

#19
mankian

mankian

    Enthusiast

  • Members
  • PipPipPip
  • 186 posts
  • Location:Macclesfield
  • Devices:LG Optimus X2
http://android.modac...r-dalvik-cache/

That'll explain how to utilise /cache for dalvik-cache.

It only seems to put the cache system apps (between 40-80mb worth of cache) there though. the rest (which isnt a lot!) is still put on /data

  • 0

#20
ALF@be

ALF@be

    Newbie

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Belgium
  • Devices:LG Optimus 2X
Thanks for the info... B)
I have missed it !:P

  • 0
Device: LG Optimus 2X ROM: Modaco GR4 KERNEL: HP RC3 Radio: BB 725

Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users