Free more available disk space from NAND - PART II

As to change the partition layout of the nand disk, we have to create the pit file ourself for custom partitions size. The pit file can be obtained by compiling a C file containing the partition info. Below shows part of the s1_odin_20100512.c provided by coolya

* /dev/block/stl1 - 6 omitted
{ 0, 0, 0x06, 0x00, 0, 256, 30, "", "KERNEL", "zImage"},
{ 0, 0, 0x07, 0x00, 0, 256, 30, "", "RECOVERY", "zImage"},
{ 0, 0, 0x16, 0x02, 0, 256, 1146, "", "FACTORYFS", "factoryfs.rfs"},
{ 0, 0, 0x17, 0x02, 0, 256, 536, "", "DBDATAFS", "dbdata.rfs"},
{ 0, 0, 0x18, 0x02, 0, 256, 140, "", "CACHE", "cache.rfs"},
{ 0, 0, 0x0b, 0x00, 0, 256, 50, "", "MODEM", "modem.bin"},

The first entry is mapped as /dev/block/stl7 (/dev/block/bml7), and so forth. Thus MODEM will be mapped to /dev/block/stl12 (/dev/block/bml12). For the meaning of each of the column above, we have to refer to the structure listed below from the C file:

unsigned int _00; /* unknown. set to 1 is entry unused */
unsigned int _04; /* unknown. set to 1 is entry unused */
unsigned int partid; /* partition ID */
unsigned int flags; /* flags. 0x 00= RO, 0x02=R/W */
unsigned int _14; /* unknown */
unsigned int blocksize; /* blocksize in 512 byte units */
unsigned int partsize; /* partition size in blocks */
char _20[8]; /* unknown */
char partname[32]; /* partition name */
char filename[64]; /* filename */

Take the CACHE partition as example, the partition info stated in s1_odin_20100512.c reads:

{ 0, 0, 0x18, 0x02, 0, 256, 140, "", "CACHE", "cache.rfs"}

That is to say, the properties of the CACHE partition should be, starts from column one:
0 - the partition is being used
0 - the partition is being used
0x18 - the partition ID
0x02 - the partition allows read/write
0 - (unknown)
256 - blocksize
140 - partition size
"empty" - (unknown)
CACHE - the partition is known as CACHE
cache.rfs - the file to be filled


Normally, we only need to deal with columns 1, 2, 4, 7, 9 and 10:
- column 1 and 2: set to 0 to mark this partition usable
- column 4: set to 0x02 for both read/write accesses
- column 7: set this to 140 units (or 35MB) for this partition, where 140 x 256 / 1024 = 35MB, ie each unit = 0.25MB
- column 9: set this as CACHE for internal reference
- column 10: set the filename required for filling this partition

So for the KERNEL or /dev/block/stl7 (/dev/block/bm7):

{ 0, 0, 0x06, 0x00, 0, 256, 30, "", "KERNEL", "zImage"}

means that this partition is known as KERNEL, with 7.5MB disk space allocated, and the required file is zImage



read more:
Free more available disk space from NAND - PART I
freeNANDmod - get more space from NAND - PART III
freeNANDmod - get more space from NAND - PART IV

Free more available disk space from NAND - PART I

The nand partitions layout in Samsung Galaxy S I9000 is controlled by a pit file (Partition Information Table), while for the mmc drive, it is hard coded in the init file.

For example, in Samsung Galaxy S I9000, the stock partition tables for s1_odin_20100512.pit should look like this:

NAND disk */dev/block/stl1 - stl6 omitted
device name mount point size in MB remarks
/dev/block/stl7 n/a 7.5 known as KERNEL, for holding zImage
/dev/block/stl8 n/a 7.5 known as RECOVERY, for storing a copy of zImage
/dev/block/stl9 /system 286.5 known as FACTORYFS
/dev/block/stl10 /dbdata 134 known as DBDATA
/dev/block/stl11 /cache 35 known as CACHE
/dev/block/stl12 n/a 7.5 known as MODEM, for storing modem.bin
MMC disk
device name mount point size in MB remarks
/dev/block/mmcblk0p1 /mnt/sdcard (/sdcard) ~6200 (8G) / ~14200 (16G) none
/dev/block/mmcblk0p2 /data ~2000 none

For other pit files like s1_odin_20100513 and s1_odin_20100803, the size of /system and /dbdata are different. So for a larger /system partition, a smaller /dbdata and/or /cache will be resulted and vice versa since the total size of the nand is fixed (~500MB)

When we flash a rom to our phone, the above information will be read by odin to decide where the files will be stored. For instance, the zImage will be written to /dev/block/stl7 (/dev/block/bml7) and /dev/block/stl8 (/dev/block/bml8), while the FACTORYFS.rfs will be stored on /dev/block/stl9 (or /dev/block/bml9) at a specific start block address, up to the size of the file and so forth.

As a result, if we wanna use our own customized partition layout, we have to deal with the pit file and the mmc via fdisk or parted, etc


read more:
Free more available disk space from NAND - PART II
freeNANDmod - get more space from NAND - PART III
freeNANDmod - get more space from NAND - PART IV




for more details, read:
Investigation Into PIT Files
The reality of PIT files

getting bored with ur i9000 already? yet more to come!

hi all,
i still have some more mods/tweaks not yet published. pls kindly give me some time to tidy them up and be patient. i also have to decide in what way to publish them since, as usual, i prefer not to release mods in a complete rom format


:)

JVQ Browser lag quick fix

i'm too frustrated with samsung's stock browser since JP6, and the deodexed one from JVQ is totally rubbish. it's sooooo lag that i've to wait for 2 seconds after each scroll


so, after studying some great posts in xda, i've modded a deodexed JVQ browser with all the lag things disappeared. now it just perform like what it used to be, u can scroll from the top to the bottom of the page with 1 single scroll. HOWEVER, i cannot say it's 100% bugs-free



so, USE IT AT YOUR OWN RISKS!! and remember to do BACKUP!




installation (for deodexed rom):
simply remove the existing Browser.apk from /system/app, and put this one there

PS you may notice some strange thing when u start this modded browser for the 1st time like a blank page is shown or cant scroll the page. just reload the page or restart the browser will do


NOTICE to all users:
- this is a one-off mod and it is not supposed to have any further modifications/adjustments

NOTICE to modders/developers:
- if u want to keep this alive or help to maintain this mod, etc, feel free to ask for the trick in xda


you can get it here

I9000XXJVP 2.3.4 available for update

I9000XXJVP (XEU) 2.3.4 is available now, which is 'supposed' to fix a security hole that allow hackers to compromise and steal personal data including phone book from your device

gingerbread sms no contact limit + no mms autoconvert + sent time fix

the long awaited gingerbread sms mod for deodexed I9000XWJVB and I9000XWJVH are out finally. they are not modded by me this time but, instead, by another nice guy called montymintypie in the xda forum, who also fixed the limit of number of msgs per sms and the auto convert to mms problem


more info and download

more info about my froyo version sms sent time fix for I9000XWJS5 and I9000XXJPX/I9000XXJPY

David Beckham and Galaxy S II

Samsung named David Beckham to be its global brand ambassador for the London 2012 Olympic Games today

"we're delighted that David will be supporting our goal to extend the Olympic spectating experience to fans throughout the world using our leading smart mobile technology..." said Mr. Gyehyun Kwon, Vice President of Samsung Electronics

and Beckham was given a Samsung Galaxy S II at the official signing






source: Samsung UK and engadget.com