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
First pull shared preferences file from device. This requires root permision.
adb pull /data/data/org.test/shared_prefs/MyKeys.xml MyKeys.xml
Now MyKeys.xml is stored in current directory of your system.
Modify values by
vim MyKeys.xml
After editing file save changes and push to device.
adb push MyKeys.xml /data/data/org.test/shared_prefs/MyKeys.xml
To Verify your changes
adb shell
cat /data/data/org.test/shared_prefs/MyKeys.xml