5

I want to know where Android stores the data of SharedPreferences in actual Android devices?

In PC I found this data under /data/data/pkg_name/shared_prefs/pkg_name.xml

Flow
  • 18,464
  • 16
  • 79
  • 138
Juned
  • 151
  • 2

1 Answers1

4

Well, the path is right. It's

/<datadir>/<pkg_name/shared_prefs/<pref_name>.xml

Where <datadir> is usually /data/data

Flow
  • 18,464
  • 16
  • 79
  • 138
  • okay but in device where do i find this .xml? – Juned Jun 01 '12 at 09:07
  • 1
    Have you looked at /data/data/<pkg_name/shared_prefs/? – Flow Jun 01 '12 at 09:13
  • i have samsung galaxy y in that where do i find this path? – Juned Jun 01 '12 at 09:15
  • 1
    Try adb shell to open a shell and cd into the path. You may need root to do so. – Flow Jun 01 '12 at 09:16
  • you are not getting me properly. in Actual phone where do i type adb command? – Juned Jun 01 '12 at 09:18
  • 1
    Oh sorry, since you mentioned in your profile that you had some Android Development experience I assumed that you are familiar with adb: Check out http://developer.android.com/guide/developing/tools/adb.html – Flow Jun 01 '12 at 09:28
  • yeah i am android developer and i have found already this adb command and sharedprefrences.xml file on PC. but i want to verify that file on Real device. – Juned Jun 01 '12 at 09:31
  • If your device has root access, it might be just easier to get RootExplorer and browse to the location on the device – Bryan Denny Jun 01 '12 at 14:14
  • how do i get the root access? – Juned Jun 04 '12 at 05:09