所以,在我的应用程序,我试着让它使用发条恢复闪存的.zip这种
运行运行=调用Runtime.getRuntime();
进程p = NULL;
DataOutputStream类OUT = NULL;
尝试{
P = run.exec(素);
OUT =新DataOutputStream类(p.getOutputStream());
out.writeBytes(回声install_zip SD卡:+ clickedFile.toString()+> /缓存/恢复/ extendedcommand \ N);
out.writeBytes(重新启动恢复的\ n); //测试
了out.flush();
}赶上(例外五){
Log.e(FLASH,无法重新启动进入恢复模式:,E);
e.printStackTrace();
}
将开机进入恢复但不会闪烁的.zip ..请告诉我错了......哦,如果你在这里需要整个.java文件是:
http://pastebin.com/NpiSLz90
解决方案 out.writeBytes(回声install_zip(\+ SD卡:+ clickedFile.toString()+ \);+> /缓存/恢复/ extendedcommand \ N);
亚洲开发银行
命令将如下所示:
ADB壳
回声install_zip(/ SD卡/ update.zip); > /缓存/恢复/ extendedcommand
So in my app Im trying to make it flash a .zip in clockwork recovery using this
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();
}
It will boot into recovery but it will not flash the .zip.. Whats wrong.. oh, and if you need the whole .java file here it is:
http://pastebin.com/NpiSLz90
解决方案out.writeBytes("echo 'install_zip(\""+ SDCARD:" +clickedFile.toString()+"\");'" +" > /cache/recovery/extendedcommand\n");
adb
commands would look like:
adb shell
echo 'install_zip("/sdcard/update.zip");' > /cache/recovery/extendedcommand
上一篇:Android应用程序被发布,但在谷歌播放不可见的任何地方但在、应用程序、地方、Android
下一篇:从Windows注册表启动上启动应用程序时,返回的ClickOnce版本无法正常工作注册表、无法正常、应用程序、版本