Pages

11/02/2017

[OLD] Extract SQLite Database from Android Application



STEP 1:
Connect Phone using respective drivers with PC before opening Command Prompt. In order to proceed you need to enable the USB Debbuging under the Developer Options of Settings on the device.

STEP 2:
Use Fastboot which is available on Eclipse SDK under the platform-tools folder especially on the path
"\sdk\platform-tools\"

STEP 3:
Open "Command Prompt" by Right Clicking there with pressing the "Shift Key" on the Keyboard.Then Choose "Open Command Window here" option from the Right Click Menu.


STEP 4:
Use the below command to enter into the mobile
"adb -d shell"


STEP 5:
Use the below command to get the root access for that application
"run-as package.app.name" (In My Case,the Package Name is "andro.app.soft.pack.assign4").


STEP 6:
Use the below command to change the directory to databases of that application
"cd databases"

STEP 7:
Use the below command to know the database name
"ls"

STEP 8:
Use the below command to copy the database of that application to your Internal Memory.
"cat databases/DBNAME.db > /sdcard/DBNAME.db" (In My Case, I know the Database name and Location So, I skipped the STEP 6 and STEP 7.) (For Me, Database File Name is "RecDB.db")


STEP 9:
Use Exit command to come out of that application.
"exit"


STEP 10:
Use Exit command to come out of the device.
"exit"


STEP 11:
Use Exit command to come out of the Command Prompt.
"exit"


STEP 12:
Now Copy the database file from the Android device to the PC.

STEP 13:
Now Downoad the SQLite Browser from the internet which is a freeware.

STEP 14:
Now open the Copied database file with SQLite to view the data under the "Browse Data" tab.


NOTE:
1) This Video is for Developers only.
2) This method will only work with the Android Applications installed from Eclipse.
3) This method can work only upto Android OS 4.3.
4) This method will work with both the Emulator and USB Debugging enabled Android Devices.

Other Related Links




No comments:

Post a Comment