Sqlite database file path consideration

I need to store sqlite database, where should the file be stored?

Below is two options with limitation I have

1 /data/data/com.myapp/files/My.sqlite
I cannot copy the database out of the device to Windows. It requires debuggable APK, which is not possible for production.

run-as com.myapp sh -c "cat /data/data/com.myapp/files/My.sqlite" > /sdcard/My.sqlite

2 /sdcard/com.myapp/My.sqlite
I can copy via USB, but what are the disadvantages?

Best Answer


Sign In or Register to comment.