Reputation: 864
HI I am developing an android application for android on nexus 7 device.
I am trying to copy my database.db
from assets to /data/data/myPackage/databases/
folder. Nothing wrong till here. No exceptions and everything runs smoothly.
But When i try to get into /data/data/ folder through adb shell or with file explorer it says permission denied or just doesnt show anything.
Am I missing something here ?
PS: myPackage is just symbolic i have my own package name in its stead
Command line is here
shell@tilapia:/ $ cd /data/
shell@tilapia:/data $ ls
opendir failed, Permission denied
Upvotes: 0
Views: 1568
Reputation: 4816
you can always get the db out of the emulator, but never from a live device or else it would be easy to write apps that read/write other apps' databases and create malware
Upvotes: 1
Reputation: 73753
You need to have your device rooted to be able to access that folder.
If you want to look at your database you can always export it to the sdcard and look at it there.
see this link for an example on how to do that
Upvotes: 2