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:

http://pastebin.com/npislz90

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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -