因此,在我的应用程序中,我尝试使用此命令使其在发条恢复中闪烁 .zip
Runtime run = Runtime.getRuntime();
Process p = null;
DataOutputStream out = null;
try{
p = run.exec("su");
out = new DataOutputStream(p.getOutputStream());
out.writeBytes("echo install_zip SDCARD:" +clickedFile.toString() +" > /cache/recovery/extendedcommand\n");
out.writeBytes("reboot recovery\n"); // testing
out.flush();
}catch(Exception e){
Log.e("FLASH", "Unable to reboot into recovery mode:", e);
e.printStackTrace();
}
它将启动进入恢复,但不会刷新 .zip..出了什么问题..哦,如果您需要整个 .java 文件,它是:
http://pastebin.com/NpiSLz90 http://pastebin.com/NpiSLz90
out.writeBytes("echo 'install_zip(\""+ SDCARD:" +clickedFile.toString()+"\");'" +" > /cache/recovery/extendedcommand\n");
adb
命令看起来像:
adb shell
echo 'install_zip("/sdcard/update.zip");' > /cache/recovery/extendedcommand
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)