I’m attempting to copy the database located, as an example, in:
/data/data/com.x.x.x/databases/mydb.db
This works on almost every phone I’ve tried, except for my new HTC amaze. When trying to use ADB to assert that the database is there, it returns false when I use the File.exists() method in the java code. It’s the same exact code and APK, just used on different devices.
There is no logcat error, it’s just that the File.exists() method returns false. When I try to use ADB to look for the database, it says I don’t have read permission.
I’m trying to back up the database by moving it to the SD card. Any help is appreciated.
Use
getDatabasePath()to get the path to a database file. Do not assume that it is in the location you specified.You cannot access
/dataon non-rooted devices viaadb/DDMS.