[ACCEPTED]-Delete shared preferences using an adb command-sharedpreferences
Accepted answer
If you want to clear all the preferences, a 1 single command will do it:
adb shell pm clear <package name>
Definitely not on an unrooted phone. On 6 normal consumer builds (user builds), only 5 the application itself can access the app's 4 data.
If you have root, you can access the 3 shell via
adb shell
Then navigate to the app's data 2 directory (/data/data/<package name>
), find the file and rm
it.
Alternatively, you 1 can do it all at once with
adb shell rm /data/data/<package name>/<file name>
You can try this on a DEBUG application 1 only:
$ adb shell
$ adb run-as mypackagename
$ cd /data/data/mypackagename/shared_prefs
//then remove whatever you want
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.