Bhanu Kaushik
Bhanu Kaushik

Reputation: 864

Nexus 7 sqlite folder /data/ permission denied

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

Answers (2)

Martin
Martin

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

tyczj
tyczj

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

trying to export db to SDCARD

Upvotes: 2

Related Questions