Click here to Skip to main content
15,938,682 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Updated 7-May-18 0:29am

1 solution

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.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900