Search code examples
androidsqlitemobilesamsung-mobile

How to get access of Android application database in android mobile devices?


I have a query, If I run any android application on my emulator, I can check its database from the

data--> data--> package name folder--> databases--> database name.db file

and then accessing it with

SQLite Browser

But if I want to access the database on my Android Mobile Device, how can I do so. I had searched a lot but could find how to access or see the database in android mobile device of a particular app. Any help will be appriciated.


Solution

  • You can only access the sqlite.db from your emulator. You cannot view the db from your mobile phone due to security restrictions.

    I had this same requirement and on searching found out that it is possible when using a rooted device. Then I came up with this alternative.

    1. Test all the mobile SQLite Data related stuff on emulator.
    2. While testing in mobile phone connected via USB, log all the data that is accessed from SQLite of mobile, so that it can be viewed in logcat.