For some reason I'm getting "umount: can't umount /data: invalid argument"
As stated in the explanation, you can ignore this error. This simply means that partition isn't currently mounted, so there is nothing to unmount.
For some reason I'm getting "umount: can't umount /data: invalid argument"
Had to recall that part from memory, wasn't exactly sure about the error but thought it came close enough. I'll update the guide. Thanks for the heads-up.
Thank you all in this thread. I just lurked around and I used the procedure described here (postcount#34):
just a lil update.Thank you all in this thread. I just lurked around and I used the procedure described here (postcount#34):
http://xdaforums.com/showpost.php?p=57638797&postcount=34&nocache=1&z=9028208057861776
/sbin # ←[6nmkdosfs -n sdcard -F 32 /dev/block/mmcblk0p29
mkdosfs -n sdcard -F 32 /dev/block/mmcblk0p29
mkdosfs 3.0.12 (29 Oct 2011)
__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!
mkdosfs -n sdcard -F 32 /dev/block/mmcblk0p29
__bionic_open_tzdata: couldn't find any tzdata when looking for CST6CDT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
mkdosfs 3.0.12 (29 Oct 2011)
Use te correct command: umount (unmount without n!) [emoji6]For me, when i try to unmount it says "not found", as it can't find the unmount command.
i use the latest TWRP
Any ideas?
I just wanted to take a small moment to say: you're welcome all, and enjoy your Oppo with enlarged userdata partition!
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.
>>> 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. <<<
gdisk -b /sdcard/gpt.bin /dev/block/mmcblk0
dd if=/dev/block/mmcblk0p<partition id> of=/sdcard/backup-<partition id>.bin
adb pull /sdcard/gpt.bin
adb pull /sdcard/backup-<partition id>.bin
adb reboot recovery
adb push parted /sbin
adb push mke2fs /sbin
adb push tune2fs /sbin
chmod 755 /sbin/parted /sbin/mke2fs /sbin/tune2fs
umount /cache
umount /sdcard
umount /emmc
umount /data
parted /dev/block/mmcblk0
# 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
# 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
# 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
# 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
parted /dev/block/mmcblk0 print
adb reboot recovery
adb devices
ls /sbin
umount /cache
umount /sdcard
umount /emmc
umount /data
umount /dev/block/mmcblk0p29
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(!)
# 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
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.
# 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
At this point, we have clobbered the /persist partition and this could cause issues as mentioned earlier. Let's restore it.
# Mount the sdcard so we can push files to it
mount -t vfat /dev/block/mmcblk0p29 /sdcard
adb push mmcblk0p21_persist_ext4.img /sdcard/
dd if=/sdcard/mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
adb push openrecovery-twrp-2.8.3.0-find5.img /sdcard/
dd if=/sdcard/openrecovery-twrp-2.8.3.0-find5.img of=/dev/block/mmcblk0p24
adb shell
parted /dev/block/mmcblk0 print
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.
- Download drivers and computertool
- Download and follow the instructions