Recovering files after accidental reset through exact-copy on windows

Search This thread

IceMan6969

Member
Jun 2, 2012
8
0
My father has done a reset to factory by accident. We are trying to restore photos, videos and other if possible.

It seems that the recovery programs for android are not as good as the pc ones so I thought: Is it possible to make a byte-by-byte copy/image of the smartphone and afterwards use pc programs to recover the files?

If you have any recommendation of such program to create the copy/image please share.

Thanks!
 

jwoegerbauer

Senior Member
  • Jul 11, 2009
    5,271
    9
    1,279
    European Union
    Huawei Mate 10
    Each file's existence and location on internal storage memory is stored / logged in Android OS's filesystem of the related partition. Once a Factory Reset is done the info about a file's existence and location is wiped in filesystem, hence it can't get retrieved anymore.

    Of course it's possible to make a byte-by-byte copy of the partition of interest: Android must be rooted & ADB must got enabled on phone to do so, for example by means of Windows batch-file:

    Example:
    Code:
    ....
    adb shell "su -c 'mount -t auto -o rw,remount <ANDROID-BLOCK-DEVICE-NAME-HERE>'"
    adb exec-out "su -c 'dd if=<ANDROID-BLOCK-DEVICE-NAME-HERE> bs=4096'"  > <LOCATION-ON-PC-HERE>
    ....
     
    Last edited:
    • Like
    Reactions: blackhawk

    IceMan6969

    Member
    Jun 2, 2012
    8
    0
    Once a Factory Reset is done the info about a file's existence and location is wiped in filesystem, hence it can't get retrieved anymore.
    There are many programs that do restore deleted or reset devices. The explanation on line is that when you delete a file it is only deleted in the filesystem's log but the raw data is still on the hard drive (until new data is stored and overwrite it). File recovery software have methods of scanning all the raw bytes on the hard drive and from there extract files that their raw data hasn't been overwritten.
    Of course it's possible to make a byte-by-byte copy of the partition of interest: Android must be rooted & ADB must got enabled on phone to do so, for example by means of Windows batch-file . . . . .
    Are you sure the code you wrote will do a byte-by-byte copy of the whole physical hard drive or will it copy only the files that are in the filesystem's log?

    Thank you very much for the reply!
     

    jwoegerbauer

    Senior Member
  • Jul 11, 2009
    5,271
    9
    1,279
    European Union
    Huawei Mate 10
    There are many programs that do restore deleted or reset devices have methods of scanning all the raw bytes on the hard drive and from there extract files that their raw data hasn't been overwritten.u delete a file it is only deleted in the filesystem's log but the raw data is still on the hard drive (until new data is stored and overwrite it). File recover. The explanation on line is that when yoy software
    Have never tried such Recovery softwares because there was never a need for me to make use of those. :)

    Are you sure the code you wrote will do a byte-by-byte copy of the whole physical hard drive or will it copy only the files that are in the filesystem's log?
    As with Android every partition is a "whole" block-device. My code sample given above clearly shows it's related to 1 ( ONE ) partition.
     

    blackhawk

    Senior Member
  • Jun 23, 2020
    2,915
    610
    What you do recover will be files only, all folders are lost.
    You can separate by file type but that's all.
    The jpeg files and so on will have no information or exif data as it will be lost in the sea of juxtaposed data. A huge jigsaw puzzle that's impossible to piece back together.

    Think about just sorting through all the jpegs alone stored in that OS for apps, the OS and then the ones you might want. No timestamps or way to ID those jpegs except by your memory alone.
    Word files same thing; you'll need to open them and read to determine what they are.
    No order to the mess whatsoever other than file type.

    It's a daunting task to even reconstruct a recover even flash card image with a 100 jpegs and RAWs. The exif information will not be matchable at all.
    In the end it was in the interest of my sanity to simply delete these recovered images.

    Moving forward...
    Whenever possible always set up a phone, laptop, etc with to 2 separate physical drives, one for the OS/apps and one for just data.
    That way most times when the OS crashes you still have you still have your data.

    To completely safeguard your data use at least 2 hdds backup drives, preferably enterprise class, that are physically/electronically isolated from the device being backed up.store in different locations ideally in a faraday cage ie earth grounded box, safe, etc.
    Planning now for future data loss is the only way to safeguard your data from the inevitable, predictable calamities that electronic data brings.
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 1
      Each file's existence and location on internal storage memory is stored / logged in Android OS's filesystem of the related partition. Once a Factory Reset is done the info about a file's existence and location is wiped in filesystem, hence it can't get retrieved anymore.

      Of course it's possible to make a byte-by-byte copy of the partition of interest: Android must be rooted & ADB must got enabled on phone to do so, for example by means of Windows batch-file:

      Example:
      Code:
      ....
      adb shell "su -c 'mount -t auto -o rw,remount <ANDROID-BLOCK-DEVICE-NAME-HERE>'"
      adb exec-out "su -c 'dd if=<ANDROID-BLOCK-DEVICE-NAME-HERE> bs=4096'"  > <LOCATION-ON-PC-HERE>
      ....
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone