Export Sqlite Database From Android Phone To My System As Mdb Or Accdb Database Format
I want to export SQLite database file created by simple android code. I want to use that database in microsoft access (.mdb or .accdb). Is it possible? If it is possible means, Tel
Solution 1:
To get DB from android device
1) just go to android-sdk-folder/platform-tools
2) type adb shell
& press enter
3) run-as com.yourapp cat /data/data/com.yourapp/databases/FILENAME > /sdcard/FILENAME.db
& this FILENAME.db you will get in mnt/sdcard/FILENAME.db
Location.
After Exporting to the SDCard, Please follow this link.
Solution 2:
You can download database from device.
That does the trick: (Linux/MacOSX)
./PATH_TO_ANDROID_SDK/platform-tools/adb -d shell 'run-as PACKAGE /data/data/package/databases/DATABASE_NAME > /sdcard/DATABASE_NAME
Then you download from /sdcard/ to computer whole database. (You've got access to write/read perm. in sdcard catalogue)
Script in bash:
#!/bin/bash
PATHTOSDK="/some_path/"
PACKAGE="com.my.app"
DATABASENAME="mydb.db"
COMMAND=$(${PATHTOSDK}adb -d shell "run-as $PACKAGE cat /data/data/$PACKAGE/databases/$DATABASENAME > /sdcard/$DATABASENAME")
In result of this steps you have SQLite DB. Another question is how to port SQLite DB to MS Access DB? Some hints: https://superuser.com/questions/264510/open-sqlite-db-in-microsoft-access
Post a Comment for "Export Sqlite Database From Android Phone To My System As Mdb Or Accdb Database Format"