Reputation: 516
I am creating an android application, and I want to directly access another application's database file (read from it). What's the best way to go about this, since applications are sandboxed from each other. I am okay with making the app require root permisisions, I am just unsure as to what the best way to do this is.
Should I make a copy of the database to my app's local area using the su command every time I start, and then use that database? Or should I directly access the database?
Upvotes: 1
Views: 2872
Reputation: 20319
Are you developing both apps? If so then the the correct way to do this is to make use of ContentProviders If you aren't developing the app with the database check with its developer to see if it provides a ContentProvider
.
If the app with the database you are trying to access doesn't provide an easy way to access its data then you can't do this without root, at which point you're problem has become many times more difficult.
Upvotes: 3