[Q] How to recover files from formatted partition, find Userdata block - G2 Q&A, Help & Troubleshooting

I just downgraded my Verizon G2 from 12b to 11a with this guide: (because of the push email issue)
http://forum.xda-developers.com/showthread.php?t=2448960
What I didn't realize was it would erase the data partition and now all my pictures are gone (idiot, I know)
Recovery software wont work because the G2 is only listed as a MTP device and they software doesn't see it.
I tried using this guide here, http://forum.xda-developers.com/showthread.php?t=1994705, which has instructions for the Galaxy Nexus which has the same MTP only issue. It basically dumps the partition as a .raw file to the computer through adb and then you can recover from that. I'm having a problem with this command "/system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p12" mmcblk0p12 is the block on the galaxy nexus where the userdata was stored. I thought I had found the G2's block at "/dev/block/platform/msmsdcc.1/by-name/userdata" but the command doesn't work
Does anyone have any idea what the block path really is or an alternative to recover my lost stuff? Thanks.

Also tried to flash TWRP and then mount from there so software will see it but mounting does nothing

indigoataxia said:
I just downgraded my Verizon G2 from 12b to 11a with this guide: (because of the push email issue)
http://forum.xda-developers.com/showthread.php?t=2448960
What I didn't realize was it would erase the data partition and now all my pictures are gone (idiot, I know)
Recovery software wont work because the G2 is only listed as a MTP device and they software doesn't see it.
I tried using this guide here, http://forum.xda-developers.com/showthread.php?t=1994705, which has instructions for the Galaxy Nexus which has the same MTP only issue. It basically dumps the partition as a .raw file to the computer through adb and then you can recover from that. I'm having a problem with this command "/system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p12" mmcblk0p12 is the block on the galaxy nexus where the userdata was stored. I thought I had found the G2's block at "/dev/block/platform/msmsdcc.1/by-name/userdata" but the command doesn't work
Does anyone have any idea what the block path really is or an alternative to recover my lost stuff? Thanks.
Click to expand...
Click to collapse
Hi there,
You should identify which partition is your data partition (link in step 1 of the guide). I did it, it shows me mmcblk0p35 (i have D802). But I had another problem.
I have rooted stock rom (D80210f-EUR-XX) with stock recovery. After modyfying /system/build.prop i got bootloop. the only thing I could do was to enter stock recovery and "Reset to defaults", so I did, but I lost all my data, messages, settings etc.
I tried to recover data partition using the same guide, but i'm stuck at step 6. It shows me speed of 0 B/s and creates file of 0B nomatter how long I wait.
Can anybody help please?

indigoataxia said:
I just downgraded my Verizon G2 from 12b to 11a with this guide: (because of the push email issue)
http://forum.xda-developers.com/showthread.php?t=2448960
What I didn't realize was it would erase the data partition and now all my pictures are gone (idiot, I know)
Recovery software wont work because the G2 is only listed as a MTP device and they software doesn't see it.
I tried using this guide here, http://forum.xda-developers.com/showthread.php?t=1994705, which has instructions for the Galaxy Nexus which has the same MTP only issue. It basically dumps the partition as a .raw file to the computer through adb and then you can recover from that. I'm having a problem with this command "/system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p12" mmcblk0p12 is the block on the galaxy nexus where the userdata was stored. I thought I had found the G2's block at "/dev/block/platform/msmsdcc.1/by-name/userdata" but the command doesn't work
Does anyone have any idea what the block path really is or an alternative to recover my lost stuff? Thanks.
Click to expand...
Click to collapse
I'have your same issue (LG G2 D802)
I tried with:
/system/xbin/busybox ncat -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/platform/msm_sdcc.1/mmcblk0p35
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/platform/msm_sdcc.1/mmcblk0p35
/system/xbin/busybox ncat -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p35
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p35
but nothing happen!
did you solve? if yes, how???

tetractius said:
did you solve? if yes, how???
Click to expand...
Click to collapse
No, never was able to recover.

Sorry for reviving a dead thread.
Has anyone been able to successfully recover their deep formatted drive? Like the guide mentioned does? I'm currently trying, but no success..

Related

Question about recent Recovery Images

Okay, so I have used four recovery images since I have had my G1 and now the myTouch 3g. Two from Cyanogen when I had my G1. When I rooted my MT3G I had Amon_Ra's 1.2.0G and 1.2.1G. Today I flashed Twisted's Recovery Image. Both Amon's and Twisted's give the option to partition your memory card (Fat32, Ext2, and Linux-Swap). I love that because it makes things so much easier. Well, getting to the point of this thread. Are there any recovery images that format just the ext. part of our memory cards? Is that even possible? I ask because I flash different ROM's every few days and I like to wipe my ext3 to give it a fresh start for each ROM. I know it's just a few codes through ADB, but I'm sure I'm not alone when I say I like to be lazy. That would make things so much easier. Thanks in advance for any feedback.
To wipe your ext3 data ..
Code:
adb remount
adb shell rm -rf /system/sd/*
adb shell rm -rf /data/dalvik-cache/*
This should be the last thing you do before you flash as it will stop stuff from working properly!
In case you need more information: Connect your device and type "adb shell" and then do "mount | grep mmcblk0p2", this will show you where your ext2/3 partition is mounted (mmcblk0 represents your sd card, and p2 is the second partition) :
Code:
# mount | grep mmcblk0p2
mount | grep mmcblk0p2
/dev/block/mmcblk0p2 on /system/sd type ext2 (rw,noatime,nodiratime,errors=conti
nue)
/dev/block/mmcblk0p2 on /data/dalvik-cache type ext2 (rw,noatime,nodiratime,erro
rs=continue)
exit

[HACK] Grow your data partition

>>> 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. <<<
Click to expand...
Click to collapse
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.
- Download drivers and tools
- 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.
You should probably use the latest TWRP 2.6.3.1 found here: http://techerrata.com/file/twrp2/find5/openrecovery-twrp-2.6.3.1-find5.img
Looks good to me. Just be very carefully doing this.
Sent from my Find 5 using xda app-developers app
gdisk -b /sdcard/gpt.bin /dev/block/mmcblk0
those commands need to be typed in recovery even that one ?
Yes although I imagine this particular command should also work when booting system.
Sent from my Find 5 using Tapatalk
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.
Since we're at toying with partition, can't we merge the partitions in some way ?
Just wondering is there any way to build a script to do this in an automated way thus avoiding user errors and typos?
There is a thread on the oppo forums
http://www.oppoforums.com/threads/guide-resizing-internal-storage-on-find-5-32gb.8361/
Hello everyone,
is the guide for the 32 or 16 gb model?
I have 16 gb Oppo find 5.
Thanks.
PS: what "on your phone" is supposed to mean"?
Click to expand...
Click to collapse
If you don't know what does that mean don't do it you'll screw your phone.
hi
Please would you make something like this for oppo find 7a x9006?
thanks
Anyone willing to recompute all the offsets dor just one 16gb partition?
Scribed henceforth from thy G pad.
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!
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?
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.
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... ???
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
Does this work for the 16gb model?
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
Finally I finish the process.
My notes:
Goal:
Keep my current system intact (stable colorOS 1.0.9i , because i have no patience to format, install a new ROM and reinstall/recofigure everything
So I backup everything on phone with TWRP and I push sdcard content (wich include the system backup i made) with ADB
1 - If I push mke2fs and tune2fs IT WILL NOT WORK. I flash the last find 5 recovery (openrecovery-twrp-2.8.1.0-find5.img) and I dont push or chmod anyting, parted, mke2fs, tune2fs are all already in the recover and that's the only way I could run mke2fs and tune2fs
edit: 1.5 - The phone commands had to be enter via ADB shell. In TWRP command line, after you enter in parted it will not accept commands.
2 - To "rm 29", i had to "umount /dev/block/mmcblk0", otherwise "rm 29" fail due to partition in use
3 - after this instruction:
mount -t vfat /dev/block/mmcblk0p29 /sdcard
(the last one on the 4 block of code)
We have this:
# Restore /persist partition
mount -t ext4 /dev/block/mmcblk0p29 /sdcard
This instruction was the only one that give me a error, so I move to the next ones.
The error was that the partition was busy, what makes senses because in the last instruction we mount the same partition on the same folder but with different file system!!??
So I move to the next instruction. I have no idea if it's a instructions mistake but it looks like, because it says "# Restore /persist partition" but the command has nothing to do with /persist
4 - FINISH
5 - Reboot in recovery. Push sdcard backup to /sdcard. restore system backup with TWRP restore
Voila, my phone exactly as before but with 3,76GB for APPS. Finally!!! The "running out of space" message on a flagship quad-core 2GB RAM phone!!!!!!?????? Was driving me CRAZYYYYY
Thanks Fickx for the up to date information, I just did my re-partition successfully, here's what I did:
- Use Rashr update the recovery to twrp-2.8.1.0
- reboot into recovery
- connect to PC (Make sure adb works, "adb devices")
- on PC:
> adb shell
> umount /cache
> umount /sdcard
> umount /emmc
> umount /data
> umount /dev/block/mmcblk0p29
> parted /dev/block/mmcblk0
> rm 29
>...
> rm 20
> mkpart primary 1325 5421
> name 20 userdata
> ...
> name 29 sdcard
> q
> mke2fs ...
> ...
> mount -t -vfat /dev/block/mmcblk0p29 /sdcard
Open another PC command terminal
> adb push mmcblk0p21_persist_ext4.img /sdcard/
> adb push openrecovery-twrp-2.8.1.0-find5.img /sdcard/
Back to original terminal in "adb shell".
> dd if=/sdcard/mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
> dd if=/sdcard/openrecovery-twrp-2.8.1.0-find5.img of=/dev/block/mmcblk0p24
> exit
> adb reboot recovery
Flash the rom.

[Q] Unable to mount /data

hey guys,
i have a huge problem with my Iconia A200. (I know its a a500 forum, but I think they are nearly the same..)
When I enter TWRP, I am not able to mount or wipe /data.. It says "Unable to mount /data".
I cant even install a Custom or Stock Rom (because of blabla /data).
Then I tried to follow this guide:
http://forum.xda-developers.com/showthread.php?t=1798652&page=3
The problem is point 2:
2) /Data would not mount - I have no idea how this got screwed up, but the solution was:
* Connect the tablet to the PC in RECOVERY. At this point, ADB should work. If not, check the drivers on the PC - I had to manually specify the Acer ADB Composite driver.
* Open a Command prompt window
* Start ADB shell by typing:
ADB SHELL
* Now execute the following:
mke2fs -j -b 4096 /dev/block/mmcblk0p8
tune2fs -O extents,uninit_bg,dir_index -C 1 /dev/block/mmcblk0p8
e2fsck -fy /dev/block/mmcblk0p8
After this is done your file system on /data will be fixed. (solution posted by spoupard on XDA-Developers.com)
When I enter mke2fs -j -b 4096 /dev/block/mmcblk0p8 after "adb shell" nothing more happens.
It only says mke2fs 1.41.0 (DATE..2010 or something) and then.. Nothing more.
Can someone help me to fix the /data problem?
Ah and I dont have a ROM installed yet, hard reset is broken, too..

[Q&A] [HACK] Grow your data partition

Q&A for [HACK] Grow your data partition
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 [HACK] Grow your data partition. 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!
killerskincanoe said:
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
Click to expand...
Click to collapse
Any update ?
abuthabet87 said:
Any update ?
Click to expand...
Click to collapse
I'm working on it, got a base for the find5 on the omni gerrit already. Though far from usable
Sent from my One X+
2 questions
Is this Hack [suficient] safe, or should I wait for LVM?
If i do a full backup of my current system (colorOS 1.0.9i Stable) and after the hack, restore the ROM, will my phone be exactly the same than before but with 4GB for apps?
Thanks for the great work
LVM needs ALOT of work right now :/
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
Guys, After I exit parted shell, I can't execute mke2fs/tune2fs commands! I get:
/sbin/sh: mke2fs: not found
though I can find them (mke2fs and tune2fs) inside /sbin/ after I cd into it!
How can I solve this ?
Edit:
Solved ... I just rebooted into recovery again.
I did it It works hehehe
Thank you very much for this amazing instructions.
I had some difficulties while executing some of the instructions, but I did some search and tried unplugging then plugging the cable or rebooting into recovery again when the shell was giving me a hard time, and everything is back as it was except now I have 4GB internal storage !!
Does this have to be done while the phone is running ColorOS? I started the procedure on my 16GB phone, running CM11, but didn't get too far.
There is no /sbin. Found tune2fs and mke2fs in /system/bin. No parted there.
From PC over USB, copied parted to Download directory.
On phone, opened a Terminal, then 'su root'.
Remounted /system/bin rw: 'mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system'
Copied parted from Download to system/bin.
chmod 755 /system/bin/parted
Most of the umount commands fail.
Started 'parted /dev/block/mmcblk0'
Fails on first 'rm 29' because it is not unmounted.
I gave up there.
Interesting, automated repartioning:
www <dot> youtube <dot> com / watch?v=2CoTIojZGlI
Shame it doesn't have a 4GB option.
@Redfoox (in dev thread), did you push mke2fs and tune2fs at the beginning of the procedure or did you use the ones already included in TWRP?
I got this error?
Code:
/sbin # mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p20
/sbin/sh: mke2fs: not found
The command also does not work in TWRP!
Anyone any idea what I should do now?
---------- Post added at 02:40 PM ---------- Previous post was at 02:36 PM ----------
Vashiru said:
@Redfoox (in dev thread), did you push mke2fs and tune2fs at the beginning of the procedure or did you use the ones already included in TWRP?
Click to expand...
Click to collapse
I did push the mke2fs and tune2fs at the beginning. Probably shouldn't have done that?
I have to wait each post for 4 minutes to post a new one
I've tried doing that during my second attempt, but got stuck at exactly the same point.
The fact that it shows mke2fs: not found tells me that you have both pushed it and CHModded it.
Push the files again, this time don't CHMod them and try it from the TWRP Terminal Emulator (from ADB shell just gives you permission denied but I didn't try it from TWRP that time).
If that doesn't work try CHModding them from TWRP. If that also doesn't work I'm out of a clue. All you could do at that point is use the last resort method (saved my device 2 times) and try the procedure again without pushing the files first.
Tried it and it gives the same errors. Cannot even chmod it through the terminal emulator.
I will go for the last resort method than
Too bad. Alright, feel free to ask questions if you run into trouble when you try again.
It worked i have 4GB now!
The only thing now is that my wifi does not work and I did do the following:
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
output of terminal:
Code:
/sdcard # dd if=mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
16384+0 records in
16384+0 records out
8388608 bytes (8.0MB) copied, 3.260498 seconds, 2.5MB/s
Any idea how to restore this? I even redid this step without succes.
---------- Post added at 07:21 PM ---------- Previous post was at 06:27 PM ----------
Got it working now. I had tot install modem 4.2.
Nice, enjoy the 4 GB!
Please help guys this is turning out to be a really frustrating experience...T___T
How are you guys even pulling this off... T___T
My adb works when the phone is booted but after "adb reboot recovery" and once in TWRP it cant see the device... and hence i cant proceed with the commands in Adb shell when the phone is connected and in twrp. i am running Liquidsmooth rom but i went back to the original rom to try this.
I'm able to execute
" chmod 755 /sbin/parted /sbin/mke2fs /sbin/tune2fs
umount /cache
umount /sdcard"
But not these ...
"umount /emmc
umount /data"
It says file or Directory not found.
then when i enter parted with the next command "parted /dev/block/mmcblk0"
I enter into parted, but cant see any of the following
"# 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"
Now i'm totally clueless on how to proceed further... Would appreciate if you guys can shed a bit more clarity... This is really turning out to be a frustrating experience. Please guys...
Going back to Liquidsmooth to use my phone ... will again reinstall original os tomorrow and try again. :crying:
OK, so I got TWRP running sweet and now following the improved descriptions in main thread post #34.
Got stuck here, all before has been ok:
mke2fs -t ext4 -m 0 -L persist /dev/block/mmcblk0p21
Message back is:
Could not stat /dev/block/mmcblk0p21 --- no such file or directory
The device apparently does not exist; did you specify it correctly?
Now what?
EDIT - think I have it sorted. I didn't scroll down enough in the post #34 windows and missed some 'parted' commands!
EDIT - 'adb shell' had quit, and it wouldn't connect again. Tried to reboot TWRP to recovery, but it didn't recover, now stuck at Oppo text logo, can't connect by adb, doesn't respond to power button. Bricked.
EDIT - was able to access the phone by fastboot only, not adb. Flashed TWRP recovery again, it rebooted and took quite a while, now it is stuck at the cyanogenmod 12 boot up spinning arrow for 10+ minutes, maybe it will recover eventually. If not, I'll try to reflash CM12 too.
Hello
Today was the third try to get this thing working ^^
But somehow i cant get past the first command.
Every time i try to unmount things like /cache or /dev umount only returns "invalid argument.
I never pushed the files from the zip. TWRP 2.8.3.0 is used.
I tried to attach a screenshot to help, but im too new to do that -.-
Thanks in advance

N910F Erasing partitions by mistake

Hello XDA
I did stupid mistake today
i was trying to fix HTC DESIRE S Dead MMC and i was using adb shell commands
i used this commands below but i didn't notice that the connected device was my NOTE 4
Here is the 3 command
mke2fs -j /dev/block/mmcblk0p25
mke2fs -j /dev/block/mmcblk0p26
mke2fs -j /dev/block/mmcblk0p27
i don't know what the command really do i think it format partitions or change there type
i didn't reboot i afraid if i did the device will not boot anymore
I read the (partition) file on /proc/ and i found
the first partition is cache
the second partition is hidden
the third partition is the internal storage coz it 26GB size
here is a picture
Is it save to reboot or not?
If not what to do?
I did reboot nothing happened
Thanks

Categories

Resources