从 Android SD 卡恢复已删除的数据?
我正在尝试制作一个 Android 应用程序来尝试从 SD 卡恢复已删除的内容。可行性如何?我想到了以下方法:
- 由于文件实际上并未被删除,因此我可以访问文件系统来查看已标记为被覆盖的文件吗?
- 或者我必须进行页眉/页脚文件雕刻?可以从android的应用层实现吗?
我担心存储在连续扇区上的文件,而不是碎片扇区上的文件。我想做基本的文件检索。
请让我知道一些我可以用来制作此应用程序的资源?
I am trying to make an Android application which would try to recover deleted content from the SD Card. How feasible is it? I have the following methods in mind:
- Since, the files are not actually deleted, can I access the file system to see files which has been marked to be overwritten.
- Or will I have to do header/footer file carving? Is it possible from the application layer of android?
I am concerned about files stored on contiguous sectors and not the fragmented ones. I want to do a basic file retrieval.
Please let me know some resources which I can use to make this application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Android 手机上的 SD 卡采用 FAT32 格式化,因此任何可以从 FAT32 文件系统恢复已删除文件的程序都可以从 Android SD 卡恢复。最简单的方法是使用 SleuthKit (http://sleuthkit.org)。使用“fls”命令列出被删除文件的目录和文件簇号,然后使用“icat”命令输出。如果您想编写应用程序,可以使用 SleuthKit 库,并使用 Android 提供的本机接口将您的 Android 应用程序链接到 SleuthKit。
祝你好运。
SD cards on Android phones are formatted with FAT32, so any program that can recover deleted files from a FAT32 file system can recover from the Android SD card. Easiest for you will be using SleuthKit (http://sleuthkit.org). Use the "fls" command to list the directory and file the cluster number of the deleted file, then use "icat" command to output it. If you want to write an application, you can use the SleuthKit library and link your Android application to SleuthKit using the native interface provided by Android.
Good Luck.
您可以使用 Android NDK 在 C/C++ 中执行此操作。我认为您的应用程序需要 root 访问权限。
You might be able to do this in C/C++ using the Android NDK. I think your application would require root access however.
您无法使用 Java Android API 执行此操作。它只能在“越狱”手机上或通过直接在手机上(即在其 /system 区域)安装 Linux 应用程序来完成。
如果你愿意的话,肯定已经有 Linux 命令行应用程序可以做到这一点。您必须寻找一种即使只有少量 RAM 也能运行的程序。
You can't do this with the Java Android API. It can only be done on "jailbroken" phones or by installing linux applications directly on the phone, i.e. in its /system area.
And if you go for it, there sure exists linux command line applications that do this already. You'll have to look out for one that can go along even with small amounts of RAM to execute on.