I need to run a script in debug mode that will pull all sharedpreferences into a folder. From my research i can only pull from debug builds. I tried from a non-rooted phone to get the sharedpreferences like this:

$adb shell

$adb run-as mypackagename

then i was able to traverse to /data/data/mypackagename/shared_prefs

but i'd like to be able to put this in a script. I can only call adb pull from outside adb shell. how can i get the shared_prefs entire folder pulled out of a normal non-rooted device on a debug application ? there must be a way because how is facebook setho doing it ?

This question is about retrieving sharedPreferences not a database retrieval.

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐