How can I view the shared preferences file using Android Studio?

前端 未结 14 1077
甜味超标
甜味超标 2020-11-27 11:33

I\'m using shared preferences to store certain values for my app. I would like to see the file where the info is actually stored on my phone. I found many ways to do this on

14条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 12:15

    If you're using an emulator you can see the sharedPrefs.xml file on the terminal with this commands:

    • adb root
    • cat /data/data//shared_prefs/

    after that you can use adb unroot if you dont want to keep the virtual device rooted.

提交回复
热议问题