yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] Leventi:
Empty partition

Hello everyone!

I ran official CM10.1 on my phone since the beginning, updated more than once a week with the actual nightly builds. I had no problem until last Friday, when the phone began to restart unexpectedly: during boot up, opening GMail, switching between home screens, connecting the phone to PC etc. I tried to fix it with updating till Monday, when I decided to try something else. I deleted the userdata, cache, all the usual things, and as a last resort, I tried to clean flash the actual daily build (this Monday). No luck, conclusion: hardware error, need to return to the manufacturer. Reset to factory defaults with the help of Galaxy Nexus Toolkit (I bought the phone running ICS 4.0.4, so I flashed this version), but this cleared not only the data partition, but the internal memory also. It contained a lot of important things like documents, photos etc. and I have no backup of them. Following the instruction found here on this topic, I dumped the whole internal memory (mmcblk0p12) to my HDD in raw, converted, partitioned and quick formatted it, finally connected and ran Recuva (deep scan), GetDataBack (extensive search) and R-Studio, but apart from a couple of files (~5 pictures from the signature of the last incoming e-mails) the disk looks empty. Any help would be apprciated to get my data back.
[Samsung Galaxy Nexus] shael1992:
Hi Wartickler! Thanks for this very helpful guide. I've been trying my best to do this but I am stuck at Step 1. Identifying which partition/block does my device has.. is there a way to identify a device memory block or something? Any procedure/code/guide to do that?

my phone's info:

Sony Xperia J

model #: ST26i

android version: 4.1.2

build #: 11.2.A.0.21

I tried to do what war says just use "mmcblk0" cos its the general and I dont really know the specific one for me and this happened:

as u can see above it says: " 0 B 0:00:00 [ 0 B/s] [<=>" it did not run as expected..

Thanks! Pls help me with this..:(

---------- Post added at 09:36 AM ---------- Previous post was at 08:48 AM ----------

hi sorry for this very noob question but where did you type the command? on cygwin terminal? I need to knw my specific block too and I am having a hard time identifying which block..Pls help. thanks!
[Samsung Galaxy Nexus] TangyTacos:
Potential overwrite of deleted data?

This seems like the only way to get data back, but wouldn't writing to the internal storage (installing Busy Box) potentially overwrite the deleted data? Is there a workaround?
[Samsung Galaxy Nexus] shael1992:
I figured it all out right too. I had the same situation as you. That is no problem. What you just need to is: Right click on that disk, just like we were instructed to initialize the disk. When you right click as you can see, there's no "initialize disk" option but no worries. Just click the option "convert disk to GPT". Its all the same option. In the first place we try to initialize the disk to make it GPT. I had successfully done retrieving some files doing this guide. After clicking convert disk to GPT. Proceed to the next steps in this guide and you'll be doing fine just like me :fingers-crossed:

Hope this one helps ;)
[Samsung Galaxy Nexus] THEGAMEPLAY94:
ok so im using vista and i dont have an attatch vhd option. what do i do
[Samsung Galaxy Nexus] tentacleslap:
I tip my hat to you sir!

I'm a hobbyist and my shell is a bit rusty. Your instructions saved my photos after unexpected data corruption caused by the phone crashing during a large file transfer. Now I'm running again

One thing of note for the people seeing 0kB files - I was getting the same result. If cygwin wasn't previously installed would advise maybe resetting the computer, or else triple-check the location of busybox, and verify you have a root shell. From my experience it's more likely to be a typo on one of the commands.

If you get a 0kB file it didn't work properly, and does not mean that you lost your data, or that the partition has a zero-size - even a completely empty partition would generate a file equal to the partitioned size when using dd

Hope that helps, and again a big thanks to the OP!

---------- Post added at 02:04 PM ---------- Previous post was at 01:47 PM ----------

You will want to verify that the adb tools are installed. If you have installed the tools, verify that adb is working by opening a command prompt in the platform-tools folder, and type 'adb devices'

If it lists a device, you probably just forgot to set the path. It's under Control Panel/System/Advanced/Environment Variables. Under the 'Path' variable include the location of adb

If step 1 failed, you will need to troubleshoot adb. There are plenty of posts on how to do that. Ditto if you have trouble with step 2
[Samsung Galaxy Nexus] diegodiego72:
Hi, i have a big problem and wisho someone help me. the story is sad, i have lost video and pics of my dead cat,

he was only born from a week, the phone was new and i havent sd card because i was waiting from online shop.

I raged for his dead, so i delete all. shame on me. its 4 days i try to recover files, now i have the raw file, but as you can see

i cant post image for forum rule, however,

i have convert the raw with vhdtool, but, when i mount with vhdtool the hd is composed of 10 small pieces, all integer (blue)

so i cant initialize, and if i click right mouse on name i can't convert.

please help :confused:

i43.tinypic.com/k1xtes.jpg

43.tinypic.com/2ynms04.jpg
[Samsung Galaxy Nexus] supermaton:
Really helpful

Great, great tutorial, definitely not for new android users.

So I was able to finish the tutorial after hours of reading. I was wondering if anyone can help me with this

1. Where are the photos stored in a stock Galaxy S3 (i9300), what partition, userdata? (Main question :p )

Because I'm able to see a lot of files but none of them are photos taken with the camera.

As soon as I noticed that the photos were gone I rooted the phone, installed CM10.1, then installed CM9, then I started this tutorial,I know this may affect the data and some photos may not be recovered, but I was hoping to recover at least some of them.

--My mmcblkop12 partition (userdata) is about 11.5gb, is it possible that I did something wrong when pulling the .raw file out of the phone? (I just started the process and went to sleep, in the morning I thought it was done)

Should I pull out the raw file again from the phone?

Should I try another recovery software?

Anyway, this was the only method I found to recover photos. Thanks a lot! :D
[Samsung Galaxy Nexus] diegodiego72:
anyone can help please? :crying:
[Samsung Galaxy Nexus] Benchwarmers6:
Wont work on i500

I have a us cellular i500 mesmerize I am trying to do this on and its not working. To start with, I set this up and did it perfectly on a LG Mytouch so I know the system is setup right and everything is working in that regard. I had to root the mesmerize with odin instead of superonelick like I used on they mytouch but i can boot the the boot loader and I have superuser installed and busybox installed. When I opened busybox it showed it was granted su rights. It is installed in the correct location and not the xbin location as well. All of these things verified. However on the mytouch I was able to dump mmcblk0 as one big file or dump each one individually and it went off without a hitch. When I try to do the mesmerize everything comes back under 1kb no matter what I try to push from it. I dont get any errors. Everything appears to work correctly except for the file sizes and it dumps in a fraction of a second so I know it isnt dumping large amounts of data and reporting small numbers. The screenshot below is what I get. The weird thing is that if I try different partitions i do get different sizes but all under 1kb. I think that is just the amount of bytes it takes to put the file header in and create the .raw file though, not any data. Any help would be appreciated. I am honestly thinking that cygwin isnt actually getting su through busybox because when i put su in the top box it says access denied but busybox does have root on the phone so have no idea what is going on.
[Samsung Galaxy Nexus] Nelutzu.work:
FOR ASUS TRANSFORMER TF300T 32GB ics 4.1.1

FOR ASUS TRANSFORMER TF300T 32GB

STEP 5. Open a Cygwin terminal and enter (This assumes your BusyBox installation is at [/system/bin/busybox]. It may be at [

/system/xbin/busybox

]):

Gateway@Gateway-▒▒ ~

$ adb forward tcp:5555 tcp:5555

adb server is out of date. killing...

* daemon started successfully *

Gateway@Gateway-▒▒ ~

$ adb shell

shell@android:/ $ su

su

shell@android:/ # /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd

if=/dev/block/platform/sdhci-tegra.3/mmcblk0p8

/block/platform/sdhci-tegra.3/mmcblk0p8

STEP 6. Open another Cygwin terminal and enter:

adb forward tcp:5555 tcp:5555

cd /ASUS

nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p12.raw

............

3.9GiB 0:19:07 [3.63MiB/s] [ <=> ]

3.9GiB 0:19:08 [ 3.8MiB/s] [ <=> ]

3.9GiB 0:19:08 [3.52MiB/s] [ <=> ]

3.9GiB 0:19:09 [3.28MiB/s] [ <=> ]

3.91GiB 0:19:09 [3.62MiB/s] [ <=> ]

3.91GiB 0:19:10 [3.72MiB/s] [<=> ]
[Samsung Galaxy Nexus] diegodiego72:
any ideas? :confused:
[Samsung Galaxy Nexus] Heart1010:
I try to to it all in a linux console and have a problem. Whenever I start the first console and do

# adb forward tcp:5555 tcp:5555
# adb shell
# busybox nc -l -p 5555 -e busybox dd if=/dev/block/mmcblk0p12

(here nothing happens, the console "waits/stays" here)

I open then the next console and do

# adb forward tcp:5555 tcp:5555
# nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p12.raw

and after I do the nc command the first terminal stops and show

[1] + Broken pipe busybox nc -l -p 5555 -e busybox dd if=/dev/blo

:(

1st thread shows "cd /nexus" in front of the nc line but what should this do on the linux console other than showing me there is no nexus folder!?

So what's wrong here?

Thanks
[Samsung Galaxy Nexus] Heart1010:
Ok update on above topic.

When I do

# nc 127.0.0.1 5555 > mmcblk0p12.raw

instead of

# nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p12.raw

it works. I got my ~13GB raw file.

And testdisk also shows me the deleted files in red color. But when i go into such red folder i got that second screen :(
[Samsung Galaxy Nexus] sklks:
I have the same problem, can you explain what you did to bypass the 0 file problem?
[Samsung Galaxy Nexus] gabg:
I found how to solve :victory:

1)open superuser(on device) and on busybox do forget.

2)open cygwin.bat and run the following commands:

adb forward tcp: 5555 tcp: 5555

adb shell (the device require root permissions now)

su

/ system / xbin / busybox nc-l-p 5555-e / system / xbin / busybox dd if = / dev/block/mmcblk0p12

3)and immediately after opening another cygwin.bat and run the following commands:

adb forward tcp: 5555 tcp: 5555

cd / nexus

nc 127.0.0.1 5555 | pv-i 0.5> mmcblk0p12.raw
[Samsung Galaxy Nexus] frozenpandaman:
I'm using XP so I cannot mount a VHD using the Windows Disk Management program (it is not an option). I tried mounting the .raw HD file using a 3rd party program, Gizmo Manager, but Recuva cannot seem to scan the disk after mounting the image when choosing that disk drive letter. I am unable to complete steps 11 and on - I cannot Initialize the Disk, do anything with GUID Partition Tables, or do a quick format. Can somebody please help?
[Samsung Galaxy Nexus] wikke:
thanks for this guide, I managed to save quite a lot of photos. had to use mmcblk0p23 for my nexus4, busybox install was in xbin
[Samsung Galaxy Nexus] bablooroyal:
Hei,

I have a 16GB Galaxy S3. In Settings --> Storage, "Total space" is shown as 11.5 GB.

I followed the procedure to recover the data and after a couple of tries, it worked and a RAW file was extracted. The size of file was 11.5 GB.

Does it mean all the data was extracted?

I am yet to go through the files that Recuva listed and find out whether the files that got deleted are recoverable.

Since the day I discovered that some files were deleted accidentally, I used the phone minimally. I didn't take any pictures, didn't browse etc etc. I used it only for calls and messages.

Can I use the phone normally (for photos, browsing etc) now?

Is there any chance that the data was fully not extracted or the RAW file was not created properly and I have to redo the process?

-Babloo
[Samsung Galaxy Nexus] maurocds:
my n4 deleted a bunch of pics

do you really need to do all thing of

http://xdaforums.com/showthread.php?t=1830108

wow, you need a guide, to understand that guide

i try to follow instructions, but there are so many thing not clear

even installing android sdk it is a pain

you download a 450mb zip file, there is no install for it, you download some sdk of 22mb, it install here:C:\Users\maodesk\AppData\Local\Android

also

Connect the phone in ADB mode

this is bootloader???

also

Connect the phone in ADB mode

Unlock the screen.

unlock what????????? you have the robot android

also this one kills me

To test the setup, run few basic commands:

adb devices

adb reboot bootloader

fastboot reboot

i get

'adb' is not recognized as an internal or external command,

operable program or batch file.

i did all the previous steps, but still nothing, stupid android sdk
[Samsung Galaxy Nexus] maurocds:
for an nexus 4 you have to use this

1

adb forward tcp:5555 tcp:5555

adb shell

su

/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p23

2

adb forward tcp:5555 tcp:5555

cd /nexus

nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p23.raw
[Samsung Galaxy Nexus] michaeljam:
his rkfaers

This could be a good way , thanks for sharing, man!
[Samsung Galaxy Nexus] maurocds:
ok, so i created my 13gb files, used the vhd thing

but stuck here

Now we need to mount the VHD in Windows. Select the Start button-->right-click Computer-->select Manage.

Select Storage-->Disk Management.

In the menu select Action-->Attach VHD.

For Location enter [c:\cygwin\nexus\mmcblk0p12.raw] and select the OK button.

windows disk manager gives error

also the raw file should be .raw or .vhd??????????????? mine is .raw even after doing the cmd vhd task
[Samsung Galaxy Nexus] maurocds:
finally did it, you have to manually change .raw into .vhd extension, in order for disk manager to mount the drive
[Samsung Galaxy Nexus] ztech750:
busybox does not contain NC

after 50 pages and 50 hours, i have determined that my busybox doesn't have the NC command

when i run the command:

/system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p12

i get "nc: applet not found"

I'm booted into recovery on a GS2 (i777) with a bad display. this is the busybox version:

BusyBox v1.20.2-cm9 static (2012-07-14 01:52 +0200) multi-call binary.

Copyright (C) 1998-2012 Erik Andersen, Rob Landley, Denys Vlasenko

and others. Licensed under GPLv2. Merged for bionic by tpruvot@github

See source distribution for full notice.

Usage: busybox [function [arguments]...]

or: busybox --list

or: function [arguments]...

BusyBox is a multi-call binary that combines many common Unix

utilities into a single executable. Most people will create a

link to busybox for each function they wish to use and BusyBox

will act like whatever it was invoked as.

Currently defined functions:

[, [[, ash, awk, base64, basename, bbconfig, blkid, blockdev, bunzip2,

bzcat, bzip2, cal, cat, catv, chattr, chgrp, chmod, chown, chroot,

clear, cmp, cp, cpio, cut, date, dc, dd, depmod, devmem, df, diff,

dirname, dmesg, dos2unix, du, echo, egrep, env, expand, expr, false,

fdisk, fgrep, find, fold, free, freeramdisk, fuser, getopt, grep,

groups, gunzip, gzip, head, hexdump, id, insmod, install, kill,

killall, killall5, less, ln, losetup, ls, lsattr, lsmod, lsof, lspci,

lsusb, lzcat, lzop, lzopcat, makedevs, md5sum, mkdir, mkdosfs, mke2fs,

mkfifo, mkfs.ext2, mkfs.vfat, mknod, mkswap, mktemp, modinfo, modprobe,

more, mount, mountpoint, mv, nanddump, nandwrite, nice, nohup, od,

patch, pgrep, pidof, pkill, printenv, printf, ps, pstree, pwd, rdev,

readlink, realpath, renice, reset, resize, rev, rm, rmdir, rmmod,

run-parts, sed, seq, setconsole, setserial, setsid, sh, sha1sum,

sha256sum, sha512sum, sleep, sort, split, stat, strings, stty, swapoff,

swapon, sync, sysctl, tac, tail, tar, tee, test, time, top, touch, tr,

true, ttysize, tune2fs, umount, uname, unexpand, uniq, unix2dos,

unlzma, unlzop, unxz, unzip, uptime, usleep, uudecode, uuencode, watch,

wc, which, whoami, xargs, xzcat, yes, zcat

When i fully boot my other GS2, i see the NC command is available in busybox. What are my options? keeping in mind that i blindly booted into recovery to use ADB. Is there a way to change what busybox its using? while only having access to recovery?

Thanks for all the help XDA
[Samsung Galaxy Nexus] nismology:
After several hours I finally got this to work. It is currently downloading at 5+MiB/s. I had attempted to do this over a dozen times and I kept getting a file that was 1KB in size. WTF!! :eek: What finally got the entire thing to start rolling was the su command after adb shell in the first step. Hopefully this saves someone the trouble that I went through to break through. Hope this helps guys.

Great write-up and surprisingly simple to follow for someone not versed in *nix commands. Thanks!
[Samsung Galaxy Nexus] frozenpandaman:
Is anyone able to help with this?
[Samsung Galaxy Nexus] TheGrudge:
Hi there, I believe i've done every step but when I run the terminal commands it's just running without doing anything (no speed) (check the screenshot).

Can you please help. What I could be doing wrong?

My device is SGS3

Thanks.

View attachment 2090982

P.S. I fixed it, apparently I have copied to cygwin wrong netcat. Now it's compiling with 3MiB/s :).
[Samsung Galaxy Nexus] Anakha56:
Okay so mine is busy making a raw file of my S3 International 32GB partition. Thank you ever so much [MENTION=2129788]Wartickler[/MENTION] for this helpful post :). If I could I would donate to you :).

/now to watch the lovely countdown until it is finished :P.

---------- Post added at 11:04 AM ---------- Previous post was at 10:41 AM ----------

http://helpdeskgeek.com/windows-xp-tips/attach-a-vhd-file-in-windows-xp/

That post explains how to attach a vhd in WinXP.
[Samsung Galaxy Nexus] frozenpandaman:
Hi Anakha56! Thanks for your reply. However, I have already tried this—going through the process again, it will not attach/mount as the file is a .raw file, not a .vhd, as per this guide. It returns the following message: "Failed to plug in the Virtual Hard Disk (VHD). The specified file is not a valid VHD."
[Samsung Galaxy Nexus] EzZn0:
Thanks for the tutorial. It really helped me and I was able to restore a part of my internal storage even though it was not the one I was planning on restoring.

The part i want to restore is the internal sdcard and it is called /dev/block/vlod/259:3 according to diskbugger. When I try to restore it I get a

nc: bind: Address already in use

Is ther anyone who has an solution to my problem?
[Samsung Galaxy Nexus] Anakha56:
Sorry for the late response, was not watching the forum or my email.

I take it you ran the vhd convert command and found that after it ran your raw file is still a raw file? If so make a backup copy of the file (just so that if this next part screws it up you dont have to redo it) and rename the extension from .raw to .vhd. Saw this tip in a previous post in this thread, once you have done that it should work fine.

As an aside for anyone else, if your partition gets destroyed by a ROM downgrade (which happened to me) you will not be able to recover data when that partition is recreated ;). I am not upset at losing the data because this thread taught me something new which is far more valuable than a few silly pics ;).
[Samsung Galaxy Nexus] frozenpandaman:
Yup. I created a copy of the file and changed the original one from .raw to .vhd. When mounting it by using the cmd command, it says "The Virtual Hard Disk is successfully plugged in as a virtual disk device." - however, after the "Found New Hardware" bubble pops up from the task bar icon in the corner, it changes to "A problem occurred during installation. Your new hardware might not work properly" and I don't see any additional drives when browsing My Computer.

I tried to fix this - under "Microsoft Virtual Server Storage Devices" in Device Manager, the listing had a yellow exclamation point. I right clicked on the entry and chose Update Driver > Install from a list or specific location > Don't search > Disk Drive. The "Microsoft Virtual Server Storage Devices" entry switches from being under "Microsoft Virtual Server Storage Devices" to "Disk Drives," but the yellow exclamation point remains. After restarting (to save changes, as it prompted me to), when I now try to mount it via cmd, I still get nothing - no popups or new drives in My Computer. If, instead, I select "Microsoft Virtual Server Storage Devices" instead of "Disk Drive" on this screen, I get a "There was a problem installing this hardware. The device cannot start. (Code 10)"

After restarting (have done this twice now), and opening device manager after mounting it via Vhdmount in cmd, it shows back up under "Microsoft Virtual Server Storage Devices" - picture here. I have not yet tried choosing "Install the software automatically."

Either way, and after trying all of that, no new drives will display in My Computer.

Any ideas? Thanks for all the help.
[Samsung Galaxy Nexus] Anakha56:
I am now at the end of my knowledge. Without working on it myself I have no idea, sorry. :(

Good luck finding a fix but I think it might be worth your time getting a OS update sometime soon.
[Samsung Galaxy Nexus] sklks:
Hi,

After attach the VHD disk it doesn't shows any unallocated space, I already have two mmcblk0.vhd files and the result is the same.. anyone had the same problem? It appear both VHD disks has Healthy (GPT Protective Partition)
[Samsung Galaxy Nexus] frozenpandaman:
Agreed. I use a Mac, mainly, but my desktop is still on XP. I plan to upgrade to Windows 7 soon. If I keep a copy of the .raw file (possibly to use when I upgrade!), will I be able to pull those lost pictures from it anytime in the future, and go back to taking pictures (thereby overwriting the "deleted" current internal memory space) using my phone?

Thanks for all your help! If anyone has other ideas (drivers not updated...? or something?) feel free to help!
[Samsung Galaxy Nexus] Droid_Dustin:
hey guys,

it seems that I am a noob. Because I tried to unlock the bootloader from my Google N4 w/o saving the data..

So I found this guide to restore the data.

But the mmcblk0p23 block gets copied only at 0 B/s.. The firewall from Windows 8 already has been disabled and I didn't copy and paste the commands. PLEASE HELP!! :(

EDIT:

Now it works with 3 MB/s!! I just had to try it on another PC.

EDIT2:

But when I convert the raw file to vhd nothing happens...
[Samsung Galaxy Nexus] blueren:
Oh mmmmaan! Thank god I found this thread! i accidentally wiped out all of my internal memory in nex4.. currently creating the raw partition. Just figured out that keeping the phone screen on somehow increases the default transfer rate from an avg of 3.2 Mbps [screen off] to 4.2Mbps [Screen on]. Hmm..
[Samsung Galaxy Nexus] MyCanSeeYou:
I get the same problem with my mmcblk0 file as well, but not with my mmcblk0p29 file (userdata for s4). I need a solution too as my recuva on the blk0p29 didn't find what I wanted
[Samsung Galaxy Nexus] creeve4:
Edit: I'm an idiot
[Samsung Galaxy Nexus] adefxda:
also working with my nexus 7

thanks for the tutorials..

also work well with my nexus 7..
[Samsung Galaxy Nexus] xzafa:
Is this still possible after factory reset? no probably
[Samsung Galaxy Nexus] Wartickler:
HEY

I would still try. You may be amazed.
[Samsung Galaxy Nexus] xzafa:
Ok I might, but I stock factory reset twice, still a chance? Ok lets see
[Samsung Galaxy Nexus] pusaran:
Hi Wartickler,

Do you mind showing me which type of rooting method is non destructive?

my HTC Butterfly is not bootloader unlocked yet and tons of my photo was gone by accident from my internal memory>.<

Thanks :crying:
[Samsung Galaxy Nexus] xzafa:
4 Part Video Tutorial

http://youtu.be/HomqBx0J0e8