yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] britoso:
Unlock your phone and see if there is a popup asking you if it should allow the adb connection request.
[Samsung Galaxy Nexus] Makaveli07:
For people who cannot get this tutorial to work and are getting 0 bytes.

For anyone who cannot get this tutorial to work, I may have a different solution for you.

Just a quick background.

Couple of days ago I updated my Galaxy S3 10.1 Cyanogenmod to 10.2 and in the process somehow managed to maybe corrupt my old files on the internal memory. The new mod was working perfectly but when I plugged the phone in to my PC to access my old pictures, music etc. I couldn't find them. The internal memory was 70% full but when I would go in to any folder from the previous mod nothing would be displayed. I could only find files from the current mod. After quite a bit of research I came across this tutorial to recover old files and followed every step with no success. I was getting 0 byte raw files and after hours of going through each comment to find some sort of a solution I finally gave up. As much as I didnt want to lose my pictures etc, I was planing on formatting the whole internal memory and putting a fresh rom on it as it was nearly full. Then I got an idea that I could maybe somehow access the files using the phone itself. I installed an app called "Root Browser" and it worked. I was able to find all my all files and using the app itself, select everything I wanted to keep and copy them to my external SD card.

I thought this could help some of you and decided to create an account and share :)
[Samsung Galaxy Nexus] Sylvia German:
[MENTION=2285321]britoso[/MENTION]

No, there is nothing.

[MENTION=5647419]Makaveli07[/MENTION]

I installed it. But when i got to the folder "/dev/block/", the mmcblk0pxx files are all 0 Byte :(
[Samsung Galaxy Nexus] Aadilnz:
Can someone please help a noob out?

I got the 'mmcblk0p28' from britoso's post above (Nexus 5)

I'm using this version of adb:

http://d-h.st/08w

Downloading the full version from google now and will report back if that makes a difference

Edit: Nope, no difference. Got nc.exe from the cgwin installer as well.

Edit2: Tried the ncat.exe from NMAP posted a page or two back as well, now it just comes up with "close:No error" and the same thing after that.

Edit3: Turns out I was using wrong file location, it's meant to be "/dev/block/platform/msm_sdcc.1/mmcblk0p28" but I still get the same error. Furthermore if I open a new cygwin and type in

adb shell

su

find /dev/block/platform/ -name 'mmc*' -exec fdisk -l {} \;

I get no result, whereas adb devices successfully shows my nexus 5.

Edit5: Fixed! Something must have been wrong with my busybox/rom. Flashed another rom (Cataclysm) and used the NMAP netcat and its copying over now!
[Samsung Galaxy Nexus] [V]endetta:
reporting for nexus 4

mmcblk0p12 doesnt work as it only stop at less than 1mb...

change to p23, 3gb and counting...will see how it goes later with the data, whether its what ive been looking for

update, raw file size is 13gb...

but only able to recover 130mb plus with recuva from 13gb...

any help guys?
[Samsung Galaxy Nexus] Depressed T.Bear:
:crying: I cant get it to work on my sgs3!

I did exactly all the steps.

This is the text of my Cygwin64 Terminals, maybe someone sees the mistake :(

First:

Markus@Markus-Notebook ~
$ adb forward tcp:5555 tcp:5555

Markus@Markus-Notebook ~
$ adb shell
shell@m0:/ $ /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p12
0 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p12 <

Second:

Markus@Markus-Notebook ~
$ adb forward tcp:5555 tcp:5555

Markus@Markus-Notebook ~
$ cd /SG3

Markus@Markus-Notebook /SG3
$ nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p12.raw
0 B 0:00:00 [ 0 B/s] [<=> ]

Markus@Markus-Notebook /SG3
$
[Samsung Galaxy Nexus] green_reaper:
i am using a gs3 as well, and not the i9300 so our partitions are different the mmcblk part for us is not the right partition im currently working on how to find the partition for gs3 users right now i was told to download the terminal emulator app and entering a code which would list the partitions but as of now im gettin a access denied error so as soon as i can figure that out ill make a post for gs3 users or just add a t utorial on how to find partitions period on any phone =]
[Samsung Galaxy Nexus] siamak5561:
I done the method for my G-nexus but The mmcblk0p12.vhd file is zero byte!! can anyone help me?
[Samsung Galaxy Nexus] Depressed T.Bear:
well, in this post http://xdaforums.com/showthread.php?t=2350935 , its said that the partition is right :

lrwxrwxrwx root root 2013-07-04 18:28 USERDATA -> /dev/block/mmcblk0p12

So I guess that isn't the fault :confused:
[Samsung Galaxy Nexus] Sylvia German:
If I go to the folder /dev/block/ each of the mmcblk0pxx files are all 0 Byte. Is this normal?
[Samsung Galaxy Nexus] Depressed T.Bear:
Yes, because it is a block device ;)

Check this post: http://xdaforums.com/showpost.php?p=34503509&postcount=24
[Samsung Galaxy Nexus] Sylvia German:
o.k. I understand. so I can use ADB.

But when I connect my Samsung Galaxy s4 with an USB Cable to my laptop an write "adb shell" I get the following message:

error: device offline
[Samsung Galaxy Nexus] peacesam:
I have the same issue as you guys. May i know how could i figure out which block to recover? i have tried multiple blocks but they won't copy!

$ nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p22.raw

0 B 0:00:00 [ 0 B/s] [<=> ]

AS you can see above, it stops right away after i executed the netcat command.
[Samsung Galaxy Nexus] Depressed T.Bear:
I had the same problem, it came right after the 4.3 update. You need to re-authorize your USB-Debugging connection.

Simply hit the field under USB-Debugging. In english it should be called something like "Delete USB-Debugging authorization".

Let us know if that could help you :good:
[Samsung Galaxy Nexus] jmboulware:
Thanks for much for this! I went into my gallery one afternoon and everything was gone .... had no idea how or why.

This worked great and I got 99% back in great shape!

The only thing I'll add is that mounting the virtual drive didn't work on my Windows 8 machine ... had to copy the .RAW file over to a windows 7 machine to get it to mount, but after that it was smooth sailing!

JB

---------- Post added at 03:53 AM ---------- Previous post was at 03:53 AM ----------

Thanks for much for this! I went into my gallery one afternoon and everything was gone .... had no idea how or why.

This worked great and I got 99% back in great shape!

The only thing I'll add is that mounting the virtual drive didn't work on my Windows 8 machine ... had to copy the .RAW file over to a windows 7 machine to get it to mount, but after that it was smooth sailing!

JB
[Samsung Galaxy Nexus] Depressed T.Bear:
Great :) For the future: You can save all your installed apps (inlc. data) and pictures, movies, musik and so on with MyBackupPro.

It's a 30 day trial... but.. *cough*...in cases of emergengy, there's also an xposed module which works like a "timemachine" for selectable apps ;)
[Samsung Galaxy Nexus] peacesam:
This recovery method doesn't work on the BeansTalk 4.4.2.

I tried to grab every block and all of them are 0 file size.

Update: I ended up jumping back on Cm11 m2 since i was experiencing too many issues on Beanstalk. I am able to product a raw file now but the memory block i need is mmcblk0p15. Don't forget to change your bUsybox bin location!
[Samsung Galaxy Nexus] LtnKowalski:
I reverted back to stock rom and in the chaos of events i didnt realize that im resetting and wiping everything. Stock rom installed and after first boot i realized what ive done. I followed the instructions here, everything worked perfectly to the last letter with my Samsung Galaxy S3, except recuva was only able to find the newly installed stock rom files. The internal HD used to be about 80% full and now less than 10% is being used. Any chances that I could still be able to recover atleast some of my lost files?
[Samsung Galaxy Nexus] sxm2:
Wow, spent many hours trying to get this working, and the quoted post really helped me out.

My problem was the 0 bytes transfer issue. Downloaded ncat.exe, put in /bin, and changed nc to ncat in the second terminal (Not the first).

So for my toro phone (busybox was in xbin):

adb forward tcp:5555 tcp:5555

adb shell

su

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

adb forward tcp:5555 tcp:5555

cd /nexus

ncat 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p12.raw
[Samsung Galaxy Nexus] MitsuiMVP:
Hi, please help out a noob here.

I tried to setup Cygwin, and it shows me a list of packages to install, I could not find pv and util-linux.

Where can I find them? Thanks
[Samsung Galaxy Nexus] funkyblue04:
So how much data would be lost if I unlocked, and reflashed the whole system image? If I unlock, flash the stock image (without wiping the user partiton) would have have a good chance of recovery using this guide?

ATM I have a Nexus 7 2013 that is stuck in a bootloop, I think from a failed update. I manually sideloaded updates to 4.4.2 but that also did not work. Is there anyway to extract data off this thing? I can access stock recovery and fastboot. I would even destroy the tablet if there was a way to take the chip out and copy the stuff to a computer,

The tablet belongs to a family friend who has been using it as a usb device for months and it contains documents, photos and other important data.

Thanks everyone￼ :)
[Samsung Galaxy Nexus] funkyblue04:
Thanks! Had nothing but issues with small files or 0 bytes. Dumping the whole think is working. I just hope data can be recovered :D
[Samsung Galaxy Nexus] lucasbroderick:
My goal here is to recover a phone number from August of 2013. I never had them in the contacts, but I had several texts back and forth to this number.

I did everything in the tutorial, it all worked, and now I have a plethora of files in a folder of recovered data. Some of the pictures go back from before August, so this makes me think that there's hope that the data I'm looking for isn't overwritten by now.

My problem now:

I have a bunch of files in here that I can't open, weird extensions, and I'm not really sure what to even look for to find these text messages and get them into a readable format.

Anybody have some insight on this? Thanks.
[Samsung Galaxy Nexus] Diablosss:
Read all please. I try this method on a 20 different phones, s3 s4 htc sony and other models with android internal memory. From all raw restored ONLY some png and watsapp and other small images. From no one phone camera photos and videos not restored. No matter model and dev block. I checked all. So if you want to restore your camera photos and videos - sad to say but this solution will not help you.
[Samsung Galaxy Nexus] Wartickler:
Sadly, it appears to be somewhat true...

Diablosss may be correct, with respect to how often people report issues with this guide. I know I recovered my stuff and others have as well. It may be down to what strategy the individual phone's firmware uses when it writes blocks of OS.

I may go through the posts at some point to compile a list of the phones that worked and didn't work. Perhaps anyone still following this thread could identify the model they were using this guide with...?
[Samsung Galaxy Nexus] peacesam:
Yep, you are right. I gave up on recovering my images/videos and backup titanium files. This method doesn't help you on recovering from DCIM folder or apps folder. I was able to retrieve it some images using Wondershare software and all you have to do is connect your phone via a usb cable + MTP connection. However, this software does't do a deep scan.
[Samsung Galaxy Nexus] tso7:
Another owner of 32GB Nexus 5 here and I just want to confirm this fact. Installing both NC and PV during cygwin installation led to a very smooth and successful backup for me.

Also, partition for user data (virtual sdcard) is /dev/block/platform/msm_sdcc.1/mmcblk0p28 on 32GB Nexus 5.
[Samsung Galaxy Nexus] duck361:
In step 15, I dont see initialize disk

please help
[Samsung Galaxy Nexus] Jeshu_fiji:
hi there,

i am not sure what i am doing wrong. is it because my phone is rooted in some other way :S

i am trying to recover files from a note 2.

heres where i am stuck at. i scanned the the comments but couldnt find what i need to resolve this. HELP please.

ive tried other mmcblk 's but to no avail. any help would be appreciated.
[Samsung Galaxy Nexus] Jeshu_fiji:
no need to worry about this, ive just read that its impossible to get back after a factory reset. my gf had turned off her fone during an update causing the fone to go haphazard and nonfunctional. i did a factory reset at that time not knowing that internal memory isnt a mass storage on which i could run recuva.

so i found this great write up which will me someday but not today :(

ive lost pictures with my gf of 7 months now....after the 10th month we go back to our countries.

well i have a month left so i guess ill take as many pictures i can. :D

great write up and great community.:good:
[Samsung Galaxy Nexus] wetman:
Samsung s3 mini couldn't recovered data

Hi,

i have the same problem. Do you have any solution?

---------- Post added at 09:47 PM ---------- Previous post was at 09:14 PM ----------

Hi,

i have the same problem. Do you have any solutions?
[Samsung Galaxy Nexus] OMGitsShan:
I have a Galaxy Note 3 where I lost all the pictures and videos from the internal memory. I tried this method and from what I gather around the net, userdata: /dev/block/mmcblk0p26 is where the Note 3 stores the items.

Well after I started the 2nd terminal window (everything fine up to that point), it created the RAW file - but it did it in like a second and the mmcblk0p26.raw it extracted was 0KB in size. Did I do something wrong or is my userdata corrupt and the 0KB accurate?
[Samsung Galaxy Nexus] Squatrack Curler:
I have a Nexus 4 running kitkat.

I deleted a folder from the gallery and I am trying to recover it. My phone is unrooted, so obviously I need to root it first.

If I root the phone now, I will lose my data. If I do a backup before I root it, and then restore it after its rooted, will I have any chance of recovering the lost pictures?
[Samsung Galaxy Nexus] MovEaxEcx:
Just to continue from the previous message, I have tried on my S4 mini phone and to fetch file mmcblk0p24.raw.

Fetched ok from phone, converted ok:

C:\cygwin\nexus>VhdTool.exe /convert mmcblk0p24.raw
Status: Converting "mmcblk0p24.raw" to a fixed format VHD.
Status: Attempting to open file "mmcblk0p24.raw"
Status: File opened, current size is 5821677056
Status: VHD footer generated
Status: VHD footer written to file.
Status: Complete

But I still getting the message "A virtual disk support provider for the specified file was not found." when I try to attach it to Storage Manager. :(
[Samsung Galaxy Nexus] MovEaxEcx:
It turns out, you need to rename extension of *.raw to *.vhd :eek: if you want to attach it to Disk Store Manager.

Evrything now works, file were recovered. :victory:
[Samsung Galaxy Nexus] Enomine:
A easy way to to this? :( In trying to recover deleted files from Internal memory of a xperia zl , 4.2

Help if you want :/

http://xdaforums.com/showthread.php?p=50409473#post50409473
[Samsung Galaxy Nexus] tiranda:
what should i do?

when i wanted to attach vhd,this problem appears :(

"the operation failed to complete because the disk management console view is not up-to-date.Refresh the view by using the refresh task.if the problem persists close the Disk management console,then restart disk management or restart the computer."

any soloution?

:rolleyes:
[Samsung Galaxy Nexus] kashsih93:
Please help!

Hi

Plzzzz help me!!! Im trying to follow OPs tutorial but am stuck on 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]):"

My Nexus 5 is connected as adb as seen below

But when i open a Cygwin terminal, it says command not found.

Also, i dont know for sure if i did the requirement "ADB (make sure adb.exe is in your path)," correctly. I have just pasted everything in the sdk>platform tools directory into the C:\cygwin64

PLZ HELP guys! :(
[Samsung Galaxy Nexus] sxm2:
Hey, a Cygwin terminal is not the same as command prompt.

You need:

- Cygwin installed to [c:\cygwin] with pv and util-linux from the repo. Make sure to open Cygwin once to make sure that the /bin folder is created. Also, I made a folder at [c:\cygwin\nexus] to put the exported .RAW file,

- Netcat (download the ZIP file and extract nc.exe to [c:\cygwin\bin]),

I personally needed an additional updated netcat during my recovery outlined on post 866

hope that helps

edit: path is in System Properties -> Advances -> Environment Variables -> System variables -> Path

add to the end: ";C:\Program Files\Android\sdk\platform-tools" or where ever you placed your adb.exe

give thanks if it helped
[Samsung Galaxy Nexus] tiranda:
tice uralME

Where is Exactly Your adb.exe file?

tell me its path.
[Samsung Galaxy Nexus] kashsih93:
Ok so im a little better now.

now my issue is im getting a 0 byte file! :(

I am having a nexus 5 16 GB, so i should type in "mmcblk0p28.raw" according the post here http://xdaforums.com/showthread.php?t=2517503, right? or will it be different for nexus 5 16 gb?

please check the screenshots below and advice:

thanks a lot for helping!
[Samsung Galaxy Nexus] kashsih93:
ok....so even if i use ncat in the 2nd window, still no luck.

Also, please see that in the first window it says "nc: invalid option -- 1". is this normal?
[Samsung Galaxy Nexus] AgentBignose:
No, the correct parameter is "-l" not "-1". It is a lower case L!!

-----

But Ihave the zero filesize issue too. With nc.ece and also with ncat.exe. I tried to copy mmcblk0 and evene mmcblk0p12 but neither did work :(

Pls let me know if you manage to fix it!

Is there any solution for zero filesize problem I missed reading the thread??

I tried dumping whole memory, using ncat instead of nc, shutting down firewall.

---

UPDATE: Solved

I am so stupid!! If you try to use ncat instead of nc.exe, of course you have to do it in BOTH Cmd Prompts!

Meaning including ncat.exe from download and not only change:

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

BUT ALSO:

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

Now its doing the copy.
[Samsung Galaxy Nexus] kashsih93:
wow thank you!!! :)

so i have managed to get the 12.7 GB .raw file. Now the problem is i cannot attach it to my computer! the vhdtool give a "Complete" status, so dont know whats wrong and why the file extension doesnt change!
[Samsung Galaxy Nexus] kashsih93:
ok so turns out you have to change the extension to .vhd manually after running the vhdtool. tried recovering but just got thumbnails of whatsapp images :(

probably wont recover anything else.

thanks everyone for helping!
[Samsung Galaxy Nexus] Sangeet007:
Can v restore folders too
[Samsung Galaxy Nexus] AgentBignose:
Die you perform a deep scan?
[Samsung Galaxy Nexus] sameergupta21:
error msg:pv command not found

Hey when I type the above mentioned command...i get this error msg "-bash: pv: command not found"

Now, I don't have a pv.exe file anywhere in my cygwin folder. what am I doing wrong?? pls help
[Samsung Galaxy Nexus] kashsih93:
yes :(

---------- Post added at 08:04 AM ---------- Previous post was at 08:02 AM ----------

download it from http://sourceforge.net/projects/pvforcygwin/

and paste it in cygwin > bin
[Samsung Galaxy Nexus] jauhari:
How about Nexus 5 16GB??
[Samsung Galaxy Nexus] kashsih93:
its the same for nexus 5 16 gb. you can check it yourself.

install https://play.google.com/store/apps/details?id=com.cls.partition&hl=en

click on the settings icon on top of the app
[Samsung Galaxy Nexus] jauhari:
Why I didn't get any data... my RAW file only ZERO size :((
[Samsung Galaxy Nexus] kashsih93:
can you post screenshots of your terminal windows?
[Samsung Galaxy Nexus] monster-exodia:
[MENTION=2600085]jauhari[/MENTION]

you need to install nc.exe and pv.exe manually from cygwin

it works for me
[Samsung Galaxy Nexus] muhamed_sy:
how to convert RAW backed up file from mobile to VHD

Thanks alot for this valued information , I have applied it on my note2 and it goes smoothly , but I stuck at the end when I was trying to attach VHD ,

I am getting message says :

virtual disk support provider for the specified file was not found

, even I used VHDtool for converting and it was ok , gave me staus : complete ( converting )

if there is any other way or software to convert RAW to VHD except VHDtool.exe that will be great , thanks for you and for everyone working on XDA DEVELOPER .

laptop specs which i used is :

_ windows 8.1 64x

_ HDD 500 GB and SSD 24 GB
[Samsung Galaxy Nexus] :
hey guys.

why terminal show me a copy of what i write in answer and do nothing ?

nima@Nima-PC ~
$ adb forward tcp:5555 tcp:5555

nima@Nima-PC ~
$ adb shell
shell@mako:/ $ su
[B]su[/B]
root@mako:/ # /system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p23
[B]5 -e /system/bin/busybox dd if=/dev/block/mmcblk0p23 <[/B]
[Samsung Galaxy Nexus] xoomolli:
Great tutorial!! Good description of the objectives, and the tasks involved.

And great idea to do this method, too! Who would have thought it was possible like that...

Once cygwin finally downloaded and installed (why exactly was it 5GB) the process described worked like a charm! :)

I was almost getting hopeful to recover my pictures... Downloaded a 32GB .raw file onto my computer.

Unfortunately it has not managed to recover anything more useful then what DiscDigger had already recovered. :( Not with Recuva, not with Photorec.

It seems as if other people had trouble recovering the contents of their DCIM folder, while still finding other files...

I had lost 8GB of pictures from the internal storage while transfering some data via MTP on the external SD card... This happened like a day before I left to go on vacation, so I didn't have time to do anything about it right then. I used my tablet only for reading and watching some videos from the external SD and had it in airplane mode the entire week. I launched no other apps... Didn't want to risk overwriting too much.

Once I got back I went through getting root and everything. Quite the process, but I made it. I had to format my storage and flash a couple things on it. No success with Hexamob Recovery or DiscDigger Undelete. USB watcher didn't allow me to connect as mass storage either. Dr. Phone from Wondershare also was unsuccessful.

Also, before rooting, I read in another forum that sometimes clearing the media cache can help with errors that happened while using MTP. And all the duplicate folders MTP had created were fixed by doing this, too, but my pics were still gone...

The couple of pictures I did recover were either email attachments (google asked me to sign into the play store and automatically synced gmail and such) and about 150 thumbnail pics for books from the kindle app. Now I did not install kindle after rooting. So it found SOMETHING. Just not what I am looking for.

I had 8GB of pictures that got lost (I know this because I happened to see the thing that tells you how many GB you have available on a drive right before and after those pics disappeared.) I have not even used 1GB at this time (just the OS, and a couple of recovery apps are on there). How can it not even recover at least a few pictures? There is like NO TRACE of them...

Has clearing the media cache or gaining root access (which required resetting to factory settings, formatting, flashing, and other procedures) PERMANENTLY deleted my pictures?

I have spent hours and hours trying so many things, but I am still not ready to give up on my pictures! :crying: