Advertisement
sniper_nuko

Prerooted.zipのupdater-script 自分用

May 7th, 2014
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. ui_print("");
  2. ui_print("--- Prerooted system installer ---");
  3.  
  4. show_progress(0.7, 75);
  5.  
  6. ui_print("");
  7. ui_print("--- Install image files ---");
  8. # rhine
  9. package_extract_file("kernel.elf", "/dev/block/platform/msm_sdcc.1/by-name/boot");
  10. package_extract_file("system.ext4", "/dev/block/platform/msm_sdcc.1/by-name/system");
  11. # blue
  12. #package_extract_file("kernel.elf", "/dev/block/platform/msm_sdcc.1/by-name/Kernel");
  13. #package_extract_file("system.ext4", "/dev/block/platform/msm_sdcc.1/by-name/System");
  14. # fuji
  15. #package_extract_file("kernel.elf", "/dev/block/mmcblk0p3");
  16. #package_extract_file("system.ext4", "/dev/block/mmcblk0p12");
  17.  
  18. show_progress(0.3, 5);
  19.  
  20. ui_print("");
  21. ui_print("--- Installing root files ---");
  22. run_program("/sbin/busybox", "mount", "/system");
  23. run_program("/sbin/busybox", "mount", "/data");
  24. delete_recursive("/data/dalvik-cache");
  25.  
  26. # From UPDATE-SuperSU-v1.94
  27. #package_extract_file("Superuser.apk", "/system/app/Superuser.apk");
  28. #set_perm(0, 0, 0644, "/system/app/Superuser.apk");
  29.  
  30. #run_program("/sbin/busybox", "mkdir", "/system/bin/.ext");
  31. #package_extrct_file(".su", "/system/bin/.ext/.su");
  32. #set_perm_recursive(0, 0, 0777, 06755, "/system/bin/.ext");
  33.  
  34. #package_extract_file("daemonsu", "/system/xbin/daemonsu");
  35. #set_perm(0, 0, 0755, "/system/xbin/daemonsu");
  36.  
  37. #package_extract_file("su", "/system/xbin/su");
  38. #set_perm(0, 0, 06755, "/system/xbin/su");
  39.  
  40. #package_extract_file("busybox", "/system/xbin/busybox");
  41. #set_perm(0, 2000, 04755, "/system/xbin/busybox");
  42. #run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
  43. #package_extract_file("installbusybox", "/tmp/installbusybox");
  44. #set_perm(0, 0, 0777, "/tmp/installbusybox");
  45. #run_program("/tmp/installbusybox");
  46.  
  47. #package_extract_file("sqlite3", "/system/xbin/sqlite3");
  48. #set_perm(0, 2000, 04755, "/system/xbin/sqlite3");
  49.  
  50. #package_extract_file("zipalign", "/system/xbin/zipalign");
  51. #set_perm(0, 2000, 04755, "/system/xbin/zipalign");
  52.  
  53. #run_program("/sbin/busybox", "mkdir", "/system/etc/init.d");
  54. #package_extract_file("00stop_ric", "/system/etc/init.d/00stop_ric");
  55. #package_extract_file("97sqlite", "/system/etc/init.d/97sqlite");
  56. #package_extract_file("98zipalign", "/system/etc/init.d/98zipalign");
  57. #package_extract_file("99SuperSUDaemon", "/system/etc/init.d/99SuperSUDaemon");
  58. #set_perm_recursive(0, 0, 0755, 0755, "/system/etc/init.d");
  59.  
  60. #package_extract_file("echo_runparts.sh", "/tmp/echo_rauparts.sh");
  61. #set_perm(0, 0, 0777, "/tmp/echo_runparts.sh");
  62. #run_program("/tmp/echo_runparts.sh");
  63.  
  64. package_extract_dir("system", "/system");
  65.  
  66. ui_print("");
  67. ui_print("--- Settings owner and permissions ---");
  68. set_perm(0, 0, 0644, "/system/app/Superuser.apk");
  69. set_perm_recursive(0, 0, 0777, 06755, "/system/bin/.ext");
  70. set_perm_recursive(0, 0, 0755, 0755, "/system/etc/init.d");
  71. set_perm(0, 2000, 04755, "/system/xbin/busybox");
  72. set_perm(0, 0, 0755, "/system/xbin/daemonsu");
  73. set_perm(0, 2000, 04755, "/system/xbin/sqlite3");
  74. set_perm(0, 0, 06755, "/system/xbin/su");
  75. set_perm(0, 2000, 04755, "/system/xbin/zipalign");
  76.  
  77. ui_print("");
  78. ui_print("--- Install busybox 1.21.1 ---");
  79. # From FlashTool 0.9.15.0
  80. run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
  81. package_extract_file("installbusybox", "/tmp/installbusybox");
  82. set_perm(0, 0, 0777, "/tmp/installbusybox");
  83. run_program("/tmp/installbusybox");
  84.  
  85. ui_print("");
  86. ui_print("--- Enable init.d ---");
  87. package_extract_file("echo_runparts.sh", "/tmp/echo_rauparts.sh");
  88. set_perm(0, 0, 0777, "/tmp/echo_runparts.sh");
  89. run_program("/tmp/echo_runparts.sh");
  90.  
  91. unmount("/system");
  92. unmount("/data");
  93.  
  94. ui_print("");
  95. ui_print("--- Finish ---");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement