yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] blackout1:
Bash: adb: command not found

Hello all,

I'm already trying hard for 4 days to recover some file from my samsung tablet, with this post. Only thing is rightnow that none of my commands work in the cygwin terminal screen.

What do i do wrong? I get with the first command the error:

Bash: adb: command not found

please help me as i don't know what i do wrong:

steps i did.

- samsung tab3 8.0 is rooted, and has superuser

- installed on tablet, busybox

- downloaded and installed cygwin incl pv and util-linux

- started cygwin

- placed netcat nc.exe in the bin folder

- placed adb in the bin folder (together with all the files packed from sdk/platform-tools

- USB debugging is on on my samsung tab

- (connected the phone in ADB mode (this is the thing in windows device manager not?)

- unlocked the screen (from tablet)

and now opend in administrator mode a cygwin terminal and put in adb forward tcp:5555 tcp:5555

the message back is:

bash: adb: command not found
[Samsung Galaxy Nexus] bmwchampz:
when i m going to attach the vhd it says the file is corrupted or unreadable.. i m running windows 8 and have a galaxy note 3.. pls help﻿..
[Samsung Galaxy Nexus] frytek:
Hello. I have tried method from first point on my Note 3. Everything went smooth, I have recovered block: userdata -> /dev/block/mmcblk0p26

Now I have a drive 26GB, but Recuva is not finding photos from my deleted DCIM folder. I understand some of them can be overwritten (it was 2 days ago) but I can't find any of them! All I can see is the photos used in mms, facebook etc.

Maybe DCIM folder was on a different block (not userdata)?
[Samsung Galaxy Nexus] blackout1:
could someone please reupload the VHDTOOL.exe, this one is not possible to get on the microsoft site anymore, so i cannot convert the file:(

in need for it very urgent, and cannot find it on the internet
[Samsung Galaxy Nexus] frytek:
I have downloaded mine from: http://www.techieshelp.com/downloads/VhdTool.exe

It's working.

Is there a solution available with recovering the DCIM folder? I see that I'm not the only one who can't recover anything from DCIM..
[Samsung Galaxy Nexus] soldier2gud4me:
Can u help me find the internal memory name of my lenovo s930. Thanks buddy.
[Samsung Galaxy Nexus] cbass64:
galaxy s4 mini - verizon

Hey guys, really appreciate this guide and all the input. Here's another sob story, i'll make it quick. And appreciate the help...

Mother-in-law was watching the kids and wife's S4 mini was in the stroller. Wife's phone kept receiving texts, mother-in-law thought it was us trying to get ahold of her. She tried to unlock it unsuccessfully and then handed it to my 4 year old to see if she could unlock it...now we have a reset S4 mini with pictures from both children's birth until now, gone...and all evidence of our recent bungee jumping trip, gone. Also, we have grandfathered unlimited data plan which has no cloud storage/backup included. So we have no backup of wife's phone.

Ok, to the point:

I followed the steps in the guide, and I am a fairly savvy Linux/Unix admin so I am comfortable with the commands. Every time I dd over tcp, I get 0 bytes transferred. I know I have the userdata block, but nothing is transferring. There is no firewall blocking it. I saw something about using ftp...is it the exact same directions, but with wifi connection rather than usb...and using ftp rather than tcp? Thanks for any details.Wife's phone has been powered off for almost a month because we don't want to overwrite any files. Files are all on internal memory, not SD card.
[Samsung Galaxy Nexus] Sneakyghost:
Hello [MENTION=2129788]Wartickler[/MENTION],

A user of my own HTCOneM8 Firmware thread has recently pointed me to your guide here. I was until then unaware of any type of method to pull the full userdata to PC except by having a bigger external SDcard and dd copying it to that, then adb pull it.

The Cygwin way to directly dd it to PC is an awesome addition to my knowledge box. I appreciate your work and the ideas of [MENTION=2738944]scandiun[/MENTION] - you created something really valuable here.

I just wanted to let you know i linked to your Guide in my own thread. See for yourself: http://xdaforums.com/showpost.php?p=54097345&postcount=4

I hope this is going to help some folks.

Regards,

Sneaky
[Samsung Galaxy Nexus] TJMacGyver:
First I wan't to thank the OP for this genius thread!

I know I'm making a raw dump of the flash memory, but for the most parts I have no idea how :)

And then I also wanna thank fazm - Without your clarification and block paths It wouldn't have worked.

I'm on a semi soft bricked HTC One Mini
[Samsung Galaxy Nexus] Elyward:
hi , you could try " nc -h " to see if it works ?? if not , maybe you should re-download your nc .
[Samsung Galaxy Nexus] coronagrey:
Followed the procedures, was able to download the partition and get the .raw file. It was like 23gb. Mounted and scanned with recuva, didn't find my pictures. I scanned this partition, I have a note 3: /dev/block/platform/msm_sdcc.1/by-name/userdata

the folder my pictures were located were: /storage/emulated/0/dcim/camera

Is that folder located on that partition? None of the photos I deleted or videos were on there.
[Samsung Galaxy Nexus] coronagrey:
After reading through all 100 pages of posts, trying every single recovery software that is out there (pretty much every one on cnet and then some), I've come to the conclusion that even if you are able to get your partition image, I have 2 words for you: YOU'RE ****ED (3?). Nothing was able to recover any image that was deleted, so if you arn't successful, don't feel bad, you are not alone. I had about a months worth of pictures and video, mainly of my son's birth (7/4/14). My wife has pics on her phone so all is not lost, but I lost some pretty memorable stuff. Thanks to the geniuses at google for making it where if you delete an image from your internal memory, no way to recover it. For those who still have hope, just root your phone and use diskdigger from play store, you will get the same result from the method described in the original post.
[Samsung Galaxy Nexus] mikewse:
Recovery of Internal Memory not possible after factory reset

Hi Wartickler,

You may want to add to the guide that if you're on Android 4.0 or higher and have done a factory reset then data is gone permanently, no use to waste time trying to recover anything from Internal Memory. I recently went to the bottom of this trying to recover data myself and finally checked the Android source code. Starting with ICS a factory reset will end up in a secure erase of the whole /data region on the eMMC memory chip so all data will be irrevocably gone.
[Samsung Galaxy Nexus] jago25_98:
Linux users may prefer this

Linux users have more tools available, it's just a matter of knowing which are best.

The trick I found making things easier is working on one partition at a time instead of trying to recreate the partition table.

(enable adb root in settings)

on linux: adb shell

android$su

andoird# (should now be a hash sign for root)

on linux box: adb shell su -c "cat /dev/block/mmcblk0p12" | pv > mmcblk0p12.raw

Then you can work on that file. You can mount it with #mount -t ext4 /mnt/point or you can work on it with scalpel. For scalpel you need to specify which files you are searching for in /etc/scalpel/scalpel.conf (fedora has a bug of not referencing /etcscalpel so you need to specify where the config file is with -c)

Titanium Backup files are identified as zip files according to the $file command. After a factory reset using TWRP recovery, not in Android booted system I found 34732 zip files with scalpel. I'm now trying to figure out which one is the Titanium Backup of Google Authenticator but it's going to take a while since we have no .TiBkp extension to differentiate them. I wonder what all the zip files are.... possibly earlier backups... possibly .apk files...

I used

zip y 10000000 PK\x03\x04 \x3c\xac

to get this result so far. I suggest adding this and also secure wipe info on the OP.
[Samsung Galaxy Nexus] omniastrider:
Do you know there was the auto-backup feature to auto-save all your photo and videos (I don't remember since when, but before April 2014)?

By the way, is there any method to make an exact copy of the internal memory, without root?
[Samsung Galaxy Nexus] jago25_98:
I expect this is the one you are thinking of. It's a load of bull. It doesn't backup App data. It doesn't backup your Google Authenticator.

[IMG="backup lie"]http://dl.dropbox.com/u/241249/Selection_001.png[/IMG]

I have found about 30,000 zip files via Scalper. Some of these will be the Titanium Backup for things like GAuth. But I haven't found one yet that will open. I guess I need to start recovery on the zip files themselves or try something different.
[Samsung Galaxy Nexus] slobo2712:
I did all like in tutorial but always got 0 kb transfer after nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p29.raw

What coul'd be wrong Im using s4 i9505 ? Tnx in advance
[Samsung Galaxy Nexus] snirben:
why it create just 2.54 MB file?
[Samsung Galaxy Nexus] veldom:
Thank you for this amazing guide!
[Samsung Galaxy Nexus] troemich:
Can't find my data

I have a Samsung Galaxy S4. I accidentally deleted a lot of my photos. I made a raw file of the entire internal memory card and converted it to a vhd file. The problem is that I mostly find temporary photos from the temp folder or something. I found just 10 of my photos. I tried lots of different recovery tools.

Can anyone look at the screenshot I made from the partition list and tell me on which partition the photos are normally stored? I believe it's the 9 GB partition (mmcblk0p29). That's where I found most of the temp pics and some of my photos. There's also a zram0 partition. That's some kind of swap partition when the ram is full right? Can anyone help me out. I can't accept that they are gone.
[Samsung Galaxy Nexus] troemich:
In the tutorial it says under requirements:

"A rooted Android phone, (try to root with a non-destructive method as this appears to protect those who must root from wiping the device data a second time)"

What is a non-destructive rooting method? I used "cf auto root" to root my Samsung Galaxy S4. Is this the reason why I can't recover my photos?
[Samsung Galaxy Nexus] ashok20205:
unable to mount the raw file as VHD

I followed the guide and created the raw file. raw file size is 11 GB,i have converted it using vhdtool.exe as explained. when i try to attach vhd in disk management, following error pops up

"A virtual drive support provider for the specified file was not found"

Iam using windows 7, please help me i have to extract some important files from my internal storage urgently, i have got a 11 GB raw file, my phone is Sam. galaxy note 2

Thanks in advance, please help me
[Samsung Galaxy Nexus] Chocobeexo:
i can't convert raw file by vhdtool.exe (please see attached file)

and i have some question.

from step 1 to convert step, i have to always connect my phone or not?

Thank you for help.
[Samsung Galaxy Nexus] Chocobeexo:
Mmcblk0p12 is just only userdata. I solve this to use mmcblk0.raw it's a full disk.

---------- Post added at 04:39 AM ---------- Previous post was at 04:29 AM ----------

I solve this to turn off firewall.
[Samsung Galaxy Nexus] avinashvasudevan:
No DCIM folder

Has any one figured why/how the recovery tools are not able to pick up anything from the DCIM folder ?

I have saved my .raw files and continued to use my phone normally :( hoping someone will have a solution some day.

But, I have to say this forum is amazing. So much support for and by everyone....

Thanks everyone.
[Samsung Galaxy Nexus] avinashvasudevan:
Confirmed DCIM partition.

I just confirmed that the DCIM folder does indeed get stored under the userdata partition by doing a small test.

step 1. Took a picture on my samsung note 3 phone and did dd/ncat on the user partition. And the recovery tool found the picture with the exact file name.

step 2. Deleted the picture from the phone, did the dd/ncat again on user partition and boom the picture could not be recovered. This to me, means that when deleting the contents of DCIM folder, the OS or the camera software or driver is given a special instruction to clean delete ( destroy the file header ) the contents.

Like someone in a post said, we are #####ed :(

Can someone with deep understanding of Android/Linux system comment on my conclusion.... May be I am wrong..
[Samsung Galaxy Nexus] tetractius:
First of all thanks for this great thread!

I'm trying to recover my photos after an accidental hard reset.

When I type into cygwin the instruction " /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0 " nothing happen and the terminal stay with the intermittent cursor

It also happen if I try to export only my data partition (mmcblk035)

What can I do? It's a busybox problem? If I retry the error message is this: " -bash: /system/bin/busybox: No such file or directory "
[Samsung Galaxy Nexus] avinashvasudevan:
I don't think there is anything wrong. This command makes the phone listen to the port 5555 for a connection and as soon as someone connects to the port, it will start executing the command dd.

Continue with the instructions, open another terminal and type the ncat.exe 127.0.0.1 5555 | pv -i 0.5 > xxx.raw command. As soon as you execute this command, you'll see it all running.

Remember to use ncat.exe instead of nc.exe. Search this thread for instructions of getting ncat.
[Samsung Galaxy Nexus] tetractius:
I also try with ncat but still nothing happen when I prompt

/system/xbin/busybox ncat -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p35

Even if I open another terminal and type the ncat.exe 127.0.0.1 5555 | pv -i 0.5 > xxx.raw command I transfer 0 bytes!

I read other users had my same problem but I don't know how they solved
[Samsung Galaxy Nexus] avinashvasudevan:
216

Did you use busybox nc on the phone like

1. /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p35

and then ncat on the pc side, like ncat 127.0.0.1 5555 | pv -i 0.5 > xxx.raw

If you see any error message, paste that also.

On the phone you can use blockdev --getsize64 /dev/block/xxx to see the size of the partition. This is the size that should be copied to the pc if everything works correctly

Also, I used cygwin64 bit. Not sure if it matters, but just FYI

---------- Post added at 08:00 PM ---------- Previous post was at 07:55 PM ----------

By saying on the phone, I meant the terminal in which you do the adb shell command. All the commands that you do within ADB shell are executing on the phone.

By saying on the pc, I meant the terminal in which you do not do the adb shell command. All the commands that you do in this terminal are executing on the pc
[Samsung Galaxy Nexus] Christopher8989:
Thanks
[Samsung Galaxy Nexus] PONKiE:
Yay!

Your post saved me! I would've never made it work without the ncat.exe.

Super first post "junior member" ;)

Hail to patience and the awesome power of the xda search tool :victory:
[Samsung Galaxy Nexus] tetractius:
First of all thank you very much for your support! ;)

I also have cygwin64 and I tried both "nc" and "ncat" command.

The problem is that when I execute the phone command

/system/xbin/busybox ncat -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0p35

or

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

the terminal doesn't return the line

5555 -e /system/xbin/busybox dd if=dd if=/dev/block/mmcblk0p35

but only stay the intermittent cursor and when I type th pc command

$ ncat 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p35.raw

it results

close: No error

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

So I don't know if can be a busybox problem, but I reinstalled it several times and all seems correct!

P.S.

I also tried on another pc and directly on the phone with terminal emulator but with the same result!
[Samsung Galaxy Nexus] avinashvasudevan:
Are you copy/pasting the commands ? its possible that its not formatted correctly. Either paste it to a notepad and copy from there or manually type. Also try other commands on busybox and see if it works.

I installed busybox stephen (StEricsson ) from google play https : / / play . google . com / store / apps / details?id=stericson.busybox ( I couldn't paste a link here as I am a new user. Remove spaces and use the url )

You can also check the size using blockdev --getsize64 /dev/block/<xxx>

Sorry, that is all I could think of, for now. I'll post if I find something else.
[Samsung Galaxy Nexus] tetractius:
Even if I check the size using the command blockdev --getsize64 /dev/block/mmcblk0p35 it always result the intermittent cursor and no data!

I attach the list of partition of my LG G2 (D802).

P.S.

I also tried with blockdev --getsize64 /dev/block/dev/block/platform/msm_sdcc.1/mmcblk0p35 but nothing!
[Samsung Galaxy Nexus] tetractius:
Finally I found a solution!!! :D :D :D

I used minimal_adb_fastboot_v1.1.3_setup.exe to send the phone command (system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0) and then with cygwin I started the raw export

adb forward tcp:5555 tcp:5555

cd /g2

ncat 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw

In this moment I'm exporting the raw file... stay tuned and tnx a lot for the support!!! ;)
[Samsung Galaxy Nexus] cakaba34:
help me please

Hello, I tried the tutorial and got this error

"shell@ja3g:/ $ /system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p21

5 -e /system/bin/busybox dd if=/dev/block/mmcblk0p21 <

dd: can't open '/dev/block/mmcblk0p21': Permission denied

"

please help me on this. how can i have the permission
[Samsung Galaxy Nexus] tetractius:
Your phone is rooted?
[Samsung Galaxy Nexus] cakaba34:
Thx. I figured it out now. I will write it on after I finished my job. Thank you all.
[Samsung Galaxy Nexus] avinashvasudevan:
No DCIM images :(

Has any one ever retrieved any deleted pictures which were under the DCIM folder ? I can only retrieve all other pictures. I just want to know if I am doing something wrong or if this is a problem with this approach.

Please someone with success report here.
[Samsung Galaxy Nexus] adypeot:
Dear all in reading,

Hi Im from Indonesia...such a savior thread this is, but I am a newbie in this kind of things and dont have any experience at all. I lost picture of my second child when he was born couple days ago, internal memory get to full and got error message, i tried to retrieve it but it sez error and I end up in formatting it...they are stored in phone memory of Samsung N7000

I tried to download all the requirements and ready, but I already face a problem since work point 1...well at least i will follow, okay work point 2,3,4 done, point 5....I dont get it, should I write that code on CYGWIN terminal window or CMD window?

*if there is someone in Jakarta could help me with this it would be greatly appreciated.
[Samsung Galaxy Nexus] tetractius:
I'm trying from several days without any success!!!

No photos or videos!

I had crypted some photos with keepsafe that store his files under sdcard\.keepsafe but I neither can recover them!!!

I think there are no ways to have back our images!!!

Someone was able to recover something from the *.raw image of his phone???
[Samsung Galaxy Nexus] Aashish-kkhckr:
vhdtool.exe command not found

first time tried making raw file. it created but only size of 456 mb

now whenever i tried to create raw file it show 0mb transfer

si i tried to convert what i have

but its showing vhdtool.exe command not found

i have already copied vhdtool.exe to /nexus
[Samsung Galaxy Nexus] ttimt:
Try choosing mmcblk0
[Samsung Galaxy Nexus] SanneB:
No files found to recover

Hi!

I spend the entire day trying to restore my data (not because of the tutorial, I'm not so great with this kind of stuff). I have a Samsung ace 2 I8160 and accidentally deleted my whatsapp backup. I would like to restore it, because it contains some precious text messages.

Anyway, I did everything I'm supposed to. I believe... ;) I made a raw file of mmcblk0, which was approximately 320 mb big. I did all the other steps and started recuva. But recuva couldn't find any files and therefor couldn't restore deleted files..

Anyone who knows how to help me?
[Samsung Galaxy Nexus] CutterX:
Hi,

Thanks a lot for the first post. I couldn't get Recuva to find anything interesting in the backup image that dd generated. I want to try mounting it in Linux and using a tool called extundelete. For now I'm unable to mount the image; would someone have an idea of what to try?

I've tried this (first and second answers) without success.

I got this error after trying to mount:

[IMG="error after trying to mount"]http://i.imgur.com/HZMxFJ9.jpg[/IMG]

Please help.
[Samsung Galaxy Nexus] SanneB:
Okay, a small update. I made a raw file of mmcblk0 (it's 3,7GB) and converted it with VhdTool.exe. Then, I followed the next step and was able to recover deleted files with Recuva :laugh:. But here comes the next problem. I was able to find the backup from my whatsapp messages, but it was the backup that's already on my phone, not the one I deleted.. So how come Recuva couldn't find the deleted msgstore.crypt?
[Samsung Galaxy Nexus] sonofjon:
Moreover, as of Android 4.3+ and the implementation of TRIM it is now incredibly difficult to recover deleted files on the internal memory. This might also be worthwhile mentioning in the original post.
[Samsung Galaxy Nexus] SanneB:
Anyone who can help me? I really want my whatsapp messages back!
[Samsung Galaxy Nexus] androidlabs:
Does this tutorial applies for all android versions and any phone phone model ?

hello i want to know that if this guide works for any android version and all phone models ?

Br,

Babar Abbasi
[Samsung Galaxy Nexus] iDi0tiK:
Sorry if I missed the answers

Just wondering will this work with Cygwin 64bit or specifically needs to be 32bit?

Also will this (or does anyone know another method) which will work with a phone after you have flashed a rom?

Cheers in advance.

iDi0t
[Samsung Galaxy Nexus] n00b4ever:
A workaround

I was having the same problem for some weird reason. I was able to send data to 5555 but it wont receive through the 'pv' command. So what I did was rather than using 'pv' , I entered 127.0.0.1:5555 in my browser. This made the file download automatically. Then I renamed it to mmcblk0pxx.raw and moved it to the appropriate location. And viola, everything works fine! But still I wanted to ask if there's a difference between obtaining the raw fil via the 'pv' method and this method ?

Thanks for the tutorial :D

---------- Post added at 04:42 AM ---------- Previous post was at 04:17 AM ----------

It must have gotten overwritten by the new backup file (or any other file for that matter). Did you transfer/download anything to your phone after the files got deleted ?
[Samsung Galaxy Nexus] purplenate26:
A virtual disk support provider for the specified file was not found error: raw file

What do I do, I know nothing about Windows and have used Linux for several years? How do I get support for the disk :confused:

Also I used wget to capture the data stream.

Install wget using cygwin.

Then follow the instructions in this post: http://xdaforums.com/showpost.php?p=34494269&postcount=19

Then when you open the second terminal do what I did.

$ wget 127.0.0.1:5555

Wget will download the file as an index.html which you can simply rename. There are wget options to rename the file during download, but I was too lazy to read the man page.
[Samsung Galaxy Nexus] bigcountryfarmer:
First off, thank you for all the awesome information. I lost my files on my Moto X because I unlocked my bootloader, but forgot to make a backup and save my files :( I finally was able to make a raw disk image of mmcblk0, and i used VHD tool to convert it to a vhd to mount, but after renaming it to .vhd, the file size drops from 36 to 29gb. Also, testdisk only finds the current boot sector even after running a deep scan. Does anyone have any suggestions?