You can't do this in the API. It's impossible... On Thu, Oct 6, 2011 at 8:55 AM, JD <james.dez...@gmail.com> wrote: > Can someone please give me a clear, simple, short, and most > importantly, working example of how to edit a database that another > app created? After days and days of searching, it's amazing that > nobody seems to truly understand how to do this. All I find is the > same old post, copied and pasted all over the internet that says: > > Process p = Runtime.getRuntime().exec("su"); >
If you're on the majority of devices out there, this won't work... > Ok now what? How do I use that "p" object to open and edit a database? > I assume you won't use p at all, it's simply an external process, by this time it will have returned (hopefully 0, for your sake).. Then, if you *have* root privileges, you can load an SQLite database... How do you do that? http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#openDatabase(java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, int) But, like I said, on the majority of devices out there, this will tell you to go away.. Kris.. P.s., you still need to know the database path. Why do you need to access another app's database? In general you shouldn't be able to, and shouldn't have to, if it's for a purpose you have control over, get the app's provider to expose a content provider to you! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en