[ThinkTank] Custom partition sizes

Joeseph Mother

Well-known member
Nov 30, 2010
80
22
0
Visit site
I've been trying this on the optimus T, but nobody reads that forum, and this could benifit S users as well, so what I've been trying is described here:
Custom partition layouts, ZERO brick risk! - xda-developers
What it states is that if you rebuild the kernel with partition sizes specified in the kernel command line, it will mount the partitions the way the command line specified instead of the default. First (I would assume) you would have to rebuild recovery to accept those partition sizes so that you can format them as those sizes so they will be usable. So, using kmsg logs, I found my partition table, which for the optimus T is:

<5>[ 1.583211] Creating 10 MTD partitions on "msm_nand":
<5>[ 1.583236] 0x000002600000-0x000002a40000 : "boot"
<5>[ 1.584648] 0x000002a40000-0x00000e840000 : "system"
<5>[ 1.585803] 0x00000e840000-0x00000ed40000 : "recovery"
<5>[ 1.587140] 0x00000ed40000-0x00000f000000 : "lgdrm"
<5>[ 1.588073] 0x00000f000000-0x00000f100000 : "splash"
<5>[ 1.589000] 0x00000f100000-0x00000f280000 : "FOTABIN"
<5>[ 1.589951] 0x00000f280000-0x00000f840000 : "FOTA"
<5>[ 1.590888] 0x00000f840000-0x00000f880000 : "misc"
<5>[ 1.591853] 0x00000f880000-0x000013880000 : "cache"
<5>[ 1.592828] 0x000013880000-0x000020000000 : "userdata"

So using my handy dandy calculator I created my mtdparts option for the command line, which after changing cache from 65mb to 10mb was:

mtdparts=msm_nand:4352k@0x000002600000(boot),194560k@0x000002a40000(system),5120k@0x00000e840000(recovery),2816k@0x00000ed40000(lgdrm),1024k@0x00000f000000(splash),1536k@0x00000f100000(FOTABIN),5888k@0x00000f280000(FOTA),256k@0x00000f840000(misc),10240k@0x00000f880000(cache),204288k@0x000010280000(userdata)

I rebuilt both my recovery.img & my boot.img with the command line specifying mtdparts, flashed the recovery & had my boot.img ready to flash, problem being, when I booted into recovery, it froze up, likely due to the fact that cache is mounted in recovery by default, and the size had been changed on it. So my question is does that sound like why recovery froze to anyone else? And if so, does building a "temp recovery" that doesn't mount any partitions other than root just to allow formatting the partitions to whatever the determined size is sound plausible?
 

xtacocorex

Well-known member
Jan 12, 2011
53
2
0
Visit site
I wonder if you clear the cache if that will help. Seems as if the cache that was there couldn't fit into the new, smaller cache size.
 

Nick7

Brick Master
Dec 3, 2010
1,038
951
0
Visit site
What partition size did they use for the hero? That would be a good starting place, they have the same amount of ROM as the Optimus.
 

cordell

Well-known member
Jan 2, 2011
333
21
0
Visit site
I've been trying this on the optimus T, but nobody reads that forum, and this could benifit S users as well, so what I've been trying is described here:
Custom partition layouts, ZERO brick risk! - xda-developers
What it states is that if you rebuild the kernel with partition sizes specified in the kernel command line, it will mount the partitions the way the command line specified instead of the default. First (I would assume) you would have to rebuild recovery to accept those partition sizes so that you can format them as those sizes so they will be usable. So, using kmsg logs, I found my partition table, which for the optimus T is:

<5>[ 1.583211] Creating 10 MTD partitions on "msm_nand":
<5>[ 1.583236] 0x000002600000-0x000002a40000 : "boot"
<5>[ 1.584648] 0x000002a40000-0x00000e840000 : "system"
<5>[ 1.585803] 0x00000e840000-0x00000ed40000 : "recovery"
<5>[ 1.587140] 0x00000ed40000-0x00000f000000 : "lgdrm"
<5>[ 1.588073] 0x00000f000000-0x00000f100000 : "splash"
<5>[ 1.589000] 0x00000f100000-0x00000f280000 : "FOTABIN"
<5>[ 1.589951] 0x00000f280000-0x00000f840000 : "FOTA"
<5>[ 1.590888] 0x00000f840000-0x00000f880000 : "misc"
<5>[ 1.591853] 0x00000f880000-0x000013880000 : "cache"
<5>[ 1.592828] 0x000013880000-0x000020000000 : "userdata"

So using my handy dandy calculator I created my mtdparts option for the command line, which after changing cache from 65mb to 10mb was:

mtdparts=msm_nand:4352k@0x000002600000(boot),194560k@0x000002a40000(system),5120k@0x00000e840000(recovery),2816k@0x00000ed40000(lgdrm),1024k@0x00000f000000(splash),1536k@0x00000f100000(FOTABIN),5888k@0x00000f280000(FOTA),256k@0x00000f840000(misc),10240k@0x00000f880000(cache),204288k@0x000010280000(userdata)

I rebuilt both my recovery.img & my boot.img with the command line specifying mtdparts, flashed the recovery & had my boot.img ready to flash, problem being, when I booted into recovery, it froze up, likely due to the fact that cache is mounted in recovery by default, and the size had been changed on it. So my question is does that sound like why recovery froze to anyone else? And if so, does building a "temp recovery" that doesn't mount any partitions other than root just to allow formatting the partitions to whatever the determined size is sound plausible?

It may be easier to use THIS method to resize partitions (same mod). All I think that really needs to be done is edit the script to match our MTD layouts. I started to work on this when I first got the Optimus but being that most of the users seems to be somewhat new to android it may be more of a headache then what its worth. At least to whomever released it :) Go look at all the endless help questions "bricked, your mod messed up, how do I create a txt file, I cant reboot recovery" on the HeroC forums on XDA about this MOD :eek:

I found it much easier to run DarkTremors a2sd script, been running that from day one, no issues, knock on wood, LOL.
 
Last edited:

debh945

Well-known member
May 15, 2010
175
40
0
www.scrappincop.com
It may be easier to use THIS method to resize partitions. All I think that really needs to be done is edit the script to match our MTD layouts. I started to work on this when I first got the Optimus but being that most of the users seems to be somewhat new to android it may be more of a headache then what its worth. At least to whomever released it :) Go look at all the endless help questions "bricked, your mod messed up, how do I create a txt file, I cant reboot recovery" on the HeroC forums on XDA about this MOD :eek:

I found it much easier to run DarkTremors a2sd script, been running that from day one, no issues, knock on wood, LOL.


Lol, so true. I don't blame Firerat one bit for some of his terse replies. This was one of my favorite mods on my old Hero. Would be very cool if you can get it working!

Sent from my Veganized Gtab using Tapatalk
 

cordell

Well-known member
Jan 2, 2011
333
21
0
Visit site
Lol, so true. I don't blame Firerat one bit for some of his terse replies. This was one of my favorite mods on my old Hero. Would be very cool if you can get it working!

Sent from my Veganized Gtab using Tapatalk

LMAO yeah I know! I was just reading through some of his remarks on the G1 forums. I mean its real BIG AND RED "do not flash if you dont understand". Yet countless people do and have no idea what they are even flashing. I think some people just see a zip file for download and load it up and flash, having no idea what it is or does, LOL. Then they go straight to the last page and post how the zip file just bricked their phone, never even read the OP :)

I do think this can work for the Optimus, its just a matter of editing firerats scripts to match our MTD's or kernel's as the OP has posted, perhaps the kernel method would be best as it may keep the questions down. It can wrote into the kernel and the average user wouldnt even know the mod is there, just that they have more room for data :)
 

cordell

Well-known member
Jan 2, 2011
333
21
0
Visit site
I flashed firerats script 157 and you know where it tells you to wipe system, cache, data? I cant wipe system, there is no option in our recovery's. Anyway I did reboot recovery and when it rebooted it didnt work. I tried to flash a rom and no go, couldnt "find" system. So I just rebooted and now hope I can flash recovery back :eek:

EDIT.....I rebooted to my rom and was able to reflash recovery. I now have found format system within the clockward mod recovery for our phone. I am a bit worried as if I format system I may not be able to mount anything to re-flash recovery if I need too! Gonna have to play with this for a sec before I wipe that system! lol

EDIT2...Errors are

E:Cant find MISC:
E:Cant find MISC:
E:Cant open /cache/recovery/log
E:Cant open CACHE:recovery/log
E:Cant find MISC:

EDIT3....It gives a error while trying to mount system while in recovery. I am not gonna proceed to wipe my system for fear I can not reboot to my OS and be able to flash a good recovery :)
 
Last edited:

beezy

Well-known member
Feb 27, 2010
2,434
1,010
0
Visit site
I flashed firerats script 157 and you know where it tells you to wipe system, cache, data? I cant wipe system, there is no option in our recovery's. Anyway I did reboot recovery and when it rebooted it didnt work. I tried to flash a rom and no go, couldnt "find" system. So I just rebooted and now hope I can flash recovery back :eek:

EDIT.....I rebooted to my rom and was able to reflash recovery. I now have found format system within the clockward mod recovery for our phone. I am a bit worried as if I format system I may not be able to mount anything to re-flash recovery if I need too! Gonna have to play with this for a sec before I wipe that system! lol

EDIT2...Errors are

E:Cant find MISC:
E:Cant find MISC:
E:Cant open /cache/recovery/log
E:Cant open CACHE:recovery/log
E:Cant find MISC:


I did this before you are going to have a fun time.lol Don't give up try restoring a nadroid if that fails power off try flashing a rom. If it errors just keeping tyring and letting it try to boot by itself. I can't remember the exact steps i took cause it took me a little while to get it to work.
 

cordell

Well-known member
Jan 2, 2011
333
21
0
Visit site
I did this before you are going to have a fun time.lol Don't give up try restoring a nadroid if that fails power off try flashing a rom. If it errors just keeping tyring and letting it try to boot by itself. I can't remember the exact steps i took cause it took me a little while to get it to work.

I figure it can work, I am scared though lmao. The script asks for a format of the system, if I do that I lose my image for booting to the OS and ability to re-flash recovery to ditch the mod. You did get it though, it must be way more trouble than its worth (to release anyways).
 

Forum statistics

Threads
943,148
Messages
6,917,519
Members
3,158,847
Latest member
fallingOutOfLoveWfithTech