Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.70 KB | None | 0 0
  1. # Updater-script Leedroid HD for the Desire HD
  2. assert(getprop("ro.product.device") == "ace" || getprop("ro.build.product") == "ace" || getprop("ro.product.board") == "ace");
  3. # Prints banner/status,then wipes, mounts, copies folders/files to /system and /data from this package
  4. ui_print("Flashing LeeDrOiD HD V1.0");
  5. # System
  6. ui_print("-Wiping /system");
  7. format("MTD", "system");
  8. mount("MTD", "system", "/system");
  9. ui_print("-Copying /system");
  10. package_extract_dir("system", "/system");
  11. show_progress(0.500000, 0);
  12. # Data
  13. # Wipe /data is optionable, to enable, remove the hash(#)
  14. #ui_print("-Wiping /data");
  15. #format("MTD", "userdata");
  16. mount("MTD", "userdata", "/data");
  17. ui_print("-Copying /data");
  18. package_extract_dir("data", "/data");
  19. show_progress(0.400000, 0);
  20. # Symlinks
  21. ui_print("-Setting symlink's");
  22. set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
  23. symlink("toolbox", "/system/bin/schedtop", "/system/bin/route", "/system/bin/chownto", "/system/bin/cat", "/system/bin/log", "/system/bin/dd", "/system/bin/dmesg""/system/bin/lsmod", "/system/bin/id", "/system/bin/iftop", "/system/bin/sendevent", "/system/bin/df", "/system/bin/hd", "/system/bin/netstat", "/system/bin/watchprops", "/system/bin/newfs_msdos", "/system/bin/ls", "/system/bin/kill", "/system/bin/sleep", "/system/bin/umount", "/system/bin/smd", "/system/bin/mv", "/system/bin/stop", "/system/bin/sync", "/system/bin/setconsole", "/system/bin/getprop", "/system/bin/start", "/system/bin/mkdir", "/system/bin/ifconfig", "/system/bin/insmod", "/system/bin/chown", "/system/bin/ioctl", "/system/bin/ln", "/system/bin/date", "/system/bin/chmod", "/system/bin/notify", "/system/bin/rmdir", "/system/bin/vmstat", "/system/bin/ionice", "/system/bin/top", "/system/bin/cmp", "/system/bin/printenv", "/system/bin/setprop", "/system/bin/ps", "/system/bin/getevent", "/system/bin/wipe", "/system/bin/mount", "/system/bin/rm", "/system/bin/renice", "/system/bin/rmmod", "/system/bin/nandread");
  24. symlink("/system/bin/bash", "/system/bin/sh");
  25. symlink("/system/bin/su", "/system/xbin/su");
  26. show_progress(0.300000, 0);
  27. # General Ownership/Permissions
  28. ui_print("-Setting permissions");
  29. set_perm_recursive(0, 0, 0755, 0644, "/system/");
  30. set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
  31. set_perm(0, 3003, 06755, "/system/bin/ip");
  32. set_perm(0, 3003, 02755, "/system/bin/netcfg");
  33. set_perm(0, 3004, 02755, "/system/bin/ping");
  34. set_perm(0, 2000, 06750, "/system/bin/run-as");
  35. set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
  36. set_perm(0, 0, 0755, "/system/etc/bluetooth");
  37. set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
  38. set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
  39. set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
  40. set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
  41. set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
  42. set_perm(0, 0, 04755, "/system/bin/bash");
  43. set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
  44. set_perm(0, 0, 04755, "/system/bin/sysrw");
  45. set_perm(0, 0, 04755, "/system/bin/sysro");
  46. set_perm(0, 0, 04755, "/system/bin/nano");
  47. set_perm(0, 0, 06755, "/system/bin/su");
  48. show_progress(0.200000, 0);
  49. #Set Additional mods
  50. ui_print("-Applying additional mods");
  51. symlink("/data/local/bootanimation.zip", "/system/customize/resource/bootanimation.zip");
  52. symlink("/data/local/android_audio.mp3", "/system/customize/resource/android_audio.mp3");
  53. run_program("installbusybox");
  54. show_progress(0.200000, 0);
  55. # Boot
  56. ui_print("-Writing boot.img");
  57. assert(package_extract_file("boot.img", "/tmp/boot.img");
  58. write_raw_image("/tmp/boot.img", "boot");
  59. delete("/tmp/boot.img");
  60. show_progress(0.100000, 0);
  61. # Unmount file system(s)
  62. unmount("/data");
  63. unmount("/system");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement