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