zoukankan      html  css  js  c++  java
  • 三星 S4 手机误删除相片(相册)后的恢复问题,仅记录处理过程,其它Android手机同样适用

    无意中删除了三星S4手机中相机的相册。过程是这样的,用手机拍了几张照片,觉得最后那张拍得不好,想删除,于是进入相册,看到有那张照片的图标,选择,删除,悲剧发生了!

    这里得说三星的不好:在相册中,相册文件夹仅显示一张大图片,整个手机拍摄照片的文件夹,就用我最后那张拍摄的照片代替,于是被我选择后删除了。在Windows中这是不可能的,如果包含多张图片,文件夹一定是显示几张图片在文件夹上面,表示这是一个文件夹,但三星不是!我的目的是想删除最后那张照片,但三星给了我错误提示,于是我在不知情的情况下删除了整个相机相册。

    更悲剧的是前段时间SD卡出了问题,于是我把相机拍摄存储到手机内存中。如果照片存储到SD卡,那么还是挺好恢复的。这个网上有大把文章:把SD卡取下来,装入到读卡器,再插入电脑,随便找个恢复软件就可以恢复了。参考:Windows环境下文件的彻底删除与恢复,推荐几个工具(整理)

    那么手机内存中的东西误删除了,怎样恢复呢?网上找到的大部分恢复软件其实是不能用的,因为手机内存对于电脑来说不是硬盘。恢复过程非常不易,下面是我找到的两种途径。

    简单的方法,下载恢复软件

    官方网站:http://www.wondershare.com/data-recovery/android-data-recovery.html

    drfone-for-android_full,这个软件是经我测试确实可以恢复手机中的信息的,包括:通讯录(已经删除的联系人可以看到)、短信(已经删除的短信可以看到)、相片与视频(已经删除的可以小图查看,选择后恢复)。

    软件使用非常简单,但扫描非常耗时。16G内存大概需要1~2小时。扫描到你已经删除的照片后,需要做第二步,恢复。其实恢复只是一个按钮的事情,但它需要注册后才可以恢复。官方售价挺贵的。建议到淘宝购买,价格在20~35元左右。

    意外的是,我删除的是文件夹,它并没有找出来。其它过期图片啥的,尤其是联系人,短信,倒都可以恢复。联系人、短信是直接查看的,不需要恢复操作。

    注意:此款软件同样有iOS版本,网上可以搜索到注册码。

    非常复杂的方法,自己动手恢复

    具体参考:[GUIDE] Internal Memory Data Recovery - Yes We Can!,本文仅做一些简单说明与补充:

    1. 问题

    Internal Memory doesn't mount as a drive like external memory does.

    External memory would allow you to use data recovery tools that scan for deleted files and return them to a usable state. These tools work because most operating systems don't go through and set all of those 1's and 0's  to just 0's when you delete a file.

    Usually the operating system will just delete the reference pointer in the index that says that a file exists with such-and-such name and it's located at this position on the hard disk / memory location. There are destructive delete tools out there that will overwrite the spot of a deleted file multiple times to discourage recovery in just this manner.

    The issue is that data recovery tools need an actual mounted drive in order to dig deep and unearth those funny pictures of cats you so tragically deleted by accident. These newest batches of phones don't have external SDcards which are super easy to mount as drives. Internal memory mounts as MTP/PTP which is not treated as a mounted drive and cannot be scanned by these data recovery tools. But, cry no more cream-puff!

    2. 分析

    My phone is the Samsung Galaxy Nexus (toro) though I imagine this should work for ANY phone with Internal Memory. We will be using a Windows 7 machine to:

    • back up the entire internal memory partition to your computer as a single, massive .RAW file,
    • convert the .RAW file output to a VHD,
    • mount the VHD as a disk in Disk Manager,
    • scan the attached VHD volume for files that have been deleted and recover them,
    • ?
    • profit!

    3. 环境准备

    3.1 获得手机Root权限

    Kingo Android ROOT这个软件非常好用(Android手机通用)

    参考:How to Root Your Samsung Galaxy S4 (or Almost Any Other Android Phone) in One Easy Click(转)

    3.2 安装BusyBox到手机上

    安装BusyBox到手机上。三星S4要麻烦一些,因为三星把Google的一些东西给删除了。

    • 步骤一:安装Google Play(如果手机已经具备,则忽略此过程),参考:Galaxy S4安装Google Play(转)
    • 步骤二:安装BusyBox,打开“Play 商店”搜索“BusyBox“,然后下载安装即可。需要注册Google帐户。

    3.3 安装Cygwin及pv/nc/util-linux

    我的是Windows 7,64位版本,安装Cygwin于C:Cygwin64目录。

    3.4 ADB环境安装

    因为本人机器已经安装Android开发环境,所以此过程非常简单。只需要加入adb.exe到PATH,及更换手机USB连接驱动程序即可。其它环境,请参考:

    [HOWTO] Install Google SDK and ADB drivers in Windows 7 

    3.5 手机开启USB调试模式

    参考:豌豆荚不能连接三星S4手机,提示打开手机的“USB调试模式”,但却找不到在哪儿可以设置

    3.6 下载VHD工具

    网上自行搜索VhdTool.exe,并放置于 C:Cygwin64 exus目录(新建),用于存放转出文件。

    3.7 准备恢复工具

    Recuva恢复工具是个不错的选择。有免费版本。我用的是商用版。

    3.8 需要点耐心与运气

    4. 步骤

    1. *****Based on the number of people having trouble with this step it is now my recommendation that you choose to recover your entire memory block instead of just the data partition. In my phone's case that is mmcblk0. Please discover if yours is different.*****  Identify which block/partition you want to recover. For our purpose here we are seeking to recover the userdata partition:  /dev/block/mmcblk0p12
      备注:可以在手机安装一个终端模拟器,然后输入下面命令以查看各mmcblk0*对应功能:
      su
      ls -l /dev/block/platform/dw_mmc.0/by-name/

      注意:实际目录路径可能与上面的不一致。

    2. Turn on your phone
    3. Connect the phone in ADB mode
    4. Unlock the screen.
    5. Open a Cygwin terminal and enter (This assumes your BusyBox installation is at [/system/bin/busybox]. It may be at [/system/xbin/busybox]):
      Code:
      adb forward tcp:5555 tcp:5555
      adb shell
      su
      /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
    6. Open another Cygwin terminal and enter:
      Code:
      adb forward tcp:5555 tcp:5555
      cd /nexus
      nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
    7. Run around the house a few times. For 32GB internal memory this is going to take 3+ hours. That's a lot of running. When it's done...
    8. We need to convert the .RAW file to a virtual hard drive. VhdTool.exe basically just puts a VHD footer on the end of the .RAW file. Open a Windows command prompt, go to [c:cygwin exus], and type:
      Code:
      VhdTool.exe /convert mmcblk0p12.raw
    9. Now we need to mount the VHD in Windows. Select the Start button-->right-click Computer-->select Manage.
    10. Select Storage-->Disk Management.
    11. In the menu select Action-->Attach VHD.
    12. For Location enter [c:cygwin exusmmcblk0p12.raw] and select the OK button.
    13. Right-click on the name (e.g. "Disk 1") to the left of the Unallocated space and select Initialize Disk.
    14. Select the GPT (GUID Partition Table) radio button and select the OK button.
    15. Right-click on the Unallocated space and select New Simple Volume...
    16. In the Wizard select Next>, leave the default for the volume size, select Next>, select a drive letter (e.g. K), select Next>, MAKE SURE to select the 'Do not format this volume' radio button, select Next>, select Finish.
    17. A box will pop up asking you to format the drive. You DO NOT want to format the drive at this time.
    18. Right-click on the RAW space and select Format... MAKE SURE to change the File system to FAT32. Set the Allocation unit size dropdown to 'Default.' MAKE SURE that the Perform a quick format checkbox is CHECKED. You do not want to overwrite the entire new drive with all zeroes (0's) and destroy your data. Quick Format means that it will only attempt to destroy the index for the drive by establishing a new index. Without this box checked the Windows operating system will write zeroes (0's) across the entire volume, potentially destroying your data. Select the OK button.
    19. A box will pop up saying that Formatting this volume will erase all data on it. That would be doubly true if you actually didn't check the 'Perform a quick format' checkbox. Double check that you actually did check the box and select the OK button. (Don't worry. This essentially leaves the volume in the exact same state that your phone's internal memory is living in right now: there is data on the drive...you just can't see it. It's coming back, I promise!)
    20. Open the Piriform Recuva application. In the wizard select the 'Next >' button. Select the 'Other' radio button and select Next >. Select the 'In a specific location' radio button and enter: k:  (assuming K is the drive letter you chose...) Select the Next > button. Select the Enable Deep Scan checkbox. This is the magical setting that finds files that have been deleted...but not really deleted. Select the Start button.
    21. The application may take about an hour to do the 'Deep Scan.' It's time for more laps around the house! Once the application has returned its results you can choose which files to recover using the checkboxes. Select the 'Recover...' button and choose the location to which you wish to output your files.
    22. ?
    23. Profit!
  • 相关阅读:
    IO 单个文件的多线程拷贝
    day30 进程 同步 异步 阻塞 非阻塞 并发 并行 创建进程 守护进程 僵尸进程与孤儿进程 互斥锁
    day31 进程间通讯,线程
    d29天 上传电影练习 UDP使用 ScketServer模块
    d28 scoket套接字 struct模块
    d27网络编程
    d24 反射,元类
    d23 多态,oop中常用的内置函数 类中常用内置函数
    d22 封装 property装饰器 接口 抽象类 鸭子类型
    d21天 继承
  • 原文地址:https://www.cnblogs.com/nayitian/p/3454402.html
Copyright © 2011-2022 走看看