On Thu, Nov 18, 2010 at 7:45 PM, Brandon <[email protected]> wrote: > Are you saying that its IMPOSSIBLE to modify a database that > "is not yours"? I was trying to test this because its incredibly > difficult to find any information that assures you that these > databases are write-protected from other applications.
By default, each application's files are read-write for the application's Linux user account and deny-all for all other accounts. This holds true both for applications that are part of the system and applications that are installed by the owner. Since each application by default gets its own Linux user account, one application has no ability to work with another application's files of any sort, including databases. If: -- a developer specifically makes their database file read-write, then you can write to it (this is generally a bad idea) -- a user roots their phone, any applications run with root privileges can write to it -- a developer puts their database on external storage, then you can write to it -- a developer arranges for a shared Linux user ID between two of that developer's apps, each app will be able to write to the other's database -- a developer exposes a database through some sort of remote API (e.g., ContentProvider, AIDL), other apps will be able to use that API and, permissions and API willing, be able to indirectly write to the database -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

