Reputation: 12326
I am modifying the android OS slightly and wish to access a specific app's sqlite database.
I know that the location is stored at /data/data/your.applications.package/databases
, however, is there a way to load the database into the sqliteDatabase connector from outside the context of the actual app?
Upvotes: 0
Views: 80
Reputation: 1006614
however, is there a way to load the database into the sqliteDatabase connector from outside the context of the actual app?
Yes, if the code trying to open the database has read and write permissions to the database file. In that case, just use open()
on SQLiteDatabase
.
So, an app running as root could do this, but an ordinary other app cannot, for obvious security reasons.
even if I am trying to access from the kernel?
Since the kernel does not run Dalvik, you would not be able to open the database in the manner I described above.
Upvotes: 1
Reputation: 4330
I do not think it is possiblle. It is fundamental to the security model of Android. http://developer.android.com/intl/de/guide/topics/security/security.html
The other database must have a published ContentProvider implemented on it for you to be able to access its data. then you can try this http://androidforums.com/application-development/65082-accessing-database-another-application-using-content-provider.html
Upvotes: 0