Guest User

Untitled

a guest
Sep 19th, 2012
526
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.62 KB | None | 0 0
  1. ui_print("[ ] Formatting SYSTEM");
  2. format("ext4", "EMMC", "/dev/block/nandd", "0");
  3.  
  4. show_progress(0.200000, 0);
  5. ui_print("[ ] Mounting SYSTEM");
  6. mount("ext4", "EMMC", "/dev/block/nandd", "/system");
  7. show_progress(0.300000, 0);
  8. ui_print("[ ] Copying files to SYSTEM");
  9. package_extract_dir("system", "/system");
  10. show_progress(0.200000, 10);
  11.  
  12. ui_print("[ ] Creating symlinks to BUSYBOX");
  13. show_progress(0.300000, 10);
  14. symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
  15. symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
  16. symlink("busybox", "/system/bin/[", "/system/bin/[[",
  17. "/system/bin/arp", "/system/bin/ash", "/system/bin/awk",
  18. "/system/bin/base64", "/system/bin/basename", "/system/bin/bbconfig",
  19. "/system/bin/blockdev", "/system/bin/brctl", "/system/bin/bunzip2",
  20. "/system/bin/bzcat", "/system/bin/bzip2", "/system/bin/blkid", "/system/bin/cal",
  21. "/system/bin/cat", "/system/bin/catv", "/system/bin/chattr", "/system/bin/chrt",
  22. "/system/bin/chgrp", "/system/bin/chmod", "/system/bin/chown", "/system/bin/cksum",
  23. "/system/bin/chroot", "/system/bin/clear", "/system/bin/cmp",
  24. "/system/bin/comm", "/system/bin/cp", "/system/bin/cpio",
  25. "/system/bin/crond", "/system/bin/crontab", "/system/bin/cut",
  26. "/system/bin/date", "/system/bin/dc", "/system/bin/dd", "/system/bin/dnsdomainname",
  27. "/system/bin/depmod", "/system/bin/devmem", "/system/bin/df",
  28. "/system/bin/diff", "/system/bin/dirname", "/system/bin/dmesg",
  29. "/system/bin/dnsd", "/system/bin/dos2unix", "/system/bin/du",
  30. "/system/bin/echo", "/system/bin/ed", "/system/bin/egrep", "/system/bin/ether-wake",
  31. "/system/bin/env", "/system/bin/expand", "/system/bin/expr",
  32. "/system/bin/false", "/system/bin/fdisk", "/system/bin/fgrep", "/system/bin/fakeidentd",
  33. "/system/bin/find", "/system/bin/flash_lock", "/system/bin/fdflush", "/system/bin/fdformat",
  34. "/system/bin/flash_unlock", "/system/bin/flashcp", "/system/bin/fsck", "/system/bin/ftpd",
  35. "/system/bin/flock", "/system/bin/fold", "/system/bin/free",
  36. "/system/bin/freeramdisk", "/system/bin/fsync", "/system/bin/ftpget",
  37. "/system/bin/ftpput", "/system/bin/fuser", "/system/bin/getopt",
  38. "/system/bin/grep", "/system/bin/groups", "/system/bin/gunzip",
  39. "/system/bin/gzip", "/system/bin/halt", "/system/bin/head", "/system/bin/hostid", "/system/bin/hostname",
  40. "/system/bin/hexdump", "/system/bin/id", "/system/bin/ifconfig", "/system/bin/httpd", "/system/bin/hwclock",
  41. "/system/bin/insmod", "/system/bin/install", "/system/bin/iostat", "/system/bin/ifenslave", "/system/bin/inetd",
  42. "/system/bin/ip", "/system/bin/kill", "/system/bin/killall", "/system/bin/inotifyd", "/system/bin/ipaddr",
  43. "/system/bin/killall5", "/system/bin/length", "/system/bin/less", "/system/bin/ipcalc", "/system/bin/iplink",
  44. "/system/bin/ln", "/system/bin/losetup", "/system/bin/ls", "/system/bin/iproute", "/system/bin/iprule",
  45. "/system/bin/lsattr", "/system/bin/lsmod", "/system/bin/lsusb", "/system/bin/iptunnel", "/system/bin/logname",
  46. "/system/bin/lzcat", "/system/bin/lzma", "/system/bin/lzop", "/system/bin/microcom",
  47. "/system/bin/lzopcat", "/system/bin/man", "/system/bin/md5sum", "/system/bin/mkdosfs",
  48. "/system/bin/mesg", "/system/bin/mkdir", "/system/bin/mke2fs", "/system/bin/mt",
  49. "/system/bin/mkfifo", "/system/bin/mkfs.ext2", "/system/bin/nameif", "/system/bin/nc",
  50. "/system/bin/mkfs.vfat", "/system/bin/mknod", "/system/bin/mkswap", "/system/bin/nmeter",
  51. "/system/bin/mktemp", "/system/bin/modinfo", "/system/bin/modprobe",
  52. "/system/bin/more", "/system/bin/mount", "/system/bin/mountpoint",
  53. "/system/bin/mpstat", "/system/bin/mv", "/system/bin/nanddump",
  54. "/system/bin/nandwrite", "/system/bin/netstat", "/system/bin/nice",
  55. "/system/bin/nohup", "/system/bin/nslookup", "/system/bin/ntpd",
  56. "/system/bin/od", "/system/bin/patch", "/system/bin/pgrep", "/system/bin/powertop",
  57. "/system/bin/pidof", "/system/bin/ping", "/system/bin/pkill", "/system/bin/pscan",
  58. "/system/bin/pmap", "/system/bin/poweroff", "/system/bin/printenv",
  59. "/system/bin/printf", "/system/bin/ps", "/system/bin/pstree",
  60. "/system/bin/pwd", "/system/bin/pwdx", "/system/bin/rdev", "/system/bin/rdate",
  61. "/system/bin/readlink", "/system/bin/realpath", "/system/bin/renice",
  62. "/system/bin/reset", "/system/bin/resize", "/system/bin/rev", "/system/bin/readahead",
  63. "/system/bin/rm", "/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/rfkill",
  64. "/system/bin/route", "/system/bin/run-parts", "/system/bin/rx",
  65. "/system/bin/sed", "/system/bin/seq", "/system/bin/setconsole", "/system/bin/script",
  66. "/system/bin/setserial", "/system/bin/setsid", "/system/bin/sh", "/system/bin/scriptreplay",
  67. "/system/bin/sha1sum", "/system/bin/sha256sum", "/system/bin/setkeycodes", "/system/bin/setlogcons",
  68. "/system/bin/sha512sum", "/system/bin/sleep", "/system/bin/sort", "/system/bin/showkey",
  69. "/system/bin/split", "/system/bin/stat", "/system/bin/strings", "/system/bin/smemcap",
  70. "/system/bin/stty", "/system/bin/sum", "/system/bin/swapoff",
  71. "/system/bin/swapon", "/system/bin/sync", "/system/bin/sysctl",
  72. "/system/bin/tac", "/system/bin/tail", "/system/bin/tar", "/system/bin/traceroute",
  73. "/system/bin/tee", "/system/bin/telnet", "/system/bin/telnetd", "/system/bin/tty",
  74. "/system/bin/test", "/system/bin/tftp", "/system/bin/tftpd", "/system/bin/tunctl",
  75. "/system/bin/time", "/system/bin/timeout", "/system/bin/top",
  76. "/system/bin/touch", "/system/bin/tr", "/system/bin/traceroute",
  77. "/system/bin/true", "/system/bin/ttysize", "/system/bin/tune2fs",
  78. "/system/bin/umount", "/system/bin/uname", "/system/bin/uncompress",
  79. "/system/bin/unexpand", "/system/bin/uniq", "/system/bin/unix2dos",
  80. "/system/bin/unlzma", "/system/bin/unlzop", "/system/bin/unxz",
  81. "/system/bin/unzip", "/system/bin/uptime", "/system/bin/usleep",
  82. "/system/bin/uudecode", "/system/bin/uuencode", "/system/bin/vi", "/system/bin/vconfig",
  83. "/system/bin/watch", "/system/bin/wc", "/system/bin/wget", "/system/bin/who", "/system/bin/whois",
  84. "/system/bin/which", "/system/bin/whoami", "/system/bin/xargs",
  85. "/system/bin/xz", "/system/bin/xzcat", "/system/bin/yes",
  86. "/system/bin/zcat");
  87. symlink("mksh", "/system/bin/sh");
  88. symlink("toolbox", "/system/bin/cat", "/system/bin/chmod",
  89. "/system/bin/chown", "/system/bin/cmp", "/system/bin/date",
  90. "/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
  91. "/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
  92. "/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
  93. "/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
  94. "/system/bin/kill", "/system/bin/ln", "/system/bin/log",
  95. "/system/bin/ls", "/system/bin/lsmod", "/system/bin/lsof",
  96. "/system/bin/mkdir", "/system/bin/mount", "/system/bin/mv",
  97. "/system/bin/nandread", "/system/bin/netstat",
  98. "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
  99. "/system/bin/ps", "/system/bin/r", "/system/bin/reboot",
  100. "/system/bin/renice", "/system/bin/rm", "/system/bin/rmdir",
  101. "/system/bin/rmmod", "/system/bin/route", "/system/bin/schedtop",
  102. "/system/bin/sendevent", "/system/bin/setconsole",
  103. "/system/bin/setprop", "/system/bin/sleep", "/system/bin/smd",
  104. "/system/bin/start", "/system/bin/stop", "/system/bin/sync",
  105. "/system/bin/top", "/system/bin/touch", "/system/bin/umount",
  106. "/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops",
  107. "/system/bin/wipe");
  108.  
  109. ui_print("[ ] Setting permissions to SYSTEM");
  110. set_perm_recursive(0, 0, 0755, 0644, "/system");
  111. set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
  112. set_perm(0, 3003, 02750, "/system/bin/netcfg");
  113. set_perm(0, 3004, 02755, "/system/bin/ping");
  114. set_perm(0, 2000, 06750, "/system/bin/run-as");
  115. set_perm(0, 0, 0755, "/system/bin/busybox");
  116. set_perm(0, 0, 0755, "/system/bin/zipalign");
  117. set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
  118. set_perm(0, 0, 0755, "/system/etc/bluetooth");
  119. set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
  120. set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
  121. set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
  122. set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
  123. set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
  124. set_perm(0, 0, 0755, "/system/etc/init.d");
  125. set_perm(0, 0, 0755, "/system/xbin/zipalign");
  126. set_perm(0, 0, 0755, "/system/bin/system_server");
  127. set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
  128. set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
  129. set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
  130. set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
  131. set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
  132. set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
  133. set_perm(0, 0, 06755, "/system/xbin/librank");
  134. set_perm(0, 0, 06755, "/system/xbin/procmem");
  135. set_perm(0, 0, 06755, "/system/xbin/procrank");
  136. set_perm(0, 0, 06755, "/system/xbin/su");
  137. symlink("/system/xbin/su", "/system/bin/su");
  138. show_progress(0.100000, 0);
  139.  
  140. ui_print("[ ] Unmounting SYSTEM");
  141. unmount("/system");
  142.  
  143. ui_print("[ ] Updating BOOT");
  144. package_extract_file("boot.img", "/dev/block/nandc");
  145.  
  146. ui_print("");
  147. ui_print("[*] Completed!");
  148. ui_print("");
Add Comment
Please, Sign In to add comment