I can access the preferences and add and change them. How can I view the entire file that stores the keys and values for sharedpreferences in my app. I have changed, added and removed some keys from my code and would like to see the effect on the preference file.
Share
Eclipse, menu/Window/Show View/File Explorer. If “File Explorer” is not in the menu, then click “Other…” and find it under the Android category.
In the file tree, find your app’s data folder under /data/data/com.your-package/shared_prefs. The preference file will be there, as an XML. Copy it from the device and enjoy. In the upper right corner of the File Explorer view, there are two icon buttons – one with a disk and one with a mobile phone. These buttons will allow you to copy files from and to the phone/emulator, respectively.
Alternatively, you can open a command line to the device/AVD using the ADB tool, and use the UNIX standard “cat” command. Like this:
Assuming there’s only one connected device or running emulator at the time.