Advertisement
Guest User

Untitled

a guest
Jun 12th, 2011
1,551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.76 KB | None | 0 0
  1. assert(getprop("ro.product.device") == "galaxys2" || getprop("ro.build.product") == "galaxys2" || getprop("ro.product.board") == "galaxys2" ||
  2. getprop("ro.product.device") == "GT-I9100" || getprop("ro.build.product") == "GT-I9100" || getprop("ro.product.board") == "GT-I9100");
  3. package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
  4. set_perm(0, 0, 0777, "/tmp/backuptool.sh");
  5. run_program("/tmp/backuptool.sh", "backup");
  6. show_progress(0.500000, 0);
  7. format("ext4", "EMMC", "/dev/block/mmcblk0p9");
  8. mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
  9. package_extract_dir("recovery", "/system");
  10. package_extract_dir("system", "/system");
  11. symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
  12. "/system/xbin/arp", "/system/xbin/ash", "/system/xbin/awk",
  13. "/system/xbin/basename", "/system/xbin/bbconfig", "/system/xbin/brctl",
  14. "/system/xbin/bunzip2", "/system/xbin/bzcat", "/system/xbin/bzip2",
  15. "/system/xbin/cal", "/system/xbin/cat", "/system/xbin/catv",
  16. "/system/xbin/chgrp", "/system/xbin/chmod", "/system/xbin/chown",
  17. "/system/xbin/chroot", "/system/xbin/cksum", "/system/xbin/clear",
  18. "/system/xbin/cmp", "/system/xbin/cp", "/system/xbin/cpio",
  19. "/system/xbin/cut", "/system/xbin/date", "/system/xbin/dc",
  20. "/system/xbin/dd", "/system/xbin/depmod", "/system/xbin/devmem",
  21. "/system/xbin/df", "/system/xbin/diff", "/system/xbin/dirname",
  22. "/system/xbin/dmesg", "/system/xbin/dnsd", "/system/xbin/dos2unix",
  23. "/system/xbin/du", "/system/xbin/echo", "/system/xbin/ed",
  24. "/system/xbin/egrep", "/system/xbin/env", "/system/xbin/expr",
  25. "/system/xbin/false", "/system/xbin/fdisk", "/system/xbin/fgrep",
  26. "/system/xbin/find", "/system/xbin/fold", "/system/xbin/free",
  27. "/system/xbin/freeramdisk", "/system/xbin/fuser", "/system/xbin/getopt",
  28. "/system/xbin/grep", "/system/xbin/gunzip", "/system/xbin/gzip",
  29. "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
  30. "/system/xbin/ifconfig", "/system/xbin/insmod", "/system/xbin/install",
  31. "/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
  32. "/system/xbin/killall5", "/system/xbin/length", "/system/xbin/less",
  33. "/system/xbin/ln", "/system/xbin/losetup", "/system/xbin/ls",
  34. "/system/xbin/lsmod", "/system/xbin/lspci", "/system/xbin/lsusb",
  35. "/system/xbin/lzop", "/system/xbin/lzopcat", "/system/xbin/md5sum",
  36. "/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
  37. "/system/xbin/mkfs.ext2", "/system/xbin/mknod", "/system/xbin/mkswap",
  38. "/system/xbin/mktemp", "/system/xbin/modprobe", "/system/xbin/more",
  39. "/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mv",
  40. "/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nohup",
  41. "/system/xbin/nslookup", "/system/xbin/ntpd", "/system/xbin/od",
  42. "/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof",
  43. "/system/xbin/ping", "/system/xbin/pkill", "/system/xbin/printenv",
  44. "/system/xbin/printf", "/system/xbin/ps", "/system/xbin/pwd",
  45. "/system/xbin/rdev", "/system/xbin/readlink", "/system/xbin/realpath",
  46. "/system/xbin/renice", "/system/xbin/reset", "/system/xbin/rm",
  47. "/system/xbin/rmdir", "/system/xbin/rmmod", "/system/xbin/route",
  48. "/system/xbin/run-parts", "/system/xbin/sed", "/system/xbin/seq",
  49. "/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
  50. "/system/xbin/sha256sum", "/system/xbin/sha512sum",
  51. "/system/xbin/sleep", "/system/xbin/sort", "/system/xbin/split",
  52. "/system/xbin/stat", "/system/xbin/strings", "/system/xbin/stty",
  53. "/system/xbin/swapoff", "/system/xbin/swapon", "/system/xbin/sync",
  54. "/system/xbin/sysctl", "/system/xbin/tac", "/system/xbin/tail",
  55. "/system/xbin/tar", "/system/xbin/tee", "/system/xbin/telnet",
  56. "/system/xbin/test", "/system/xbin/tftp", "/system/xbin/time",
  57. "/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
  58. "/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/tty",
  59. "/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
  60. "/system/xbin/uniq", "/system/xbin/unix2dos", "/system/xbin/unlzop",
  61. "/system/xbin/unzip", "/system/xbin/uptime", "/system/xbin/usleep",
  62. "/system/xbin/uudecode", "/system/xbin/uuencode", "/system/xbin/vi",
  63. "/system/xbin/watch", "/system/xbin/wc", "/system/xbin/wget",
  64. "/system/xbin/which", "/system/xbin/whoami", "/system/xbin/xargs",
  65. "/system/xbin/yes",
  66. "/system/xbin/zcat");
  67. symlink("iwmulticall", "/system/xbin/iwconfig", "/system/xbin/iwgetid",
  68. "/system/xbin/iwlist", "/system/xbin/iwpriv",
  69. "/system/xbin/iwspy");
  70. symlink("toolbox", "/system/bin/cat", "/system/bin/cmp",
  71. "/system/bin/date", "/system/bin/dd", "/system/bin/dmesg",
  72. "/system/bin/getevent", "/system/bin/getprop", "/system/bin/hd",
  73. "/system/bin/id", "/system/bin/ifconfig", "/system/bin/iftop",
  74. "/system/bin/insmod", "/system/bin/ioctl", "/system/bin/ionice",
  75. "/system/bin/kill", "/system/bin/log", "/system/bin/lsmod",
  76. "/system/bin/nandread", "/system/bin/netstat",
  77. "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
  78. "/system/bin/ps", "/system/bin/reboot", "/system/bin/renice",
  79. "/system/bin/rmdir", "/system/bin/rmmod", "/system/bin/route",
  80. "/system/bin/schedtop", "/system/bin/sendevent",
  81. "/system/bin/setconsole", "/system/bin/setprop", "/system/bin/sleep",
  82. "/system/bin/smd", "/system/bin/start", "/system/bin/stop",
  83. "/system/bin/sync", "/system/bin/top", "/system/bin/uptime",
  84. "/system/bin/vmstat", "/system/bin/watchprops",
  85. "/system/bin/wipe");
  86. set_perm_recursive(0, 0, 0755, 0644, "/system");
  87. set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
  88. set_perm(0, 3003, 02750, "/system/bin/netcfg");
  89. set_perm(0, 3004, 02755, "/system/bin/ping");
  90. set_perm(0, 2000, 06750, "/system/bin/run-as");
  91. set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
  92. set_perm(0, 0, 0755, "/system/etc/bluetooth");
  93. set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
  94. set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
  95. set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
  96. set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
  97. set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
  98. set_perm(0, 0, 0755, "/system/etc/init.d");
  99. set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
  100. set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
  101. set_perm(0, 2000, 0755, "/system/vendor");
  102. set_perm(0, 2000, 0755, "/system/vendor/firmware");
  103. set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
  104. set_perm(0, 0, 06755, "/system/xbin/hcitool");
  105. set_perm(0, 0, 06755, "/system/xbin/librank");
  106. set_perm(0, 0, 06755, "/system/xbin/procmem");
  107. set_perm(0, 0, 06755, "/system/xbin/procrank");
  108. set_perm(0, 0, 06755, "/system/xbin/su");
  109. set_perm(0, 0, 06755, "/system/xbin/tcpdump");
  110. show_progress(0.200000, 0);
  111. show_progress(0.200000, 10);
  112. package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
  113. set_perm(0, 0, 0777, "/tmp/backuptool.sh");
  114. run_program("/tmp/backuptool.sh", "restore");
  115. package_extract_file("system/bin/verify_cache_partition_size.sh", "/tmp/verify_cache_partition_size.sh");
  116. set_perm(0, 0, 0777, "/tmp/verify_cache_partition_size.sh");
  117. run_program("/tmp/verify_cache_partition_size.sh");
  118. show_progress(0.200000, 10);
  119. assert(package_extract_file("boot.img", "/tmp/boot.img"),
  120. write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p5"),
  121. delete("/tmp/boot.img"));
  122. show_progress(0.100000, 0);
  123. unmount("/system");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement