[problem] Convert2EXT4 = can't wipe properly - Droid Incredible Q&A, Help & Troubleshooting

Hey Gang,
I have an old Dinc that I am trying to get setup for a friend to use on Cricket or Pageplus. This is not the issue though.
The phone is using:
hboot .92
S-Off
CMW recovery 5.0.2.0
The phone was on Touch of Blue 2.0 and having wifi issues, so i decided to wipe it and install ToB2.2
In looking for new mods for the dinc, I ran across Convert2EXT4
I flashed "Convert2Ext4_no_data_limit_dalvik_moved.v2.0.zip" and proceeded to install ToB.
All seemed fine, but upon initial boot it never gets past the bootanimation.
After 30 minutes of waiting I decided to re-wipe everything manually.
THIS IS WHERE THE PROBLEM CAME IN
I get an error when wiping /data & /cache
I flashed "Convert2Ext4_no_data_limit_dalvik_moved_Revert.v2.0.zip" to try to revert the change. It went fine, but i still get the error when wiping.
I have also tried to fix things using "fix_datadata.v2.0.zip" & "wipe_dalvik.v2.0.zip"
Nothing seems to fix the problem.
Now I can't flash anything.
When I flash a stock ROM via RUU or PB31IMG.zip I get a bootloop.
I believe the phone is not wiping the /data or /cache partitions because it can't find them.
Any help getting the partitions back to stock?

Try a factory reset from hboot? It will wipe emmc as a warning.
Sent from my Galaxy Nexus using Tapatalk 2

tiny4579 said:
Try a factory reset from hboot? It will wipe emmc as a warning.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
tired that and every other form of wiping.
I have deduced that the phone has messed up partitions and needs to be re-setup.
I am currently following this thread ( http://forum.cyanogenmod.org/topic/6433-solved-messed-up-partitions-on-internal-storage/ ) to correct the problem. I'll post my success/failure in a bit :silly:

part of my problem is that i can't unmount /dev/block/mmcblk0 partition 1
The CACHE partition.
when I "print" ,or view, the partitions using "parted" i get this
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7911MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File System Flags
1 8192B 797MB 797MB primary ext4
2 797MB 1007MB 210MB primary ext3
3 1007MB 7944MB 6937MB primary fat32 lba
I wish i had a nandroid backup to revert to.... but i don't
Oh well. This thing might be bricked for now until i figure out how to remove and re-create the internal partitions.

i need some help understanding this 'parted' stuff.
I have tried to re-create the partitions but I get errors that i need to run "e2fsck" to fix them.
I am completely lost and need the help of a pro =)
TINY... where are you when I need you =)

CalvinAMi said:
i need some help understanding this 'parted' stuff.
I have tried to re-create the partitions but I get errors that i need to run "e2fsck" to fix them.
I am completely lost and need the help of a pro =)
TINY... where are you when I need you =)
Click to expand...
Click to collapse
At work. I haven't exactly had the chance to look. I wish I knew the thread where I tried to help before. Perhaps that could come in handy at least as a starting point.
Sent from my Galaxy Nexus using Tapatalk 2

tiny4579 said:
At work. I haven't exactly had the chance to look. I wish I knew the thread where I tried to help before. Perhaps that could come in handy at least as a starting point.
Click to expand...
Click to collapse
No rush!
Let me know what files or screenshots you need to even think about it =)
Who knows.... this could lead to the UlTiMaTE WiPE & FOrMaT script to rule them all :silly: :good:

Ok so just to be clear you were on 2.0, then without wiping you flashed the ext4 dalvik moved mod. Then without wiping you flashed 2.2? After you flashed the ext4 dalvik moved mod, did you reboot before flashing 2.2, or just flash it right after the ext4 mod?
Fyi all versions of tob have the ext4 normal dalvik mod already built in. This may be where the issue came up. That is why i want to know exactly how you flashed the files.

cmlusco said:
Ok so just to be clear you were on 2.0, then without wiping you flashed the ext4 dalvik moved mod. Then without wiping you flashed 2.2? After you flashed the ext4 dalvik moved mod, did you reboot before flashing 2.2, or just flash it right after the ext4 mod?
Fyi all versions of tob have the ext4 normal dalvik mod already built in. This may be where the issue came up. That is why i want to know exactly how you flashed the files.
Click to expand...
Click to collapse
No. Here is what i did.
looked for new version of the ROM and downloaded it.
while it was downloading, I ran across the Convert2EXT4 mod and downloaded all of the files.
moved all my downloaded files to the SD card (ROM & mods)
factory wipe, then wiped system, datadata, data, cache, emmc, sd-ext.
flashed the rom ToB2.2
flashed the ext4 dalvik moved mod.
reboot
*** this is when i noticed something wrong because the phone sat on the splash screen for 30 minutes.
At this point I decided to un-do the mod and move things back to the way they were.
I flashed the mod to revert the change. The flash went fine with no reported errors.
Next, I wanted to start fresh so I format everything again. This is where my problem was evident.
/data & /cache could not be formatted. I rebooted and tried formatting again. No dice.
I moved forward with flashing the ToB2.2 ROM once again. No joy. It still won't boot.
This is where I am now.
I researched online and found "parted" . I believe this may be the solution but for some reason /cache will not unmount so i can format it.
I need a way to completely remove all partitions from the internal memory of the phone and re-create them.
Otherwise, I am semi-bricked
I hope this info clears up any questions :good:

CalvinAMi said:
No. Here is what i did.
looked for new version of the ROM and downloaded it.
while it was downloading, I ran across the Convert2EXT4 mod and downloaded all of the files.
moved all my downloaded files to the SD card (ROM & mods)
factory wipe, then wiped system, datadata, data, cache, emmc, sd-ext.
flashed the rom ToB2.2
flashed the ext4 dalvik moved mod.
reboot
*** this is when i noticed something wrong because the phone sat on the splash screen for 30 minutes.
At this point I decided to un-do the mod and move things back to the way they were.
I flashed the mod to revert the change. The flash went fine with no reported errors.
Next, I wanted to start fresh so I format everything again. This is where my problem was evident.
/data & /cache could not be formatted. I rebooted and tried formatting again. No dice.
I moved forward with flashing the ToB2.2 ROM once again. No joy. It still won't boot.
This is where I am now.
I researched online and found "parted" . I believe this may be the solution but for some reason /cache will not unmount so i can format it.
I need a way to completely remove all partitions from the internal memory of the phone and re-create them.
Otherwise, I am semi-bricked
I hope this info clears up any questions :good:
Click to expand...
Click to collapse
Ok that wasnt the problem then. Im not sure what causes this, but i have seen it several times before on different roms. Its always cache and data that seem to mess up. Any luck with parted? That thread is the only one i see where someone actually got it working right again. My only other sugestion would be to unlock your bootloader with htcdev, and then fastboot flash a misc img from froyo. Then run the froyo ruu thru hboot. I belive this is where the partition info is stored.

CalvinAMi said:
No. Here is what i did.
looked for new version of the ROM and downloaded it.
while it was downloading, I ran across the Convert2EXT4 mod and downloaded all of the files.
moved all my downloaded files to the SD card (ROM & mods)
factory wipe, then wiped system, datadata, data, cache, emmc, sd-ext.
flashed the rom ToB2.2
flashed the ext4 dalvik moved mod.
reboot
*** this is when i noticed something wrong because the phone sat on the splash screen for 30 minutes.
At this point I decided to un-do the mod and move things back to the way they were.
I flashed the mod to revert the change. The flash went fine with no reported errors.
Next, I wanted to start fresh so I format everything again. This is where my problem was evident.
/data & /cache could not be formatted. I rebooted and tried formatting again. No dice.
I moved forward with flashing the ToB2.2 ROM once again. No joy. It still won't boot.
This is where I am now.
I researched online and found "parted" . I believe this may be the solution but for some reason /cache will not unmount so i can format it.
I need a way to completely remove all partitions from the internal memory of the phone and re-create them.
Otherwise, I am semi-bricked
I hope this info clears up any questions :good:
Click to expand...
Click to collapse
Check post #7 on this thread below:
http://forum.cyanogenmod.org/topic/6433-solved-messed-up-partitions-on-internal-storage/
Fortunately, parted is loaded on recoveries now so it doesn't need to be pushed over so run these from adb shell in recovery.
Quoted below:
Now, we need to fix the partitions. This is assuming that the partitions are there, just the wrong format (which is what happened to me .. I accidentally made them FAT32 instead of ext). So, run the following: parted /dev/block/mmcblk0 mkfs ext2. It will ask if you want to continue, hit yes. When it asks for the partition number, enter 1. Next, when it asks for the format, enter ext2. Let it do its thing. Now, once it's done, run parted again. This time, enter partition 2 (everything else is the same).
Click to expand...
Click to collapse
Prior to trying to change anything, what is the output if you run parted /dev/block/mmcblk0 then type print as shown in post #11 from that thread?
Here is mine below:
Code:
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model: MMC HYNIX (sd/mmc)
Disk /dev/block/mmcblk0: 8095MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext3
2 797MB 1007MB 210MB primary ext3
3 1007MB 8095MB 7088MB primary fat32 lba

tiny4579 said:
Check post #7 on this thread below:
http://forum.cyanogenmod.org/topic/6433-solved-messed-up-partitions-on-internal-storage/
Fortunately, parted is loaded on recoveries now so it doesn't need to be pushed over so run these from adb shell in recovery.
Quoted below:
Prior to trying to change anything, what is the output if you run parted /dev/block/mmcblk0 then type print as shown in post #11 from that thread?
Here is mine below:
Code:
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model: MMC HYNIX (sd/mmc)
Disk /dev/block/mmcblk0: 8095MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext3
2 797MB 1007MB 210MB primary ext3
3 1007MB 8095MB 7088MB primary fat32 lba
Click to expand...
Click to collapse
I have been round and round with parted (post#4). It seems my '/cache' partition will not unmount :crying:
I hope we can figure this out :highfive:
Here is my 'print'
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools\DINC>adb devices
List of devices attached
HT132HJ00898 recovery
C:\Program Files (x86)\Android\android-sdk\platform-tools\DINC>adb shell
# parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) [B][COLOR="Blue"]print[/COLOR][/B]
print
print
[B][COLOR="DarkOrange"]Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7944MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext4
2 797MB 1007MB 210MB primary ext3
3 1007MB 7944MB 6937MB primary fat32 lba[/COLOR][/B]
(parted) [B][COLOR="Blue"]mkfs[/COLOR][/B]
mkfs
mkfs
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
Yes/No? [B][COLOR="blue"]y[/COLOR][/B]
y
y
Partition number? [B][COLOR="blue"]1[/COLOR][/B]
1
1
File system type? [ext2]? [B][COLOR="blue"]ext2[/COLOR][/B]
ext2
ext2
[B][COLOR="Red"]Error: File system was not cleanly unmounted! You should run e2fsck. Modifying
an unclean file system could cause severe corruption.[/COLOR][/B]
Ignore/Cancel?[B][COLOR="Blue"] i[/COLOR][/B]
i
i
Error: File system has an incompatible feature enabled. Compatible features are
has_journal, dir_index, filetype, sparse_super and large_file. Use tune2fs or
debugfs to remove features.
You found a bug in GNU Parted! Here's what you have to do:
Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:
Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:
http://ftp.gnu.org/gnu/parted/
Please check this version prior to bug reporting.
If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:
http://www.gnu.org/software/parted
for further information.
Your report should contain the version of this release (1.8.8.1.179-aef3)
along with the error message below, the output of
parted DEVICE unit co print unit s print
and the following history of commands you entered.
Also include any additional information about your setup you
consider important.
Error: SEGV_MAPERR (Address not mapped to object)
Aborted

Preliminary results from using e2fsck
Code:
#[B][COLOR="Blue"]e2fsck[/COLOR][/B]
e2fsck
Usage: e2fsck [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
[-E extended-options] device
Emergency help:
-p Automatic repair (no questions)
-n Make no changes to the filesystem
-y Assume "yes" to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external_journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list
#[B][COLOR="blue"]e2fsck /dev/block/mmcblk0[/COLOR][/B]
e2fsck /dev/block/mmcblk0
e2fsck 1.41.12 (17-May-2010)
e2fsck: Device or resource busy while trying to open /dev/block/mmcblk0
Filesystem mounted or opened exclusively by another program?
#[B][COLOR="blue"]e2fsck -p /dev/block/mmcblk0[/COLOR][/B]
e2fsck -p /dev/block/mmcblk0
e2fsck: Device or resource busy while trying to open /dev/block/mmcblk0
Filesystem mounted or opened exclusively by another program?
#

CalvinAMi said:
Preliminary results from using e2fsck
Code:
#[B][COLOR="Blue"]e2fsck[/COLOR][/B]
e2fsck
Usage: e2fsck [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
[-E extended-options] device
Emergency help:
-p Automatic repair (no questions)
-n Make no changes to the filesystem
-y Assume "yes" to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external_journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list
#[B][COLOR="blue"]e2fsck /dev/block/mmcblk0[/COLOR][/B]
e2fsck /dev/block/mmcblk0
e2fsck 1.41.12 (17-May-2010)
e2fsck: Device or resource busy while trying to open /dev/block/mmcblk0
Filesystem mounted or opened exclusively by another program?
#[B][COLOR="blue"]e2fsck -p /dev/block/mmcblk0[/COLOR][/B]
e2fsck -p /dev/block/mmcblk0
e2fsck: Device or resource busy while trying to open /dev/block/mmcblk0
Filesystem mounted or opened exclusively by another program?
#
Click to expand...
Click to collapse
You can't run a filesystem check on a device level as there's no partition data there. To check /data or /cache you need to run:
e2fsck /dev/block/mmcblk0p1 for /data and
e2fsck /dev/block/mmcblk0p2 for /cache
Try to add -f to the list to force check such as e2fsck -pf /dev/block/mmcblk0p1
Edit:
I don't know if you'll be able to check /cache if it's mounted. What do you get from adb shell in recovery when you type umount /cache or try to unmount it from the recovery options?
Anyways, you should be able to run mkfs even with the partition being dirty.
I just thought of something. What if you type:
parted /dev/block/mmcblk0
then
rm 1 to delete the first partition?
Then rebuild the partition with mkpartfs primary ext2 8192B 797MB
Then exit out of parted with quit.
Then convert to ext3 with mke2fs -j /dev/block/mmcblk0p1
This process will wipe /data.
I tested this with partition 2 with a similar command.
If the phone still bootloops, do the following:
parted /dev/block/mmcblk0
rm 2
mkpartfs primary ext2 797MB 1007MB
mke2fs -j /dev/block/mmcblk0p2
The above steps will wipe /cache.
Hopefully you should be able to mount and unmount /cache after rebooting recovery.

My results
tiny4579 said:
You can't run a filesystem check on a device level as there's no partition data there. To check /data or /cache you need to run:
e2fsck /dev/block/mmcblk0p1 for /data and
e2fsck /dev/block/mmcblk0p2 for /cache
Try to add -f to the list to force check such as e2fsck -pf /dev/block/mmcblk0p1
***
C:\Program Files (x86)\Android\android-sdk\platform-tools\DINC>adb shell
~ # 2fsck -pf /dev/block/mmcblk0p1
e2fsck -pf /dev/block/mmcblk0p1
/dev/block/mmcblk0p1: recovering journal
e2fsck: unable to set superblock flags on /dev/block/mmcblk0p1
~ #
***
Edit:
I don't know if you'll be able to check /cache if it's mounted. What do you get from adb shell in recovery when you type umount /cache or try to unmount it from the recovery options?
***
C:\Program Files (x86)\Android\android-sdk\platform-tools\DINC>adb shell
~ # unmount /cache
unmount /cache
/sbin/sh: unmount: not found
~ #
***
Anyways, you should be able to run mkfs even with the partition being dirty.
I just thought of something. What if you type:
parted /dev/block/mmcblk0
then
rm 1 to delete the first partition?
Then rebuild the partition with mkpartfs primary ext2 8192B 797MB
Then exit out of parted with quit.
Then convert to ext3 with mke2fs -j /dev/block/mmcblk0p1
This process will wipe /data.
I tested this with partition 2 with a similar command.
***
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) rm 1
rm 1
rm 1
(parted) mkpartfs primary ext2 8192B 797MB
mkpartfs primary ext2 8192B 797MB
mkpartfs primary ext2 8192B 797MB
Warning: You requested a partition from 8192B to 797MB.
The closest location we can manage is 7680B to 7680B.
Is this still acceptable to you?
Yes/No? y
y
y
Error: File system too small for ext2.
(parted)
***
If the phone still bootloops, do the following:
parted /dev/block/mmcblk0
rm 2
mkpartfs primary ext2 797MB 1007MB
mke2fs -j /dev/block/mmcblk0p2
The above steps will wipe /cache.
Hopefully you should be able to mount and unmount /cache after rebooting recovery.
Click to expand...
Click to collapse

CalvinAMi said:
My results
Click to expand...
Click to collapse
Do a print from parted and tell me what you get.
Sent from my Galaxy Nexus using Tapatalk 2

Same results :silly:
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools\DINC>adb shell
# parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7944MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext4
2 797MB 1007MB 210MB primary ext3
3 1007MB 7944MB 6937MB primary fat32 lba

Did you try the ruu from cmlusco? Also theres a link someone gave for fixing their partition issues.
Edit: here is a detailed guide and the one I'm talking about. I'm sure you're up to trying anything.
http://blog.swiftpassage.com/2013/02/03/htc-incredible-jelly-bean-nearly-bricked/
Sent from my Galaxy Nexus using Tapatalk 2

tiny4579 said:
Did you try the ruu from cmlusco? Also theres a link someone gave for fixing their partition issues.
Edit: here is a detailed guide and the one I'm talking about. I'm sure you're up to trying anything.
http://blog.swiftpassage.com/2013/02/03/htc-incredible-jelly-bean-nearly-bricked/
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I didn't see any particular RUU posted by Cmlusco. I have run the stock RUU for Froyo & Gingerbread multiple time. No dice.
Also, that blog went through the same stuff i have tired. Result = /cache & /data are still mounted and not available to alter.
I did find an old back (stock+) for this phone. When I try to restore the backup I get:
Code:
Checking MD5 sums...
Erasing boot before restore...
Restoring boot image...
Restoring system...
Restoring data...
Error while formatting /data!
I am at my wits-end with this thing.
Shame the stock RUU can't remove the partitions entirely and recreate them.
Oh well. It might be time to just put this old Dinc on the shelf. :crying:

Did you ever fix this?
I think I am having a very similar problem. I had originally flashed convert2ext4_no_data_limit_normal_dalvik.zip on stock ROM a long time ago.
I have /cache, but no /data. It was the opposite earlier.

Related

Applications to your SD card ?

Hi guys,
sorry because this has probably been answered somewhere but I couldn't find it ....
So here it goes: I just installed Modaco's ROM and it works perfectly. Now I would like my apps to install directly on the SD card.
What I understand is that I need to create a EXT3 partition but I don't know what the hell that means, nor how to do it.
I just put my SD card in the hero, didn't format anything ....
Dould you give a step by step guide ? On how to create that EXT3 partition, how to use A2SD afterwards ? Also, what to do with the currently installed applications ?
Thanks
Geeum
Dould you give a step by step guide ?
Click to expand...
Click to collapse
http://androidandme.com/2009/08/news/how-to-manually-partition-your-sd-card-for-android-apps2sd/
how to use A2SD afterwards?
Click to expand...
Click to collapse
Just use MoDaCo's custom ROMs. (It will do it automatically)
can app2sd work with official ROMs not rooted?
Hi guys I finally partitioned my sdcard to have an ext3 partition.
I thought A2SD was automatic but apparently applications don't go to the sdcard: my phone memory has changed after I installed an app ...
Here is what I get if I type the 'print' command on parted
Code:
(parted) print
print
print
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk0: 8166MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 7110MB 7110MB primary fat32 lba
2 7110MB 8134MB 1024MB primary ext3
3 8134MB 8166MB 32.3MB primary linux-swap(v1)
So I DO have ext3. Then I found this post that explains how to check if A2SD is working:
Thanks! Here is my way to check if a2sd is working:
Check if the ext3 partition exists (please see androidandme.com for details):
Code:
# mount | grep mmcblk0p2
mount | grep mmcblk0p2
/dev/block/mmcblk0p2 on /system/sd type ext3 (rw,noatime,nodiratime,errors=continue,data=ordered)
Compare available/used space on mmcblk0p2:
Code:
adb shell
# df
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98520 0 98520 0% /dev
tmpfs 4096 0 4096 0% /sqlite_stmt_journals
/dev/block/mtdblock3 174080 153460 20620 88% /system
/dev/block/mtdblock5 169728 27240 142488 16% /data
/dev/block/mtdblock4 133120 1160 131960 1% /cache
/dev/block/mmcblk0p2 468331 11767 431579 3% /system/sd
Now install an app from the market (as suggested by fleming222) and again run "df". Compare the available (or used) space on /dev/block/mmcblk0p2 with the first "df".
Click to expand...
Click to collapse
This is what I get (I can see on the first line that my ext3 is not listed ... weird)
Code:
/ # mount | grep mmcblk0p2
mount | grep mmcblk0p2
/ # df
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98508 0 98508 0% /dev
/dev/block/mtdblock4 133120 1496 131624 1% /cache
HELP !
By the way I'm running MODACO's 2.6 custom ROM ...
Geeum said:
By the way I'm running MODACO's 2.6 custom ROM ...
Click to expand...
Click to collapse
The best way to do it if your not too good with the adb commands is to install the AMON recovery image for Hero.
It has all the options to create the correct sd card partitions from the recovery mode, then just install your custom rom and everything should work.
You will need to format your sd card so you may want to create a backup of it. And I would suggest that you wipe the phone clean as well. Once you install the modaco rom it automatically moves all of your apps to the sd card.
The link for the recovery image is here:
http://forum.xda-developers.com/showthread.php?t=561124
You will also need Instant Root (http://neilandtheresa.co.uk/Android/), which you should install first, it is an .apk file so you will need a file manager for your phone. It should pop up with a notification "instant root was successfully" or along those lines. (If you have a problem installing Instant Root make sure Settings>Applications>Unknown Sources is checked)
You should then place the AMON recovery image onto the sdcard making sure it is not put into any folders (root).
Instant root then allows for root access with adb shell using the following 2 commands:
1) adb shell
then
2) su
the icon should change from a $ to #.
Now flash the recovery image with the following command:
flash_image recovery /sdcard/recovery-RA-HERO-v1.2.3.img
That should do it, remove the usb and battery and once you have replaced the battery boot into recovery mode.
I ran the following commands in this order from recvoery mode:
- Wipe data + cache (factory reset)
- Wipe ext partition on SD-card
- Wipe Dalvik-cache on SD-card (NOT on /data !) [email protected] ALWAYS WORK
- Partition SD-card : 500MB Ext2, 32MB Swap, remaining Fat32
- Convert ext2 to ext3
- Installed ROM
Hope this helps
Hi and thanks for your reply. I finally sorted my problem, I was typing the commands from the recovery console, and now my ext3 shows:
Code:
# mount | grep mmcblk0p2
mount | grep mmcblk0p2
/dev/block/mmcblk0p2 on /system/sd type ext3 (rw,noatime,nodiratime,errors=conti
nue,data=ordered)
I checked the space with df, and I can see it changing when installing apps.
However, so does the 'internal memory of the phone' in the settings panel; it keeps getting smaller as I install apps
Why is that ?
really want to do this but i find it all to hard and confusing
Geeum said:
I checked the space with df, and I can see it changing when installing apps.
However, so does the 'internal memory of the phone' in the settings panel; it keeps getting smaller as I install apps
Why is that ?
Click to expand...
Click to collapse
I think this is inevitable as the app uses some part of the phone memory for cache files etc (I am not 100% certain on this, just saw it written in an older post on the same topic).
I do not know if this is a coincidence but for some reason I have tried partitioning manually (the way your doing it) in the past and have recently used the AMON recovery image for partitioning instead. I notice that the recovery image tends to use less of the internal storage for each installed app, I don't know why but you could try it out yourself.
guys, i am using modaco's 2.6 rom. so if i just create partitions this custom rom will automatically install newly installed apps to the sd card. right?
but what if i already got many apps installed? will those be deleted while creating partitions?
is there any way so that i can backup the whole application folder and restore after creating partitions?
cheers
apparently if you do ext2 + swap + fat32, you can't do a Nandroid backup (it keeps giving errors). anyone got similar issues?
kazuni said:
apparently if you do ext2 + swap + fat32, you can't do a Nandroid backup (it keeps giving errors). anyone got similar issues?
Click to expand...
Click to collapse
is it so? if so then that wud be a disaster.

[How-to] How I expanded my app storage (repartitioning)

I took some time today to play with the partition layout on my Kindle Fire and I decided I wanted to share my method in case anyone else found it interesting. The reason I did this is because I know that I'm not going to be putting much of anything onto the KF's /sdcard directory. Instead of having 1 GB for data/apps (and books?) and 5 GB for media, I wanted to more-or-less reverse those numbers. What I settled on was 4.5 GB for data/apps and about 1.7 GB of "external" storage. In other words, I can install 4 times as many apps as I could have on a stock layout, but can only store about 1/3 as much music/pictures/etc.
BIG HONKING DISCLAIMER: I have ONLY tested this on my own personal Kindle Fire. There is some very real potential that you could render your system unbootable if you're not careful, so if you want to try this or something similar, please BE CAREFUL, and please don't try to hold me responsible if something gets messed up. You've been fairly warned! You also stand the chance of losing your data partition by doing this. If you have anything you don't want to lose, please make a backup of some sort. That being said, as long as you're careful when doing this it should be fairly safe and you shouldn't lose your data, either.
1. Preparation
1.1 Installing a custom bootloader (FIREFIREFIRE)
Strictly speaking, this is somewhat "optional", but it makes things a whole lot easier. I strongly suggest that you head on over to pokey9000's thread and install his custom bootloader. Not only will this get you into recovery much more easily, but it will give you access to fastboot on every boot up (which will be very helpful if something goes wrong). I won't repeat the installation instructions here, just head over there and follow the instructions!
1.2 Installing a custom recovery (ClockworkMod)
The second thing you'll need is ClockworkMod recovery. Again, the heavy lifting is mostly done, and you can jump over to JackpotCalvin's installation and info thread to get it. Don't worry about the fact that you can't navigate the recovery menu - we won't be using that. The only purpose of the recovery is that it gives us an environment to safely work in with the /data and /cache partitions unmounted (i.e. not being used).
1.3 Root your Kindle Fire
You could do most of this (maybe all of the partitioning, in fact) without rooting, but at best you would lose everything on your /data partition. I'm not even positive if you could do the partitioning without root since...well, I was already rooted when I tried this. In any case, head over to this thread, get SuperOneClick, and root your KF. You'll be voiding your warranty by doing the rest of this anyway
1.4 ADB connection
Make sure you have ADB set up on your computer. You can follow the rooting guide to get this working. You can't do anything else in this post without working ADB.
1.5 (Optional) The parted and e2fsprogs binaries
This is somewhat optional since CWM has the utilities you need already, but it's not a bad idea to have a backup copy of the parted utility and the various e2fsprogs binaries (e2fsck, tune2fs, etc). You can grab this zip file and set it aside somewhere in case you need it. Here is the documentation for parted (applies to both the CWM binaries and the standalone ones).
2. Repartitioning your device
2.1 Backup your data
I cannot stress this enough: backup anything you don't want to lose. And don't just back it up to the external storage, either - move it to your computer or dropbox or something. I also highly recommend following the instructions in the FIREFIREFIRE thread to pull images of your various partitions in their current layout, in case you need to restore through fastboot (or you need them later down the line). Backing up your external data is as simple as copying it to your computer. To backup your /data partition, you can do the following:
Code:
C:\> adb shell
$ su
# cd /data
# tar -cvpzf /sdcard/data.tar.gz .
Note the "." at the end of the last line (in *nix this means "the current directory"). This will create an archive on your external storage named data.tar.gz. You should copy this to your computer for now, to make sure nothing happens to it. This could take a few minutes depending on how much stuff you already have on your /data partition, of course (mine was ~500 MB compressed).
Once you've backed up everything you want, reboot your Kindle by turning off and back on again. You should land at the FIREFIREFIRE bootloader (a yellow triangle with a flame in it). When you see the bootloader come up, press the power button (I had to hold it for a few seconds) to boot into ClockworkMod.
3. Repartitioning
3.1 External storage (/sdcard)
Time for the fun part
Use adb to shell into your device, and then run 'mount' with no parameters to see what's already mounted. You should see /cache has been mounted, and since we'll be moving it later we'll go ahead and unmount it now:
Code:
C:\> adb shell
~ # umount /cache
At this point, your /cache, /data and /sdcard partitions should all be unmounted. Now you need to start up the parted partition manager, which should be included with CWM (it's in /sbin). Fire it up and check your current partition layout by doing the following. Note that
Code:
(parted)
is the prompt that parted gives you after you start it up.
Code:
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
5 212MB 229MB 16.8MB recovery
6 229MB 296MB 67.1MB ext4 backup
7 296MB 307MB 10.5MB boot
8 307MB 312MB 5243kB ext4 splash
9 312MB 849MB 537MB ext4 system
10 849MB 2041MB 1192MB ext4 userdata
11 2041MB 2309MB 268MB ext4 cache
12 2309MB 7690MB 5381MB fat32 media msftres
(parted)
I highly recommend that you store this in a text file somewhere. I saved a copy to my Dropbox to make sure I don't lose it. The reason I say this is because I don't know how a custom partition layout will affect things like OTA updates. If you ever want to go back to the default layout, you'll need these numbers handy.
Now you can go ahead and resize your external partition, which is block 12 ("media"). Make sure you don't try to make it smaller than its contents, or else it will probably error out. For example, if you have 2 GB of music on your /sdcard storage, you won't want to shrink it to 1 GB. What you want to do to shrink the partition is increase the start value. If you were looking at this graphically, it would be equivalent to moving the start of the partition to the right. So, for example, I moved the start of my external partition from the default 2309 to 5809 (5809 - 2309 = 3500, so I made it 3.5 GB smaller). You can choose whatever size you want, and then set it like this:
Code:
(parted) resize 12 5809 7690
This says "resize partition 12 so that it starts at 5809 and ends at 7690 (same as the current end point, which is the end of the disk). As long as you don't see any errors, this should not affect your sdcard's data. I did not lose any of my data by doing this. If you want, you can reboot now to test and make sure everything is in good shape, but it's not required.
3.2 The /cache partition
Since data is partition 10, cache is 11, and media is 12, we now have a gap between the end of cache and the beginning of media. In order to expand the data partition to fill that gap, we need to move the cache partition so that it is next to media again. Unfortunately, parted doesn't support moving an ext4 partition, so we have to make some magic happen first. Basically, we're going to erase the current cache partition, create a new one that is ext2 in the proper spot, and then "upgrade" it to an ext4 partition.
To erase the cache partition (which will erase /cache's data - no big deal), do the following in parted:
Code:
(parted) rm 11
(parted) mkpartfs primary ext2 <begin> <end>
(parted) name 11 cache
To figure out the "begin" value, take the beginning value you used for your external partition and subtract 268. This will be the beginning of the cache partition (assuming you want it to stay the same size as before - this is what I recommend). For the "end" value, use the same number that you entered for the beginning of your media partition. Using my example, 5809 - 268 = 5541, so I used 5541 for the beginning and 5809 for the end. If you enter the "print" command again, you should now see that your cache partition has effectively been moved so that it's right next to your media partition again. Now we need to exit parted to "upgrade" the partition to ext4 by enabling some filesystem features and letting e2fsck run a check on the filesystem. It may say that it's fixing some group descriptor checksums - don't worry, this is normal.
Code:
(parted) quit
~ # tune2fs -j /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
If e2fsck complains that it needs to be run manually, you should omit the -p flag. This happened to me the second time I ran through this process, but the first time it did not. I'm not entirely sure why. In that case, the e2fsck commands simply become:
Code:
~ # e2fsck -fD /dev/block/mmcblk0p11
Which will cause it to ask if you want to fix the group descriptors. Just answer 'Y' and let it run through.
3.3. The userdata partition (/data)
The last thing we need to do is expand the userdata partition to use up the space we freed up by shrinking media. Once again, since we can't resize an ext4 partition directly, we're going to have to delete it, re-create it as an ext2 partition, and then "upgrade" it.
STOP. DO NOT PASS GO. DO NOT COLLECT $200
This will wipe your /data partition. Double check to make sure you have a copy of your backed up data, because it's going to be gone after this.
Code:
~ # parted /dev/block/mmcblk0
(parted) rm 10
(parted) mkpartfs primary ext2 849 <end>
(parted) name 10 userdata
Here the value of <end> should simply be the same as the beginning of your cache partition (in my case this was 5541). This creates the new partition between system and cache, and it takes up all of the available space. Next we need to enable the ext4 features, so we'll do the same thing we did with cache:
Code:
(parted) quit
~ # tune2fs -j /dev/block/mmcblk0p10
~ # e2fsck -fDp /dev/block/mmcblk0p10
~ # tune2fs extents,uninit_bg,dir_index /dev/block/mmcblk0p10
~ # e2fsck -fDp /dev/block/mmcblk0p10
At this point you can fire up parted again and use print to see your shiny new partition layout:
Code:
# parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
5 212MB 229MB 16.8MB recovery
6 229MB 296MB 67.1MB ext4 backup
7 296MB 307MB 10.5MB boot
8 307MB 312MB 5243kB ext4 splash
9 312MB 849MB 537MB ext4 system
10 849MB 5541MB 4692MB ext4 userdata
11 5541MB 5809MB 268MB ext4 cache
12 5809MB 7690MB 1881MB fat32 media msftres
As you can see, the userdata partition is now 4692 MB You'll also notice that Titanium Backup will report the new size, so you can keep track of how much space you've used up.
4. Restoring your data from the archive
Don't reboot your Kindle Fire yet! Remember the data we backed up earlier into the data.tar.gz archive? Now we need to restore it to your nice new data partition. First mount your /data partition so you can get at it from the recovery shell:
Code:
~ # mount /dev/block/mmcblk0p10 /data
Now push your backup to your phone. From a command shell on our computer, just use adb push to move it over:
Code:
C:\> adb push /path/to/data.tar.gz /data
Now you can go back to your adb shell and extract everything you backed up earlier. Once it finishes extracting you can go ahead and remove the backup from your /data partition and reboot:
Code:
~ # cd /data
/data # tar -xvpzf data.tar.gz
/data # rm data.tar.gz
/data # reboot
And that's it! Now you should have a larger /data partition, and you can go on an app installation spree.
5. Credits/Thanks/Etc
Just want to give a quick thanks to JackpotCalvin and pokey9000 for CWM and the custom bootloader, since I obviously needed those to make this happen. Also thanks to all the other devs working on the KF for all the great work so far!
If something doesn't work, feel free to drop a reply here. I'll see what I can do to help, but bear in mind that this is intended to be for power users or extreme tweakers. I'd definitely be interested in hearing some success stories if anybody else decides to give this a try.
I also want to add a shoutout/plug for the Android Enthusiasts website, hosted by StackExchange. It's a Q&A site dedicated to power users of Android devices. Stop by if you have a question, I'm always hanging around!
Very impressive tuto! I haven't tried it because I haven't run out of space yet but sounds great and I'm glad to know that it is here when I need it. Thanks!
Sent from my Kindle Fire using Tapatalk
SikYou said:
Very impressive tuto! I haven't tried it because I haven't run out of space yet but sounds great and I'm glad to know that it is here when I need it. Thanks!
Sent from my Kindle Fire using Tapatalk
Click to expand...
Click to collapse
Thanks! I got motivated to play around with it today when I realized I'd already eaten through 500 MB of my internal storage. All those "wifi only" game downloads really add up...
Also, here's a screenshot of Ti after I repartitioned. Note that my internal storage is at 3.73GB out of 4.61GB at the bottom
Sweet! Made me double check my space and yeah.... Those games do eat up a lot of space
I don't know if I'll ever change the partitions layout, but this guide is absolutely impressive.
WOW!!! Great!
I was thinking of what would it take to go the other way, actually. I mean,
1) I don't care about any future OTA updates from Amazon, so I definitely don't need a 500+ Mb /system partition.
2)/512 Mb will be more than enough for me on /data - anything I can't fit in that, I'll be able to just move to the /media partition.
3) Since I won't be flashing any OTA updates, I don't need this huge /cache partition either - I have 2Mb on my phone, but I think there's a script in the ROM that actively avoids using the cache partition for anything really.
4) What is /dfs and why do we need 200 Mb there...
This all adds up to nearly 2GB more space I can definitely use in the /media partition....
Do you guys think this could work? I.e - apply the same approach to /system - back up/shrink/restore?
renegade027 said:
WOW!!! Great!
I was thinking of what would it take to go the other way, actually. I mean,
1) I don't care about any future OTA updates from Amazon, so I definitely don't need a 500+ Mb /system partition.
2)/512 Mb will be more than enough for me on /data - anything I can't fit in that, I'll be able to just move to the /media partition.
3) Since I won't be flashing any OTA updates, I don't need this huge /cache partition either - I have 2Mb on my phone, but I think there's a script in the ROM that actively avoids using the cache partition for anything really.
4) What is /dfs and why do we need 200 Mb there...
This all adds up to nearly 2GB more space I can definitely use in the /media partition....
Do you guys think this could work? I.e - apply the same approach to /system - back up/shrink/restore?
Click to expand...
Click to collapse
I would think you could do this as long as you make sure you get a good backup of /system and it restores properly, but I've never tried. You'd just need to be a little careful since you would have to erase and repartition it since parted doesn't understand ext4, although as long as you can get into recovery and fastboot you could partition back to normal and flash a stock system image if something went wrong (at least you should be able to). I'm probably not going to try that since I'm fine with this layout and I've only got my personal KF, but it doesn't sound unreasonable.
I'm not sure what /dfs, /dkernel or /backup are, either. I thought I saw a thread somewhere that had some talk about them, but I don't remember where it was. /dkernel is actually the same size as the /boot partition - which made me suspicious - but I can't unpack the image with my usual unpack/repack scripts so I'm not sure what it really is and I don't want to mess with it
Assuming you do everything right, how long would you expect this process to take?
WOW, that's a lot of work for just a little bit more space! Good write up though, thanks!
rmagruder said:
Assuming you do everything right, how long would you expect this process to take?
Click to expand...
Click to collapse
I'd wager you could probably knock this out in about 20-30 minutes, depending on how much stuff is on your /data partition.
The longest part, by far, was archiving and unarchiving /data. All of the partitioning commands together would only take, like, 10 minutes or so (they execute very fast). Archiving the /data partition alone took about 4 or 5 minutes for me and my archive was ~500 MB. Unzipping the archive later was another 3-5 minutes.
Altogether it probably took me about 45 minutes of actual time since I was playing with numbers and writing stuff down periodically.
I know it looks like it would take a lot longer, but I just have a tendency to write very, uh, "thorough" documentation. It's mostly out of habit (I'm a software developer).
Right there with you.
I'm not feeling brave enough to do this right now because I'm not sure I would get EVERYTHING backed up and sorted properly...but as I've now run out of app install space several times, my tolerance for it is steadily decreasing!
Randy
Good Friggin Stuff
eldarerathis,
This guide was excellent and worked fantabulously for me. Thanks for an excellent walk-thru.
One Caveat. In this section:-
eldarerathis said:
3.3. The userdata partition (/data)
...
Code:
~ # parted
...
Click to expand...
Click to collapse
The executed parted command in should read:-
Code:
~ # parted /dev/block/mmcblk0
...
Also, in setting up the /cache partition, after initiating this command:-
Code:
tune2fs -j /dev/block/mmcblk0p11
Thanks for pointing out the potential for the need to fix 'group descriptor checksums'. Though, in order to ensure the filesystem was marked clean, I had to initiate an extra step of running f2sck manually:-
Code:
~ # e2fsck -fD /dev/block/mmcblk0p11
(note the lack of the -p switch)
Again: Good work putting this together for the KF community. I, for one, had the immediate consideration of a small /media partition (and an inflated apps area) as this is mostly for books / apps / games for the kids whom would not use this for locally stored content and would stream any media they desired.
One question: can any of this be scripted in any way?
Cheers.
I'd love to see a script or something for this....
airmaxx23 said:
I'd love to see a script or something for this....
Click to expand...
Click to collapse
Ya, I agree - terrified to do this myself but happy to run a script by someone who's had it tested by others.
drExel said:
eldarerathis,
This guide was excellent and worked fantabulously for me. Thanks for an excellent walk-thru.
One Caveat. In this section:-
The executed parted command in should read:-
Code:
~ # parted /dev/block/mmcblk0
...
Also, in setting up the /cache partition, after initiating this command:-
Code:
tune2fs -j /dev/block/mmcblk0p11
Thanks for pointing out the potential for the need to fix 'group descriptor checksums'. Though, in order to ensure the filesystem was marked clean, I had to initiate an extra step of running f2sck manually:-
Code:
~ # e2fsck -fD /dev/block/mmcblk0p11
(note the lack of the -p switch)
Again: Good work putting this together for the KF community. I, for one, had the immediate consideration of a small /media partition (and an inflated apps area) as this is mostly for books / apps / games for the kids whom would not use this for locally stored content and would stream any media they desired.
One question: can any of this be scripted in any way?
Cheers.
Click to expand...
Click to collapse
Oops, you're right. I *always* forget the device parameter when I use parted (even when I'm actually running it; I do it the first time without a param constantly and parted yells at me), so I'm not surprised I missed one of them. Thanks, I'll fix that.
Per your second comment: I actually did this a second time because I changed my mind and decided to go with 3.5 GB /data and 2.5 GB /media, and I also had to run e2fsck manually. The first time I did this I didn't need to, and I'm not entirely sure why that is. Thanks for reminding me to add that note, though.
If I have some time I could try to put together a script for this. I was thinking about doing that since you should be able to do all of the parted stuff with command line parameters, but I haven't had time between work and the holidays. I might try to take a look at it again this weekend if I have a chance.
eldarerathis said:
Oops, you're right. I *always* forget the device parameter when I use parted (even when I'm actually running it; I do it the first time without a param constantly and parted yells at me), so I'm not surprised I missed one of them. Thanks, I'll fix that.
Per your second comment: I actually did this a second time because I changed my mind and decided to go with 3.5 GB /data and 2.5 GB /media, and I also had to run e2fsck manually. The first time I did this I didn't need to, and I'm not entirely sure why that is. Thanks for reminding me to add that note, though.
If I have some time I could try to put together a script for this. I was thinking about doing that since you should be able to do all of the parted stuff with command line parameters, but I haven't had time between work and the holidays. I might try to take a look at it again this weekend if I have a chance.
Click to expand...
Click to collapse
I'd make a donation to you if you get this done in a script.
Awesome space Space flip. Lov It.
eldarerathis said:
Per your second comment: I actually did this a second time because I changed my mind and decided to go with 3.5 GB /data and 2.5 GB /media, and I also had to run e2fsck manually.
Click to expand...
Click to collapse
Having done this with your original method, I totally understand why you might have had to revisit and partition as you did the second go-around. It seems most game downloads cache the initial files on the media partition before actually 'installing' the data to the SYSTEM partition. As a result, in no time at all (especially with Gameloft titles) you begin to receive 'LOW SPACE' warnings when downloading some of the extremely large game-data (ie. Dungeon Hunter 2 requires 900+ megs free available) so there is potential for required manual clean-up to see things through.
Does this work with TWRP installed? I actually want to increase my media storage, as I use my Kindle Fire mainly for reading things online and watching movies/anime (not porn you nasty people). I'm not so sure I would want to install ClockworkMod if I have TWRP already on here.
Hydrocharged said:
Does this work with TWRP installed? I actually want to increase my media storage, as I use my Kindle Fire mainly for reading things online and watching movies/anime (not porn you nasty people). I'm not so sure I would want to install ClockworkMod if I have TWRP already on here.
Click to expand...
Click to collapse
Yes, this should work fine. TWRP 2.0 has the utilities you need, to my knowledge.

[Q] Error formatting /data! Error formatting /cache!

Using CWM 5.0.2.0, when I try to format /data, I get:
Error formatting /data!
When I try to format /cache, I get:
Error formatting /cache!
This all started because I decided to try Albinoman's AOSP 4.2 ROM. This is what happened:
1. Booted into CWM 5.0.2.0, made a nandroid backup of stock GB ROM.
2. Installed Albinoman's ROM using CWM, wiped /cache and /data.
3. Booted Albinoman's ROM, no problems. Decided I wanted to backup and restore some apps in the old ROM using Titanium Backup.
4. Restored nandroid backup of stock ROM. When it rebooted, all was well.
5. Used Titanium Backup to back up my apps.
6. Installed Albinoman's ROM again.
7. Cleared /data, it was fine. Cleared /cache. Stuck at "formatting" for half an hour.
8. Rebooted back to recovery and tried it again. Couldn't find E:.
9. Tried letting it boot. Stuck on the boot animation for 30-minutes.
10. Wipe everything and re-flash. Tried again. Still stuck on boot animation.
11. Manually unmount and tried to format /data and /cache, and I get the error messages.
I had installed Convert2Ext4_no_data_limit_normal_dalvik.zip to the stock ROM about 4-months ago, not sure if that makes a difference or not.
When I search, it looks like the news is bad... most people that had this error gave up and believed it to be hardware NAND failure. Anything I can do to confirm or rule out NAND failure?
UPDATE: Managed to flash RUU, but results were interesting. It worked and it boots, home screen is blank (no HTC widgets), and apps I'd installed are still there. Clear Storage and Factory Reset does not get rid of them! I can manually uninstall apps, but when I reboot, they come back. I guess the /data must be stuck in some kind of read-only state.
GnatGoSplat said:
Using CWM 5.0.2.0, when I try to format /data, I get:
Error formatting /data!
When I try to format /cache, I get:
Error formatting /cache!
This all started because I decided to try Albinoman's AOSP 4.2 ROM. This is what happened:
1. Booted into CWM 5.0.2.0, made a nandroid backup of stock GB ROM.
2. Installed Albinoman's ROM using CWM, wiped /cache and /data.
3. Booted Albinoman's ROM, no problems. Decided I wanted to backup and restore some apps in the old ROM using Titanium Backup.
4. Restored nandroid backup of stock ROM. When it rebooted, all was well.
5. Used Titanium Backup to back up my apps.
6. Installed Albinoman's ROM again.
7. Cleared /data, it was fine. Cleared /cache. Stuck at "formatting" for half an hour.
8. Rebooted back to recovery and tried it again. Couldn't find E:.
9. Tried letting it boot. Stuck on the boot animation for 30-minutes.
10. Wipe everything and re-flash. Tried again. Still stuck on boot animation.
11. Manually unmount and tried to format /data and /cache, and I get the error messages.
I had installed Convert2Ext4_no_data_limit_normal_dalvik.zip to the stock ROM about 4-months ago, not sure if that makes a difference or not.
When I search, it looks like the news is bad... most people that had this error gave up and believed it to be hardware NAND failure. Anything I can do to confirm or rule out NAND failure?
UPDATE: Managed to flash RUU, but results were interesting. It worked and it boots, home screen is blank (no HTC widgets), and apps I'd installed are still there. Clear Storage and Factory Reset does not get rid of them! I can manually uninstall apps, but when I reboot, they come back. I guess the /data must be stuck in some kind of read-only state.
Click to expand...
Click to collapse
Did you reflash the Convert2Ext4 mod after you flashed the new rom? See this thread and read the top part after 'IMPORTANT:' There is a link in there to the old thread as well with a lot of info.
I did try that, but my /data and /cache are still unable to be written to, wiped, or formatted.
e2fsck won't touch /data, it has a superblock error. It finds errors on /cache and appears to be fixing them, but when I re-run it, the same errors are still there.
GnatGoSplat said:
I did try that, but my /data and /cache are still unable to be written to, wiped, or formatted.
e2fsck won't touch /data, it has a superblock error. It finds errors on /cache and appears to be fixing them, but when I re-run it, the same errors are still there.
Click to expand...
Click to collapse
Since you flashed the RUU, did you install an EXT4 compatible kernel or are you using the stock kernel? Maybe try restoring your working nandroid backup, then run the .zip to revert Convert2Ext4. Or even better, if you have a nandroid from before you installed the EXT4 mod.
DaggerDave said:
Since you flashed the RUU, did you install an EXT4 compatible kernel or are you using the stock kernel? Maybe try restoring your working nandroid backup, then run the .zip to revert Convert2Ext4. Or even better, if you have a nandroid from before you installed the EXT4 mod.
Click to expand...
Click to collapse
Wiping /data and /cache are enough to revert the mod.
Sent from my Galaxy Nexus using Tapatalk 2
Uggh, definitely doesn't sound so good. Since the RUU won't work, I'd say check out this thread:
http://forum.xda-developers.com/showthread.php?t=2123966
Yep, my partitions are no longer EXT4. #1 is EXT3 and #2 is EXT2. I guess that means Convert2Ext4 is no longer in play and the problem is unrelated.
Here is my parted:
Code:
parted /dev/block/mmcblk0 print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7944MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext3
2 797MB 1007MB 210MB primary ext2
3 1007MB 7944MB 6937MB primary fat32 lba
Yeah, I read that thread and it didn't sound encouraging! I get pretty much the same errors.
Even rm 1 and rm 2 don't remove the partitions. It's like they're read-only. I'm using the parted from CWM 5.0.2.0. Should I use a different one?
Also when I try e2fsck on it:
Code:
~ # e2fsck -pf /dev/block/mmcblk0p1
e2fsck -pf /dev/block/mmcblk0p1
/dev/block/mmcblk0p1: recovering journal
e2fsck: unable to set superblock flags on /dev/block/mmcblk0p1
~ # e2fsck -pf /dev/block/mmcblk0p2
e2fsck -pf /dev/block/mmcblk0p2
/dev/block/mmcblk0p2: Unconnected directory inode 34817 (/???)
/dev/block/mmcblk0p2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
~ # e2fsck -f /dev/block/mmcblk0p2
e2fsck -f /dev/block/mmcblk0p2
e2fsck 1.41.6 (30-May-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Unconnected directory inode 34817 (/???)
Connect to /lost+found<y>? y
yes
Pass 4: Checking reference counts
Inode 2 ref count is 2, should be 3. Fix<y>? yes
Inode 34817 ref count is 3, should be 2. Fix<y>? y
yes
Pass 5: Checking group summary information
Block bitmap differences: +274 +(449--510) +(645--701) -(139524--139541) -(139
85--139800)
Fix<y>? yes
Free blocks count wrong for group #0 (7919, counted=7799).
Fix<y>? y
yes
Free blocks count wrong for group #17 (7934, counted=7929).
Fix<y>? yes
Free blocks count wrong (198324, counted=198199).
Fix<y>? y
yes
Free inodes count wrong for group #17 (2048, counted=2045).
Fix<y>? yes
Directories count wrong for group #17 (0, counted=1).
Fix<y>? y
yes
Free inodes count wrong (51189, counted=51186).
Fix<y>? yes
/dev/block/mmcblk0p2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p2: 14/51200 files (14.3% non-contiguous), 6601/204800 blocks
When I tried it without the -p is when it looks above like it's fixing something, but it really didn't fix anything because it does the same thing when I try e2fsck again (as if it's read-only).
Is MMCBLK0 one physical NAND chip? If so, how come I can read/write/erase the /emmc with no problems? Isn't that just another partition on the same NAND disk?
If /data and /cache are really bad, is there any possible way to do an equivalent of a low-level format on the NAND and repartition?
Is booting CWM 5.0.2.0 and using adb shell supposed to have root privileges?
I can't modify the partition table using either parted or fdisk. I even tried zeroing the partitions using dd if=/dev/zero of=/dev/block/mmcblk0p1, p2, and even the whole of mmcblk0, but nothing actually gets written.
Since it seems like the NAND is probably irreparably borked, can I approach this problem from a different angle?
Can I partition my sdcard with an ext3 and ext2 partition, and tell Android to use those as /data and /cache respectively?
What in Android maps /dev/block/mmcblk0p1 to /data and /dev/block/mmcblk0p2 to /cache, and can I change those to point to partitions on sdcard?
Or is that hard-coded into the kernel?
GnatGoSplat said:
Since it seems like the NAND is probably irreparably borked, can I approach this problem from a different angle?
Can I partition my sdcard with an ext3 and ext2 partition, and tell Android to use those as /data and /cache respectively?
What in Android maps /dev/block/mmcblk0p1 to /data and /dev/block/mmcblk0p2 to /cache, and can I change those to point to partitions on sdcard?
Or is that hard-coded into the kernel?
Click to expand...
Click to collapse
It is hard coded into the kernel. To get root in adbshell try typimg su. This seems to be happening to more and more people as these phones get up there in age.
GnatGoSplat said:
Since it seems like the NAND is probably irreparably borked, can I approach this problem from a different angle?
Can I partition my sdcard with an ext3 and ext2 partition, and tell Android to use those as /data and /cache respectively?
What in Android maps /dev/block/mmcblk0p1 to /data and /dev/block/mmcblk0p2 to /cache, and can I change those to point to partitions on sdcard?
Or is that hard-coded into the kernel?
Click to expand...
Click to collapse
The answer is yes to both actually. Thrle boot.img would need to be customized. The best way is a flashable zip in recovery. Data and cache would need to be wiped manually ad recovery will not pick this up. Expect poorer performance though as SD cards tend to be slower than built in storage.
Sent from my Galaxy Nexus using Tapatalk 2
Thanks! So it sounds like the way to make this work is to compile a custom kernel? I don't know the first thing about it, but I think I could learn.
This is only in the kernel, so I could flash any 3rd party D-Inc ROM and just flash my customized kernel and it will see /data and /cache on the sdcard?
I could probably get one of those fast Class 10 cards if it turns out this is too slow, but I do recall changing vold.fstab once to fool Android into seeing /emmc as /sdcard and the /emmc (as /sdcard) didn't benchmark all that much faster than a real sdcard. I'm assuming /data and /cache are the same speed as /emmc since they're on the same mmcblk0 device, so I'm thinking maybe sdcard performance would be acceptable.
This actually sounds like it could be a better long-term solution than replacing the motherboard because no telling if a new motherboard will fail soon too.
The motherboard should be reliable. Emmc may die. Especially considering how old current dincs are.
I was talking about the boot.img which is not ROM independent and kernels aren't always either. Best idea is a flashable zip to modify the ram disk but I need the partition names if you decide to do it. I recommend keeping cache and data in the same order.
Also there would need to be a flashable wipe script to wipe data and cache.
Sent from my Galaxy Nexus using Tapatalk 2
Sorry, I wasn't very clear. By motherboard failing, I was assuming NAND is soldered to the motherboard, and if that's the case, ruined NAND = ruined motherboard. I had thought maybe I could buy a DInc with smashed LCD and good motherboard and just swap into mine (because mine is MINT condition), but I thought if I do that, I could very well end up in the same place as I'm in now and using sdcard would be more of a guarantee I wouldn't have to worry about this again.
I think I understand, the boot.img and kernel aren't exactly the same thing, but the kernel is part of boot.img? Or is it only the RAMDisk that needs changed, or both? You mentioned partition names, are you offering to make these modifications for me?
By same order, do you mean because mmcblk0p1 is /data, mmcblk0p2 is /cache, and mmcblkp3 is /emmc, I should partition my sdcard the same way with data 1st, cache 2nd, and sdcard 3rd?
Should I partition it with the phone, PC, or does it matter? Should the sizes of the new /data and /cache be the same size as original, or is there any reason I should make them larger?
Could I wipe the new /data and /cache simply by booting into Recovery and using adb shell and format them?
Also, the commands I was issuing in adb shell were from booting into CWM Recovery. Is it possible that mode can't write because I didn't login as root using the su command? I hadn't thought that would be the problem seeing as how the RUU and Android itself can't write to /data and /cache and other people managed to fix partition problems without needing to run su.
GnatGoSplat said:
Sorry, I wasn't very clear. By motherboard failing, I was assuming NAND is soldered to the motherboard, and if that's the case, ruined NAND = ruined motherboard. I had thought maybe I could buy a DInc with smashed LCD and good motherboard and just swap into mine (because mine is MINT condition), but I thought if I do that, I could very well end up in the same place as I'm in now and using sdcard would be more of a guarantee I wouldn't have to worry about this again.
I think I understand, the boot.img and kernel aren't exactly the same thing, but the kernel is part of boot.img? Or is it only the RAMDisk that needs changed, or both? You mentioned partition names, are you offering to make these modifications for me?
By same order, do you mean because mmcblk0p1 is /data, mmcblk0p2 is /cache, and mmcblkp3 is /emmc, I should partition my sdcard the same way with data 1st, cache 2nd, and sdcard 3rd?
Should I partition it with the phone, PC, or does it matter? Should the sizes of the new /data and /cache be the same size as original, or is there any reason I should make them larger?
Could I wipe the new /data and /cache simply by booting into Recovery and using adb shell and format them?
Also, the commands I was issuing in adb shell were from booting into CWM Recovery. Is it possible that mode can't write because I didn't login as root using the su command? I hadn't thought that would be the problem seeing as how the RUU and Android itself can't write to /data and /cache and other people managed to fix partition problems without needing to run su.
Click to expand...
Click to collapse
The NAND is likely soldered to the motherboard, so you're right about that.
To answer your first question, yeah, the kernel is part of the boot.img. The other part is the RAMdisk which is the only thing that needs to be changed.
Partition it in the same order. Probably parted via adb shell. 100MB for cache and at least 750MB for data. Sizes don't matter too much but you want enough.
adb shell has root access automatically in recovery. The issue is hardware most likely so your proposed workaround may be the only option.
First plan of attack is to find the partition names which would be mmcblk1p1 and mmcblk1p1 if you partition the sdcard the same way as the ROM is partitioned. Ideally you need to be able to fix the partitions themselves. I'll try to give more info later.
I copied the partition sizes from mmcblk0, so here's what I have on my 16GB SD card:
Code:
Model: SD SA16G (sd/mmc)
Disk /dev/block/mmcblk1: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext2
2 797MB 1007MB 210MB primary ext2
3 1007MB 16.0GB 15.0GB primary fat32 lba
mmcblk1p1 for /data
mmcblk1p2 for /cache
mmcblk1p3 for /sdcard
Will that work? I couldn't get mmcblk1p1 to show up as ext3. I did use mke2fs -j /dev/block/mmcblk1p1 to format it and I've read ext3 = ext2+journal, so I guess the fact it's not saying "ext3" under filesystem is okay?
GnatGoSplat said:
I copied the partition sizes from mmcblk0, so here's what I have on my 16GB SD card:
Code:
Model: SD SA16G (sd/mmc)
Disk /dev/block/mmcblk1: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext2
2 797MB 1007MB 210MB primary ext2
3 1007MB 16.0GB 15.0GB primary fat32 lba
mmcblk1p1 for /data
mmcblk1p2 for /cache
mmcblk1p3 for /sdcard
Will that work? I couldn't get mmcblk1p1 to show up as ext3. I did use mke2fs -j /dev/block/mmcblk1p1 to format it and I've read ext3 = ext2+journal, so I guess the fact it's not saying "ext3" under filesystem is okay?
Click to expand...
Click to collapse
You would be correct. Yes, that's fine.
Thanks, what should be my next steps?
GnatGoSplat said:
Thanks, what should be my next steps?
Click to expand...
Click to collapse
I'll have to find time to make scripts that will modify the ramdisk, unless you can just extract it and make the changes yourself.
That would be great, I really appreciate all the help so far.
Do you think ramdisk is the only place a change will need to be made?
I was trying to see if I could figure out how to extract ramdisk from boot.img and found a perl script, but I haven't gotten around to playing with it.

[Q&A] [Guide] CWM ReParted

Q&A for [Guide] CWM ReParted
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [Guide] CWM ReParted. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
ChronoMonochrome said:
CWM ReParted is a method of reparition internal SDcard via recovery using flashable zip. It was developed a few months ago, but the message about this method "lost" in a closed thread http://forum.xda-developers.com/showpost.php?p=54157635&postcount=129 so I decided to create separate thread.
It's only for custom (non-stock) based ROMs
Installation method
1) backup your /data partition and /sdcard
2) flash zip archive. It may take a while, be patient.
3) format /data, /cache and /sdcard
4) restore your data
5) swap storages via Novathor settings app
After repartition you'll have:
2,87 Gb on data
~320 Mb on cache (I didn't change cache partition size because I use F2FS and it needs to use more memory in /cache. Anyway, you can edit repartition script as you want)
~51 kb on UMS and HIDDEN
This script will not change your /system partition.
View attachment 2959869
Click to expand...
Click to collapse
First i would like to thank you for your contribution for our Ace devices. I would like to use your kernel with full f2fs, but the system partition is too small(approx. 600MB) to install GApps that i would like. Is there any way to enlarge system partition? Thank you
fada3 said:
First i would like to thank you for your contribution for our Ace devices. I would like to use your kernel with full f2fs, but the system partition is too small(approx. 600MB) to install GApps that i would like. Is there any way to enlarge system partition? Thank you
Click to expand...
Click to collapse
Temporarily there is no repartition script, that changes system partition. You can edit repartition.sh manually(remove system partition, change start/end positions of needed partitions and then create /system. don't forget then to name it "SYSTEM" - without quotes. There's no difference in which order you create partitions, just make sure that number of system is 3, data - 5, cache - 4, etc... ).
Make sure you have backup. To restore partition scheme flash stock with pit file.
P.s. if unsure, read this topic since repartition may be potentially dangerous.
http://forum.xda-developers.com/showthread.php?t=2596521
Increase UMS partition size
Hi! Can you tell me how do I edit the script to leave a little more storage on UMS (around 50-100MB) ? Thx for your reply!
Matteo90 said:
Hi! Can you tell me how do I edit the script to leave a little more storage on UMS (around 50-100MB) ? Thx for your reply!
Click to expand...
Click to collapse
Forget it, I pretty much figured it out after downloading a proper script editor, instead of messing around in notepad, lol.
By the way, these are the lines I edited in reparted.sh:
parted $MMC unit kb mkpart primary 3578036 3448836
parted $MMC name $CACHEFS CACHEFS
parted $MMC unit kb mkpart primary 747635 3578036
parted $MMC name $DATAFS DATAFS
parted $MMC unit kb mkpart primary 3448836 3948886
parted $MMC name $UMS UMS
Is it going to work as expected, or there's still something that needs editing?
Matteo90 said:
Is it going to work as expected, or there's still something that needs editing?
Click to expand...
Click to collapse
Code:
KB
641.729 SYSTEM System mkpart primary 105906 747635
2.971.202 DATAFS Data mkpart primary 747635 3718837
130.000 CACHEFS Cache mkpart primary 3718837 3848837
100 HIDDEN Hidden mkpart primary 3848837 3848937
100.000 UMS Int. SDCard mkpart primary 3848937 3948937
Made with my selfmade partition calculator - Call if you need other values...
Chrono's script is still full of (for you) unneeded parts (for automatic backup/recocvery) - mostly hashed and not active
This is a bit cleaned... Anyway.... It's @ChronoMonochrome work - So its his respekt...
EDIT - UPDATED - Now its correct...
Use an CWM Kernel... TWRP has no PARTED integrated
Code:
#!/sbin/sh
#-------------------------------------------------------------------#
# CWM ReParted for Codina #
#-------------------------------------------------------------------#
MMC=/dev/block/mmcblk0
CACHEFS=4
UMS=8
Fota=11
HIDDEN=9
SYSTEM=3
DATAFS=5
DEV_UMS=`mount | grep 'sdcard0' | cut -f 1 -d ' ' | grep 'dev'`
p=p
# unmount partitions
umount $DEV_UMS
umount $MMC$p$UMS
umount $MMC$p$Fota
umount $MMC$p$HIDDEN
umount $MMC$p$DATAFS
umount $MMC$p$SYSTEM
umount -l $MMC$p$CACHEFS
# remove partitions
parted $MMC rm $UMS
parted $MMC rm $Fota
parted $MMC rm $HIDDEN
parted $MMC rm $CACHEFS
parted $MMC rm $DATAFS
parted $MMC rm $SYSTEM
# rebuild SYSTEM
parted $MMC unit kb mkpart primary 105906 747635
# rebuild CACHEFS
parted $MMC unit kb mkpart primary 3718837 3848837
# rebuild DATAFS
parted $MMC unit kb mkpart primary 747635 3718837
# rebuild UMS
parted $MMC unit kb mkpart primary 3848937 3948937
# rebuild HIDDEN
parted $MMC unit kb mkpartfs primary ext2 3848837 3848937
# name partitions
parted $MMC name $SYSTEM SYSTEM
parted $MMC name $CACHEFS CACHEFS
parted $MMC name $DATAFS DATAFS
parted $MMC name $UMS UMS
parted $MMC name $HIDDEN HIDDEN
#
Please note that mkpart-part is in the order as the name-part.
The nameing right after mkpart results that DATAFS was not named correctly here... Don't know why...
Therefore I put the naming at the end...
And note that I've already SYSTEM in the script - This can be deleted if you do not need it....
Thank you, both you and Chrono! :good:
So all I have to do, is paste your script into reparted.sh, and everything will work like a charm.
One last question, though... Chrono wrote in his original post, that he left cache 320MB because F2FS needs it. If I plan on upgrading to F2FS in the future, is it better for me to leave it at 320 or the 130MB you calculated should be enough?
Matteo90 said:
Thank you, both you and Chrono! :good:
So all I have to do, is paste your script into reparted.sh, and everything will work like a charm.
One last question, though... Chrono wrote in his original post, that he left cache 320MB because F2FS needs it. If I plan on upgrading to F2FS in the future, is it better for me to leave it at 320 or the 130MB you calculated should be enough?
Click to expand...
Click to collapse
As you like... I'm also an full F2FS and have the minimum recommended for F2FS whioch is 130MB... This is setted in the script...
Don't know if 320 will imporve it or not - Never tested...
If you want to have the values with 320 on Cache - Here you are
Code:
641.729 SYSTEM System mkpart primary 105906 747635
2.781.202 DATAFS Data mkpart primary 747635 3528837
320.000 CACHEFS Cache mkpart primary 3528837 3848837
100 HIDDEN Hidden mkpart primary 3848837 3848937
100.000 UMS Int. SDCard mkpart primary 3848937 3948937
And dont forget to format partitions DATA CACHE (SYSTEM if changed) with the file system you want. Also format Int. SD Card with vfat/fat32.
Keep in mind that if you format SYSTEM with F2FS you would need an ROM.zip with adjusted mounting values (Chrono wrote it in this Kernel thread)
AND: Make this all with a Kernel with CWM (not TWRP) - No PARTED in TWRP...
fluffi444 said:
And dont forget to format partitions DATA CACHE (SYSTEM if changed) with the file system you want. Also format Int. SD Card with vfat/fat32.
Keep in mind that if you format SYSTEM with F2FS you would need an ROM.zip with adjusted mounting values (Chrono wrote it in this Kernel thread)
AND: Make this all with a Kernel with CWM (not TWRP) - No PARTED in TWRP...
Click to expand...
Click to collapse
Thanks, but F2FS is still in the future. I'm currently using ace2nutzer kernel, and I'm happy with it, won't convert to F2FS until his kernel supports it. But this adjusted mounting volumes has to do something with this repartitioning, or it's just the same thing Chrono wrote about in the F2FS installation tutorial in the third post of his kernel thread?
Also another noob question In your script, you put HIDDEN partition between CACHE and UMS, while in the original Chrono script HIDDEN is the last partition. Does it matter where this partition is?
Matteo90 said:
Thanks, but F2FS is still in the future. I'm currently using ace2nutzer kernel, and I'm happy with it, won't convert to F2FS until his kernel supports it. But this adjusted mounting volumes has to do something with this repartitioning, or it's just the same thing Chrono wrote about in the F2FS installation tutorial in the third post of his kernel thread?
Also another noob question In your script, you put HIDDEN partition between CACHE and UMS, while in the original Chrono script HIDDEN is the last partition. Does it matter where this partition is?
Click to expand...
Click to collapse
The ones were HIDDEN partition is between CACHE and UMS is only for values of each partition (c&p out of my Excel calculation file) - This is not the script...
The script beginns with #!/sbin/sh
And no - This is only for changing partition sizes...
fluffi444 said:
The ones were HIDDEN partition is between CACHE and UMS is only for values of each partition (c&p out of my Excel calculation file) - This is not the script...
The script beginns with #!/sbin/sh
And no - This is only for changing partition sizes...
Click to expand...
Click to collapse
Okay, I did it! Now I have 2.55GB on data, thanks to you guys!
Although I got an erron in CWM, saying "E:unknown volume for path [/sd-ext]", but after googling it, I read that it should not cause any problems.
Could please you go to CWM - Start ADB shell (from PC with USB attached)
and enter the following...
Code:
parted /dev/block/mmcblk0 unit kb print
Will also work from running Phone with ADB shell and SU
Code:
C:\ADB>adb shell
[email protected]:/ $ su
su
[email protected]:/ # parted /dev/block/mmcblk0 unit kb print
Please copy and post results - Just to be sure that everything was setted correctly
---------- Post added at 02:59 PM ---------- Previous post was at 02:57 PM ----------
Matteo90 said:
"E:unknown volume for path [/sd-ext]", but after googling it, I read that it should not cause any problems.
Click to expand...
Click to collapse
Did you format Internal SD (SDCARD0 in CWM) to vfat?
fluffi444 said:
Please copy and post results - Just to be sure that everything was setted correctly
---------- Post added at 02:59 PM ---------- Previous post was at 02:57 PM ----------
Did you format Internal SD (SDCARD0 in CWM) to vfat?
Click to expand...
Click to collapse
That's what it says:
Code:
C:\Users\Matt>adb shell
←7←[r←[999;999H←[[email protected]:/ $ su
su
←7←[r←[999;999H←[[email protected]:/ # parted /dev/block/mmcblk0 unit kb print
parted /dev/block/mmcblk0 unit kb print
sh: parted: not found
127|[email protected]:/ #
I did a system wipe, installed Rox 20141109 Rom and switched to ART in the meantime, could that be the problem?
Also, Internal SD was formatted as default, which I guess is FAT32. But that unknown volume error has since disappeared, CWM only gave that for the first reboot after repartitioning.
Arg. Parted is not Part of cm11. Please Do it from CWM....
Yes. If the error message is away and you have access then its Ok.
Gesendet von meinem GT-I8160P mit Tapatalk 2
fluffi444 said:
Arg. Parted is not Part of cm11. Please Do it from CWM....
Yes. If the error message is away and you have access then its Ok.
Gesendet von meinem GT-I8160P mit Tapatalk 2
Click to expand...
Click to collapse
From CWM it worked:
Code:
~ # parted /dev/block/mmcblk0 unit kb print
parted /dev/block/mmcblk0 unit kb print
Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3959423kB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
10 524kB 1573kB 1049kB PIT
6 1573kB 3146kB 1573kB CSPSA FS
7 4194kB 14680kB 10486kB ext4 EFS
2 14680kB 31457kB 16777kB ext4 Modem FS
14 32506kB 34603kB 2097kB SBL
16 34603kB 36700kB 2097kB SBL_2
1 36700kB 53477kB 16777kB PARAM
12 53477kB 55575kB 2097kB IPL Modem
13 55575kB 72352kB 16777kB Modem
15 72352kB 89129kB 16777kB Kernel
17 89129kB 105906kB 16777kB Kernel2
3 105906kB 747635kB 641729kB ext4 SYSTEM
5 747635kB 3528837kB 2781202kB ext4 DATAFS
4 3528837kB 3848837kB 320001kB ext4 CACHEFS
8 3848837kB 3948837kB 100000kB fat32 UMS
9 3948837kB 3948937kB 99.8kB ext2 HIDDEN
~ #
Is everything all right?
Matteo90 said:
From CWM it worked:
Code:
~ # parted /dev/block/mmcblk0 unit kb print
parted /dev/block/mmcblk0 unit kb print
Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3959423kB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
10 524kB 1573kB 1049kB PIT
6 1573kB 3146kB 1573kB CSPSA FS
7 4194kB 14680kB 10486kB ext4 EFS
2 14680kB 31457kB 16777kB ext4 Modem FS
14 32506kB 34603kB 2097kB SBL
16 34603kB 36700kB 2097kB SBL_2
1 36700kB 53477kB 16777kB PARAM
12 53477kB 55575kB 2097kB IPL Modem
13 55575kB 72352kB 16777kB Modem
15 72352kB 89129kB 16777kB Kernel
17 89129kB 105906kB 16777kB Kernel2
3 105906kB 747635kB 641729kB ext4 SYSTEM
5 747635kB 3528837kB 2781202kB ext4 DATAFS
4 3528837kB 3848837kB 320001kB ext4 CACHEFS
8 3848837kB 3948837kB 100000kB fat32 UMS
9 3948837kB 3948937kB 99.8kB ext2 HIDDEN
~ #
Is everything all right?
Click to expand...
Click to collapse
Not 100% - Because HIDDEN and UMS should be changed (their place on NAND) - But the most impotrant (Partition Nrs) are correct...
Did you used the script? Each commant has to be eactly at his correct place...
http://forum.xda-developers.com/showpost.php?p=56755086&postcount=6
fluffi444 said:
Not 100% - Because HIDDEN and UMS should be changed (their place on NAND) - But the most impotrant (Partition Nrs) are correct...
Did you used the script? Each commant has to be eactly at his correct place...
http://forum.xda-developers.com/showpost.php?p=56755086&postcount=6
Click to expand...
Click to collapse
I edited Chrono's script with your values, but he left HIDDEN at the end, so I figured it would be better if I do the same.
Is it going to cause any problems? What is HIDDEN used for, by the way?
Matteo90 said:
I edited Chrono's script with your values, but he left HIDDEN at the end, so I figured it would be better if I do the same. Is it going to cause any problems? What is HIDDEN used for, by the way?
Click to expand...
Click to collapse
Never tried Chrono's script. Mine is tested (from me) with my phone and it gives me the 100% original partition order as it was originally.
This is an 100% original layout...unmodified... (left out the parts of no interest)
Code:
3 106MB 748MB 642MB ext4 SYSTEM
5 748MB 2056MB 1309MB ext4 DATAFS
4 2056MB 2377MB 321MB ext4 CACHEFS
9 2377MB 2713MB 336MB ext4 HIDDEN
11 2713MB 2765MB 52,4MB Fota
8 2765MB 3949MB 1184MB fat32 UMS
BUT - I would leave yours as it is...
As I said - Its important that partition no's and names are correct... And they are for you...
I don't think that there will be a noticeable difference...
HIDDEN is not really needed in CM11. But if its not there some reported that CM11 does not boot.
Therefore its there - but as small as it can be...some KBs... To be sure I choosed 100KB.
If I remember correctly PRELOAD was on HIDDEN on JB...
Okay then! Thanks @fluffi444 for all the support on this matter! :highfive:
Hello everybody! I'm do the repart about the guide but now I have got 2.64 GB in internal storage.This is normal? And when I try to do download apps or games from Play Store,I have an error message:"couldn't install on USB Storage or SD card".How to fix that? ROM:cm11 by poppmensa
Sorry for my bad english.

[Q] How to increase partition size on my redmi 1s?

I flashed Yirom on my redmi 1s yesterday and i downloaded PA's GOOGLE STOCK GAPPS PACKAGE (~437MB) to flash with it.But the problem is that the system partition size on my device is too small to flash this GAPPS package and I DON'T WANT TO FLASH ANY OTHER GAPPS PACKAGE. So if anyone here could help me increase the partition size of my redmi 1s without any risks of bricking my device then I would really appreciate it.
I've TWRP recovery installed and there is no other data in my internal memory.Also I don't want to partition my external SD card's space.
Thanks in advance.
I also wanted to resize the system partition by reducing cache.
I thought fdisk can help but it does not work gpt style partitions. We needed gpt-fdisk.
Go here
however, no use of extending system partition... our redmi 1s has around 800 MB system partition..i repartitioned couple of times n extended it to 2gigs by taking some space from data partition.. but still u will get that insufficient error if u flash stock pa lp gapps... but u can flash full pa lp gapps over mokee lp (not cm12) with having even 1 gig of system partition..worked for me... rest couple of apps u can install manually... go to pa gapps for lollipop thread... read point 5 in post 3...
This is an old thread, but this is a good, v cheap (under £70 new) phone and it's one of the top finds on Google for resize redmi s1 system partition, I've just done one for my OH so I thought I share.
Here goes, this is the exact specific instructions for resizing the redmi s1 system partition 400mb larger which you will need to do if you want to run Android 6 with GAPPS, as even pico GAPPS is too big.
You'll need a PC with USB port running the ADB drivers, get them here.
a factory reset Redmi 1S with nothing but custom recovery, easily installed from within the MIUI updater
a micro SD card with you choice of ROM (Mokee 6.0.1 is very good indeed) and GAPPS (nano is fine, pico may not be) zip files
Boot the phone to recovery (power and volume up)
Attach the USB lead from the PC to the phone
Open a CMD prompt (Windows) or whatever if you use Linux/Mac.
Type
Code:
adb devices
adb shell
parted /dev/block/mmcblk0
unit MB
print
and you should see this, as you can see the system partion is just 800mb, not enough! But we have 6gb of user data space which is more than ample.
So we need to delete partions 27, 28 and 29 and recreate them with system 400mb larger and user data 400mb smaller, name them and make them ext4 format again.
Code:
rm 27
rm 28
rm 29
mkpartfs primary ext2 336 1574
mkpartfs primary ext2 1574 1977
mkpartfs primary ext2 1977 7818
name 27 system
name 28 cache
name 29 userdata
print
quit
should get this, all going well.
then
Code:
tune2fs -j /dev/block/mmcblk0p27
e2fsck -fDp /dev/block/mmcblk0p27
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p27
e2fsck -fDp /dev/block/mmcblk0p27
tune2fs -j /dev/block/mmcblk0p28
e2fsck -fDp /dev/block/mmcblk0p28
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p28
e2fsck -fDp /dev/block/mmcblk0p28
tune2fs -j /dev/block/mmcblk0p29
e2fsck -fDp /dev/block/mmcblk0p29
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p29
e2fsck -fDp /dev/block/mmcblk0p29
parted /dev/block/mmcblk0
unit MB
print
quit
will get this.
REBOOT your phone to recovery (any attempt to do anything beforehand will fail with unable to mount errors) and flash your ROM and GAPPS.
All done!

Categories

Resources