java - Install .zip in clockwork from app? -
so in app im trying make flash .zip in clockwork recovery using
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 reboot recovery mode:", e); e.printstacktrace(); }
it boot recovery not flash .zip.. whats wrong.. oh, , if need whole .java file here is:
out.writebytes("echo 'install_zip(\""+ sdcard:" +clickedfile.tostring()+"\");'" +" > /cache/recovery/extendedcommand\n");
adb
commands like:
adb shell echo 'install_zip("/sdcard/update.zip");' > /cache/recovery/extendedcommand
Comments
Post a Comment