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.
In this Guide you will learn how to modify your system to handle the 9GB Partition 29 as Data (App-Storage) and use the external SD-Card as internal.
Don't be afraid, this is a lot of text mostly to explain the whole procedure, the steps are straight forward.
Thanks go to Kishd (oppoforums), Coldbird and alienmind (xdadevelopers)
Beside of the public made solutions i will do the following:
Instead of repartitioning the device i will change only the partition name of "sdcard" to "userdata", mount the external SD as internal and use the remaining 3GB Partition as external SD.
So partition 15 will become "sdcard1" and partition 29 will become "userdata"
On the Find7a you will have 9 gigs of application space and xx gigs for the internal sd (size of the sdcard).
This should work on Find7 too, someone has to check the partition layout if it is equal, than you will have 25 gigs of application space and xx gigs for the internal sd (size of the sdcard).
PRECAUTIONS:
If you mess around with partition table you could brick your device, so be careful!
Thes procedure worked for me, i am not responseable for any missing or mistyped commands/procedures, so THINK BEFORE YOU DO ANYTHING!
I am not an android Pro, nor an Develper. My Spare time is very limited so i can't help you out if something goes wrong!
I've done this with Gummy Rom, not tryed with ColorOS or another custom rom but it should work on all AOSP-based ROMS.
The swapped SD-cards do not belong to recovery, so the internal SD is accessed as before.
What do you need:
1.: Time: This is not done in 5 minutes, so please be patient.
2.: A Linux-PC with working ADB and Fastboot
3.: TWRP recovery image on your PC or installed on the device: http://techerrata.com/browse/twrp2/find7a (I used 2.7.1.0)
4.: An SD card with at least 16Gb inseted into your Find7a
5.: Fully charge your Device before messing around, some jobs will need a lot of time.
6.: A fitting custom ROM installed, i've done this with Gummy-M2.3-06-29-14-NIGHTLY-find7 which is suitable for find7 and find7a which can be found here: http://crackflasher.com/gummy-m2-3-06-29-14-nightly-find7-zip-oppo-find-7a-gummy/
7.: The zip-file of the custom rom on your local PC
What are we going to do:
0.: Boot into recovery and access the Device via ADB
1.: Format external SD to Ext4 Filesystem
2.: Backup the original partition layout and all partitions too
3.: Copy Data from internal SD to external
4.: Rename two partitions
5.: Format the new "userdata" partition and move all content of the old to the new location
6.: Format the new "sdcard1" partition
7.: Edit/replace fstab files in /etc to tell TWRP and System the new mountpoints
OK, let's do the trick
Step0.: Booting into recovery and accessing the Device via ADB-shell:
Put the phone into fast boot mode. (Power Volume Up simultaneously)
Open a terminal in your linux-PC and do the following as root (sudo -r):
#: fastboot devices ( check that fastboot is up and running)
#: fastboot boot openrecovery-twrp-2.7.1.0-find7a.img (or boot into TWRP if already installed)
The phone will boot into twrp.
Connect the phone and go into adb
#: adb shell
After entering the adb shell you should see the following in your terminal:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
~ #
Step1.: Format external SD to Ext4 Filesystem
First we have to write a new partition table as i dont know how your SD-card looks:
umount /external_sd (could cause errors if no filesystem is present on SD - dont mind)
parted /dev/block/mmcblk1 (you should see parted welcome message, no errors!)
mklabel msdos (this will write a new partition table on your sdcard)
mkpart primary ext4 1 -1 (this will make a ext4 partition which uses the whole sd)
quit
Now we are going to format the ext4 partition:
mke2fs -t ext4 -m 0 -L sdcard /dev/block/mmcblk1p1
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk1p1
mount /dev/block/mmcblk1p1 /external_sd (Mount the new formatted sd-card -- this should show no errors)
If all is done without errors, proceed to step2
Step2.: Backup the original partition layout and all partitions too
dd makes physical imagea of partitions so you can put it back if needed
While DD is copying you will see no progress bar or any output, so BE PATIENT!
Code:
mkdir /external_sd/backup
parted /dev/block/mmcblk0 print > /external_sd/backup/partitions (original partition Layout for later reference)
dd if=/dev/block/mmcblk0p1 of=/external_sd/backup/modem
dd if=/dev/block/mmcblk0p2 of=/external_sd/backup/sbl1
dd if=/dev/block/mmcblk0p3 of=/external_sd/backup/dbi
dd if=/dev/block/mmcblk0p4 of=/external_sd/backup/ddr
dd if=/dev/block/mmcblk0p5 of=/external_sd/backup/aboot
dd if=/dev/block/mmcblk0p6 of=/external_sd/backup/rpm
dd if=/dev/block/mmcblk0p7 of=/external_sd/backup/boot
dd if=/dev/block/mmcblk0p8 of=/external_sd/backup/tz
dd if=/dev/block/mmcblk0p9 of=/external_sd/backup/pad
dd if=/dev/block/mmcblk0p10 of=/external_sd/backup/modemst1
dd if=/dev/block/mmcblk0p11 of=/external_sd/backup/modemst2
dd if=/dev/block/mmcblk0p12 of=/external_sd/backup/oppodycnvbk
dd if=/dev/block/mmcblk0p13 of=/external_sd/backup/oppostanvbk
dd if=/dev/block/mmcblk0p14 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/system.gz
dd if=/dev/block/mmcblk0p16 of=/external_sd/backup/persist
dd if=/dev/block/mmcblk0p17 of=/external_sd/backup/cache
dd if=/dev/block/mmcblk0p18 of=/external_sd/backup/recovery
dd if=/dev/block/mmcblk0p19 of=/external_sd/backup/fsg
dd if=/dev/block/mmcblk0p20 of=/external_sd/backup/fsc
dd if=/dev/block/mmcblk0p21 of=/external_sd/backup/ssd
dd if=/dev/block/mmcblk0p22 of=/external_sd/backup/misc
dd if=/dev/block/mmcblk0p23 of=/external_sd/backup/LOGO
dd if=/dev/block/mmcblk0p24 of=/external_sd/backup/DRIVER
dd if=/dev/block/mmcblk0p25 of=/external_sd/backup/reserve1
dd if=/dev/block/mmcblk0p26 of=/external_sd/backup/reserve2
dd if=/dev/block/mmcblk0p27 of=/external_sd/backup/reserve3
dd if=/dev/block/mmcblk0p28 of=/external_sd/backup/reserve4
dd if=/dev/block/mmcblk0p30 of=/external_sd/backup/grow
It is not urgently needed to make dd backups of userdata and (internal) sdcard but here for refernce:
Do a compressed multispan backup with dd so you can use the files on an FAT32 filesystem too:
dd if=/dev/block/mmcblk0p15 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/userdata.gz.
dd if=/dev/block/mmcblk0p29 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/sdcard.gz.
Example of restoring partition 29:
cat /external_sd/backup/userdata.gz.* | gzip -dc | dd of=/dev/block/mmcblk0p29
Step3.: Copy Data from internal SD to external SD:
cp -a -i /internal_sd/* /external_sd/ (this can take a while)
ls /external_sd/ (you should see a bunch of files here)
If nothing went wrong go to step4
Step4.: Rename partitions:
umount /internal_sd/
umount /and-sec/
umount /data/
parted /dev/block/mmcblk0
name 15 sdcard
name 29 userdata
print (should show you the renamed layout)
quit
If nothing went wrong go to step5
Step5.: Format the new "userdata" partition and move all content of the old to the new location:
mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p29
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p29
mount /dev/block/mmcblk0p15 /internal_sd
mount /dev/block/mmcblk0p29 /data
cp -a -i /internal_sd/* /data/ (this can take a while)
If nothing went wrong go to step6
Step6.: Format the new "sdcard1" partition:
umount /internal_sd/
mke2fs -t ext4 -m 0 -L sdcard1 /dev/block/mmcblk0p15
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p15
If nothing went wrong go to step7
Step7.: Edit/replace fstab.qcom file to tell System the new mountpoints:
Guide from Coldbird: http://www.oppoforums.com/threads/unpack-repack-find-7-a-boot-img.14538/
Unpack update.zip and make a working directory.
copy file boot.img from update.zip into this directory
download https://github.com/xiaolu/mkbootimg_tools
unpack bootimage:
mkboot boot.img extracted (this will create a folder "extracted" with the content of boot.img where you can find fstab.qcom
edit fstab.qcom co match your needs (i.e. swap internal and external storage as shown below)
pack bootimage:
mkboot extracted newboot.img (creates newboot.img)
test bootimage (via fastboot):
sudo fastboot boot newboot.img
flash bootimage (via fastboot):
sudo fastboot flash boot newboot.img
sudo fatboot reboot
This is how the original file looks:
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337 wait
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk:auto
Code:
This is the changed file:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
# Use internal sdcard as /data
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
#/dev/block/platform/msm_sdcc.1/by-name/sdcard /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
# CM11 hack: Swap sdcard1 and sdcard0 - both in ext4 and (internal)sdcard1 as emulated
#/devices/msm_sdcc.2/mmc_host auto vfat defaults voldmanaged=sdcard0:auto,noemulatedsd
#/dev/block/platform/msm_sdcc.1/by-name/userdata /storage/sdcard1 ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 defaults
#/dev/block/platform/msm_sdcc.1/by-name/sdcard auto ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 voldmanaged=sdcard1:29,nonremovable,noemulatedsd
# Original Entry of Gummy rom:
#/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
#/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:auto,noemulatedsd
# Working with switched sd-cards, Aut0mat3d:
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:15,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:auto,nonremovable,noemulatedsd
/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto
Reserved
Reserved1
This should work for most people until we fully unify the storage.
Good job there.
MrColdbird said:
This should work for most people until we fully unify the storage.
Good job there.
Click to expand...
Click to collapse
Thanks. without your Help with storage mounting i'd dropped the project
I really want to try it out but I fear that I screwed something up... I use the unofficial AOSB port. Could somebody check, if my modifications to the fstab.qcom file are correct?
Original file:
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
/devices/msm_sdcc.1/mmc_host auto ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto vfat defaults voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto
And the new one:
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
/devices/msm_sdcc.1/mmc_host auto auto noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 voldmanaged=sdcard1:15,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto defaults voldmanaged=sdcard0:auto,nonremovable,noemulatedsd
/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto
Did I miss something? I would really appreciate your help because I don't want to mess up my device...
looks pretty fine, just give it a try. If it doesnt work it will not damage your device.
alternatively you can use the following lines tested on Gummy and CM11:
Code:
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:15,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:auto,nonremovable,noemulatedsd
For getting the job more easy i have made a AROMA installer that handles with partition renaming and flashing boot.img:
http://www.oppoforums.com/threads/a...rage-and-mount-external-sd-card-as-sd0.17852/
This can use on stock color OS?
vincent_smoox said:
This can use on stock color OS?
Click to expand...
Click to collapse
in principe: Yes
You have to modify fstab in boot.img to swap sd cards
I did it
Thanks a lot. It worked. Now I have a 128 GB SD Card in my Find7.
If anybody reads this and wants the Files needed for AOSB 1.3.6 - I uploaded the ROM including new boot.img and the boot.img alone to mega. Download here:
ROM+Boot.img
Boot.img only
I hope it works for you too
Everything was working fine until after 2 days, without warning, the screen went blank and then when I rebooted, I'm unable to save screenshots and gallery images are unavailable and external storage unavailable is the error. Sdcard0 is empty under /storage
Sent from my Find7 using XDA Free mobile app
Happened Again! Random reboot followed by corrupt partition. Cannot repair via TWRP also.
defective SD card?
Gesendet von meinem Find7 mit Tapatalk
Possible.
Sent from my Find7 using XDA Free mobile app
can you repeat step 7 again? I don't understand which zip file I have to download and how are the next small steps (command lines)?
Thank you very much for your help
jowar said:
can you repeat step 7 again? I don't understand which zip file I have to download and how are the next small steps (command lines)?
Thank you very much for your help
Click to expand...
Click to collapse
update.zip means the zip file of custom rom you have installed. next steps are in command line like steps before.
Aut0mat3d said:
In this Guide you will learn how to modify your system to handle the 9GB Partition 29 as Data (App-Storage) and use the external SD-Card as internal.
Don't be afraid, this is a lot of text mostly to explain the whole procedure, the steps are straight forward.
Thanks go to Kishd (oppoforums), Coldbird and alienmind (xdadevelopers)
Beside of the public made solutions i will do the following:
Instead of repartitioning the device i will change only the partition name of "sdcard" to "userdata", mount the external SD as internal and use the remaining 3GB Partition as external SD.
So partition 15 will become "sdcard1" and partition 29 will become "userdata"
On the Find7a you will have 9 gigs of application space and xx gigs for the internal sd (size of the sdcard).
This should work on Find7 too, someone has to check the partition layout if it is equal, than you will have 25 gigs of application space and xx gigs for the internal sd (size of the sdcard).
PRECAUTIONS:
If you mess around with partition table you could brick your device, so be careful!
Thes procedure worked for me, i am not responseable for any missing or mistyped commands/procedures, so THINK BEFORE YOU DO ANYTHING!
I am not an android Pro, nor an Develper. My Spare time is very limited so i can't help you out if something goes wrong!
I've done this with Gummy Rom, not tryed with ColorOS or another custom rom but it should work on all AOSP-based ROMS.
The swapped SD-cards do not belong to recovery, so the internal SD is accessed as before.
What do you need:
1.: Time: This is not done in 5 minutes, so please be patient.
2.: A Linux-PC with working ADB and Fastboot
3.: TWRP recovery image on your PC or installed on the device: http://techerrata.com/browse/twrp2/find7a (I used 2.7.1.0)
4.: An SD card with at least 16Gb inseted into your Find7a
5.: Fully charge your Device before messing around, some jobs will need a lot of time.
6.: A fitting custom ROM installed, i've done this with Gummy-M2.3-06-29-14-NIGHTLY-find7 which is suitable for find7 and find7a which can be found here: http://crackflasher.com/gummy-m2-3-06-29-14-nightly-find7-zip-oppo-find-7a-gummy/
7.: The zip-file of the custom rom on your local PC
What are we going to do:
0.: Boot into recovery and access the Device via ADB
1.: Format external SD to Ext4 Filesystem
2.: Backup the original partition layout and all partitions too
3.: Copy Data from internal SD to external
4.: Rename two partitions
5.: Format the new "userdata" partition and move all content of the old to the new location
6.: Format the new "sdcard1" partition
7.: Edit/replace fstab files in /etc to tell TWRP and System the new mountpoints
OK, let's do the trick
Step0.: Booting into recovery and accessing the Device via ADB-shell:
Put the phone into fast boot mode. (Power Volume Up simultaneously)
Open a terminal in your linux-PC and do the following as root (sudo -r):
#: fastboot devices ( check that fastboot is up and running)
#: fastboot boot openrecovery-twrp-2.7.1.0-find7a.img (or boot into TWRP if already installed)
The phone will boot into twrp.
Connect the phone and go into adb
#: adb shell
After entering the adb shell you should see the following in your terminal:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
~ #
Step1.: Format external SD to Ext4 Filesystem
First we have to write a new partition table as i dont know how your SD-card looks:
umount /external_sd (could cause errors if no filesystem is present on SD - dont mind)
parted /dev/block/mmcblk1 (you should see parted welcome message, no errors!)
mklabel msdos (this will write a new partition table on your sdcard)
mkpart primary ext4 1 -1 (this will make a ext4 partition which uses the whole sd)
quit
Now we are going to format the ext4 partition:
mke2fs -t ext4 -m 0 -L sdcard /dev/block/mmcblk1p1
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk1p1
mount /dev/block/mmcblk1p1 /external_sd (Mount the new formatted sd-card -- this should show no errors)
If all is done without errors, proceed to step2
Step2.: Backup the original partition layout and all partitions too
dd makes physical imagea of partitions so you can put it back if needed
While DD is copying you will see no progress bar or any output, so BE PATIENT!
Code:
mkdir /external_sd/backup
parted /dev/block/mmcblk0 print > /external_sd/backup/partitions (original partition Layout for later reference)
dd if=/dev/block/mmcblk0p1 of=/external_sd/backup/modem
dd if=/dev/block/mmcblk0p2 of=/external_sd/backup/sbl1
dd if=/dev/block/mmcblk0p3 of=/external_sd/backup/dbi
dd if=/dev/block/mmcblk0p4 of=/external_sd/backup/ddr
dd if=/dev/block/mmcblk0p5 of=/external_sd/backup/aboot
dd if=/dev/block/mmcblk0p6 of=/external_sd/backup/rpm
dd if=/dev/block/mmcblk0p7 of=/external_sd/backup/boot
dd if=/dev/block/mmcblk0p8 of=/external_sd/backup/tz
dd if=/dev/block/mmcblk0p9 of=/external_sd/backup/pad
dd if=/dev/block/mmcblk0p10 of=/external_sd/backup/modemst1
dd if=/dev/block/mmcblk0p11 of=/external_sd/backup/modemst2
dd if=/dev/block/mmcblk0p12 of=/external_sd/backup/oppodycnvbk
dd if=/dev/block/mmcblk0p13 of=/external_sd/backup/oppostanvbk
dd if=/dev/block/mmcblk0p14 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/system.gz
dd if=/dev/block/mmcblk0p16 of=/external_sd/backup/persist
dd if=/dev/block/mmcblk0p17 of=/external_sd/backup/cache
dd if=/dev/block/mmcblk0p18 of=/external_sd/backup/recovery
dd if=/dev/block/mmcblk0p19 of=/external_sd/backup/fsg
dd if=/dev/block/mmcblk0p20 of=/external_sd/backup/fsc
dd if=/dev/block/mmcblk0p21 of=/external_sd/backup/ssd
dd if=/dev/block/mmcblk0p22 of=/external_sd/backup/misc
dd if=/dev/block/mmcblk0p23 of=/external_sd/backup/LOGO
dd if=/dev/block/mmcblk0p24 of=/external_sd/backup/DRIVER
dd if=/dev/block/mmcblk0p25 of=/external_sd/backup/reserve1
dd if=/dev/block/mmcblk0p26 of=/external_sd/backup/reserve2
dd if=/dev/block/mmcblk0p27 of=/external_sd/backup/reserve3
dd if=/dev/block/mmcblk0p28 of=/external_sd/backup/reserve4
dd if=/dev/block/mmcblk0p30 of=/external_sd/backup/grow
It is not urgently needed to make dd backups of userdata and (internal) sdcard but here for refernce:
Do a compressed multispan backup with dd so you can use the files on an FAT32 filesystem too:
dd if=/dev/block/mmcblk0p15 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/userdata.gz.
dd if=/dev/block/mmcblk0p29 | gzip -c | split -b 2000m -a 3 - /external_sd/backup/sdcard.gz.
Example of restoring partition 29:
cat /external_sd/backup/userdata.gz.* | gzip -dc | dd of=/dev/block/mmcblk0p29
Step3.: Copy Data from internal SD to external SD:
cp -a -i /internal_sd/* /external_sd/ (this can take a while)
ls /external_sd/ (you should see a bunch of files here)
If nothing went wrong go to step4
Step4.: Rename partitions:
umount /internal_sd/
umount /and-sec/
umount /data/
parted /dev/block/mmcblk0
name 15 sdcard
name 29 userdata
print (should show you the renamed layout)
quit
If nothing went wrong go to step5
Step5.: Format the new "userdata" partition and move all content of the old to the new location:
mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p29
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p29
mount /dev/block/mmcblk0p15 /internal_sd
mount /dev/block/mmcblk0p29 /data
cp -a -i /internal_sd/* /data/ (this can take a while)
If nothing went wrong go to step6
Step6.: Format the new "sdcard1" partition:
umount /internal_sd/
mke2fs -t ext4 -m 0 -L sdcard1 /dev/block/mmcblk0p15
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p15
If nothing went wrong go to step7
Step7.: Edit/replace fstab.qcom file to tell System the new mountpoints:
Guide from Coldbird: http://www.oppoforums.com/threads/unpack-repack-find-7-a-boot-img.14538/
Unpack update.zip and make a working directory.
copy file boot.img from update.zip into this directory
download https://github.com/xiaolu/mkbootimg_tools
unpack bootimage:
mkboot boot.img extracted (this will create a folder "extracted" with the content of boot.img where you can find fstab.qcom
edit fstab.qcom co match your needs (i.e. swap internal and external storage as shown below)
pack bootimage:
mkboot extracted newboot.img (creates newboot.img)
test bootimage (via fastboot):
sudo fastboot boot newboot.img
flash bootimage (via fastboot):
sudo fastboot flash boot newboot.img
sudo fatboot reboot
This is how the original file looks:
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337 wait
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk:auto
Code:
This is the changed file:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
# Use internal sdcard as /data
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
#/dev/block/platform/msm_sdcc.1/by-name/sdcard /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
# CM11 hack: Swap sdcard1 and sdcard0 - both in ext4 and (internal)sdcard1 as emulated
#/devices/msm_sdcc.2/mmc_host auto vfat defaults voldmanaged=sdcard0:auto,noemulatedsd
#/dev/block/platform/msm_sdcc.1/by-name/userdata /storage/sdcard1 ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 defaults
#/dev/block/platform/msm_sdcc.1/by-name/sdcard auto ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,nodelalloc,uid=1023,gid=1023,dmask=0007,fmask=0007 voldmanaged=sdcard1:29,nonremovable,noemulatedsd
# Original Entry of Gummy rom:
#/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:29,nonremovable,noemulatedsd
#/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:auto,noemulatedsd
# Working with switched sd-cards, Aut0mat3d:
/devices/msm_sdcc.1/mmc_host/mmc0 auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard1:15,nonremovable,noemulatedsd
/devices/msm_sdcc.2/mmc_host auto auto uid=1023,gid=1023,fmask=0007,dmask=0007 voldmanaged=sdcard0:auto,nonremovable,noemulatedsd
/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto
Click to expand...
Click to collapse
Does this work with Color is 2.1.5?
unpack-repack-find-7-a-boot-img
Does anybody has unpack-repack-find-7-a-boot-img ? OppoForums are down. I need this file.
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.