Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int InstallZipFromSD(String path)
- {
- File zip = new File(path);
- String fileName = zip.getName();
- // String[] aryPath = zip.getAbsolutePath().split("/");
- // if (aryPath[1] != fileName && aryPath[0] != "sdcard")
- // {
- suRun("ln -s " + path + " /cache/recovery/" + fileName);
- zip = new File("/cache/recovery/" + fileName);
- // }
- setInstallZip(zip);
- strlist.clear();
- strlist.add("busybox mount -o rw,remount /system");
- {
- strlist.add("echo \"#!/system/bin/sh\" > " + fileInit);
- strlist.add("echo \"rm " + zip.getAbsolutePath()+ "\" >> " + fileInit);
- strlist.add("echo \"rm " + fileInit + "\" >> " + fileInit);
- strlist.add("chmod 755 " + fileInit);
- strlist.add("reboot recovery");
- }
- try {
- doCmds(strlist);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement