Radjah

Untitled

Jul 29th, 2013
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. ifelse(
  2. is_mounted("/sd-ext") == "/sd-ext",(
  3. ui_print("sd-ext partition found!");
  4. ui_print("Extracting tools...");
  5. package_extract_dir("restore", "/system/bin");
  6. ui_print("Preparing...");
  7. set_perm(0, 0, 0777, "/system/bin/gnutar");
  8. set_perm(0, 0, 0777, "/system/bin/makerestore.sh");
  9. set_perm(0, 0, 0777, "/system/bin/checkfile.sh");
  10. run_program("/system/bin/checkfile.sh");
  11. ifelse(file_getprop("/tmp/check.prop","ro.backup.exist") == "yes",(
  12. ui_print("Backup found!");
  13. ui_print("Restoring...");
  14. run_program("/system/bin/makerestore.sh");
  15. ),(
  16. ui_print("Backup not found!");
  17. ));
  18. ui_print("Cleaning...");
  19. delete("/system/bin/gnutar");
  20. delete("/system/bin/makerestore.sh");
  21. delete("/system/bin/checkfile.sh");
  22. ui_print("Done!");
  23. ui_print("Restore log here: /sdcard/sd-ext_restore.log");
  24. ),(ui_print("Unable to mount sd-ext partition!");)
  25. );
Advertisement
Add Comment
Please, Sign In to add comment