yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] Albercook:
another NOOB question.

My son accidentally did a factory reset by touching buttons too fast during fast boot. I have been trying to recover his lost files. I have been learning a lot but still have some questions. I have ADB installed and get a valid response to the device command. Isn't there a way at this point to use ADB to pull an image of the phone without installing busybox? I would rather not install anything on the phone after the factory reset. If I try to install busybox through the playstore it wants me to log in as a user. Once I do that it will start downloading all the data for that user. Both of these actions will overwrite data.

Thanks for any help

NOOBDad
[Samsung Galaxy Nexus] shauphei:
oh my gosh,i haven't got the tool that named vhdtool

I have not got the vhdtool.exe

I have do a lot of search,but all the links are retired.

Even this one:archive.msdn.microsoft.com

It said that the archive was retired.

Is there someone archived it?
[Samsung Galaxy Nexus] Albercook:
I don't have enough posts to have permission to include a link in my post but I searched this forum for vhdtool and found it.

Hope that helps
[Samsung Galaxy Nexus] shauphei:
Thanks

Thanks a lot.

It's all my fault. I did not do searching.
[Samsung Galaxy Nexus] HelpNeeded1:
Hi, could you please load up the file somewhere? ^^ (the correct nc.exe, if that works)

I updated cyqwin but I still get "command not found"... THANKS!
[Samsung Galaxy Nexus] Subhojit:
Is this compatible with Lollipop 5.1 on Nexus 4?
[Samsung Galaxy Nexus] carl1961:
As long as your phone is rooted and you know where your partitions are you should have no problem
[Samsung Galaxy Nexus] Subhojit:
That's all good.

It kept saying "error device not found".

Even on cygwin terminal had issues saying adb not found when I have adb setup.
[Samsung Galaxy Nexus] carl1961:
that could be because your partition is wrong, you need to find your internal data partition

also if you type adb shell in a windows cmd screen you get

Microsoft Windows [Version 6.1.7600]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\carl shelton>adb shell

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

operable program or batch file.

then your adb environmental path needs setting
[Samsung Galaxy Nexus] Albercook:
I have found conflicting information online. is it possible to use ADB to make an image of internal memory?
[Samsung Galaxy Nexus] Voltor46:
I am exactly stuck with the same problem. My device is a Xperia M2 D2303, mmcblk0p29.

Any help?
[Samsung Galaxy Nexus] Lennyz1988:
For those that don't know it yet. This method does not work anymore as of Android 4.3. Android enabled Trim. Once the file is gone, it's gone. Not even a professional company can get it back.
[Samsung Galaxy Nexus] carl1961:
did you try these steps as I did in this post?

http://xdaforums.com/showpost.php?p=58718411&postcount=1109
[Samsung Galaxy Nexus] Lennyz1988:
Yes I did exactly the same. Are you telling me you recovered the files on Android 4.3+?
[Samsung Galaxy Nexus] carl1961:
Yes but I will do it again I will do a factory reset and try again to be sure a stock recovery factory reset will redo my internal drive then I will try guide again
[Samsung Galaxy Nexus] Voltor46:
Ok, my problem was that I haven´t installed PV and util-linux when installing cygwin.

I got the raw, and made de partition. Everything worked perfectly. The problem is that recuva doesn´t seem to get de .crypt8 format from WhatsApp. I need one very importat conversation that I need for a judgement. Any help?
[Samsung Galaxy Nexus] Albercook:
Attemting to recover files from HTC one

I have made it through steps 1-4 ( rooted, drivers installed,debug mode on, Busybox installed, adb downloaded and installed, phone unlocked, superuser, adb device works)

at step 5 go to >all programs> Cygwin>>Cygwin64 Terminal

I right click and run as administrator. In the window that appears I see

myname@desktop ~

$

When I type

$$ adb forward tcp:5555 tcp:5555

I get this

-bash: adb: command not found

Any idea what I'm doing wrong

---------- Post added at 05:48 PM ---------- Previous post was at 05:34 PM ----------

Do I have to set the PATH so windows knows where ADB is?

I have to run. I will do this when I return.
[Samsung Galaxy Nexus] carl1961:
Yes
[Samsung Galaxy Nexus] POWBlock:
Hi everyone!

I installed and did everything as described but so far I failed, I got permission denied errors when I opened the 2nd terminal window and executed the last commands, then I noticed after I type the command "su", it doesnt change the $ to #, and yes, I rooted my gt-i9192 android version 4.2.2 with SuperSu, after searching around what could be the problem I decided to install adbd insecure, and as soon as type: "adb shell" I already got the "#" but I got another error: "nc: socket: Permission denied".

So, in short,

Without adbd insecure installed:

-no # whatsoever

-nc (while listening) and dd seems to be both running fine and waiting, but nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p12.raw gives me permission denied

With adbd insecure installed:

- always get #

- nc doesnt get permission to listen

Oh and, I never got any prompt from SuperSU when I typed "su" at the terminal.

Any ideas?
[Samsung Galaxy Nexus] carl1961:
Make sure you have USB debugging checked and also give pc authorization to your phone. You may have to revoke and try again. (Look in developer's section in settings )
[Samsung Galaxy Nexus] POWBlock:
Yes, I do have USB debugging checked, I confirned the first time I connected the USB cable, also checked the "remember this" setting, but now I really would like to revoke all that, but I cant find where to do that.
[Samsung Galaxy Nexus] carl1961:
right under or around USB debuggin in developer options should be revoke USB debugging authorations unless your running maybe JB
[Samsung Galaxy Nexus] Wartickler:
So after this thread's earning 100 posts it appears to me that I may have added unnecessary steps into the process. It works, as others have attested to, but perhaps it might be streamlined and become more technology-agnostic. That is to say, perhaps not specific to any one technology - or product. Extra points for a full FOSS solution (O;

I certainly did not play with any other ways to do this and I don't know *nix very well at all. I am also considering learning the proper steps to do this on a *nix box and writing this as a new *nix thread for our *nix friends. (:

Sent from my Galaxy Nexus

"Two hours? I think I could do better than that streaming Netflix with torch on. Something is very wrong there." - mmuzzy
[Samsung Galaxy Nexus] scandiun:
You can't know everything from the beginning. Is better to do it that don't.
[Samsung Galaxy Nexus] TheJuicer:
I definitely did use deep scan in recuva. I've also tried testdisk, active file recovery, and Easus Recovery. They all seemed to find the same files which are the most recent files on the device. This may be a dumb question in the linux world but is there more than one block mmcblk0p12 that I should pull or might have pulled the wrong one? I noticed on my phone I have a directory deb/block/mmcblk0p12 which is what was outline in the tutorial but I also have the same file under /deb/block/platform/omap/omap_hsmmc.o which has mmcblk0p12 in it. Is this the same as the other location? My mmcblk0p12 was about 30gb so I think it contained everything.

Thanks for all your help with this.
[Samsung Galaxy Nexus] no.one.writeme:
/dev/block/mmcblk0

@TheJuicer

Using Testdisk and/or Photorec I found more convenient to dump the whole device block ( /dev/block/mmcblk0 ), because it gets easier for both tools to properly identify the device partitions thus making recovery more successful.
[Samsung Galaxy Nexus] scandiun:
Probably the first is just a symbolic link to the real device. Do "ls -l" on such to see if it redirects to the real block device.
[Samsung Galaxy Nexus] ali_crown:
deleted
[Samsung Galaxy Nexus] rickkane:
I flashed a stock image to my phone using this procedure.

adb reboot bootloader

fastboot flash bootloader bootloader-toro-primekk15.img

fastboot reboot-bootloader

fastboot flash radio radio-toro-i515.ek02.img

fastboot reboot-bootloader

fastboot flash radio-cdma radio-cdma-toro-i515.ek05.img

fastboot reboot-bootloader

fastboot -w update image-mysid-icl53f.zip

fastboot reboot-bootloader

I didn't realize it wiped all data on the internal SD card. I am even more annoyed that the GNEX didn't come with removable storage now. Am I screwed or will your method recover my data? I did not do a bootloader lock or unlock, I left it unlocked. Thanks in advance.
[Samsung Galaxy Nexus] scandiun:
Probably you can recover some data. You should know that flashing some official stock roms delete everything, included sdcards., on the nexus as well.
[Samsung Galaxy Nexus] ali_crown:
whats wrong ?
[Samsung Galaxy Nexus] scandiun:
adb isn't in your PATH. You can workaround that making a symlink from you /bin folder to the real location:

ln -s "/cygdrive/c/Program Files (x86)/android-sdk/platform-tools/adb" /bin/adb
[Samsung Galaxy Nexus] ali_crown:
now

.... ?
[Samsung Galaxy Nexus] scandiun:
You need to install pv and util-linux into cygwin. Use setup.exe.
[Samsung Galaxy Nexus] Wartickler:
It also irritates me as well that we don't have a removable card... I believe that you should at least be able to recover some of your stuff though.

The only thing that worries me about your kind of situation is that there might be built in firmware software that automatically distributes "disk writes" evenly across the flash memory to resolve the issue of flash memory burn out. In that case it would be reasonable to believe that flashing a new system could write over areas that have recently been emptied.

Here's hoping that you are successful: :beer:

Sent from my Galaxy Nexus

"Two hours? I think I could do better than that streaming Netflix with torch on. Something is very wrong there." - mmuzzy
[Samsung Galaxy Nexus] rickkane:
After I enter the command

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

nothing happens. The screen went back to the waiting prompt. I thought I got lucky, but when I open the windows command prompt I get the error that the file size is smaller than 12MB.

Any thoughts on what I am doing wrong? Thanks for the help.
[Samsung Galaxy Nexus] Wartickler:
My thought is that you missed a step somewhere. Have you retraced your steps?

Sent from my Galaxy Nexus

"Two hours? I think I could do better than that streaming Netflix with torch on. Something is very wrong there." - mmuzzy
[Samsung Galaxy Nexus] TheJuicer:
I was having similar issues. What seemed to fix it was to make sure to enter one line of commands at a time. I was copying and pasting from the first page of steps in it wasn't liking it. I was getting raw files of size 0 with your error. Finally I did get it working but haven't been able to find the correct data to recover. Also make sure to be super user using "su" after "adb shell" in the first set of commands. My busybox was also installed in xbin and not bin so I had to modify the commands accordingly. Good luck.
[Samsung Galaxy Nexus] TheJuicer:
So this is the closest I have gottten to see anything that looks like could be usefull. I have navigated throught these folders but cannnot find any personal files. It seems these are the "generic" setup files for the nexus. Can anyone confirm I am getting close? I thought I should see an sdcard folder or userdata folder etc. Thanks
[Samsung Galaxy Nexus] Wartickler:
You are one folder deeper then you should be. You are in the system folder. If you could come up one folder higher then you could see the data folder. What phone do you have and what block did you try to recover?

For example, I have the Samsung Galaxy Nexus and I recovered the p12 block for 'userdata.'

Sent from my Galaxy Nexus

"Two hours? I think I could do better than that streaming Netflix with torch on. Something is very wrong there." - mmuzzy
[Samsung Galaxy Nexus] scandiun:
The sdcard usually is in the media folder you see there.
[Samsung Galaxy Nexus] Wartickler:
No that is the media folder inside the system folder. There will be the ringtones and boot animations.

Sent from my Galaxy Nexus

"Two hours? I think I could do better than that streaming Netflix with torch on. Something is very wrong there." - mmuzzy
[Samsung Galaxy Nexus] POWBlock:
Yes, its 4.2.2, its Jelly Bean
[Samsung Galaxy Nexus] carl1961:
I just checked my wifes lenova 889 4.4.2 4.2.2 and it did not have the revoke option either
[Samsung Galaxy Nexus] POWBlock:
4.4.2 or 4.2.2 ?
[Samsung Galaxy Nexus] carl1961:
your correct 4.2.2
[Samsung Galaxy Nexus] POWBlock:
I tried on a different computer (one that runs ubuntu 12.04), now it prompts again (to accept that USB connection), but only when I type "adb start-server" (or when I make the 1st connection with any other command like adb forward tcp:5555 tcp:5555), either way, everything is the same. No prompts from SuperSU while I mess with adb.
[Samsung Galaxy Nexus] Albercook:
Busybox give "Missing applet" error "Not linked Applets"

Thanks to this tread I'm making steady progress. I had some trouble installing BusyBox because I had s-on. That was fixed by BusyBox on Rails using recovery install mode. BusyBox is installed in /system/xbin.

Now I'm getting the message on BusyBox that nc is "Not Linked Applet" I did some searching but have not found a solution

I have an HTC one rooted and unlocked.

superuser

ADB installed

Debug active

BusyBox installed but with an error.

Any suggestions?

Thanks
[Samsung Galaxy Nexus] carl1961:
Run Cygwin setup and let it update
[Samsung Galaxy Nexus] younx:
Hi,

First of all, thanks or the guide.

I'm trying to recover pictures from the internal memory of my samsung s4 (android 4.4.2)

that were deleted without any action of my side.

I've tried a lot of recovery software but none of which worked because of the instability that i had on my phone : i couldn't root it nor use the usb debug option (it kept unchecked itself automatically)

So, my last attempt was to factory reset the phone in order to root it and to check once and for all the usb debug.

Doing so, i was hopping that my pictures weren't lost forever and that some how, they are kept in a memory area.

I followed the guide but i'm stuck at the step n° 6 (using nc)

when trying the following command :

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

i keep getting the error :

-bash: mmcblk0p29.raw: Permission denied

Any idea how to pass this step ??

Samsung S4 GT-I9505

ANdroid : 4.4.2

Thanks a lot for your help
[Samsung Galaxy Nexus] POWBlock:
Hi younx, when you type "su" on adb shell, does the sign "$" change to "#" ?
[Samsung Galaxy Nexus] younx:
Hi POWBlock,

When typing "su" on adb shell, the sign is #.

I could somehow pass the step after disconnect and reconnect the phone

Now, the issue is that the raw file is empty (0 kb).

I've tried another nc (from one of the posts here) and same result.

Any ideas ?
[Samsung Galaxy Nexus] POWBlock:
The raw file is empty because you didnt really get root permissions to use nc.

Did you try adbd insecure?
[Samsung Galaxy Nexus] younx:
I didn't use adbd insecure because i don't know what that is and how to use it.

isn't possible to use adb alone ?
[Samsung Galaxy Nexus] POWBlock:
This is what I mean: http://xdaforums.com/showthread.php?t=1687590

Read the first post.
[Samsung Galaxy Nexus] younx:
i've read the post but not sure how to install the adbd insecure by downloading it from the post :(

can you help with a step by step installation?

Moreover, i tried again step by step the tutorial in http://xdaforums.com/showthread.php?t=2123999

and one step described in the video is that i should have on my phone "grant or denied" when writing "su" on "cygwin". But, i don't have that.

Could this be the issue that is making the raw file empty ?
[Samsung Galaxy Nexus] Spacket:
Thanks for the great tut but i stucked at point 13. my disk is not appearing in the overview. It says that something is not up to date. When i try to attach it one more time, it says that it is already attached.

Please can someone help? A lot of people had this problem but no solution was postet :(
[Samsung Galaxy Nexus] POWBlock:
Click on download link you will see a qr code, you should have a qr code reader app on your phone, to get the link from it, download and install.

But now I just read your first post again, you couldnt root your phone, right? You need to do that or the whole thing is worthless trying.
[Samsung Galaxy Nexus] Spacket:
Can someone pls help?
[Samsung Galaxy Nexus] younx:
I couldn't root it before doing a factory reset.

Once i factory reset it, I could root my phone;

thanks for the qr tips. I didn't see it in the post.

I downloaded and installed the adbd insecure.

I've tried again and now i've a new line (in blue below) in cygwin after the command nc

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

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

The result still the same in the directory : file with 0kb
[Samsung Galaxy Nexus] Spacket:
Tried now with Win 8, getting now this error: Semaphore timeout period has expired ????

I cannot attach that file, is there an other possibilty to open/mount a vhd?
[Samsung Galaxy Nexus] POWBlock:
Are you sure you completed step 8 succesfully?
[Samsung Galaxy Nexus] younx:
Hi all,

I've managed to get the partition where i thought will be the lost pictures but recuva didn't find anything.

So i tried with the whole memory (mmcblk0). The issue i'm having now is that i can't initiaize the disk (step 13).

when right clicking on the name of the disk, i don't have the option "initialize disk"

I've attached a screenshot of what i have.

Any ideas ?

Thanks
[Samsung Galaxy Nexus] Albercook:
Learning lots of new ways to fail

Here is what I get in the first window

------------------------

Caren@desktop ~

$ adb devices

List of devices attached

HT39WW901336 device

Caren@desktop ~

$ adb forward tcp:5555 tcp:5555

Caren@desktop ~

$ adb shell

ViperOne@/# /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p3

5 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p3 <

----------------------------------------

The last line beginning with the 5. It appears when I hit enter after the previous line. it does not look the same each time and there is no prompt afterwards

in the other window

------------------------------

Caren@desktop /HTCone

$ adb forward tcp:5555 tcp:5555

Caren@desktop /HTCone

$ nc 127.0.0.1 55555 |pv -i 0.5

Caren@desktop /HTCone

$ nc 127.0.0.1 55555 |pv -i 0.5 > mmcblk0p3.raw

Caren@desktop /HTCone

$

-----------------

The file mmcblk0p3.raw is created but it has 0K

I was missing pv.exe on my PC so I downloaded it. All I did was move it to Cygwin/bin

not sure if that was enough but I stopped getting the "pv: command not found" error.

same for nc.exe

I still have s-on. is that a problem? I tried rumrunner but it failed

Any thoughts?

UPDATE:

I re ran setup for Cygwin and made sure it had nc and pv. Still getting an empty file. Is there a way that I can see some error log to see what step is failing?
[Samsung Galaxy Nexus] younx:
Hi,

I had the same issue and when i used cygwin 32 instead of cygwin 64, i could get the file without problem.
[Samsung Galaxy Nexus] Frodofrodo:
also empty raw file

How did you reinstall cygwin 32? I tried just installing it after deleting the cygwin 64 folder, but still getting empty raw file. Is this solution only applicable to galaxy nexus?

Thanks!
[Samsung Galaxy Nexus] Frodofrodo:
Following is on windows 7 using cygwin as suggested.

I started experimenting with skipping the nc step, by dumping the output from dd straight to "of=/mnt/media_rw/sdcard1/mmcblk0.raw" i.e. that is where my external SDCard is mounted on my xperia z2. Stupidly, I forgot about the sdcard's FAT32 filesize limitation (4GB) so dd bailed on me with a message

dd: writing '/mnt/media_rw/sdcard1/mmcblk0.raw': File too large

Instead I thought I would try to dd from the cygwin terminals host prompt, and stream the output to the destination drive (my computer) which runs on ntfs and thus allows big files.

[destination drive letter]:

cd /cygwin/nexus

adb shell su -c "dd if=/dev/block/mmcblk0" | pv > mmcblk0.raw

(the pv step above is not strictly necessary but gives you a nice overview of the process. you could just as well write adb shell su -c "dd if=/dev/block/mmcblk0" > mmcblk0.raw")

which works for dumping the datastream. However, I have not mounted the virtual file system yet so I will update this post with any info on whether it worked. If this works it may be a solution for those of you who get a zero size dump when going the way of the first post. Not sure if the destination file system modifies the raw dump differently than if I had used nc like the first post suggested.

wish me luck!
[Samsung Galaxy Nexus] POWBlock:
I hope it works! Good luck!
[Samsung Galaxy Nexus] Frodofrodo:
I ended up getting the internal memory to a raw file, mounted it as per instructions and ran recuva on it. However everything was corrupted so no dice for recovery :) My file system was wiped when I unlocked the boot loader so I was not too hopeful. Recuva does seem to be missing a lot, as if I run undeleter on the phone itself several intact pictures can be found that were deleted manually from within the os, but nothing that was deleted during the file system wipe. I'll try some other recovery applications and report back.

Final Update: didn't get any files back but at least I learned something.. lol.
[Samsung Galaxy Nexus] bryanho29:
I had success with this android internal storage data recovery solution, you may have a try.
[Samsung Galaxy Nexus] kurniawan_johar:
thx great work finally after so far i can get my user data back

the only problem was the mounts point (not every people has this block 12 for userdata)

try to find your own user data partition block with this way

(i use the #2 way to recognize my user data)

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

if you had problem with pv command like i do

its simple just google for pv.exe bin for cygwin

then paste in /cygwin/bin

pv command will work flawlessly

thx a lot guys...

edited just in case you need

http://www.techieshelp.com/downloads/VhdTool.exe vhd tools

http://softlayer-sng.dl.sourceforge.net/project/pvforcygwin/pv.exe pv which placed in cygwin/bin

http://www.daemon.de/idisk/Apps/netcat-openbsd-cygwin/netcat-openbsd-win32-1.10.2.3.zip nc.exe which extracted from this zip and placed into cygwin/bin

goodluck guys
[Samsung Galaxy Nexus] reza.abbasi:
0 Bytes problem

For those who have the 0 bytes issue, the problem is the 64-bit version of cygwin. you should download and install the 32-bit version of cygwin Regardless of your OS version and then it'll be solved :)
[Samsung Galaxy Nexus] ZzzzzxXxzzzzZ:
Can someone tell me the userdata partition for Xiomi mi4 ?

thx
[Samsung Galaxy Nexus] carl1961:
Download disk info from play store
[Samsung Galaxy Nexus] toonlight:
I had this problem, here's what I did:

1. Open the Start Menu, type diskpart, press Enter

2. Type list disk, press Enter

3. Type select disk X (where X is the number your drive shows up as), press Enter

4. Type clean, press Enter

5. Type convert gpt, press Enter

6. You're done. Close the window.

This takes care of steps 13 and 14 in OP's guide. Now you can continue with step 15 (select New Simple Volume). Hope this helps!

source: http://www.overclock.net/t/1227647/how-to-initialize-and-format-a-new-disk-for-use-in-windows
[Samsung Galaxy Nexus] huszonnegy:
Rename it to VHD. I also faced this issue in Windows 8.1.
[Samsung Galaxy Nexus] crytoy:
How can I dump the mmcblk0p12 partition on Ubuntu 14.04, I dont want to use windows and dont want to dump the raw file to the sdcard.

Anyone could guide on the steps to dump the android partition on Ubuntu
[Samsung Galaxy Nexus] POWBlock:
I think you should install adb on ubuntu then just use the terminal, then follow the same commands that he did on cygwin, since you are on linux you already have nc and dd. That will give you the raw file you need.