Advertisement
TugaPower

Update-Script TugaPower S3 JellyBean

Dec 6th, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.97 KB | None | 0 0
  1. ui_print(" ");
  2. ui_print(" _ +--------------------------------+ _ ");
  3. ui_print(" /o)| Instalacao |(o\ ");
  4. ui_print(" / / | ROM | \ \ ");
  5. ui_print(" ( (_ | _ By TugaPower _ | _) ) ");
  6. ui_print(" ((\ \)+-/o)------------------------(o\-+(/ /)) ");
  7. ui_print(" (\\\ \_/ / \ \_/ //) ");
  8. ui_print(" \ / \ / ");
  9. ui_print(" \____/ \____/ ");
  10.  
  11. run_program("/sbin/sleep", "3");
  12.  
  13. unmount("/system");
  14.  
  15. ui_print("Iniciando Limpezas");
  16. ui_print("");
  17. ui_print("Limpando cache/dalvik-cache");
  18. mount("ext4", "EMMC", "/dev/block/mmcblk0p12", "/data");
  19. delete_recursive("/data/dalvik-cache");
  20.  
  21. run_program("/sbin/sleep", "3");
  22.  
  23. mount("ext4", "EMMC", "/dev/block/mmcblk0p8", "/cache");
  24. delete_recursive("/cache");
  25. ui_print("Processo de limpeza da cache/dalvik concluido");
  26. ui_print("");
  27.  
  28. run_program("/sbin/sleep", "3");
  29.  
  30. ui_print("Limpando sistema");
  31. format("ext4", "EMMC", "/dev/block/mmcblk0p9", "0");
  32. mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
  33. delete_recursive("/data/data/com.sec.android.app.FlashBarService");
  34. ui_print("Limpeza do sistema concluido");
  35. ui_print("");
  36.  
  37. run_program("/sbin/sleep", "3");
  38.  
  39. #ui_print("Limpando a data");
  40. #package_extract_file("tugapower/wipe/wipe.sh", "/tmp/wipe.sh");
  41. #package_extract_file("tugapower/wipe/bash", "/tmp/bash");
  42. #set_perm(0, 0, 0777, "/tmp/wipe.sh");
  43. #set_perm(0, 0, 0777, "/tmp/bash");
  44. #run_program("/tmp/wipe.sh");
  45. #delete("/tmp/wipe.sh");
  46. #delete("/tmp/bash");
  47. #ui_print("Limpeza da data concluida");
  48.  
  49. ui_print("");
  50. ui_print("A flashar a ROM");
  51. package_extract_dir("system", "/system");
  52. package_extract_dir("data", "/data");
  53. ui_print("Instalaçao ROM terminado");
  54.  
  55. ui_print(" ");
  56. ui_print("Instalando BusyBox");
  57. set_perm(0, 1000, 0755, "/system/xbin/busybox");
  58. run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
  59. symlink("/system/xbin/busybox", "/system/bin/busybox");
  60. ui_print("BusyBox terminado");
  61.  
  62. ui_print("Symlinking Ficheiros");
  63. symlink("toolbox", "/system/bin/cat", "/system/bin/cmp",
  64. "/system/bin/date", "/system/bin/dd", "/system/bin/dmesg",
  65. "/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
  66. "/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
  67. "/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
  68. "/system/bin/kill", "/system/bin/log", "/system/bin/lsmod",
  69. "/system/bin/nandread", "/system/bin/netstat",
  70. "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
  71. "/system/bin/ps", "/system/bin/reboot", "/system/bin/renice",
  72. "/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",
  73. "/system/bin/schedtop", "/system/bin/sendevent",
  74. "/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep",
  75. "/system/bin/smd", "/system/bin/start", "/system/bin/stop",
  76. "/system/bin/sync", "/system/bin/top", "/system/bin/uptime",
  77. "/system/bin/vmstat", "/system/bin/watchprops",
  78. "/system/bin/wipe");
  79.  
  80. symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
  81. "/system/xbin/arp", "/system/xbin/ash", "/system/xbin/awk",
  82. "/system/xbin/basename", "/system/xbin/bbconfig", "/system/xbin/brctl",
  83. "/system/xbin/bunzip2", "/system/xbin/bzcat", "/system/xbin/bzip2",
  84. "/system/xbin/cal", "/system/xbin/cat", "/system/xbin/catv",
  85. "/system/xbin/chgrp", "/system/xbin/chmod", "/system/xbin/chown",
  86. "/system/xbin/chroot", "/system/xbin/cksum", "/system/xbin/clear",
  87. "/system/xbin/cmp", "/system/xbin/cp", "/system/xbin/cpio",
  88. "/system/xbin/cut", "/system/xbin/date", "/system/xbin/dc",
  89. "/system/xbin/dd", "/system/xbin/depmod", "/system/xbin/devmem",
  90. "/system/xbin/df", "/system/xbin/diff", "/system/xbin/dirname",
  91. "/system/xbin/dmesg", "/system/xbin/dnsd", "/system/xbin/dos2unix",
  92. "/system/xbin/du", "/system/xbin/echo", "/system/xbin/ed",
  93. "/system/xbin/egrep", "/system/xbin/env", "/system/xbin/expr",
  94. "/system/xbin/false", "/system/xbin/fdisk", "/system/xbin/fgrep",
  95. "/system/xbin/find", "/system/xbin/fold", "/system/xbin/free",
  96. "/system/xbin/freeramdisk", "/system/xbin/fuser", "/system/xbin/getopt",
  97. "/system/xbin/grep", "/system/xbin/gunzip", "/system/xbin/gzip",
  98. "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
  99. "/system/xbin/ifconfig", "/system/xbin/insmod", "/system/xbin/install",
  100. "/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
  101. "/system/xbin/killall5", "/system/xbin/length", "/system/xbin/less",
  102. "/system/xbin/ln", "/system/xbin/losetup", "/system/xbin/ls",
  103. "/system/xbin/lsmod", "/system/xbin/lspci", "/system/xbin/lsusb",
  104. "/system/xbin/lzop", "/system/xbin/lzopcat", "/system/xbin/md5sum",
  105. "/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
  106. "/system/xbin/mkfs.ext2", "/system/xbin/mknod", "/system/xbin/mkswap",
  107. "/system/xbin/mktemp", "/system/xbin/modprobe", "/system/xbin/more",
  108. "/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mv",
  109. "/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nohup",
  110. "/system/xbin/nslookup", "/system/xbin/ntpd", "/system/xbin/od",
  111. "/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof",
  112. "/system/xbin/ping", "/system/xbin/pkill", "/system/xbin/printenv",
  113. "/system/xbin/printf", "/system/xbin/ps", "/system/xbin/pwd",
  114. "/system/xbin/rdev", "/system/xbin/readlink", "/system/xbin/realpath",
  115. "/system/xbin/renice", "/system/xbin/reset", "/system/xbin/rm",
  116. "/system/xbin/rmdir", "/system/xbin/rmmod", "/system/xbin/route",
  117. "/system/xbin/run-parts", "/system/xbin/sed", "/system/xbin/seq",
  118. "/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
  119. "/system/xbin/sha256sum", "/system/xbin/sha512sum",
  120. "/system/xbin/sleep", "/system/xbin/sort", "/system/xbin/split",
  121. "/system/xbin/stat", "/system/xbin/strings", "/system/xbin/stty",
  122. "/system/xbin/swapoff", "/system/xbin/swapon", "/system/xbin/sync",
  123. "/system/xbin/sysctl", "/system/xbin/tac", "/system/xbin/tail",
  124. "/system/xbin/tar", "/system/xbin/tee", "/system/xbin/telnet",
  125. "/system/xbin/test", "/system/xbin/tftp", "/system/xbin/time",
  126. "/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
  127. "/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/tty",
  128. "/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
  129. "/system/xbin/uniq", "/system/xbin/unix2dos", "/system/xbin/unlzop",
  130. "/system/xbin/unzip", "/system/xbin/uptime", "/system/xbin/usleep",
  131. "/system/xbin/uudecode", "/system/xbin/uuencode", "/system/xbin/vi",
  132. "/system/xbin/watch", "/system/xbin/wc", "/system/xbin/wget",
  133. "/system/xbin/which", "/system/xbin/whoami", "/system/xbin/xargs",
  134. "/system/xbin/yes",
  135. "/system/xbin/zcat");
  136. symlink("/system/bin/mksh", "/system/bin/sh");
  137. symlink("/system/fonts/Roboto-Regular.ttf","/system/fonts/DroidSans.ttf");
  138. symlink("/system/fonts/Roboto-Bold.ttf","/system/fonts/DroidSans-Bold.ttf");
  139.  
  140. ui_print("Definindo permissoes");
  141. set_perm_recursive(0, 0, 0755, 0644, "/system");
  142. set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
  143. set_perm(0, 3003, 02750, "/system/bin/netcfg");
  144. set_perm(0, 3004, 02755, "/system/bin/ping");
  145. set_perm(0, 2000, 06750, "/system/bin/run-as");
  146. set_perm(1000, 1000, 0755, "/system/bin/sysro");
  147. set_perm(1000, 1000, 0755, "/system/bin/sysrw");
  148. set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
  149. set_perm(0, 0, 0755, "/system/etc/bluetooth");
  150. set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
  151. set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
  152. set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
  153. set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
  154. set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
  155. set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
  156. set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
  157. set_perm(0, 2000, 0755, "/system/vendor");
  158. set_perm(0, 2000, 0755, "/system/vendor/etc");
  159. set_perm(0, 2000, 0755, "/system/vendor/etc/nxp");
  160. set_perm(0, 2000, 0755, "/system/vendor/etc/nxp/BargeIn");
  161. set_perm(0, 2000, 0755, "/system/vendor/etc/nxp/mVoIP");
  162. set_perm(0, 2000, 0755, "/system/vendor/etc/nxp/mVoIPSec");
  163. set_perm(0, 2000, 0755, "/system/vendor/firmware");
  164. set_perm(0, 2000, 0755, "/system/vendor/lib");
  165. set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
  166. set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so");
  167. set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/pittpatt");
  168. set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
  169. set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
  170. set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-2/full_model.bin");
  171. set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24/full_model.bin");
  172. set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24/full_model.bin");
  173. set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24/full_model.bin");
  174. set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N/full_model.bin");
  175. set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
  176. set_perm(0, 0, 06755, "/system/xbin/su");
  177. set_perm(0, 0, 0644, "/system/app/Superuser.apk");
  178. symlink("/system/xbin/su", "/system/bin/su");
  179. set_perm(1000, 1000, 0771, "/data");
  180. set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
  181.  
  182. #ui_print(" ");
  183. #ui_print("A preparar Backup da EFS...");
  184. #ui_print("BackUp da pasta EFS em /sdcard/EFS_BACKUP");
  185. #package_extract_file("tugapower/efs_backup.sh", "/tmp/efs_backup.sh");
  186. #set_perm(0, 0, 0755, "/tmp/efs_backup.sh");
  187. #run_program("/tmp/efs_backup.sh");
  188. #delete("/tmp/efs_backup.sh");
  189. #ui_print("BackUp da pasta EFS terminado");
  190.  
  191. ui_print("");
  192. ui_print("Instalando Kernel");
  193. assert(package_extract_file("tugapower/boot.img", "/tmp/boot.img"),
  194. write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p5"),
  195. delete("/tmp/boot.img"));
  196. ui_print("Kernel Terminado");
  197.  
  198. ui_print("");
  199. ui_print("Instalando Recovery Siyah");
  200. assert(package_extract_file("tugapower/recovery.img", "/tmp/recovery.img"),
  201. write_raw_image("/tmp/recovery.img", "/dev/block/mmcblk0p6"),
  202. delete("/tmp/recovery.img"));
  203. ui_print("Recovery Terminado");
  204.  
  205. ui_print("");
  206. ui_print("Instalando Modem");
  207. assert(package_extract_file("tugapower/modem.bin", "/tmp/modem.bin"),
  208. write_raw_image("/tmp/modem.bin", "/dev/block/mmcblk0p7"),
  209. delete("/tmp/modem.bin"));
  210. ui_print("Modem Terminado");
  211.  
  212. ui_print("");
  213. ui_print("Verificacao do sistema a procura de erros");
  214. run_program("/sbin/e2fsck", "-p", "/dev/block/mmcblk0p8");
  215. run_program("/sbin/e2fsck", "-p", "/dev/block/mmcblk0p9");
  216. run_program("/sbin/e2fsck", "-p", "/dev/block/mmcblk0p12");
  217.  
  218. #run_program("/sbin/sleep", "3");
  219.  
  220. unmount("/system");
  221. unmount("/cache");
  222. unmount("/data");
  223.  
  224. ui_print("");
  225. ui_print(" *********************************************** ");
  226. ui_print(" * Instalacao terminada com sucesso * ");
  227. ui_print(" * ROM by TugaPower * ");
  228. ui_print(" * Nao esquecer de dar feedback... * ");
  229. ui_print(" * Reinicie o Galaxy S3 e desfrute ;) * ");
  230. ui_print(" *********************************************** ");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement