Created
May 28, 2019 20:15
-
-
Save immujahidkhan/ee3e96b3bacf1813e26ef81f4d509a9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
/*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