重置Android上的所有应用程序缓存和数据。

huangapple go评论61阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年10月1日 01:03:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/64142425.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定