Root the android device
or
write a code for coping db file to sdcard
Code for coping database from /data/data directory to sdcard
public void copyDBToSDCard() {
try {
File sd = Environment.getExternalStorageDirectory();
File data = Environment.getDataDirectory();
if (sd.canWrite()) {
String currentDBPath = "//data//"+getPackageName()+"//databases//"+DB_NAME+"";
String backupDBPath = "backupname.db";
File currentDB = new File(data, 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());
src.close();
dst.close();
}
}
Toast.makeText(print.this,
"Database Saved", Toast.LENGTH_LONG).show();
} catch (Exception e) {
Toast.makeText(print.this,
"Error="+e, Toast.LENGTH_LONG).show();
Log.i("FO","exception="+e);
}
}