Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a database file from apk file?

I have an android application apk file. I want to open a database file from apk file: is there any official tool to open a database file from apk file?

By using extractor I extract that apk file. Finally I get some files namely assets, bin, lib, res folder, but I cant find the database file and layout files.

I searched the path given below:

assets->data

but I didn't found that data folder inside the assets folder. Why?

like image 294
prabhakaran Avatar asked Mar 27 '14 13:03

prabhakaran


People also ask

How do I find my APK database?

Database that is actually used is not stored in the APK. It needs to be in a writable location. Canonically it's in databases under the application's data directory e.g. /data/data/package.name/databases . Many apps generate their databases dynamically in code.

Where is data stored in APK?

apk? For normal apps, there are stored in internal memory in /data/app. Some of the encrypted apps, the files are stored in /data/app-private. For apps stored in the external memory, files are stored in /mnt/sdcard/Android/data.


1 Answers

Database that is actually used is not stored in the APK. It needs to be in a writable location. Canonically it's in databases under the application's data directory e.g. /data/data/package.name/databases.

Many apps generate their databases dynamically in code. Some apps ship with a pre-populated database in assets, but even they need to copy it to a writable location before using.

like image 95
laalto Avatar answered Oct 06 '22 21:10

laalto