• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[HACK] Grow your data partition

Search This thread

cyansmoker

Inactive Recognized Developer
Sep 18, 2010
500
636
Los Angeles
nexus.zteo.com
>>> Please note that Vashiru reworked this guide for reliability and alternate values, so I recommend you check his various posts in this thread starting with this one. <<<

THE PROBLEM

As many of us have noticed, it is fairly easy to get an "Out of space" message when installing apps on our phones because, for some weird reason, Oppo decided that the storage part of the device should linger in the dark ages, when /userdata and /sdcard were separate partitions and you only had 2GB of data storage, even if your phone was a 32GB model.

Now, imagine that you are running KitKat and would like to try ART. This may be a bad idea as, if your data partition is more than 30% full, you will find that while converting your apps to this new format, Android will run out of space.

At OppoForums, a few bright people started looking into the issue and, of course, there is a way to improve the situation.

WARNING!

If you follow the steps below correctly, you should not run in any trouble. If you do not, however, you may end up spending much more time fixing your phone.

FIRST, THE THANKS SECTION

  • Anders tinkered with his device’s partition table until he got to where he had grown the /userdata partition to something useable. Yes, it’s some people’s definition of “play” ;)
  • Jousa11 is the first person trying to put a guide together explaining the steps to reproduce Anders’ work. WARNING: I did no get to see said guide as Jousa quickly deleted it due to the risks involved. So, take that in account!
  • Rockman for providing the last resort rescue tools in case you brick your phone
  • Lucky for providing the WiFi fix
Please let me know if you are not on this list and I forgot to give you credit!

YOU WILL NEED

The hardware:

  • An Oppo Find5 phone(!)
  • A computer (Windows/Linux/Mac) with adb installed and working
  • A USB cable

On your computer:

  • adb
  • [Optional] fastboot

On your phone (SDCard):

  • parted + mke2fs + tune2fs
  • mmcblk0p21_persist_ext4.img
  • openrecovery-twrp-2.6.3.0-find5-TP-patch.img
  • [Optional] gdisk

You will use parted to work on your partition table; mke2fs and tune2fs to create ext4 filesystems on some of these partitions (parted does not know how to create ext4 partitions)

mmcblk0p21_persist_ext4.img is an image that you need to restore your /persist partition and avoid issues such as non-working WiFi.

openrecovery-twrp-2.6.3.0-find5-TP-patch.img is a patched recovery image. I know: you already have a recovery image if you are going through these steps. However, we are going to wipe it so you want to install this guy before rebooting. Note that if you forget, you can always flash it later using fastboot.

On your computer:

  • adb to access your phone recovery, push files to SDCard, reboot...
  • [Optional] fastboot. You will only need fastboot if you mess up your recovery partition.

WHAT IF SOMETHING GOES AWFULLY WRONG?

You may “brick” your phone. Apparently it’s near impossible to hard brick your Find5, though. See below.

First, Anders recommends making a backup of your partition table. I didn’t because I felt that if I messed something up, it would be a partitions’ content rather than the partition table but that’s not the wisest approach.
Furthermore, if you are really worried about what stilly error your fat fingers will cause (I know I should be!) you can also backup your partitions.

Backing up your partition table:

On your phone:
Code:
gdisk -b /sdcard/gpt.bin /dev/block/mmcblk0
Backing up a single partition:

On your phone:
Code:
dd if=/dev/block/mmcblk0p<partition id> of=/sdcard/backup-<partition id>.bin
On your computer:
Code:
adb pull /sdcard/gpt.bin
adb pull /sdcard/backup-<partition id>.bin
LAST RESORT

OK. So, you've bricked your phone. Now what?
First, you will need Windows. So if you're on a Mac or Linux and have no access to a Windows machine/VM, er..don't brick your phone.


  1. - Download drivers and tools
  2. - Download and follow the instructions


READY ? LET'S GET STARTED


>>>>>>>>>>>> First, Download The Files <<<<<<<<<<<<

Then...

On your computer:
UPDATE As dixxa pointed out, mke2fs and tune2fs may already be present on your device. It was not the case for me but you should check first; it seems like a good idea to use existing binaries.
Code:
adb reboot recovery
adb push parted /sbin
adb push mke2fs /sbin
adb push tune2fs /sbin
On your phone:
Code:
chmod 755 /sbin/parted /sbin/mke2fs /sbin/tune2fs

umount /cache
umount /sdcard
umount /emmc
umount /data

parted /dev/block/mmcblk0

You are now in the parted shell.
CAREFUL! Do not delete any partition below 20 or you will enter "Big Oops" territory. I recommend typing carefully and, yes, staying away from copy/paste operations that may swallow a character like, say, the '2' in '20'

Note that the size value I am using here is '4GB' for /userdata (rather than 2GB). I guess you could make /userdata bigger than 4GB, in which case you would have to recompute all the offsets in the commands below(!)

Code:
# rm sdcard
rm 29
# 28 thru 23 are reserved
rm 28
rm 27
rm 26
rm 25
# rm recovery
rm 24
# rm misc
rm 23
# rm cache
rm 22
# rm persist
rm 21
# rm data/emmc
rm 20

# now, re-create partitions but data is bigger
mkpart primary 1325 5421
name 20 userdata
mkpart primary 5421  5430
name 21 persist
mkpart primary 5430  5967
name 22 cache
mkpart primary 5967  5968
name 23 misc
mkpart primary 5968  5979
name 24 recovery
mkpart primary 5979  6012
name 25 reserve1
mkpart primary 6012  6019
name 26 reserve2
mkpart primary 6019 6028
name 27 reserve3
mkpart primary 6028 6062
name 28 reserve4
mkpart primary 6062MB  100%
name 29 sdcard
# exit parted shell
q

Let's create a file system on the partitions that require one. Note that I am formatting the SDCard using VFAT as, yes, EXT4 is a better FS, but it is also incompatible with Oppo's ROM and some apps may not require the proper permissions etc.

Code:
# Notes:
# -m 0: no reserved blocks
# -c 0: no max mount count
# -C -1: no mount count
# -i -1: max_int interval between checks
mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p20
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p20
mke2fs -t ext4 -m 0 -L persist /dev/block/mmcblk0p21
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p21
mke2fs -t ext4 -m 0 -L cache /dev/block/mmcblk0p22
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p22
# Hey look it’s an ext4 SDCard!
mke2fs -t ext4 -m 0 -L sdcard /dev/block/mmcblk0p29
tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p29
# Actually to avoid errors like unable to write to root of sdcard:
mkdosfs -n sdcard -F 32 /dev/block/mmcblk0p29
mount -t vfat /dev/block/mmcblk0p29 /sdcard

At this point, we have clobbered the /persist partition and this could cause issues as mentioned earlier. Let's restore it.

Code:
# Restore /persist partition
mount -t ext4 /dev/block/mmcblk0p29 /sdcard
# On computer
adb push mmcblk0p21_persist_ext4.img /sdcard/
# On phone
dd if=mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21

IMPORTANT! Flash your recovery partition now. If you wait until after rebooting, you will need to use fastboot instead.

Code:
# Recovery partition: on computer
adb push openrecovery-twrp-2.6.3.0-find5-TP-patch.img /sdcard/
# On phone
dd if=openrecovery-twrp-2.6.3.0-find5-TP-patch.img of=/dev/block/mmcblk0p24

Admire your work
Code:
parted /dev/block/mmcblk0 print

Reboot into your new recovery and install your favorite ROM

FAQ

Q: Is this dangerous?
A: Yes. Yes, it is.

Q: Any tip?
A: Yes. Follow these instructions carefully and if something wrong happens, unless you know what you are doing, leave your device alone and come here to ask for help.

Q: Can I hold you responsible for any damage to my phone/etc?
A: As usual, the answer is 'No'

Q: I found an error in your write-up!
A: Please let me know immediately.

-Chris.
 
Last edited:

dixxa

Senior Member
Jul 30, 2007
353
12
Neuilly-Plaisance
This thread is fine the only problem here is with those 2 binaries: mke2fs and tune2fs
You don't need to push them or chmod them since they are already in the recovery
Except that that thread is perfect.
 
Feb 4, 2011
13
2

mattzildjian

Senior Member
Mar 23, 2011
108
18
Hi all, I am trying to do this mod and I am half way through it with a problem

I am stuck on the new file system, I cannot use mke2fs or tune2fs, i get

Code:
mke2fs: not found

like it doesn't even exist, but it does I can see it. I get the same error for tune2fs. but parted and gdisk work fine.

Yes I did push them and chmod 755 them.. and I have tried running it from the /sbin directory.

Help!
 

klaassybrand

New member
Jan 13, 2010
1
0
Hello!

I'm getting the same error over and over again creating /dev/block/mmcblk0p21 to /dev/block/mmcblk0p22:

tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p21

"Bad magic number in super-block while trying to open /dev/block/mmcblk0p21"
"Couldn't find valid filesystem superblock"

So i can't create a file system on the created partitions. I have been looking everywhere for an answer. Somebody have an idea?
 

killerskincanoe

Senior Member
Mar 4, 2009
1,191
88
U should just wait. Andrew dodd found a way to make find7a have unified partition and he claims he can make it work on find5 as well. Let's give him a bit to figure it out tho.

Scribed henceforth from thy G pad.
 
  • Like
Reactions: cajuda
Nov 26, 2013
38
3
Gdisk not working... :(

Ok guys sort of a noob here... Firstly, totally appreciate what you guys are doing here... I wants it bad, thass why i'm here. ;)

So far... I have i have done...

"adb reboot recovery"

"adb push gdisk /sbin"

I figured that's how you are supposed to install it ... hope i'm not wrong, but i guess it pushed through fine

But after rebooting to system in TWRP , i opened terminal emulator and when i use the command

"gdisk -b /sdcard/gpt.bin /dev/block/mmcblk0"

I get ...

"/system/bin/sh: gdisk: not found"

now i'm too scared to proceed without backing up the partition tables... so please help...

edit - FYI , i'm running the last build of Asylum Carbon... should i just go back to latest oopo stable stock rom and then root my device again and then try all this again... would that help... ???
 
Last edited:

killerskincanoe

Senior Member
Mar 4, 2009
1,191
88
Directly from Andrew Dodds g+ " IT HAS BEGUN.

The first phase of Find 7a/7s LVM testing is here.* See linked post for details.* (Sorry to disappoint, but the first phase is "make sure we don't break existing configurations")

Once this phase is complete, the remaining list is:
Fix up the remaining TWRP issues (make RECOVERY_SDCARD_ON_DATA runtime instead of compile-time)
Make user-friendly conversion processes

Once things are solid on Find 7, I'll work on Find 5 and N1."

Stay thirsty my friends. Good things ahead

Sent from my A0001 using Tapatalk
 

Fickx

Member
Jan 18, 2009
23
4
Can someone help please?

I'm trying to do this, but after enter in parted [parted /dev/block/mmcblk0] when i try to do "rm 29", i get "can't remove 29: no such file or directory

I'm doing the "on your phone" commands in TWRP command line., is that correct?

I'm running stable colorOS 1.0.9i
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    >>> Please note that Vashiru reworked this guide for reliability and alternate values, so I recommend you check his various posts in this thread starting with this one. <<<

    THE PROBLEM

    As many of us have noticed, it is fairly easy to get an "Out of space" message when installing apps on our phones because, for some weird reason, Oppo decided that the storage part of the device should linger in the dark ages, when /userdata and /sdcard were separate partitions and you only had 2GB of data storage, even if your phone was a 32GB model.

    Now, imagine that you are running KitKat and would like to try ART. This may be a bad idea as, if your data partition is more than 30% full, you will find that while converting your apps to this new format, Android will run out of space.

    At OppoForums, a few bright people started looking into the issue and, of course, there is a way to improve the situation.

    WARNING!

    If you follow the steps below correctly, you should not run in any trouble. If you do not, however, you may end up spending much more time fixing your phone.

    FIRST, THE THANKS SECTION

    • Anders tinkered with his device’s partition table until he got to where he had grown the /userdata partition to something useable. Yes, it’s some people’s definition of “play” ;)
    • Jousa11 is the first person trying to put a guide together explaining the steps to reproduce Anders’ work. WARNING: I did no get to see said guide as Jousa quickly deleted it due to the risks involved. So, take that in account!
    • Rockman for providing the last resort rescue tools in case you brick your phone
    • Lucky for providing the WiFi fix
    Please let me know if you are not on this list and I forgot to give you credit!

    YOU WILL NEED

    The hardware:

    • An Oppo Find5 phone(!)
    • A computer (Windows/Linux/Mac) with adb installed and working
    • A USB cable

    On your computer:

    • adb
    • [Optional] fastboot

    On your phone (SDCard):

    • parted + mke2fs + tune2fs
    • mmcblk0p21_persist_ext4.img
    • openrecovery-twrp-2.6.3.0-find5-TP-patch.img
    • [Optional] gdisk

    You will use parted to work on your partition table; mke2fs and tune2fs to create ext4 filesystems on some of these partitions (parted does not know how to create ext4 partitions)

    mmcblk0p21_persist_ext4.img is an image that you need to restore your /persist partition and avoid issues such as non-working WiFi.

    openrecovery-twrp-2.6.3.0-find5-TP-patch.img is a patched recovery image. I know: you already have a recovery image if you are going through these steps. However, we are going to wipe it so you want to install this guy before rebooting. Note that if you forget, you can always flash it later using fastboot.

    On your computer:

    • adb to access your phone recovery, push files to SDCard, reboot...
    • [Optional] fastboot. You will only need fastboot if you mess up your recovery partition.

    WHAT IF SOMETHING GOES AWFULLY WRONG?

    You may “brick” your phone. Apparently it’s near impossible to hard brick your Find5, though. See below.

    First, Anders recommends making a backup of your partition table. I didn’t because I felt that if I messed something up, it would be a partitions’ content rather than the partition table but that’s not the wisest approach.
    Furthermore, if you are really worried about what stilly error your fat fingers will cause (I know I should be!) you can also backup your partitions.

    Backing up your partition table:

    On your phone:
    Code:
    gdisk -b /sdcard/gpt.bin /dev/block/mmcblk0
    Backing up a single partition:

    On your phone:
    Code:
    dd if=/dev/block/mmcblk0p<partition id> of=/sdcard/backup-<partition id>.bin
    On your computer:
    Code:
    adb pull /sdcard/gpt.bin
    adb pull /sdcard/backup-<partition id>.bin
    LAST RESORT

    OK. So, you've bricked your phone. Now what?
    First, you will need Windows. So if you're on a Mac or Linux and have no access to a Windows machine/VM, er..don't brick your phone.


    1. - Download drivers and tools
    2. - Download and follow the instructions


    READY ? LET'S GET STARTED


    >>>>>>>>>>>> First, Download The Files <<<<<<<<<<<<

    Then...

    On your computer:
    UPDATE As dixxa pointed out, mke2fs and tune2fs may already be present on your device. It was not the case for me but you should check first; it seems like a good idea to use existing binaries.
    Code:
    adb reboot recovery
    adb push parted /sbin
    adb push mke2fs /sbin
    adb push tune2fs /sbin
    On your phone:
    Code:
    chmod 755 /sbin/parted /sbin/mke2fs /sbin/tune2fs
    
    umount /cache
    umount /sdcard
    umount /emmc
    umount /data
    
    parted /dev/block/mmcblk0

    You are now in the parted shell.
    CAREFUL! Do not delete any partition below 20 or you will enter "Big Oops" territory. I recommend typing carefully and, yes, staying away from copy/paste operations that may swallow a character like, say, the '2' in '20'

    Note that the size value I am using here is '4GB' for /userdata (rather than 2GB). I guess you could make /userdata bigger than 4GB, in which case you would have to recompute all the offsets in the commands below(!)

    Code:
    # rm sdcard
    rm 29
    # 28 thru 23 are reserved
    rm 28
    rm 27
    rm 26
    rm 25
    # rm recovery
    rm 24
    # rm misc
    rm 23
    # rm cache
    rm 22
    # rm persist
    rm 21
    # rm data/emmc
    rm 20
    
    # now, re-create partitions but data is bigger
    mkpart primary 1325 5421
    name 20 userdata
    mkpart primary 5421  5430
    name 21 persist
    mkpart primary 5430  5967
    name 22 cache
    mkpart primary 5967  5968
    name 23 misc
    mkpart primary 5968  5979
    name 24 recovery
    mkpart primary 5979  6012
    name 25 reserve1
    mkpart primary 6012  6019
    name 26 reserve2
    mkpart primary 6019 6028
    name 27 reserve3
    mkpart primary 6028 6062
    name 28 reserve4
    mkpart primary 6062MB  100%
    name 29 sdcard
    # exit parted shell
    q

    Let's create a file system on the partitions that require one. Note that I am formatting the SDCard using VFAT as, yes, EXT4 is a better FS, but it is also incompatible with Oppo's ROM and some apps may not require the proper permissions etc.

    Code:
    # Notes:
    # -m 0: no reserved blocks
    # -c 0: no max mount count
    # -C -1: no mount count
    # -i -1: max_int interval between checks
    mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p20
    tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p20
    mke2fs -t ext4 -m 0 -L persist /dev/block/mmcblk0p21
    tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p21
    mke2fs -t ext4 -m 0 -L cache /dev/block/mmcblk0p22
    tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p22
    # Hey look it’s an ext4 SDCard!
    mke2fs -t ext4 -m 0 -L sdcard /dev/block/mmcblk0p29
    tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p29
    # Actually to avoid errors like unable to write to root of sdcard:
    mkdosfs -n sdcard -F 32 /dev/block/mmcblk0p29
    mount -t vfat /dev/block/mmcblk0p29 /sdcard

    At this point, we have clobbered the /persist partition and this could cause issues as mentioned earlier. Let's restore it.

    Code:
    # Restore /persist partition
    mount -t ext4 /dev/block/mmcblk0p29 /sdcard
    # On computer
    adb push mmcblk0p21_persist_ext4.img /sdcard/
    # On phone
    dd if=mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21

    IMPORTANT! Flash your recovery partition now. If you wait until after rebooting, you will need to use fastboot instead.

    Code:
    # Recovery partition: on computer
    adb push openrecovery-twrp-2.6.3.0-find5-TP-patch.img /sdcard/
    # On phone
    dd if=openrecovery-twrp-2.6.3.0-find5-TP-patch.img of=/dev/block/mmcblk0p24

    Admire your work
    Code:
    parted /dev/block/mmcblk0 print

    Reboot into your new recovery and install your favorite ROM

    FAQ

    Q: Is this dangerous?
    A: Yes. Yes, it is.

    Q: Any tip?
    A: Yes. Follow these instructions carefully and if something wrong happens, unless you know what you are doing, leave your device alone and come here to ask for help.

    Q: Can I hold you responsible for any damage to my phone/etc?
    A: As usual, the answer is 'No'

    Q: I found an error in your write-up!
    A: Please let me know immediately.

    -Chris.
    13
    Alright, sorry you had to wait a little while longer but here it is. I'll try to make the steps as easy as possible but feel free to ask any questions if you run into problems. In this post I've collected the information of all the previous post. Thus the commands causing problems have been removed, others have been added/modified and the whole thing has been seperated phone/pc so it's a little clearer what to do. Also TWRP has been updated to the newest 2.8.0.1.

    Please note: I've followed these instructions on Windows 7 with UAC turned off. I can not be held responsible for any damage you do to your device. My device is the 32 GB model but the instructions also apply to the 16 GB model.

    Starting situation:

    • A rooted Oppo Find 5
    • TWRP 2.8.3.0 installed on your Oppo Find 5
    • Working ADB connection with your device (see below on how to install adb and how to solve driver issues)
    • TWRP 2.8.3.0 a copy of this image on your PC (you're going to flash this after manipulating the partitions)
    • The following files from the OP cyansmoker
    • Read the FULL post before executing it and you're aware of the dangers of executing this procedure and you're aware that the last resort method only works on Windows 7
    Newer versions of TWRP should work as well, but 2.8.3.0 has been confirmed to be working.

    To get the ADB connection working:

    1. Download & install the ADB installer from: Snoop5's ADB Installer
    2. Download & install PDANet+ (ADB Driver, I had trouble with the original Oppo drivers)
    3. Turn on your phone and boot to Android
    4. Connect your phone to you computers, wait for the drivers to install on your computer
    5. Unlock your phone, you shoud now be prompted if you trust your computer for ABD. Tell it to remember the choice and allow access
    6. Open the Command Prompt and run the 'adb devices' command to check if the connection is working. As long as this lists your device and doesn't say untrusted you're good to go.

    Before you continu: make sure you have a back-up of all the files you want to keep. This includes data on the SD-Card as this will be destroyed during the process. Please note that making a full back-up with TWRP will not guarantee that you'll be able to restore that back-up. In my case the back-up files were 1,5 GB and once I wanted to restore them the file system wouldn't accept files of this size.

    Alright ready, here it goes.
    Multiple users across XDA and the Oppo forums reported that all steps can be executed from the ADB shell as well and there's no need to enter any commands on your phone. I've been able to confirm this when I enlarged my partition from 4 GB to 6 GB. However some people have reported that they weren't able to use the shell anymore after entering parted. So I'll leave the guide as it is, with some commands entered through your computer, others on your phone. Those willing to attempt this from their computer probably know how. Please not that you still have to boot into recovery even when executing this procedure from your computer!

    First things first, let's reboot into recovery, after that we'll double check if the connection is still trusted.
    Code:
    adb reboot recovery
    adb devices

    Because parted, mke2fs and tune2fs are included in TWRP so we won't have to push them. But just to be sure, we're gonna double check if they exists. If they don't, you won't be able to continu following these instructions. DO NOT push the versions from the zip you just downoaded 'just to be sure' as this will actually break stuff later on

    On your phone, go to Advanced -> Terminal Command (you can't follow the procedure from the terminal emulator inside Android, don't even attempt to) to open the terminal and execute the following command:
    Code:
    ls /sbin
    Now double check if the list contains mke2fs, parted and tune2fs. If not, stop now!

    Now, on your phone (you'll have to manually clear the line after each command, even when successfuly executed):
    Code:
    umount /cache
    umount /sdcard
    umount /emmc
    umount /data
    umount /dev/block/mmcblk0p29
    Some of these might throw a 'invalid' error, this is not a problem, this simply means those folders aren't mounted right now.

    From the OP cyansmoker:
    CAREFUL! Do not delete any partition below 20 or you will enter "Big Oops" territory. I recommend typing carefully and, yes, staying away from copy/paste operations that may swallow a character like, say, the '2' in '20'

    Note that the size value I am using here is '4GB' for /userdata (rather than 2GB). I guess you could make /userdata bigger than 4GB, in which case you would have to recompute all the offsets in the commands below(!)

    So as quoted from Cyansmoker, this guide contains the values for 4GB. I recommend 4 GB when installing Kitkat, but if you plan on installing Lollipop (now or later) go for 6 GB. Apps take up about 1,5 times more space on Lollipop due to the change from ART to Dalvik. The mkpart values for 6GB can be found in Post #54. Other than that the guide is exactly the same.

    On your computer (lines starting with a # are comments, you won't have to enter these. Every line is a new command):
    Code:
    # Enter the adb shell
    adb shell
    # Open the parted shell 
    parted /dev/block/mmcblk0
    
    # remove partition 30, some people reported to have a partition 30, if it fails to remove ignore because it doesn't exist ignore it
    rm 30
    # rm sdcard
    rm 29
    # 28 thru 23 are reserved
    rm 28
    rm 27
    rm 26
    rm 25
    # rm recovery
    rm 24
    # rm misc
    rm 23
    # rm cache
    rm 22
    # rm persist
    rm 21
    # rm data/emmc
    rm 20
    
    # now, re-create partitions but data is bigger
    mkpart primary 1325 5421
    name 20 userdata
    mkpart primary 5421  5430
    name 21 persist
    mkpart primary 5430  5967
    name 22 cache
    mkpart primary 5967  5968
    name 23 misc
    mkpart primary 5968  5979
    name 24 recovery
    mkpart primary 5979  6012
    name 25 reserve1
    mkpart primary 6012  6019
    name 26 reserve2
    mkpart primary 6019 6028
    name 27 reserve3
    mkpart primary 6028 6062
    name 28 reserve4
    mkpart primary 6062MB  100%
    name 29 sdcard
    # exit parted shell
    q
    #close adb shell
    exit
    If everything went as it should you should now have the partitions, but some of them have to be reformatted.

    From the OP cyansmoker:
    Let's create a file system on the partitions that require one. Note that I am formatting the SDCard using VFAT as, yes, EXT4 is a better FS, but it is also incompatible with Oppo's ROM and some apps may not require the proper permissions etc.

    The following steps are executed on your phone. Be aware that when you run a mke2fs command your phone's screen will turn off. Simply turn it back on, return to the terminal, clear the command line (it won't auto-clear) and enter the following command. I found that the screen turning off is normal and isn't an issue. Running these commands from the adb shell wouldn't work for me.
    On your phone:
    Code:
    # Notes:
    # -m 0: no reserved blocks
    # -c 0: no max mount count
    # -C -1: no mount count
    # -i -1: max_int interval between checks
    mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p20
    tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p20
    mke2fs -t ext4 -m 0 -L persist /dev/block/mmcblk0p21
    tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p21
    mke2fs -t ext4 -m 0 -L cache /dev/block/mmcblk0p22
    tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p22
    # Hey look it’s an ext4 SDCard!
    mke2fs -t ext4 -m 0 -L sdcard /dev/block/mmcblk0p29
    tune2fs -c 0 -i -1 -C -1 /dev/block/mmcblk0p29
    # Actually to avoid errors like unable to write to root of sdcard we need to reformat it as fat32. If you get __bionic_open_tzdata warnings, ignore them.
    mkdosfs -n sdcard -F 32 /dev/block/mmcblk0p29

    From the OP cyansmoker:
    At this point, we have clobbered the /persist partition and this could cause issues as mentioned earlier. Let's restore it.

    On your phone:
    Code:
    # Mount the sdcard so we can push files to it
    mount -t vfat /dev/block/mmcblk0p29 /sdcard

    On your computer:
    Code:
    adb push mmcblk0p21_persist_ext4.img /sdcard/

    On your phone:
    Code:
    dd if=/sdcard/mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
    The /persist partition has now been restored. We're almost there.

    On with flashign the recovery.
    On your computer:
    Code:
    adb push openrecovery-twrp-2.8.3.0-find5.img /sdcard/

    On your phone:
    Code:
    dd if=/sdcard/openrecovery-twrp-2.8.3.0-find5.img of=/dev/block/mmcblk0p24

    To admire your work and to make sure everything went as it should do the following.
    On your pc:
    Code:
    adb shell
    parted /dev/block/mmcblk0 print
    Now double check if you typed all the partition names correctly. If you made a mistake: follow the umount instructions again, open parted, rename the partition, quit parted, mount the sdcard on your phone again.

    That's it! Reboot your phone into the newly installed recovery and install your favorite rom. (If you don't reboot you'll run into a lot of trouble when/after installing roms).

    FAQ:

    Q: Is this dangerous?
    A: Yes. Yes, it is.

    Q: Any tip?
    A: Yes. Follow these instructions carefully and if something wrong happens, unless you know what you are doing, leave your device alone and come here to ask for help.

    Q: Can I hold you responsible for any damage to my phone/etc?
    A: As usual, the answer is 'No'

    Q: I found an error in your write-up!
    A: Please let me know immediately.

    Q: My ADB connection stopped working somewhere during the process, what do I do now?
    A: Follow the last resort method mentioned below

    Q: HELP I THINK I MESSED UP MISSERABLY
    A: Follow the last resort method mentioned below. A Find 5 is very hard to brick.

    Q: I get mke2fs/tune2fs/parted not found errors
    A: You probably pushed the versions in the ZIP file and chmodded them like the OP said, you should not have done that. Follow the instructions in this post instead.

    Q: I get unmount command not found error
    A: It's umount, not unmount, so without the letter n, common mistake, retry and carry on.

    Q: When running mkdosfs (when using a newer version of TWRP) I get __bionic_open_tzdata messages, what do I do?
    A: Ignore them, it are only warnings, not error messages so it's not an issue.

    Q: I've used the last resort method and after that flashed a new ROM, now my WiFi isn't working
    A: The computertool installs a very old version of ColorOS, running modem 4.1. All recent roms use modem 4.2. Download it and flash using TWRP. (Note that the modem version isn't necessarily the same version as the Android version on your device).

    Q: I've followed all the steps, the data partition is now 4GB (or larger) but WiFi isn't working.
    A: 2 possibilities: Something went wrong flashing the persist partition, follow the guide again. Or, most likely: You came from a very old rom using modem 4.1. All recent roms use modem 4.2. Download it and flash using TWRP. (Note that the modem version isn't necessarily the same version as the Android version on your device).

    Q: My touchscreen isn't working in TWRP
    A: Kallsop at the Oppo forums has ran into the same issue in post #672 on the Oppo forums. He used CWM instead of TWRP to follow the steps. Difference is you have to execute all commands from your computer (which I've not confirmed to be working yet, but according to multiple users it is possible) and use the newfs_msdos command instead of mkdosfs.

    Q: Can I use ClockworkMod Recovery instead of TWRP for following this guide?
    According to Kallsop at the Oppo forums in post #672 you can. Difference is that you need to execute all command from your computer (which I've not confirmed to be working yet) and use the newfs_msdos command instead of mkdosfs.

    Last resort:
    OK. So, you've bricked your phone. Now what?
    First, you will need Windows. So if you're on a Mac or Linux and have no access to a Windows machine/VM, er..don't brick your phone.
    1. Download drivers and computertool
    2. Download and follow the instructions

    Credits:

    • Anders tinkered with his device’s partition table until he got to where he had grown the /userdata partition to something useable. Yes, it’s some people’s definition of “play” ;)
    • Jousa11 is the first person trying to put a guide together explaining the steps to reproduce Anders’ work. WARNING: I did no get to see said guide as Jousa quickly deleted it due to the risks involved. So, take that in account!
    • Rockman for providing the last resort rescue tools in case you brick your phone
    • Lucky for providing the WiFi fix
    • cyansmoker for the guide in the first post, parts of his post have been copied into this one for information/warning purposes.
    • Fickx for the 'rm29-fail-due-to-partition-in-use' fix
    • joeblk for the summarized explanation
    • Daniel Azevedo Link to modem 4.1 and modem 4.2.

    That's all folks, enjoy your Oppo Find 5 with 4 GB (or larger) data partition. For me it was the best thing ever to happen to my phone apart from getting the device in the first place. :D

    - Vashiru
    (Last update: 26/01/2015 20:32 GMT+1)
    5
    GUI Tool for data partition...

    Based on the information in this thread and oppo forums, I thought it would be nice to have it included in a GUI tool. Fortunately I found O-Tools which specifically helped oppo devices do various things without getting into the command prompt. I have added on top of that to allow for the data partitions to grow ranging from 6GB to 10GB.

    The code is available on: https://github.com/wolverine2k/O-Tools/tree/linux. I will soon push the binaries on that one as well. Attached are some screenshots for the same. I have successfully updated my data partition to 10GB running that tool.

    Would be great to hear your comments.

    o_tools_1.png

    o_tools_2.png

    CBARSc_PWYAAR_uv.jpg


    Cheers,
    3
    I just wanted to take a small moment to say: you're welcome all, and enjoy your Oppo with enlarged userdata partition! :D

    Also I've updated the guide based on comments I received in this topic and on the Oppo forums. The guide now includes a link to the 6 GB datapartition values (which I recommend when planning on installing Lollipop now or later), instructions to ignore the __bionic_open_tzdata warnings on running the msdos_fs cmmand, the notion that it should be possible to run all commands from your computer (although I've not tested this myself other users have reported that this is possible) and that it's possible to follow this guide using CWM instead of TWRP and what the required changes are to do so. Thanks everyone for letting me know about this stuff and keep any additional information coming! :good: I'll keep updating the guide so it will always be up-to-date with the latest information and it's no longer necessary to scroll trough pages on end looking for a solution for a particular problem.
    3
    Directly from Andrew Dodds g+ " IT HAS BEGUN.

    The first phase of Find 7a/7s LVM testing is here.* See linked post for details.* (Sorry to disappoint, but the first phase is "make sure we don't break existing configurations")

    Once this phase is complete, the remaining list is:
    Fix up the remaining TWRP issues (make RECOVERY_SDCARD_ON_DATA runtime instead of compile-time)
    Make user-friendly conversion processes

    Once things are solid on Find 7, I'll work on Find 5 and N1."

    Stay thirsty my friends. Good things ahead

    Sent from my A0001 using Tapatalk