Si podemos hacer esto, pero en diferentes way.Using esta lógica obtendrá base de datos en SDcard
.
String sourceLocation = "/data/data/com.sample/databases/yourdb.sqlite" ;// Your database path
String destLocation = "yourdb.sqlite";
try {
File sd = Environment.getExternalStorageDirectory();
if(sd.canWrite()){
File source=new File(sourceLocation);
File dest=new File(sd+"/"+destLocation);
if(!dest.exists()){
dest.createNewFile();
}
if(source.exists()){
InputStream src=new FileInputStream(source);
OutputStream dst=new FileOutputStream(dest);
// Copy the bits from instream to outstream
byte[] buf = new byte[1024];
int len;
while ((len = src.read(buf)) > 0) {
dst.write(buf, 0, len);
}
src.close();
dst.close();
}
}
return true;
} catch (Exception ex) {
ex.printStackTrace();
return false;
}
usted tiene que dar permiso
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
posible duplicado de [Herramienta para ver androide de bases de datos, tablas y datos] (http://stackoverflow.com/questions/2149438/tool-to-see -Android-Database-mesas-y-datos) – Thilo