I tried to go to Android/data/
but my package isn't there. I tried to search the whole file system on my phone for my app's package name and found nothing. I actually want to find the SharedPreferences
files that my app creates, but I can't find them.
Asked
Active
Viewed 1.5k times
3

Abhishek Jain
- 3,562
- 2
- 26
- 44

Eldar Azulay
- 271
- 1
- 3
- 17
-
Try /data/data/YOUR_PACKAGE_NAME/shared_prefs/YOUR_PREFS_NAME.xml or /data/data/YOUR_PACKAGE_NAME/shared_prefs/YOUR_PACKAGE_NAME_preferences.xml. You might have to show hidden files too – Adam Gardner Mar 03 '17 at 19:20
-
`I tried to go to Android/data/ ` That path does not exist to begin with. So indeed you can never go there. The shared preferences files are on the path Adam mentioned. Which is private internal memory for your app only. So with a file explorer app you cannot go there too. – greenapps Mar 03 '17 at 19:22
-
If "Android/data/" is the "%EXTERNAL_STORAGE/Android/data/" directory, then it will only be created if your app uses the external storage. Anyway, SharedPreferences will use the internal (private) app storage and, unless you have a rooted device, other apps won't be able to see it – Hugo Hideki Yamashita Mar 03 '17 at 19:46
2 Answers
1
I actually want to find the SharedPreferences files that my app creates
SharedPreferences
are stored in what the Android SDK describes as internal storage. You do not have direct access to this on production hardware. With some difficulty, you can use adb shell run-as
to access your app's portion of internal storage.

Community
- 1
- 1

CommonsWare
- 986,068
- 189
- 2,389
- 2,491
1
You can't access the internal storage of the Android system without root privileges. It will simply show up blank if you open the /data/
directory without root privileges. You may be able to access your app data using command line tool adb
.
Check this answer : How to access data/data folder in Android device?

Abhishek Jain
- 3,562
- 2
- 26
- 44