Skip to content

Instantly share code, notes, and snippets.

@immujahidkhan
Created May 28, 2019 20:15
Show Gist options
  • Save immujahidkhan/ee3e96b3bacf1813e26ef81f4d509a9d to your computer and use it in GitHub Desktop.
Save immujahidkhan/ee3e96b3bacf1813e26ef81f4d509a9d to your computer and use it in GitHub Desktop.
//
/*File f = new File("/data/data/com.lovequotes/databases/notes_db.db");
FileInputStream fis = null;
FileOutputStream fos = null;
try {
fis = new FileInputStream(f);
fos = new FileOutputStream("/mnt/sdcard/db_dump.db");
while (true) {
int i = fis.read();
if (i != -1) {
fos.write(i);
} else {
break;
}
}
fos.flush();
Toast.makeText(this, "DB dump OK", Toast.LENGTH_LONG).show();
} catch (Exception e) {
e.printStackTrace();
Toast.makeText(this, "DB dump ERROR", Toast.LENGTH_LONG).show();
} finally {
try {
fos.close();
fis.close();
} catch (IOException ioe) {
}
}*/
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment