DeX03 DeX03 - 1 year ago 70
Android Question

Android - Pulling SQlite database android device

I've looked everywhere and i can't find a real precise answer or a tutorial on how, if it is possible, to do this.

is it possible to pull in any way a database of an Android device without having to root it? i just need to extract that data in any way in order to gather it on my pc, so how can i perform this? do i have to reprogram the app or whatever method you guys know about, but remember without rooting the device. thanks

Answer Source

A common way to achieve what you desire is to use the ADB pull command.

Another way I prefere in most cases is to copy the database by code to SD card:

try {
    File sd = Environment.getExternalStorageDirectory();
    File data = Environment.getDataDirectory();

    if (sd.canWrite()) {
        String currentDBPath = "/data/" + getPackageName() + "/databases/yourdatabasename";
        String backupDBPath = "backupname.db";
        File currentDB = new File(currentDBPath);
        File backupDB = new File(sd, backupDBPath);

        if (currentDB.exists()) {
            FileChannel src = new FileInputStream(currentDB).getChannel();
            FileChannel dst = new FileOutputStream(backupDB).getChannel();
            dst.transferFrom(src, 0, src.size());
} catch (Exception e) {


Dont forget to set the permission to write on SD in your manifest.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download