Advertisement
ruberval

script

Oct 21st, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.08 KB | None | 0 0
  1. assert(getprop("ro.product.device") == "galaxys" || getprop("ro.build.product") == "galaxys" ||
  2. getprop("ro.product.device") == "galaxysmtd" || getprop("ro.build.product") == "galaxysmtd" ||
  3. getprop("ro.product.device") == "GT-I9000" || getprop("ro.build.product") == "GT-I9000" ||
  4. getprop("ro.product.device") == "GT-I9000M" || getprop("ro.build.product") == "GT-I9000M" ||
  5. getprop("ro.product.device") == "GT-I9000T" || getprop("ro.build.product") == "GT-I9000T");
  6. package_extract_file("modem.bin", "/tmp/modem.bin");
  7. set_perm(0, 0, 0777, "/tmp/modem.bin");
  8. package_extract_file("updater.sh", "/tmp/updater.sh");
  9. set_perm(0, 0, 0777, "/tmp/updater.sh");
  10. package_extract_file("make_ext4fs", "/tmp/make_ext4fs");
  11. set_perm(0, 0, 0777, "/tmp/make_ext4fs");
  12. package_extract_file("busybox", "/tmp/busybox");
  13. set_perm(0, 0, 0777, "/tmp/busybox");
  14. package_extract_file("flash_image", "/tmp/flash_image");
  15. set_perm(0, 0, 0777, "/tmp/flash_image");
  16. package_extract_file("erase_image", "/tmp/erase_image");
  17. set_perm(0, 0, 0777, "/tmp/erase_image");
  18. package_extract_file("bml_over_mtd", "/tmp/bml_over_mtd");
  19. set_perm(0, 0, 0777, "/tmp/bml_over_mtd");
  20. package_extract_file("bml_over_mtd.sh", "/tmp/bml_over_mtd.sh");
  21. set_perm(0, 0, 0777, "/tmp/bml_over_mtd.sh");
  22. package_extract_file("boot.img", "/tmp/boot.img");
  23. assert(run_program("/tmp/updater.sh") == 0);
  24. show_progress(0.500000, 0);
  25. format("ext4", "EMMC", "/dev/lvpool/system", "0", "/system");
  26. mount("ext4", "EMMC", "/dev/lvpool/system", "/system");
  27. package_extract_dir("system", "/system");
  28. symlink("/system/xbin/su", "/system/bin/su");
  29. symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
  30. symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
  31. symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
  32. "/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
  33. "/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
  34. "/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
  35. "/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
  36. "/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
  37. "/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
  38. "/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
  39. "/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
  40. "/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
  41. "/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
  42. "/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
  43. "/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
  44. "/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
  45. "/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
  46. "/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
  47. "/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
  48. "/system/xbin/fbsplash", "/system/xbin/fdisk", "/system/xbin/fgrep",
  49. "/system/xbin/find", "/system/xbin/flash_lock",
  50. "/system/xbin/flash_unlock", "/system/xbin/flashcp",
  51. "/system/xbin/flock", "/system/xbin/fold", "/system/xbin/free",
  52. "/system/xbin/freeramdisk", "/system/xbin/fstrim", "/system/xbin/fsync",
  53. "/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
  54. "/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
  55. "/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
  56. "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
  57. "/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
  58. "/system/xbin/install", "/system/xbin/ionice", "/system/xbin/iostat",
  59. "/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
  60. "/system/xbin/killall5", "/system/xbin/less", "/system/xbin/ln",
  61. "/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
  62. "/system/xbin/lsmod", "/system/xbin/lsusb", "/system/xbin/lzcat",
  63. "/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
  64. "/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mesg",
  65. "/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
  66. "/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
  67. "/system/xbin/mknod", "/system/xbin/mkswap", "/system/xbin/mktemp",
  68. "/system/xbin/modinfo", "/system/xbin/modprobe", "/system/xbin/more",
  69. "/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
  70. "/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
  71. "/system/xbin/nbd-client", "/system/xbin/netstat", "/system/xbin/nice",
  72. "/system/xbin/nohup", "/system/xbin/nslookup", "/system/xbin/ntpd",
  73. "/system/xbin/od", "/system/xbin/patch", "/system/xbin/pgrep",
  74. "/system/xbin/pidof", "/system/xbin/ping", "/system/xbin/pipe_progress",
  75. "/system/xbin/pkill", "/system/xbin/pmap", "/system/xbin/poweroff",
  76. "/system/xbin/printenv", "/system/xbin/printf", "/system/xbin/ps",
  77. "/system/xbin/pstree", "/system/xbin/pwd", "/system/xbin/pwdx",
  78. "/system/xbin/rdev", "/system/xbin/readlink", "/system/xbin/realpath",
  79. "/system/xbin/renice", "/system/xbin/reset", "/system/xbin/resize",
  80. "/system/xbin/rev", "/system/xbin/rm", "/system/xbin/rmdir",
  81. "/system/xbin/rmmod", "/system/xbin/route", "/system/xbin/run-parts",
  82. "/system/xbin/rx", "/system/xbin/sed", "/system/xbin/seq",
  83. "/system/xbin/setconsole", "/system/xbin/setserial",
  84. "/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
  85. "/system/xbin/sha256sum", "/system/xbin/sha3sum",
  86. "/system/xbin/sha512sum", "/system/xbin/sleep", "/system/xbin/sort",
  87. "/system/xbin/split", "/system/xbin/stat", "/system/xbin/strings",
  88. "/system/xbin/stty", "/system/xbin/sum", "/system/xbin/swapoff",
  89. "/system/xbin/swapon", "/system/xbin/sync", "/system/xbin/sysctl",
  90. "/system/xbin/tac", "/system/xbin/tail", "/system/xbin/tar",
  91. "/system/xbin/taskset", "/system/xbin/tee", "/system/xbin/telnet",
  92. "/system/xbin/telnetd", "/system/xbin/test", "/system/xbin/tftp",
  93. "/system/xbin/tftpd", "/system/xbin/time", "/system/xbin/timeout",
  94. "/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
  95. "/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/ttysize",
  96. "/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
  97. "/system/xbin/uncompress", "/system/xbin/unexpand", "/system/xbin/uniq",
  98. "/system/xbin/unix2dos", "/system/xbin/unlzma", "/system/xbin/unlzop",
  99. "/system/xbin/unxz", "/system/xbin/unzip", "/system/xbin/uptime",
  100. "/system/xbin/usleep", "/system/xbin/uudecode", "/system/xbin/uuencode",
  101. "/system/xbin/vi", "/system/xbin/watch", "/system/xbin/wc",
  102. "/system/xbin/wget", "/system/xbin/which", "/system/xbin/whoami",
  103. "/system/xbin/xargs", "/system/xbin/xz", "/system/xbin/xzcat",
  104. "/system/xbin/yes",
  105. "/system/xbin/zcat");
  106. symlink("logcat", "/system/bin/lolcat");
  107. symlink("mksh", "/system/bin/sh");
  108. symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
  109. "/system/bin/chown", "/system/bin/cmp", "/system/bin/cp",
  110. "/system/bin/date", "/system/bin/dd", "/system/bin/df",
  111. "/system/bin/dmesg", "/system/bin/du", "/system/bin/getevent",
  112. "/system/bin/getprop", "/system/bin/grep", "/system/bin/hd",
  113. "/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
  114. "/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
  115. "/system/bin/kill", "/system/bin/ln", "/system/bin/log",
  116. "/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof",
  117. "/system/bin/md5", "/system/bin/mkdir", "/system/bin/mount",
  118. "/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
  119. "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
  120. "/system/bin/ps", "/system/bin/r", "/system/bin/reboot",
  121. "/system/bin/renice", "/system/bin/restart", "/system/bin/rm",
  122. "/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",
  123. "/system/bin/schedtop", "/system/bin/sendevent",
  124. "/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep",
  125. "/system/bin/smd", "/system/bin/start", "/system/bin/stop",
  126. "/system/bin/sync", "/system/bin/top", "/system/bin/touch",
  127. "/system/bin/umount", "/system/bin/uptime", "/system/bin/vmstat",
  128. "/system/bin/watchprops",
  129. "/system/bin/wipe");
  130. set_perm_recursive(0, 0, 0755, 0644, "/system");
  131. set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
  132. set_perm(0, 3003, 02750, "/system/bin/netcfg");
  133. set_perm(0, 3004, 02755, "/system/bin/ping");
  134. set_perm(0, 2000, 06750, "/system/bin/run-as");
  135. set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
  136. set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
  137. set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
  138. set_perm(0, 0, 0755, "/system/etc/init.d");
  139. set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
  140. set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
  141. set_perm(0, 2000, 0755, "/system/vendor");
  142. set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
  143. set_perm(0, 2000, 0755, "/system/vendor/etc");
  144. set_perm(0, 2000, 0755, "/system/vendor/firmware");
  145. set_perm(0, 2000, 0755, "/system/vendor/lib");
  146. set_perm(0, 2000, 0755, "/system/vendor/lib/egl");
  147. set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
  148. set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
  149. set_perm(0, 0, 06755, "/system/xbin/librank");
  150. set_perm(0, 0, 06755, "/system/xbin/procmem");
  151. set_perm(0, 0, 06755, "/system/xbin/procrank");
  152. set_perm(0, 1000, 06750, "/system/xbin/shelld");
  153. set_perm(0, 0, 06755, "/system/xbin/su");
  154. show_progress(0.200000, 0);
  155. show_progress(0.200000, 10);
  156. mount("ext4", "EMMC", "/dev/lvpool/userdata", "/data");
  157. package_extract_dir("data", "/data");
  158. set_perm_recursive(1000, 1000, 0755, 0644, "/data/preinstall_apps");
  159. unmount("/data");
  160. unmount("/system");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement