清除Android应用程序的用户数据 [英] Clear android application user data
本文介绍了清除Android应用程序的用户数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用的亚行外壳以清除应用程序数据。
Using adb shell to clear application data
adb shell pm clear com.android.browser
但在执行从应用程序的命令时,
But when executing that command from application
String deleteCmd = "pm clear com.android.browser";
Runtime runtime = Runtime.getRuntime();
try {
runtime.exec(deleteCmd);
} catch (IOException e) {
e.printStackTrace();
}
问题:
它不会清除用户数据没有给出,虽然我已经给出了以下权限的任何异常。
It doesn't clear the user data neither gives any exception though I have given the following permission.
<uses-permission android:name="android.permission.CLEAR_APP_USER_DATA"/>
问:
如何使用清除应用程序数据的亚行外壳
How to clear the application data using adb shell?
推荐答案
此命令为我工作:
adb shell pm clear packageName
这篇关于清除Android应用程序的用户数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文