0

Is it possible to get the raw data file in my Samsung phone?

Like I have a sample app, and this app saved data to the database in my phone. Now I want to get that raw data, but don't know where it's located.

Thanks

RJ

user1120260
  • 375
  • 4
  • 12
  • 29

2 Answers2

0

To access a database from an app directly on your phone you can use the platform tools that come with the Android SDK, specifically adb and sqlite3.

For example, if you know what your application package is called, such as com.sample.app, you should be able to find more information about the database. First, locate your platform-tools folder in your Android SDK folder, then open up a shell to your phone with the command:

adb shell

This will allow you to view your phone through the command line. The databases should be stored in the folder /data/data, so you should be able to navigate to your specific database by typing:

cd /data/data/com.sample.app

Within this directory should be a databases directory, navigate into that directory using

cd databases

Now from within this directory you should be able to access all the databases used by the app. Specifically, if your database is named mydatabase, you should then be able to begin accessing it and viewing it with the command:

sqlite3 mydatabase

From there you can learn more about your database such as the different tables, currently stored data, etc. For more help within the tool type .help

You can find more information about the tool here: http://developer.android.com/tools/help/sqlite3.html

And a brief tutorial here: http://www.vogella.com/articles/AndroidSQLite/article.html#sqlite_commnandline

Aaron Fujimoto
  • 321
  • 1
  • 6
0

Another way would be to pull the database from the device and browse it with a sqlite client on your pc:

For this you need the adb pull tool that takes a source path and a target path as parameters:

adb pull /data/data/com.yourdomain.yourapp/databases/yourdatabase.db c:\users\yourfolder

Then you can use e.g. SQLite Database Browser or any other sqlite client.

Matt Handy
  • 29,855
  • 2
  • 89
  • 112