1

I am making an android application in which I have to save image names in shared preferences via string format.

I am able to see my shared preference xml file in Android Device Monitor but I want to see it in my real android device. I have searched in android device local data neither I am seeing my application package name nor xml file anywhere during debugging.

Please help me why I can't see my application package in mobile device during debugging.

1
  • Check out Stetho. Great tool Commented Feb 7, 2017 at 13:25

2 Answers 2

1

SharedPreferences are stored in an xml file in the app data folder, i.e. /data/data/YOUR_PACKAGE_NAME/shared_prefs/YOUR_PREFS_NAME.xml

or the default preferences at: /data/data/YOUR_PACKAGE_NAME/shared_prefs/YOUR_PACKAGE_NAME_preferences.xml

from this Answer

However, you can also use Stetho to access your sharedpreferences in debug mode. ie you can view sharedPreferences from your chrome browser.

Stetho can :

  • view and edit SharedPreferences
  • view and edit sqlite db
  • monitor network requests enter image description here
Sign up to request clarification or add additional context in comments.

Comments

0

You will need to have root permission to see the sharedpreferences of your app in real device,

Steps

1.Root your phone(for rooting phone i would suggest kingo root mobile app)

2.install Root browser/Root explorer app

3.go to folder data-->data-->your packagename-->shared_prefs-->your shared prefs name

1 Comment

It's possible to access private files via adb for debuggable applications with run-as <package-name> command (without root access). Like in this answer: stackoverflow.com/questions/2811615/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.