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

前端 未结 14 1063
甜味超标
甜味超标 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:28

    I always find these commands useful in console:

    1. Find the correct file name

      adb shell

      ls /data/data/com.your.package/shared_prefs

    2. Get the file to local directory

      adb pull /data/data/com.your.package/shared_prefs/the_file_you_want $local_dir

    3. Check it in your $local_dir.

提交回复
热议问题