[TEST] Custom Storage Partitions v1 for OPPO FIND 7 (x9076)

222 posts
Thanks Meter: 243
 
By italianquadcore, Senior Member on 6th November 2014, 08:54 AM
Post Reply Email Thread
Read-Me First
1) This procedure may brick your phone and make it useless. Use this procedure at your own risk.
2) This procedure is not official, so it is not supported by Oppo company.
3) This procedure is only for advanced users with a good low-level knowledge of Android storage and adb-fastboot commands.
4) This procedure WILL ERASE ALL YOUR PERSONAL DATA on your phone. Please BACKUP ALL YOUR DATA before using this procedure.
5) This procedure has been tested only on Oppo Find 7 (x9076) phone.
6) This procedure will use an external Micro-SD card to make user run some scripts.

Goal/Purpose
This procedure will resize the two partitions ("userdata" and "sdcard") used by Oppo Find 7 to store personal data, such as apps, photos, images, and so on.
Due to the fact the Oppo Find 7 (x9076) uses an only-3GB "userdata" partition to store apps, while all the remaining space (24 GB) is used for "sdcard" partition to store other data, this matter doesn't provide with enough space to store apps and their related data.
This procedure should be used to enlarge the size of "userdata" partition, to let user have more space for apps and less space for personal data in order to use some ROMs that currently do not provide with support for unified storage ("Unified Storage Layout" or LVM), such as Color OS, CyanogenMod and other ROMs based on CyanogenMod rom.
With the provided compressed file, you will receive some ".sh" files to be used to resize the storage partitions. The namefile of these scripts just means two numbers, the first one is the new size (in GB) of "userdata" partition, while the second one is the new size (in GB) of "sdcard" partition. So, for example, the script "8_19.sh" should be used to have 8 GB for the resized "userdata" partition, and "19 GB" for the resized "sdcard" partition.

How to
1) Make a backup of all your data on your phone.
2) Download and unzip the compressed file.
3) Just unzip the included "external_sd.zip" file on root of your external MicroSD card.
4) Restart into recovery.
5) Run terminal window and execute "adb shell" to go into adb shell.
6) Run command "cd /external_sd/new_scripts".
7) Be sure that all .sh files are in folder "/external_sd/new_scripts".
8) Run one of the provided ".sh" file. Do not unplug the usb cable and wait until the end of the procedure. If you've selected "unified.sh" script, please remember that you have to update the custom recovery (as described in thread "Unified Storage Layout" - http://www.oppoforums.com/threads/tu...find-7a.17952/).
9) Enjoy your new storage partitions.

Issues
1) If the procedure will end with the error "Persist partition is damaged. After rebooting into recovery, please run persist_fix application.", you have to reboot into recovery again, and then run the script included inside "persist_fix" folder (it is part of the zipped file "external_sd.zip").
Make sure that "persist" partition will have the "ext4" formatting, because it is happened, many times, that during backup and restore of "persist" partition, something happens to damaged the "ext4" formatting.
2) It is happened, once only, that you cannot reboot into recovery again due to some problems during backup-restore procedure of "recovery" partition. This problem may be simply solved flashing the recovery with "fastboot" command.

Tips & Hints
1) I suggest users of Oppo Find 7a, to use alternate unified procedures (such as “Unified Storage Layout” or LVM) instead of this procedure, due to low storage sizes. It is a non-sense to waste space for two partitions (one dedicated only to the apps, and the other one to user’s data) when you can use only a big one, shared for both apps and data.
2) If you have not enough know-how to use this procedure or if you are afraid of doing something wrong using this procedure, you can wait for a definitive decision from Oppo about storage layout. With last final release of ColorOS (2.0 kitkat), Oppo still continues to use two partitions, with only 3GB dedicated to apps, and the remaining storage space dedicated to user’s data.
There are some rumors about Oppo regarding storage layout, that is Oppo will use the LVM storage layout in the future. Anyway we hope that Oppo may release the guidelines for storage as soon as possible, maybe with next ColorOS release.
3) This procedure makes a backup of the most important partitions in order to restore them after the resizing procedure. The backup is stored on the external MicroSD card at the end of the procedure, so please keep the backup for future reference and to restore it if something goes wrong in the future.
Please take note that only ColorOS is bundled with updated images of few partitions (some of them managed by the backup/restore procedure), but not for all partitions, so the only way to restore an image of a partition currently is to restore it from a stored image (such as the images stored by this procedure).
4) During testing period, I’ve discovered that “persist” partition, managed by this procedure, may lose the “ext4” file system formatting during the backup/restore procedure. On Internet there is a lot of mainstream about this partition, but mainly there is a lot of confusion regarding it. Someone even suggests formatting (so erasing it) this partition whenever users encounter problems on using phone.
As far as I understand, “persist” partition is a mountable partition, it contains important code (binaries and data), mainly regarding wi-fi connections. It is used by all ROMs, including stock and custom ones.
So it is mandatory to preserve the contents of this partition to avoid bootloops, missing or poor wi-fi connections and other serious problems on using this phone.
If you want to know what is the contents of this partition, you can simply boot your ROM, use a terminal prompt, input “su” (you need root permissions) and simply go into “/persist” folder (it is mounted by the ROM).
At the end of the resize procedure, the “ext4” formatting will be checked in order to prevent any problems on “persist” partition. If “ext4” file system formatting is lost, a message will be shown to the user. The user must reboot into recovery, and then use the script included inside “persist_fix” folder (included in “external_sd.zip” file). This script will restore an image of “persist” partition and then check if the problem is solved or not. Please use this script whenever you have problems on “persist” partition (on Internet there is a lot of mainstream about “persist” partition, not only related to Oppo Find 7).

Copyrights
Some scripts included in this procedure are based on scripts written by Coldbird and included into "Unified Storage Layout" procedure. All rights are reserved to Coldbird.

Thanks
1) Thanks to Coldbird, to aut0mat3d and to all people involved into "Unified Storage Layout" procedure.
2) Thanks to all people involved into "LVM Partition Remapping" procedure.
3) Thanks, in advance, to all people that will test this procedure.

References
Why there is only 9.x GB user space on Find 7a (http://www.oppoforums.com/threads/fa...find-7a.11787/)
Unified Storage Layout (http://www.oppoforums.com/threads/tu...find-7a.17952/)
Partition Repairscripts for Oppo Find7, Find7a (http://www.oppoforums.com/threads/to...-find7a.20271/)
LVM Partition Remapping (http://forum.xda-developers.com/find...pping-t2865843)

Tested ROMs
1) Color OS – releases 1.2.6 and 2.0.0 Kitkat.
2) AICP – Release 20141018.
Issue: it is not possible to use the "sdcard0" mounting partition, it is set to read-only permission. To solve this issue, you have to flash another ROM before this, reboot and let it write its own folders onto "sdcard0" partition. Finally you can flash AICP rom and use it normally.
3) AOKP – Nightly 2014-10-18.
4) CyanogenMod CM11 – Nightly 20141025.
5) Dirty Unicorns – 20141011 v8.0 weekly.
Issue: bootloop – When a window, for selecting the language, appears, it seems to be blocked and after 5 seconds it reboots.
6) Mokee – 141025 release
7) Nameless ROM – 20141027 nightly
8) Omnirom 20140923 nightly and 20141031 nightly
Issue: bootloop – When a window, for selecting the language, appears, it seems to be blocked and after 5 seconds it reboots.
9) Paranoid Android – 4.6 beta 5 20141021
Issue : no boot – This ROM doesn't boot at all.
Tested also with 4.6 beta 4 20141007 – no problem.

Tested machine
Custom Recovery : TWRP 2.8.0.1
Google Apps : gapps-kk-20140606-signed.zip
New Internal Storage : 8 GB for "userdata" + 19 GB for "sdcard"
External Storage : 32 gb micro-sd class 10
Attached Thumbnails
Click image for larger version

Name:	Screenshot_AOKP.jpg
Views:	3024
Size:	151.7 KB
ID:	3001964   Click image for larger version

Name:	Screenshot_CM11_1.jpg
Views:	2965
Size:	160.5 KB
ID:	3001965   Click image for larger version

Name:	Screenshot_CM11_2.jpg
Views:	2926
Size:	163.6 KB
ID:	3001966   Click image for larger version

Name:	Screenshot_CM11_3.png
Views:	2628
Size:	248.9 KB
ID:	3001967   Click image for larger version

Name:	Screenshot_COLOROS_126.jpg
Views:	3163
Size:	175.7 KB
ID:	3001968   Click image for larger version

Name:	Screenshot_COLOROS_200.jpg
Views:	3274
Size:	168.9 KB
ID:	3001969   Click image for larger version

Name:	Screenshot_MOKEE.png
Views:	3121
Size:	242.3 KB
ID:	3001970   Click image for larger version

Name:	Screenshot_NAMELESS.png
Views:	2699
Size:	253.6 KB
ID:	3001971   Click image for larger version

Name:	Screenshot_PARANOID.png
Views:	2310
Size:	231.3 KB
ID:	3001972  
Attached Files
File Type: zip Custom Storage Partitions v1 for OPPO FIND 7 (x9076).zip - [Click for QR Code] (113.8 KB, 2899 views)
The Following 18 Users Say Thank You to italianquadcore For This Useful Post: [ View ] Gift italianquadcore Ad-Free
6th November 2014, 03:27 PM |#2  
Member
Thanks Meter: 7
 
More
I've tried this method. And I choose unified.
but I can't see that unified (like the pic).
Here the log from command

H:\adt\sdk\platform-tools>adb shell
~ # ←[6ncd external_sd
cd external_sd
/external_sd # ←[6ncd external_sd
cd external_sd
/external_sd/external_sd # ←[6nls
ls
new_scripts
persist_fix
/external_sd/external_sd # ←[6ncd new_scripts
cd new_scripts
/external_sd/external_sd/new_scripts # ←[6nls
ls
10_17.sh
11_16.sh
13_14.sh
8_19.sh
parted
stock.sh
unified.sh
/external_sd/external_sd/new_scripts # ←[6nsh unified.sh
sh unified.sh







=================================================
Retrieving the size of all partitions.....
userdata = 6291456s sectors
sdcard = 50000000 sectors
=================================================
rm: can't remove '/tmp/backup': No such file or directory

=================================================
Unmount all partitions except external_sd ....
=================================================

=================================================
Backup partitions into /tmp folder.....
=================================================
65536+0 records in
65536+0 records out
33554432 bytes (32.0MB) copied, 0.809779 seconds, 39.5MB/s
32768+0 records in
32768+0 records out
16777216 bytes (16.0MB) copied, 0.440292 seconds, 36.3MB/s
3072+0 records in
3072+0 records out
1572864 bytes (1.5MB) copied, 0.036449 seconds, 41.2MB/s
2+0 records in
2+0 records out
1024 bytes (1.0KB) copied, 0.000651 seconds, 1.5MB/s
16+0 records in
16+0 records out
8192 bytes (8.0KB) copied, 0.000746 seconds, 10.5MB/s
2048+0 records in
2048+0 records out
1048576 bytes (1.0MB) copied, 0.025429 seconds, 39.3MB/s
32768+0 records in
32768+0 records out
16777216 bytes (16.0MB) copied, 0.396552 seconds, 40.3MB/s
65536+0 records in
65536+0 records out
33554432 bytes (32.0MB) copied, 0.829321 seconds, 38.6MB/s
65536+0 records in
65536+0 records out
33554432 bytes (32.0MB) copied, 0.840793 seconds, 38.1MB/s
32768+0 records in
32768+0 records out
16777216 bytes (16.0MB) copied, 0.424749 seconds, 37.7MB/s
16384+0 records in
16384+0 records out
8388608 bytes (8.0MB) copied, 0.221377 seconds, 36.1MB/s
131072+0 records in
131072+0 records out
67108864 bytes (64.0MB) copied, 1.573372 seconds, 40.7MB/s
253919+0 records in
253919+0 records out
130006528 bytes (124.0MB) copied, 3.915451 seconds, 31.7MB/s

=================================================
We remove and create new partitions .......
=================================================
unified.sh: line 94: can't open /external_sd/new_scripts/parted/find7_unified.pa
rted: no such file

=================================================
Restore partitions from /tmp folder.....
=================================================
32768+0 records in
32768+0 records out
16777216 bytes (16.0MB) copied, 0.495464 seconds, 32.3MB/s
3072+0 records in
3072+0 records out
1572864 bytes (1.5MB) copied, 0.199716 seconds, 7.5MB/s
2+0 records in
2+0 records out
1024 bytes (1.0KB) copied, 0.000620 seconds, 1.6MB/s
16+0 records in
16+0 records out
8192 bytes (8.0KB) copied, 0.005822 seconds, 1.3MB/s
2048+0 records in
2048+0 records out
1048576 bytes (1.0MB) copied, 0.139941 seconds, 7.1MB/s
32768+0 records in
32768+0 records out
16777216 bytes (16.0MB) copied, 2.644259 seconds, 6.1MB/s
65536+0 records in
65536+0 records out
33554432 bytes (32.0MB) copied, 5.312673 seconds, 6.0MB/s
65536+0 records in
65536+0 records out
33554432 bytes (32.0MB) copied, 5.498313 seconds, 5.8MB/s
32768+0 records in
32768+0 records out
16777216 bytes (16.0MB) copied, 2.608278 seconds, 6.1MB/s
16384+0 records in
16384+0 records out
8388608 bytes (8.0MB) copied, 1.549714 seconds, 5.2MB/s
131072+0 records in
131072+0 records out
67108864 bytes (64.0MB) copied, 11.840047 seconds, 5.4MB/s
253919+0 records in
253919+0 records out
130006528 bytes (124.0MB) copied, 3.924011 seconds, 31.6MB/s

=================================================
We format userdata, cache and sdcard partitions.....
=================================================
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=userdata
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
196608 inodes, 786432 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=805306368
24 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.14 (22-Dec-2010)
Setting maximal mount count to -1
Setting current mount count to -1
Setting interval between checks to 4294880896 seconds
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=cache
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
32768 inodes, 131072 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=134217728
4 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.14 (22-Dec-2010)
Setting maximal mount count to -1
Setting current mount count to -1
Setting interval between checks to 4294880896 seconds
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=sdcard
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1564672 inodes, 6250000 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
191 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.14 (22-Dec-2010)
Setting maximal mount count to -1
Setting current mount count to -1
Setting interval between checks to 4294880896 seconds

=================================================
We restore and check the persist partition.....
=================================================
65536+0 records in
65536+0 records out
33554432 bytes (32.0MB) copied, 4.838189 seconds, 6.6MB/s

e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p16: 28/320 files (0.0% non-contiguous), 1085/1280 blocks

=================================================
We copy all /tmp folder into external sdcard....
=================================================

=================================================
End of resizing partitions....
=================================================
Model: MMC 032GE4 (sd/mmc)
Disk /dev/block/mmcblk0: 61071360s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 16384s 147455s 131072s fat16 modem
2 147456s 148479s 1024s sbl1
3 148480s 148543s 64s dbi
4 163840s 163903s 64s DDR
5 180224s 182271s 2048s aboot
6 182272s 183271s 1000s rpm
7 196608s 229375s 32768s boot
8 229376s 230375s 1000s tz
9 230376s 232423s 2048s pad
10 232424s 235495s 3072s modemst1
11 235496s 238567s 3072s modemst2
12 238568s 259047s 20480s oppodycnvbk
13 259048s 279527s 20480s oppostanvbk
14 294912s 3006463s 2711552s ext4 system
15 3006464s 9297919s 6291456s ext4 userdata
16 9297920s 9363455s 65536s ext4 persist
17 9363456s 10412031s 1048576s ext4 cache
18 10412032s 10444799s 32768s recovery
19 10444800s 10447871s 3072s fsg
20 10452992s 10452993s 2s fsc
21 10452994s 10453009s 16s ssd
22 10453010s 10455057s 2048s misc
23 10455058s 10487825s 32768s LOGO
24 10487826s 10553361s 65536s DRIVER
25 10553362s 10618897s 65536s reserve1
26 10618898s 10651665s 32768s reserve2
27 10651666s 10668049s 16384s reserve3
28 10668050s 10799121s 131072s reserve4
29 10813440s 60813439s 50000000s ext4 sdcard
30 60817408s 61071326s 253919s grow



Done.
/external_sd/external_sd/new_scripts # ←[6n


Maybe I make a mistake but can you explain more detail what's wrong?

Thanks
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-11-07-01-23-24-435.jpg
Views:	866
Size:	181.3 KB
ID:	3002677  
6th November 2014, 10:39 PM |#3  
italianquadcore's Avatar
OP Senior Member
Flag Italy
Thanks Meter: 243
 
More
Quote:
Originally Posted by OldClass

I've tried this method. And I choose unified.
but I can't see that unified (like the pic).
Here the log from command
.......................
Maybe I make a mistake but can you explain more detail what's wrong?

Thanks

May you kindly show me the output of command "ls -l /external_sd/new_scripts/parted/", because I am worried about upper/lower case of extracted files. Thanks.
The Following User Says Thank You to italianquadcore For This Useful Post: [ View ] Gift italianquadcore Ad-Free
7th November 2014, 01:42 AM |#4  
Member
Thanks Meter: 7
 
More
Quote:
Originally Posted by italianquadcore

May you kindly show me the output of command "ls -l /external_sd/new_scripts/parted/", because I am worried about upper/lower case of extracted files. Thanks.

Here is the output :

K:\adt\sdk\platform-tools>adb shell
~ # ←[6nls -l /external_sd/new_scripts/parted/
ls -l /external_sd/new_scripts/parted/
/external_sd/new_scripts/parted/: No such file or directory
~ # ←[6nls -l /external_sd/external_sd/new_scripts/parted/
ls -l /external_sd/external_sd/new_scripts/parted/
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
-rwxrwxrwx root root 872 2014-11-06 23:36 find7_10_17.parted
-rwxrwxrwx root root 872 2014-11-06 23:36 find7_11_16.parted
-rwxrwxrwx root root 872 2014-11-06 23:36 find7_13_14.parted
-rwxrwxrwx root root 872 2014-11-06 23:36 find7_8_19.parted
-rwxrwxrwx root root 868 2014-11-06 23:36 find7_stock.parted
-rwxrwxrwx root root 872 2014-11-06 23:36 find7_unified.parted
~ # ←[6n
7th November 2014, 02:24 AM |#5  
Member
Thanks Meter: 7
 
More
i'm sorry has make mistake when put extracted folder in my sd card
now i can repart my internal Find 7 X9076
thanks for your help
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-11-07-09-20-22-497[1].jpg
Views:	538
Size:	181.7 KB
ID:	3003186  
7th November 2014, 07:30 AM |#6  
italianquadcore's Avatar
OP Senior Member
Flag Italy
Thanks Meter: 243
 
More
Quote:
Originally Posted by OldClass

i'm sorry has make mistake when put extracted folder in my sd card
now i can repart my internal Find 7 X9076
thanks for your help

I've just updated the "how-to" procedure in order to avoid this problem in the future. I'am happy that it worked. Thanks for your testing.
The Following User Says Thank You to italianquadcore For This Useful Post: [ View ] Gift italianquadcore Ad-Free
8th November 2014, 08:52 AM |#7  
Junior Member
Flag Malang
Thanks Meter: 3
 
More
It's work. Tested on my x9076 using ColorOS KitKat 33 (Chinese Full)
8th November 2014, 06:58 PM |#8  
Junior Member
Thanks Meter: 7
 
More
Hello,

i was on unified storage (coldbird method) and this method take me to brick my x9076
I have recovered it with the method QHSUSB_BULK on Oppo forums, and then, when i have a stock layout, i try again with this method.
It works like a charm! Thank youuuuuuu!!
9th November 2014, 09:02 AM |#9  
Trinaaa's Avatar
Senior Member
Flag Leipzig
Thanks Meter: 67
 
More
Hi.

If i go to recovery and execute adb shell, "device not found" error appears. Seems that i missed to install a driver. But i installed the oppo driver, adb driver from google... Nothing of that works.
9th November 2014, 09:12 AM |#10  
Junior Member
Flag Malang
Thanks Meter: 3
 
More
Quote:
Originally Posted by Trinaaa

Hi.

If i go to recovery and execute adb shell, "device not found" error appears. Seems that i missed to install a driver. But i installed the oppo driver, adb driver from google... Nothing of that works.

Enable USB Debugging under Developer options in ColorOS and disable MTP under the mount menu in TWRP, then reconnect the phone to PC.
The Following User Says Thank You to okiesuparno For This Useful Post: [ View ] Gift okiesuparno Ad-Free
9th November 2014, 09:59 AM |#11  
Trinaaa's Avatar
Senior Member
Flag Leipzig
Thanks Meter: 67
 
More
Done everything before, but i´ve got an old twrp version which doesn´t show me the "diasble mtp" option. With your hint i installed the newest twrp and it works! Thank you!
Post Reply Subscribe to Thread

Tags
development

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes