How to examine SharedPreferences from adb shell?

前端 未结 8 708
傲寒
傲寒 2021-01-30 10:30

Now that we can Examining sqlite3 Databases from a Remote Shell, is it possible to examine SharedPreferences from adb shell? Since it would be much more convenient to examine an

8条回答
  •  梦如初夏
    2021-01-30 11:11

    If the app is debugable you could do:

    $ adb shell
    $ run-as 
    $ cat /data/data//shared_prefs/prefs.xml
    

    Note that the preference might be stored in another file so better check the directory to find it:

    $ ls /data/data//shared_prefs/
    

提交回复
热议问题