Search code examples
androiddatabaseadb

Am i able to copy android native databases?


I'm trying to copy android mmssms.db file to the SD card. And I'm facing some kind of permission issue.

java.io.FileNotFoundException: /data/data/com.android.providers.telephony/databases/mmssms.db (Permission denied)

Is there a way to force or bypass that? Because I tried with success to copy/paste these files from Eclipse DDMS File explorer. And see that it's possible from the adb pull/push command to make it works.


Solution

  • Why do you expect it to work? This is not your application's DB, you shouldn't have an access to it. If something is not allowed from java code, it is not allowed from native code either.

    When using ADB or DDMS, it is the user that access, not some specific application, and this is not the case when running from your application of course.