dumpster应用程序如何恢复意外删除的文件? [英] How does the dumpster app works to recover accidently deleted files?

查看:332
本文介绍了dumpster应用程序如何恢复意外删除的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试创建自己的应用程序,它充当了垃圾箱或垃圾回收站,但是很少有模糊的资源或大多数指向计算机而不是应用程序的恢复工具,任何人都可以指导如何恢复文件?



我的尝试:



i已经阅读了大部分内容文件被删除后仍然保留在内存中,因为无法访问,可以覆盖,但没有人提供如何在应用程序上以编程方式执行此操作的编码材料。

I have been trying to create my own app which acts as a dumpster or recycle bin for android but there are very few vague resources or mostly points to recovery tools from computer instead of app, can any one guide how the files are recovered ?

What I have tried:

i have read most about how recovery is done when file is deleted but still remains on memory as inaccessible which can be overridden but no one has provided an coding material of how to do this pro-grammatically on app.

推荐答案

此类应用程序可能挂钩 unlink 系统调用并将文件移动到应用程序定义的文件夹而不是删除它们(将调用转发到内核)。应用程序还存储文件的源路径,以便只需将其移回原始位置即可恢复。



因此您需要查找的关键字是Android钩子系统调用。但是出于安全原因,应用程序只允许挂起自己发起的系统调用。



解决方案是使用以系统权限运行并与之交互的服务(守护程序)一个GUI应用程序。



但是在一个没有根设备的设备上如何做到这一点超出了我的范围。
Such applications probably hook the unlink system call and move the files to an application defined folder instead of deleting them (forwarding the call to the kernel). The application stores also the source path of the file so that it can be restored by simply moving it back to the original location.

So the keywords you have to look for are "Android hook system call". But applications are only allowed to hook system calls initiated from themself for security reasons.

The solution is to use a service (daemon) that runs with system privileges and interacts with a GUI application.

But it is beyond my scope on how to do that on a not rooted device.


这篇关于dumpster应用程序如何恢复意外删除的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆