[Galaxy Tab  Android Development] cx5:
dedicated to users who would like to know how to change partition

EDIT 12th Dec 5:35PM - 200MB only enough for ROM to use ART but not enough with gapps, now I am using 256MB, so far so good. below no longer valid

Red is what I typed into TERMINAL(linux) or Command Prompt(windows)

Blue is computer feedback reply / results

user@user-desktop ~ $ adb devices

List of devices attached

3231F6AA9D5200EC	recovery

user@user-desktop ~ $ adb shell

~ # umount / cache

umount: can't umount /: Device or resource busy

umount: can't umount cache: Invalid argument

~ # umount /cache

umount: can't umount /cache: Invalid argument

~ # mount /cache

~ # mount /cache

mount: mounting /dev/block/mmcblk0p3 on /cache failed: Device or resource busy

I was testing to make sure I had it un-mounted. Finally start the real work now.

~ # umount /cache

~ # fdisk /dev/block/mmcblk0

The number of cylinders for this disk is set to 1944064.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): e just so the list of choices appears.

e: unknown command

Command Action

a	toggle a bootable flag

b	edit bsd disklabel

c	toggle the dos compatibility flag

d	delete a partition

l	list known partition types

n	add a new partition

o	create a new empty DOS partition table

p	print the partition table

q	quit without saving changes

s	create a new empty Sun disklabel

t	change a partition's system id

u	change display/entry units

v	verify the partition table

w	write table to disk and exit

Command (m for help):

then I accidentally fell out and had to re run fdisk.

~ # fdisk /dev/block/mmcblk0

The number of cylinders for this disk is set to 1944064.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p as per adviced by darkpal to check the total number of heads. Mine was 1 like his.

Disk /dev/block/mmcblk0: 15.9 GB, 15925772288 bytes

1 heads, 16 sectors/track, 1944064 cylinders

Units = cylinders of 16 * 512 = 8192 bytes

Device Boot Start End Blocks Id System

/dev/block/mmcblk0p1 5 1681920 13455328 83 Linux

Partition 1 does not end on cylinder boundary

/dev/block/mmcblk0p2 1681921 1931264 1994752 83 Linux

Partition 2 does not end on cylinder boundary

/dev/block/mmcblk0p3 1931265 1944064 102400 83 Linux

Partition 3 does not end on cylinder boundary

Command (m for help): d this is to delete,

Partition number (1-4): 2 partition number 2.

Command (m for help): d

Partition number (1-4): 3

Command (m for help): n this is to create new partition

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 2 create partition 2.

First cylinder (2-1944064, default 2): 1681921

Last cylinder or +size or +sizeM or +sizeK (1681921-1944064, default 1944064): 1918465 I'll explain how to get this later.

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 3

First cylinder (2-1944064, default 2): 1918466

Last cylinder or +size or +sizeM or +sizeK (1918466-1944064, default 1944064): 1944064

Command (m for help): p this is to check new effect.

Disk /dev/block/mmcblk0: 15.9 GB, 15925772288 bytes

1 heads, 16 sectors/track, 1944064 cylinders

Units = cylinders of 16 * 512 = 8192 bytes

Device Boot Start End Blocks Id System

/dev/block/mmcblk0p1 5 1681920 13455328 83 Linux

Partition 1 does not end on cylinder boundary

/dev/block/mmcblk0p2 1681921 1918465 1892360 83 Linux

/dev/block/mmcblk0p3 1918466 1944064 204792 83 Linux

Command (m for help): w this is final command to execute it all (I think).

The partition table has been altered.

Calling ioctl() to re-read partition table

fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy

done, you're back to TWRP.

wipe everything

install ROM.

done. Good Luck.

EDIT 12th Dec 5:35PM - 200MB only enough for ROM to use ART but not enough with gapps, now I am using 256MB, so far so good. above no longer valid.