Recover deleted files on UTouch / Nexus 5
-
@zlamalp said in Recover deleted files on UTouch / Nexus 5:
So, could it just work with /bin/nc and /bin/dd, ommiting all busybox ?
I would say: just try. The commands read from the phone, so I wouldn't assume it'll break anything.
The solution is for Android, so I guess it'll be easier (i.e. no need for busybox) for UT because that's a "real" linux. -
@ingo said in Recover deleted files on UTouch / Nexus 5:
I would say: just try. The commands read from the phone, so I wouldn't assume it'll break anything.
The solution is for Android, so I guess it'll be easier (i.e. no need for busybox) for UT because that's a "real" linux.So I tried, but it failed on "broken pipe" error. I probably misunderstood some netcat param (it doesn't have -e param in utouch). But I find out, that I did backed up most of the lost files, so I don't need to investigate this any more. But I guess, that with proper netcat syntax we can use linked solution for android on utouch.
-
I guess the syntax to be used on the phone would be
dd if=/dev/mmcblk0p28 | nc -l -p 5555It reads the entire partition and passes the output to netcat which then transfers it to the PC when the corresponding nc command is launched there.
-
I tried, but it resulted only in:
root@ubuntu-phablet:~# /bin/dd if=/dev/mmcblk0p28 | nc -l -p 5555 /bin/dd: writing to 'standard output': Broken pipe 129+0 records in 128+0 records out 65536 bytes (66 kB, 64 KiB) copied, 0.00488971 s, 13.4 MB/s -
Do you get that error immediately or after some time?
Have you done the matching commands on the computer side?The general syntax should be correct. I've tried a simple setup on my PC
In terminal 1
dd if=README.txt | nc -l -p 5555In terminal 2
nc localhost 5555And then I saw the contents of README.txt on the "client" side.
-
@ingo said in Recover deleted files on UTouch / Nexus 5:
Do you get that error immediately or after some time?
Have you done the matching commands on the computer side?It fails almost immediatelly, with random number of records (in/out). I did matching command on the computer side like this:
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p28.imgI didn't test it with a single file. I will try it and with localhost instead of IP too.
-
I now did a full test.
Terminal 1 (preparation on the PC and commands on the phone)
ingo@pc:~> adb forward tcp:5555 tcp:5555 ingo@pc:~> adb shell phablet@ubuntu-phablet:~$ sudo -i root@ubuntu-phablet:~$ /bin/dd if=/dev/mmcblk0p6 | nc -l -p 5555This then waits until I do something on the PC.
Terminal 2 (connecting to the phone over port 5555 and receiving the partition image)
ingo@pc:~> nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p6.imgAnd when I saw
10485760 bytes (10 MB, 10 MiB) copied, 22.2077 s, 472 kB/sin terminal 1 I canceled the command in terminal 2 withctrl+c.I used mmcblk0p6 as an example because that is a 10MB partition for me. Enough for a test but not too much to wait for.
-
I tried exactly what you posted, but again with "broken pipe" error message. I tried even different (smaller) partitions with same result.
root@ubuntu-phablet:~# /bin/dd if=/dev/mmcblk0p28 | nc -l -p 5555 /bin/dd: writing to 'standard output': Broken pipe 33+0 records in 32+0 records out 16384 bytes (16 kB, 16 KiB) copied, 0.0672733 s, 244 kB/s root@ubuntu-phablet:~# /bin/dd if=/dev/mmcblk0p28 | nc -l -p 5555 /bin/dd: writing to 'standard output': Broken pipe 1+0 records in 0+0 records out 0 bytes copied, 0.00068524 s, 0.0 kB/s root@ubuntu-phablet:~# /bin/dd if=/dev/mmcblk0p28 | nc -l -p 5555 /bin/dd: writing to 'standard output': Broken pipe 1+0 records in 0+0 records out 0 bytes copied, 0.000911716 s, 0.0 kB/s -
Maybe you can try some very simple test.
echo Test | nc -l -p 5555 -
Sadly doesn't work, but it exits with 0. I'm not sure but I guess its blocked on the way to the PC for some reason.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login