自己的应用复制自己的数据库,无需root,直接文件复制就行,大概如下:
File f = new File("/data/data/应用的包名/databases/数据库名"); //比如  "/data/data/com.hello/databases/test.db"
String sdcardPath = Environment.getExternalStorageDirectory().getAbsolutePath();
File o = new File(sdcardPath+"cp.db"); //sdcard上的目标地址
if(f.exists()) {
FileChannel outF;
try {
outF = new FileOutputStream(o).getChannel();
new FileInputStream(f).getChannel().transferTo(0, f.length(),outF);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Toast.makeText(mainpage.this, "完成", Toast.LENGTH_SHORT).show();
}