public void CopyDB(String DBname){
AssetManager assetManager = this.getResources().getAssets();
File outfile = new File(ROOT_DIR + DBname);
InputStream is = null;
FileOutputStream fo = null;
long filesize = 0;
try{
is = assetManager.open(DBname, AssetManager.ACCESS_BUFFER);
filesize = is.available();
if (outfile.length() <= 0)
{
byte[] tempdata = new byte[(int) filesize];
is.read(tempdata);
is.close();
outfile.createNewFile();
fo = new FileOutputStream(outfile);
fo.write(tempdata);
fo.close();
}
} catch (IOException e)
{
}
}
이런식으로 에셋에있는 db파일을 복사하셔서 쓰시면 사용가능합니다.