FORUMS

Sunday Debate: How Can We Get a No-Compromise Phone?

Join us in a fun Sunday Debate on Compromises. Come with your opinions and … more

PSA: You Can Optimize Your Note 4’s Recents Menu & RAM

The Note 4 never had the fastest Recents Menu, and despite its 3GB of RAM, … more

XDA Picks: Best Apps of the Week (July 25 – Aug 1)

Apps are at the front and center of any smartphone experience, and with over a … more

Voices Of XDA: Orbiting The Earth With Android

Editor’s note: This week’s feature has been written by forum … more

[Q] How to restore wiped files?

33 posts
Thanks Meter: 1
 
By thekkk, Member on 25th March 2014, 08:37 PM
Post Reply Subscribe to Thread Email Thread
I unlocked my HTC One Bootloader, but all my files got wiped

How can i restore files? I lost all my photos and whatsapp chat history. There must be a possibility?! But how?
 
 
25th March 2014, 09:15 PM |#2  
Senior Member
Thanks Meter: 59
 
More
Quote:
Originally Posted by thekkk

I unlocked my HTC One Bootloader, but all my files got wiped

How can i restore files? I lost all my photos and whatsapp chat history. There must be a possibility?! But how?

I don't think you can recover. It told you this when unlocking.
25th March 2014, 09:18 PM |#3  
OP Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by mb_guy

I don't think you can recover. It told you this when unlocking.

It told me that personal settings will be deleted, and i thought that only would be settings, etc...

and in the tutorial i've read there was no warning for this
25th March 2014, 10:32 PM |#4  
Senior Member
Thanks Meter: 26
 
More
Yeah I don't think you'll get anything back easily at all. Keep that phone backed up in the future!

Sent from my HTC One using Tapatalk
25th March 2014, 10:39 PM |#5  
alray's Avatar
Senior Member
Thanks Meter: 2,203
 
Donate to Me
More
Quote:
Originally Posted by thekkk

It told me that personal settings will be deleted, and i thought that only would be settings, etc...

and in the tutorial i've read there was no warning for this

No the bootloader unlock screen says personal data (not settings) will be wiped which include the virtual sdcard (/data/media/0)



btw this also deleted stock apps like flashlight, calculator, sound trimmer, tuneIn, SoundHound etc.... which are stored in /data/preload
Last edited by alray; 25th March 2014 at 10:41 PM.
25th March 2014, 10:40 PM |#6  
OP Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by bbinder

Yeah I don't think you'll get anything back easily at all. Keep that phone backed up in the future!

Sent from my HTC One using Tapatalk

It doesnt matter how difficult it is, but somehow i'm sure there must be a way, the question is how. Because every recovery software cant be used because of de MTP-mode
26th March 2014, 12:59 AM |#7  
Senior Member
Thanks Meter: 26
 
More
Quote:
Originally Posted by thekkk

It doesnt matter how difficult it is, but somehow i'm sure there must be a way, the question is how. Because every recovery software cant be used because of de MTP-mode

Sure. I just personally think that you'll give up, given those circumstances Just being realistic...

Sent from my HTC One using Tapatalk
26th March 2014, 08:38 AM |#8  
Senior Member
Thanks Meter: 494
 
More
Quote:
Originally Posted by thekkk

the question is how. Because every recovery software cant be used because of de MTP-mode

The first step is to not boot the phone until you get a dump of your data partition. Booting to a custom recovery is okay--a full Android boot is not.
In recovery (using the ADB shell), umount data and get a dump of the data partition (/dev/block/mmcblk0p37) using "dd". Since you can't write to the data partition while making its dump, you'll need to write to /system. Since /system isn't very big, you'll need to do the dump in pieces of about 350 MB each (depends on how much free space you have in /system).

The "dd" parameters you'll need are "bs" to speed things up, "skip" to tell it where to start the chunk, and "count" to determine how big the chunk is. Since /data is 25.6 GB, you'll need to do this 60-70 times, and after each chunk, use "adb pull" to copy the chunk to your computer. When you have all the chucks, reassemble them and make sure it's the same size as /dev/block/mmcblk0p37. Make sure it's a valid ext4 filesystem. Then you can start using data recovery tools.

Quote:
Originally Posted by thekkk

It doesnt matter how difficult it is, but somehow i'm sure there must be a way,

So put your money where your mouth is and do it.
The Following User Says Thank You to fenstre For This Useful Post: [ View ]
26th March 2014, 04:46 PM |#9  
OP Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by fenstre

The first step is to not boot the phone until you get a dump of your data partition. Booting to a custom recovery is okay--a full Android boot is not.
In recovery (using the ADB shell), umount data and get a dump of the data partition (/dev/block/mmcblk0p37) using "dd". Since you can't write to the data partition while making its dump, you'll need to write to /system. Since /system isn't very big, you'll need to do the dump in pieces of about 350 MB each (depends on how much free space you have in /system).

The "dd" parameters you'll need are "bs" to speed things up, "skip" to tell it where to start the chunk, and "count" to determine how big the chunk is. Since /data is 25.6 GB, you'll need to do this 60-70 times, and after each chunk, use "adb pull" to copy the chunk to your computer. When you have all the chucks, reassemble them and make sure it's the same size as /dev/block/mmcblk0p37. Make sure it's a valid ext4 filesystem. Then you can start using data recovery tools.


So put your money where your mouth is and do it.

That sounds like something, first of all thanks for your input!

But how should i run this command without booting into android (I'm in clockwork-touch recovery, but doesnt seem to work)? This command works (when booted into android), i've tried it with 'dd', so i guess thats the correct way!

=> If i have to boot into android anyway to do this, i would also have an OTG plus USB-Stick (32GB), then i could do it in about 2 parts to save it directly to the usb-stick. Would that be the better aproach instead of writing it to the /system? because i don't know what action writes to the /sdcard

Just to clarify, i have to execute the following command one after the other(?) :

$ dd if=/dev/block/mmcblk0p37 bs=367001600 count=1 skip=0 of=/system/chunk1.img
adb pull /system/chunk1.img .
$ dd if=/dev/block/mmcblk0p37 bs=367001600 count=1 skip=1 of=/system/chunk2.img
adb pull /system/chunk2.img .
$ dd if=/dev/block/mmcblk0p37 bs=367001600 count=1 skip=2 of=/system/chunk3.img
adb pull /system/chunk3.img .


Do i have to make something special that i can reassemble them later or are there programms out there for that problem?
Last edited by thekkk; 26th March 2014 at 05:12 PM.
26th March 2014, 07:07 PM |#10  
NxNW's Avatar
Senior Member
Thanks Meter: 517
 
More
Um, every time you boot to android you are rewriting the very flash memory you are trying to recover.

The ratio of the amount of work required vs the chances of success is not a favorable one. Unless you are trying to recover video of 'baby's first steps' or a bitcoin private key, I would let this go..

Sent from my HTC One using xda app-developers app
26th March 2014, 10:02 PM |#11  
OP Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by NxNW

Um, every time you boot to android you are rewriting the very flash memory you are trying to recover.

The ratio of the amount of work required vs the chances of success is not a favorable one. Unless you are trying to recover video of 'baby's first steps' or a bitcoin private key, I would let this go..

Sent from my HTC One using xda app-developers app

There were memories on it, and it would be a pity if they're all gone now

I'm not that type of guy to give up, I have the motivation and the time to do it. I will give it at least a try, I have nothing to loose, except time - but that doesnt matter because I wanna have these data's back

The only one problem I see now is that if I read the block step by step and save this, I don't know how I should reassemble all these files. Anyone has an idea? Reading a block and pull it out of the phone isnt the problem
The Following User Says Thank You to thekkk For This Useful Post: [ View ]

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes