Saturday, April 21, 2012

Android - Access SQLite Database File in Emulator


You have to be on the DDMS perspective on your Eclipse IDE
(Window > Open Perspective > Other > DDMS)
and the most important:
YOUR APPLICATION MUST BE RUNNING SO YOU CAN SEE THE HIERARCHY OF FOLDERS AND FILES.
Then in the File Explorer Tab you will follow the path :
data > data > your-package-name > databases > your-database-file.
Then select the file, click on the disket icon in the right corner of the screen to download the .db file. If you want to upload a database file to the emulator you can click on the phone icon(beside disket icon) and choose the file to upload.
If you want to see the content of the .db file, I advise you to use SQLite Database Browser, which you can download here.
PS: If you want to see the database from your real device, you must root your phone.

Wednesday, April 18, 2012

Decompile APK file to JAR

The Following Tutorial Describes very thoroughly how to decompile APK file to get its source code. I have tried it myself and its working. Keep in mind it only gets the "JAVA" code not the layouts and any other resources.

http://a4apphack.com/security/sec-code/extract-android-apk-from-market-and-decompile-it-to-java-source