Jump to content

How to repartition G330


Guest hvdh

Recommended Posts

I managed to repartition my G330 to 450MB /cache, 5MB /cust, 1.1GB /system, 1GB /data and 930MB /storage/sdcard0
without losing any data. My installed installed SlimKat 9.0 still worked after this.
(I have no clue how much /cache one needs, maybe less iss enough.)

 

Note: Below, I have posted a reduced guide if you only want to increase /data at cost of internal SD size.

This is how I repartitioned my G330:

Prerequities:
- installed CWM 6.0.4.4 (others may work, I just had this one installed)
- adb (from Android SDK)
- external SD card with >4GB free space
- "resize2fs_s" from https://github.com/moddingg33k/android_kernel_y300_general/blob/master/ramdisk/synopsis/sbin/resize2fs_s
- accepting that this may permanently brick your phone
- being able to read & doing exactly what is written here
- courage!

Note1: I don't know if it's just my phone, but it spontaneously rebooted several times
while in CWM (idle, copying files in phone or between phone and PC).

Note2: I didn't check this guide. I just wrote it up after doing all this to my phone.



Step 1: Planning the partition layout

Boot the phone to recovery.
Run "adb shell" from command line
run: fdisk -H64 -S32 -l /dev/block/mmcblk0
to print the current partition table

The last lines are (I added the mount points on the right hand side)
              Device Boot      Start         End      Blocks  Id System
[..]
/dev/block/mmcblk0p15            201         392      196608  83 Linux    -> /cache
/dev/block/mmcblk0p16            393         472       81920  83 Linux    -> /cust
/dev/block/mmcblk0p17            473         984      524288  83 Linux    -> /system
/dev/block/mmcblk0p18            985        1624      655360  83 Linux    -> /data
/dev/block/mmcblk0p19           1625        3728     2154496  6b Unknown  -> /storage/sdcard0 ("internal SD card")

"mmcblk0" is the phone-internal flash, and the "pXX" suffix enumerates the partitions in this flash.


"Blocks" is in 1MB units. You can see /system is only 512MB

This is what we are going to do:
/dev/block/mmcblk0p15            202         649      458752  83 Linux    -> /cache
/dev/block/mmcblk0p16            650         659       10240  83 Linux    -> /cust
/dev/block/mmcblk0p17            660        1799     1167360  83 Linux    -> /system
/dev/block/mmcblk0p18           1800        2799     1024000  83 Linux    -> /data
/dev/block/mmcblk0p19           2800        3728      951296  6b Unknown  -> /storage/sdcard0

Note 1:
Make sure that each new partition is big enough to hold the current content.
For p15-p18, you can use "resize2fs_s -P" (see step 3) to get the minimum required size.
For p19, mount the phone as USB storage, then check in Windows how full the internal SD drive is.

Note 2:
The partition layout is somewhat inconsitent/corrupt if the first few partitions.
To avoid problems from overlap, I chose to recreate /cache starting at 202, not 201.



Step 2: Preparation

Copy resize2fs_s to your external SD card root dir.

On phone (under mounts & storage), mount /storage/sdcard1 (your actual SD card) and unmount /cache.

Copy resize2fs_s to root partition & make it executable
run: cp /storage/sdcard1/resize2fs_s .
run: chmod a+x resize2fs_s



Step 3: Make a backup of all relevant EXT partitions

You need to do this step for all partitons you want to keep.
Other partiton content will be lost.
Suggestion:
- backup /data and /cust
- backup /system (unless you want to do a fresh ROM install after repartitioning AND don't need a fallback)
- skip /cache (just format them in CWM after repartitioning)
- skip /storage/sdcard0, this is a FAT partition and we need handle to handle this differently.

We're resizing the partitions now to make them smaller (example is p15 = /cache here):
run: ./resize2fs_s -P /dev/block/mmcblk0p15
This gives you the minimum partition size for mmcblk0p15 (=/cache)
"Estimated minimum size of the filesystem: 14170" (in 4KB blocks)

Now shrink to some size that is ~10% larger.
run: ./resize2fs_s /dev/block/mmcblk0p15 15000

Then copy to shrunk partition image to external SD card.
Partition p15 goes into a file "p15". Specify the copy size accordingly.
run: dd if=/dev/block/mmcblk0p15 of=/storage/sdcard1/p15 bs=4K count=15000



Step 4: Make a backup of InternalSdCard FAT partition (/storage/sdcard0)

In CWM, select "mount USB storage".
On Windows, copy all files from internal SD card partition to some directory (e.g. "InternalSDcardBackup") on PC.
(You should first enable display of hidden files, in case there are some)
"Eject" both phone drives in Windows, then leave "mount USB storage" in CWM.
In CWM unmount all partitions except /storage/sdcard1.



Step 5: Change partition layout

run: fdisk -H64 -S32 /dev/block/mmcblk0

Delete all partitions to be changed:
(Enter d, then the partition number to delete)
do: d [enter] 19 [enter]
do: d [enter] 18 [enter]
do: d [enter] 17 [enter]
do: d [enter] 16 [enter]
do: d [enter] 15 [enter]

Create new partitions (automatically numbered in order):
(Enter n, then the start block number, then the end block number)
For the table above, it would be:
do: n [enter] 202  [enter]  649   (for p15 = /cache)
do: n [enter] 650  [enter]  659   (for p16 = /cust)
do: n [enter] 660  [enter] 1799   (for p17 = /system)
do: n [enter] 1800 [enter] 2799   (for p18 = /data)
do: n [enter] 2800 [enter] 3728   (for p19 = /storage/sdcard0)

Change partition type for p19 to "6b" (it was like this before, and recreating the partition changed it to 83):
do: t [enter] 19 [enter] 6b [enter]

Check that the new layout is what you want:
do: p [enter]

Write the new layout to flash:
In CWM, make sure all partitons except /storage/sdcard1 are unmounted, otherwise you'll get an error here.
do: w [enter]

All partitons are now it the right size, but without right content.



Step 6: Restore partition content.

In CWM, make sure all partitons except /storage/sdcard1 are unmounted.

For all EXT partitions you made a backup in step 3 (here for example p15 = /cache):
Copy shrunk backup back into new partition:
run: dd if=/storage/sdcard1/p15 of=/dev/block/mmcblk0p15 bs=4K

Enlarge file system to full partition size:
run: ./resize2fs_s /dev/block/mmcblk0p15

Repeat step 6 for all EXT partiton you want to have restored.
For skipped partitons (except p19 = /storage/sdcard0), format the partition in CWM.


Step 7: Restore InternalSdCard FAT partiton
In CWM, go into USB storage mode.
On PC, format the InternalSdCard partition (default settings). Windows will ask for it by itself.
Copy files from InternalSDcardBackup to this empty partition.
Unmount phone drives in windows, then reboot phone from CWM.

Edited by hvdh
Link to comment
Share on other sites

  • 1 month later...
Guest impulse686

Many thanks to hvdh for this guide! I used it to repartition my Y300-0151 as follows:

Cache:          192MB -> 128MB
Cust:               80MB -> 80MB
System:       1024MB -> 512MB
Data:           1152MB -> 2552MB

SD-Internal: 1080MB -> 256MB

-=Original=-
              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p15            201         392      196608  83 Linux (/cache)
/dev/block/mmcblk0p16            393         472       81920  83 Linux (/cust)
/dev/block/mmcblk0p17            473        1496     1048576  83 Linux (/system)
/dev/block/mmcblk0p18           1497        2648     1179648  83 Linux (/data)
/dev/block/mmcblk0p19           2649        3728     1105920  6b Unknown (/storage/sdcard0)

 

-=Modified=-

/dev/block/mmcblk0p15            201         328      131056  83 Linux (/cache)
/dev/block/mmcblk0p16            329         408       81904  83 Linux (/cust)
/dev/block/mmcblk0p17            409         920      524272  83 Linux (/system)
/dev/block/mmcblk0p18            921        3472     2613232  83 Linux (/data)
/dev/block/mmcblk0p19           3473        3728      262128  6b Unknown(/storage/sdcard0)

I think p15, p16 and p19 could still be made even smaller to make p17/p18 a little bigger, but what is a good minimum size for /cache, /cust and /sdcard0 partitions?

After repartitioning I installed H3ROS' B209 AOSP ROM without issues. Runs great!

post-1031406-0-80361000-1426853406_thumb

Link to comment
Share on other sites

Guest H3ROS

I wouldn't always recommend reducing the size of the cache because if the cache is too small then some of the larger apps on the Play Store will fail to download correctly. Reducing the size of the system partition to increase the size of the data partition is something that I recommend most people to do though. It means that you can store more app data on the phone without the need for programs such as Link2SD.

Link to comment
Share on other sites

I wouldn't always recommend reducing the size of the cache because if the cache is too small then some of the larger apps on the Play Store will fail to download correctly. Reducing the size of the system partition to increase the size of the data partition is something that I recommend most people to do though. It means that you can store more app data on the phone without the need for programs such as Link2SD.

 

Well, i'm not sure how much cache is needed. On my G330 it seems to be pretty much empty.

/cust is static and pretty much unused, does not need to waste 80MB.

Regarding /system, I would keep it at least at 512MB, because this is the reqiured minimum for SlimLP (alpha) ROM installers.

Edited by hvdh
Link to comment
Share on other sites

Reduced guide when you only want to enlarge /data at cost of internal SD size.
All other partitions are left untouched.

Prerequities:
- installed CWM 6.0.4.4 (others may work, I just had this one installed)
- adb (from Android SDK)
- external SD card with >4GB free space
- "resize2fs_s" from https://github.com/moddingg33k/android_kernel_y300_general/blob/master/ramdisk/synopsis/sbin/resize2fs_s
- accepting that this may permanently brick your phone
- being able to read & doing exactly what is written here
- courage!

Note1: I don't know if it's just my phone, but it spontaneously rebooted several times
while in CWM (idle, copying files in phone or between phone and PC).

Note2: I didn't check this guide. I just wrote it up after doing all this to my phone.

Note3: Some lines in this guide are jsut explanation, some are things you need to do.
Formatting is like this:

This is just some explanation what the next lines will do. No need to actually do something.
- This is some step you need to perform (e.g. on PC or in CWM)
- run: command    -> You need to run "command" on PC in the ADB shell.
- type: command   -> You need to type this on PC in the ADB shell.



Step 1: Planning the partition layout

- Boot the phone to recovery.
- On PC, run "adb shell" from command line
Print the current partition table:
- run: fdisk -H64 -S32 -l /dev/block/mmcblk0

The last lines are (I added the mount points on the right hand side)
              Device Boot      Start         End      Blocks  Id System
[..]
/dev/block/mmcblk0p17            473         984      524288  83 Linux    -> /system
/dev/block/mmcblk0p18            985        1624      655360  83 Linux    -> /data
/dev/block/mmcblk0p19           1625        3728     2154496  6b Unknown  -> /storage/sdcard0 ("internal SD card")

"mmcblk0" is the phone-internal flash, and the "pXX" suffix enumerates the partitions in this flash.
Note that each partition's start is one block after the end of the previous partition.
"Blocks" is in 1MB units. You can see /system is only 512MB (524288 KB)
Partition size can be calculated: blocks[KB] = (end - start + 1) * 1024

The room for /data and intSD together is 2744MB. You can split is as you like.
Here are two examples:

Used for this guide: (1000 blocks = 1.0GB /data + 1.3GB intSD):
/dev/block/mmcblk0p18            985        1984     1024000  83 Linux    -> /data
/dev/block/mmcblk0p19           1985        3728     1325056  6b Unknown  -> /storage/sdcard0

Other example (1500 blocks = 1.5GB /data +  760MB GB intSD):
/dev/block/mmcblk0p18            985        2484     1536000  83 Linux    -> /data
/dev/block/mmcblk0p19           2485        3728      761856  6b Unknown  -> /storage/sdcard0

General: When you want Y MB /data, use X = 985+Y-1.
/dev/block/mmcblk0p18            985           X     ???????  83 Linux    -> /data
/dev/block/mmcblk0p19            X+1        3728     ???????  6b Unknown  -> /storage/sdcard0

 

This guide assumes that your partition table is in factory state. If you have changed it

before (e.g. changed /system size), p18 might not start on block 985, and you have to

adjust for this.

Note:
Make sure that each new partition is big enough to hold the current content.
For p18, you can use "resize2fs_s -P" (see step 3) to get the minimum required size.
For p19, mount the phone as USB storage, then check in Windows how full the internal SD drive is.



Step 2: Preparation: Copy resize2fs_s to your external SD card root dir.

- In CWM, under "Mounts & Storage", mount /storage/sdcard1 (your actual SD card) and unmount /cache.

Copy resize2fs_s to root partition & make it executable:
- run: cp /storage/sdcard1/resize2fs_s .
- run: chmod a+x resize2fs_s


Step 3a: Shrink /data and make a backup of it

- run: ./resize2fs_s -P /dev/block/mmcblk0p18
This gives you the minimum partition size for mmcblk0p18 (=/data)
"Estimated minimum size of the filesystem: 123456" (in 4KB blocks)

Now shrink to some size that is 10-20% larger: 123456 -> 140000
- run: ./resize2fs_s /dev/block/mmcblk0p18 140000

Make a backup of p18 /data partition image on external SD card in a file "p18",
specify the copy size (from the last command) accordingly.
- run: dd if=/dev/block/mmcblk0p18 of=/storage/sdcard1/p18 bs=4K count=140000



Step 4: Make a backup of intSD FAT partition (/storage/sdcard0)

- In CWM, select "mount USB storage".
- On Windows, copy all files from internal SD card partition to some new directory (e.g. "InternalSDcardBackup") on PC.
(You should first enable display of hidden files, in case there are some.)
- "Eject" both phone drives in Windows
- In CWM, leave "mount USB storage".
- In CWM, unmount all partitions except /storage/sdcard1.



Step 5: Change partition layout

Start partition editor:
- run: fdisk -H64 -S32 /dev/block/mmcblk0

Delete all partitions to be changed: Enter 'd', then the partition number to delete.
- type: d [enter] 19 [enter]
- type: d [enter] 18 [enter]

Create new partitions: Enter 'n', then start block number, then end block number
For the guide example from above, it would be X=1984:
- type: n [enter]  985 [enter] 1984   (for p18 = /data)
- type: n [enter] 1985 [enter] 3728   (for p19 = /storage/sdcard0)

Change partition type for p19 to "6b"
- type: t [enter] 19 [enter] 6b [enter]

Check that the new layout is what you want:
- type: p [enter]

Write the new layout to flash:
- In CWM, make sure all partitons except /storage/sdcard1 are unmounted, otherwise you'll get an error here.
- type: w [enter]



Step 6: Restore partition content

- In CWM, make sure all partitons except /storage/sdcard1 are unmounted.

Copy p18 /data backup back into new partition:
- run: dd if=/storage/sdcard1/p18 of=/dev/block/mmcblk0p18 bs=4K

Enlarge file system to full partition size:
- run: ./resize2fs_s /dev/block/mmcblk0p18


Step 7: Restore InternalSdCard FAT partiton

- In CWM, in "Mounts & Storage", do "format /storage/sccard0"
- In CWM, in "Mounts & Storage", select "mount USB storage"
- On PC, copy files from InternalSDcardBackup to the empty intSD partition.
- Unmount phone drives in windows, then reboot phone from CWM.
 

Edited by hvdh
Link to comment
Share on other sites

Guest pottkopp

Hey guys!

 

I changed Cache, System, Data and Internal SD... but now I have a problem... in /proc/mounts the mount information of Cache, Cust, System, Data and Internal SD is deleted. I managed to mount the internal SD again but how can I mount those others again? I'm always getting "Invalid argument" error when typing i.e.: "mount -o rw,nosuid,nodev,noatime,noauto_da_alloc,data=ordered -t ext4 /dev/block/mmcblk0p15 /cache"

 

Would be awesome if someone could help me so I can use my phone again :D Thanks in advance and thanks a lot for your tut and your help so far hvdh!

 

Pottkopp

 

EDIT: Found the mistake ;) my ext4 partitions weren't formatted.. I formatted them with mke2fs -t ext4 /dev/block/mmcblk0p15 (one by one till p18) and now they can be mounted :)

Edited by pottkopp
Link to comment
Share on other sites

  • 1 month later...
Guest Jairus1998

I tried to partition my device with this code "-run: fdisk -H64 -S32 /dev/block/mmcblk0" and it doesn't allow me.

 

 

 

Command (m for help): ~ # -run| fdisk -H64 -S32 /dev/block/mmcblk0
-run| fdisk -H64 -S32 /dev/block/mmcblk0
/sbin/sh: -run: not found
 
The number of cylinders for this disk is set to 3776.
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): ~ #
Link to comment
Share on other sites

Guest hvdh

 

I tried to partition my device with this code "-run: fdisk -H64 -S32 /dev/block/mmcblk0" and it doesn't allow me.

 

Well, "-run:" is instruction for you, and "fdisk -H64 -S32 /dev/block/mmcblk0" is the command to run.

Link to comment
Share on other sites

Guest Jairus1998

Well, "-run:" is instruction for you, and "fdisk -H64 -S32 /dev/block/mmcblk0" is the command to run.

Already partitioned.

 

Thanks to your guidelines @hvdh and @CreasingMass for doing it through team viewer.

Really appreciated .

Link to comment
Share on other sites

Guest Arbab Irfan

I have just a thought about Rename "mmcblkl1p1" (sdcard) to "mmcblk0p18" (data) ... I am noob I didn't have answer what to do with original "mmcblk0p18" I mean rename into what..?

 

I just downloaded app from playstore that shows all info "storgae partition"

 

 

 

Partition                              Name                              Size                                                            USED                              
mmcblk0p1                              XX                              20    kb                              NOT MOUNTED                              
mmcblk0p2                              XX                              300  kb                              NOT MOUNTED                              
mmcblk0p3                              XX                              130  MB                              NOT MOUNTED                              
mmcblk0p4                              XX                              1      KB                              NOT MOUNTED                              
mmcblk0p5                              XX                              12    MB                              NOT MOUNTED                              
mmcblk0p6                              XX                              4      MB                              NOT MOUNTED                              
mmcblk0p7                              XX                              4      MB                              NOT MOUNTED                              
mmcblk0p8                              XX                              3      MB                              NOT MOUNTED                              
mmcblk0p9                              XX                              3      MB                              NOT MOUNTED                              
mmcblk0p10                            XX                              3      MB                              NOT MOUNTED                              
mmcblk0p11                            XX                              4      MB                              NOT MOUNTED                              
mmcblk0p12                            XX                              8      MB                              NOT MOUNTED                              
mmcblk0p13                            XX                              20    MB                              NOT MOUNTED                              
mmcblk0p14                            XX                              4      MB                              NOT MOUNTED                              
mmcblk0p15                            cache                         189  MB                              4.7   MB
mmcblk0p16                            cust                             79   MB                              25    MB
mmcblk0p17                            system                        1009 MB                            779  MB
mmcblk0p18                            data                            1.11  GB                            942  MB
mmcblk0p19                            storage                       1.10  GB                            442  MB
mmcblk1p1                              sdcard                            ~~                                       ~~                                                            
 

idk why 14 partition are unmounted.. may be recovery would be flashed in some... all 1 to 13 partition is equal to 512 MB and

14 = 4 MB may be partition for recovery...

Edited by Arbab Irfan
Link to comment
Share on other sites

Guest hvdh

I have just a thought about Rename "mmcblkl1p1" (sdcard) to "mmcblk0p18" (data) ... I am noob I didn't have answer what to do with original "mmcblk0p18" I mean rename into what..?

 

I just downloaded app from playstore that shows all info "storgae partition"                        

 

idk why 14 partition are unmounted.. may be recovery would be flashed in some... all 1 to 13 partition is equal to 512 MB and

14 = 4 MB may be partition for recovery...

 

mmcblk0... is internal flash, mmcblk1... is external flash (removable SD card).

mmcblk0p1 to p14 are partitions containing boot loader, recovery and internal firmware (for modem, GPU etc) that are not used anymore once the phone has booted.

Link to comment
Share on other sites

Guest Arbab Irfan

mmcblk0... is internal flash, mmcblk1... is external flash (removable SD card).

mmcblk0p1 to p14 are partitions containing boot loader, recovery and internal firmware (for modem, GPU etc) that are not used anymore once the phone has booted.

 

actually I was thinking about the idea if we simply rename "mmcblk1"  to mmcblk0p18 then system recognize SD Card as  "/Data" if that possible.

Link to comment
Share on other sites

Guest Jairus1998

actually I was thinking about the idea if we simply rename "mmcblk1"  to mmcblk0p18 then system recognize SD Card as  "/Data" if that possible.

 

 

 

Don't do that, it can brick your phone.

'/data' is a 83 linux Id system. Your sdcard1 is different type of Id system. If you manage to change it to linux, your sdcard will become useless. Why not you use your /sdcard0 instead.  

Edited by Jairus1998
Link to comment
Share on other sites

  • 1 month later...
Guest ASergey

Please help repartiton G300. Original memory layout:

/dev/block/mmcblk0p12 357 740 393216 83 Linux - System
/dev/block/mmcblk0p13 741 1508 786432 83 Linux - Data
/dev/block/mmcblk0p14 1509 1512 4096 47 Unknown
/dev/block/mmcblk0p15 1513 1520 8192 48 Unknown
/dev/block/mmcblk0p16 1521 1540 20480 60 Unknown
/dev/block/mmcblk0p17 1541 1544 4096 6c Unknown
/dev/block/mmcblk0p18 1545 1624 81920 83 Linux - /cust
/dev/block/mmcblk0p19 1625 3728 2154496 6b Unknown - Internal SD
I want to move space from mmcblk0p19 to mmcblk0p12-mmcblk0p13 and i need this memory layout:
/dev/block/mmcblk0p12 357 940 598016 83 Linux - System
/dev/block/mmcblk0p13 941 3508 2629632 83 Linux - Data
/dev/block/mmcblk0p14 3509 3512 4096 47 Unknown
/dev/block/mmcblk0p15 3513 3520 8192 48 Unknown
/dev/block/mmcblk0p16 3521 3540 20480 60 Unknown
/dev/block/mmcblk0p17 3541 3544 4096 6c Unknown
/dev/block/mmcblk0p18 3545 3624 81920 83 Linux - /cust
/dev/block/mmcblk0p19 3625 3728 106496 6b Unknown - Internal SD
How to move the space without losing contents of partitions 14-17, and that stored in these partitions?
Link to comment
Share on other sites

Guest hvdh

 

Please help repartiton G300. Original memory layout:

/dev/block/mmcblk0p12 357 740 393216 83 Linux - System
/dev/block/mmcblk0p13 741 1508 786432 83 Linux - Data
/dev/block/mmcblk0p14 1509 1512 4096 47 Unknown
/dev/block/mmcblk0p15 1513 1520 8192 48 Unknown
/dev/block/mmcblk0p16 1521 1540 20480 60 Unknown
/dev/block/mmcblk0p17 1541 1544 4096 6c Unknown
/dev/block/mmcblk0p18 1545 1624 81920 83 Linux - /cust
/dev/block/mmcblk0p19 1625 3728 2154496 6b Unknown - Internal SD
I want to move space from mmcblk0p19 to mmcblk0p12-mmcblk0p13 and i need this memory layout:
/dev/block/mmcblk0p12 357 940 598016 83 Linux - System
/dev/block/mmcblk0p13 941 3508 2629632 83 Linux - Data
/dev/block/mmcblk0p14 3509 3512 4096 47 Unknown
/dev/block/mmcblk0p15 3513 3520 8192 48 Unknown
/dev/block/mmcblk0p16 3521 3540 20480 60 Unknown
/dev/block/mmcblk0p17 3541 3544 4096 6c Unknown
/dev/block/mmcblk0p18 3545 3624 81920 83 Linux - /cust
/dev/block/mmcblk0p19 3625 3728 106496 6b Unknown - Internal SD
How to move the space without losing contents of partitions 14-17, and that stored in these partitions?

 

 

p12 and p13 are internal partitions. They are not system & data.

Do not touch any partition before p15, otherwise your phone may be bricked permanently.

Using the first post (full guide) you can resize p15-p19 without losing data, because you first do a backup of each

partition, then resize, then restore all backups.

Link to comment
Share on other sites

Guest ASergey

p12 and p13 are internal partitions. They are not system & data.

It's not my imagination. For the G300 is a reality. Look at the size of partitions

post-1042924-0-13179400-1436462303_thumb

Link to comment
Share on other sites

Guest hvdh

 

It's not my imagination. For the G300 is a reality. Look at the size of partitions

 

 

Oh, I didn't notice you're writing about G300. Well, you can try to repartition, but you may permanently break your phone.

The problem here is that device-internal partitions are in the middle between system+data and intSD.

When system+data grow, the internal partitions p14-p17 need to be shifted, and I cannot guarantee that the phone

still works after doing this. Chances are good, but there's no guarantee.

 

First you should backup p12-p18 contents to SD card.

For p19 I suggest to copy the contents to your PC via USB mount.

Only the ext partitions (type 83) can be resized before making a backup (using dd)

For p14-p17, do directly dd to SD card.

Then delete p19-p12 and recreate p12-p19 with your new sizes.

Restore all backups, then use resize2fs on the ext partitions.

 

Good luck!

Link to comment
Share on other sites

  • 3 weeks later...
Guest ASergey

Please help:

Original memory layout:

/dev/block/mmcblk0p14 1509 1512 4096 47 Unknown
/dev/block/mmcblk0p15 1513 1520 8192 48 Unknown
/dev/block/mmcblk0p16 1521 1540 20480 60 Unknown
/dev/block/mmcblk0p17 1541 1544 4096 6c Unknown
/dev/block/mmcblk0p18 1545 1624 81920 83 Linux - /cust
/dev/block/mmcblk0p19 1625 3728 2154496 6b Unknown - Internal SD

New memory layout:

/dev/block/mmcblk0p14           1509        1512        4096  47 Unknown
/dev/block/mmcblk0p15           1513        1520        8192  48 Unknown
/dev/block/mmcblk0p16           1521        1540       20480  60 Unknown
/dev/block/mmcblk0p17           1541        1544        4096  6c Unknown
/dev/block/mmcblk0p18           1545        1624       81920  83 Linux
/dev/block/mmcblk0p19           1625        3692     2117616  6b Unknown
/dev/block/mmcblk0p20           3693        3696        4080  47 Unknown
/dev/block/mmcblk0p21           3697        3704        8176  83 Linux
/dev/block/mmcblk0p22           3705        3724       20464  83 Linux
/dev/block/mmcblk0p23           3725        3728        4080  83 Linux

Why the count of blocks in 14 / 20, 15 / 21, 16 / 22, 17 / 23 partitions different ??? Partition 20-23 created for backup partitions 14-17

 

Link to comment
Share on other sites

W

hy the count of blocks in 14 / 20, 15 / 21, 16 / 22, 17 / 23 partitions different ??? Partition 20-23 created for backup partitions 14-17

When creating a new partition, instead of entering the end block number, try to enter "+4096K" (or whatever size you need, in KB).

 

Link to comment
Share on other sites

Guest ASergey

When creating a new partition, instead of entering the end block number, try to enter "+4096K" (or whatever size you need, in KB).

 

It did not work

create.jpg

Link to comment
Share on other sites

  • 1 year later...

Reviving a zombie thread, but wanted to report that this guide worked well with my Y300 and showed me how to repartition mmcblk0p18 and mmcblk0p19 to give most of the space to /data for apps (about 1.9GB). I then used the "swap internal and external SD" feature of CyanogenMod to make the external SD the primary storage of photos, music, video, etc. As for the remaining 256MB I left on the "internal SD", I now use that as swap space for the kernel. Made a real difference in keeping this old device alive and usable.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.