Help me Unbrick redmi 1s (accidentally removed partition fsg) - Xiaomi Redmi 1S

Guys can anyone help me in unbrick redmi 1s. In the process of extending system partition i removed fsg partition.
Tried below things:
1. Tried to flash miui fastboot rom using miflash tool its giving ((0x80004005: FAILED (remote: partition table doesn't exist))
2. Tried to flash miui developer rom by booting into cwm(through fastboot) but its not installing
Please help me in unbricking redmi 1s i have only this device.

ok i have created fsg partition through parted and rebooted to fastboot->twrp then flashed miui latest and everything working fine.
To create partition through parted
mkpart (this command is to create )
partition name: fsg
start block: 134
end block: 136
and i also found that i havent created system,cache, userdata so i have created them using following commands from parted
mkpartfs primary ext2 336 1336 (system partition i have increased to 1000MB)
mkpartfs primary ext2 1336 1739 (cache partition)
mkpartfs primary ext2 1739 7818 (userdata partition)
Labeling partition:
name 27 system
name 28 cache
name 29 userdata
quit (comeout from parted)
System(27),cache(28),userdata(29) Partitions from ext2 to ext4 (replace last two digits with cache and userdata and run them all)
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
and miui is working
source:http://en.miui.com/thread-183258-1-1.html

please explain in detail, i am also not able to flash any rom via miflash, my phone is bricked as i have accidently deleted partitions please help
slst said:
ok i have created fsg partition through parted and rebooted to fastboot->twrp then flashed miui latest and everything working fine.
To create partition through parted
mkpart (this command is to create )
partition name: fsg
start block: 134
end block: 136
and i also found that i havent created system,cache, userdata so i have created them using following commands from parted
mkpartfs primary ext2 336 1336 (system partition i have increased to 1000MB)
mkpartfs primary ext2 1336 1739 (cache partition)
mkpartfs primary ext2 1739 7818 (userdata partition)
Labeling partition:
name 27 system
name 28 cache
name 29 userdata
quit (comeout from parted)
System(27),cache(28),userdata(29) Partitions from ext2 to ext4 (replace last two digits with cache and userdata and run them all)
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
and miui is working
source:http://en.miui.com/thread-183258-1-1.html
Click to expand...
Click to collapse

Related

[Q] [Help] 32GB SD Card Error

I have a 32GB uSD Card Class 6. I partition in Recovery (RA) with 512 Swap, 1920 ext2 (or 3 or 4 tried all) and remaining FAT32. If I use the old 8GB Class 4 card with 100MB Swap, 512MB EXT4 and remainder FAT32, it works fine.
I get the error "Bad magic number in super-block while trying to open /dev/block/mmcblk0p2" when I try to upgrade from EXT2 to 4 and when I wipe DALVIK Cache. I tried mini partition with the same results. I have formatted card with NTFS and copied a 17GB movie file and it plays ok. Reformat it as above and back to same old error. Can copy files into FAT32 partition (<2gb files that is) and see them. Here is a RECOVERY.log of the partition, upgrade and then Dalvik cache wipe. Please help
- RECOVERY.log------------------------------
Model: SD 33333 (sd/mmc)
Disk /dev/block/mmcblk0: 32.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 30.3GB 30.3GB primary fat32 lba
2 30.3GB 32.2GB 1920MB primary
3 32.2GB 32.7GB 512MB primary
script log is located @ /data/sdparted.log
Partitioning complete!
I:Set boot command ""
Upgrade ext2 to ext3
Press Trackball to confirm,
any other key to abort.
Upgrading ext2 to ext3 : .e2fsck 1.41.6 (30-May-2009)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p2
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
tune2fs: Bad magic number in super-block while trying to open /dev/block/mmcblk0p2
Couldn't find valid filesystem superblock.
tune2fs 1.41.6 (30-May-2009)
Ext upgrade complete!
I:Set boot command ""
Upgrade ext3 to ext4
Press Trackball to confirm,
any other key to abort.
Upgrading ext3 to ext4 : .tune2fs: Bad magic number in super-block while trying to open /dev/block/mmcblk0p2
Couldn't find valid filesystem superblock.
tune2fs 1.41.6 (30-May-2009)
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p2
/dev/block/mmcblk0p2:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Ext upgrade complete!
I:Set boot command ""
I:Set boot command ""
I:Set boot command ""
Wipe Dalvik-cache
Press Trackball to confirm,
any other key to abort.
Formatting DATA:dalvik-cache...
Formatting CACHE:dalvik-cache...
Formatting SDEXT:dalvik-cache...
E:Can't mount /dev/block/mmcblk0p2 (or /dev/block/mmcblk0)
(Invalid argument)
Error mounting /sd-ext/dalvik-cache!
Skipping format...
Dalvik-cache wipe complete!
-end-----------------------------------------------
when i run this command
/ # e2fsck -p /dev/block/mmcblk0p2
e2fsck -p /dev/block/mmcblk0p2
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcb
2
/dev/block/mmcblk0p2:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
What does this all mean. I had a dream of a 32 GB storage with plenty of songs and media on my HTC Desire
__________________
HTC Desire PVT4
SD Card: 32GB Class 6
Espresso Sense HD RCS Touch v2.1 A2SD+
Recovery: RA AMON Recovery 2.0.0
Radio: 32.54.00.32U_5.14.05.17
HBOOT : 0.93.0001 S-OFF
Try formatting it with no swap. Set it to 0.
Ok, tried that same error. 0MB Swap, 512MB Ext2 and remainder FAT32. Partition FAT32 is first (viewable and RW in Windows) followed by 512MB EXT2.
I guess the question should be asked, does anyone run a HTC Desire GSM with a 32GB microSD Card, and if so what/how did the partitions set up. I suspect that the HTC Desire does not support 32GB cards. (I put the card in a HTC Desire HD and formatted under Clockworks 3.0.0.5). Formats ok, but get same error. Put a 16 GB card in CLASS 10 and get same errors. Put an 8GB microSD CLASS 4 and everything works fine.
-thanks anyway for the suggetion !

[problem] Convert2EXT4 = can't wipe properly

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.

[Guide] Find7 9GB App storage and mount External SD-Card as SD0

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] [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