Чтобы скопировать файл из папки активов в папку / database:
public static final String DATABASE_NAME = "data.db";
private void copyDatabaseFromAssets() {
try {
byte[] buffer = new byte[1024];
OutputStream myOutput;
int length;
InputStream myInput;
String DB_PATH = this.getDatabasePath(AppSettings.DATABASE_NAME).getAbsolutePath();
AssetManager assetManager = getAssets();
myInput = assetManager.open("databases/" + AppSettings.DATABASE_NAME);
myOutput = new FileOutputStream(DB_PATH);
while ((length = myInput.read(buffer)) > 0) {
myOutput.write(buffer, 0, length);
}
myOutput.close();
myOutput.flush();
myInput.close();
} catch (IOException e) {
e.printStackTrace();
}
}