0

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, Tell me the steps

Note:Here, I didn't put any code.. I just want know what are steps to exporting the sqlite database file to mdb or accdb format file..

Thanks in Advance...

2 Answers2

3

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.

Community
  • 1
  • 1
Dixit Patel
  • 3,190
  • 1
  • 24
  • 36
0

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

Community
  • 1
  • 1
RobertM
  • 287
  • 1
  • 6