英文:
Reset all apps cache and data on Android
问题
我需要制作一个应用程序,用于清除安卓设备的所有数据和缓存。我需要这样做是因为我有一个安卓设备,将会被不同的人在不同的时间点使用,因此我希望有一种方式来保护不同用户的数据。我已经找到了一些方法来清除这些数据,但它们都需要获取 root 权限,比如在所有应用上运行 adb clear
。是否有一种在没有 root 权限的情况下清除所有应用程序数据和缓存的方法呢?
英文:
I need to make an app which erases all of Android's data and cache. I need it because I have an Android device which will be used by different people at different points in time, so I want a way to protected the different users data. I have found a few methods to do erase the data, but they all need root, such as running adb clear
on all packages. Is there a method to clear all apps data and cache without rooting?
答案1
得分: 1
不,你需要root访问权限才能这样做。
这在这里有文档记录(https://developer.android.com/training/data-storage)。
你所说的文件是应用程序特定的文件,除非它们具有root访问权限,否则其他应用程序无法访问它们。
英文:
No, you need root access for that.
It is documented here.
The files you are talking about are app-specific files, and other apps cannot access them, unless they have root access.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论