[英]How to copy files from 'assets' to system in the rooted android device?
我想这样做。但是我得到了/ system / app / filename:打开失败:EROFS(只读文件系统)错误。
This is an example. 这是一个例子。 Please try
请试试
private void saveFileToInternal(String orginal_url) {
File file = new File(orginal_url);
File dir = mContext.getDir(TEMP_FOLDER, Context.MODE_PRIVATE);
File dest = new File(dir, "filename_" + file.getName());
try {
FileOutputStream out = new FileOutputStream(dest);
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
Log.e("Can not create file", e.getMessage());
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.