Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.29 KB | None | 0 0
  1. show_progress(0.800000, 80);
  2. set_bootloader_env("upgrade_step", "3");
  3. format("ext4", "EMMC", "/dev/block/system", "0", "/system");
  4. mount("ext4", "EMMC", "/dev/block/system", "/system");
  5. package_extract_dir("recovery", "/system");
  6. package_extract_dir("system", "/system");
  7. symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
  8. symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
  9. symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
  10. "/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
  11. "/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
  12. "/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
  13. "/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
  14. "/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
  15. "/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
  16. "/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
  17. "/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
  18. "/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
  19. "/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
  20. "/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
  21. "/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
  22. "/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
  23. "/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
  24. "/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
  25. "/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
  26. "/system/xbin/fbset", "/system/xbin/fbsplash", "/system/xbin/fdisk",
  27. "/system/xbin/fgrep", "/system/xbin/find", "/system/xbin/flash_lock",
  28. "/system/xbin/flash_unlock", "/system/xbin/flashcp",
  29. "/system/xbin/flock", "/system/xbin/fold", "/system/xbin/free",
  30. "/system/xbin/freeramdisk", "/system/xbin/fstrim", "/system/xbin/fsync",
  31. "/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
  32. "/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
  33. "/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
  34. "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
  35. "/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
  36. "/system/xbin/install", "/system/xbin/ionice", "/system/xbin/iostat",
  37. "/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
  38. "/system/xbin/killall5", "/system/xbin/less", "/system/xbin/ln",
  39. "/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
  40. "/system/xbin/lsmod", "/system/xbin/lsof", "/system/xbin/lsusb",
  41. "/system/xbin/lzcat", "/system/xbin/lzma", "/system/xbin/lzop",
  42. "/system/xbin/lzopcat", "/system/xbin/man", "/system/xbin/md5sum",
  43. "/system/xbin/mesg", "/system/xbin/mkdir", "/system/xbin/mkdosfs",
  44. "/system/xbin/mke2fs", "/system/xbin/mkfifo", "/system/xbin/mkfs.ext2",
  45. "/system/xbin/mkfs.vfat", "/system/xbin/mknod", "/system/xbin/mkswap",
  46. "/system/xbin/mktemp", "/system/xbin/modinfo", "/system/xbin/modprobe",
  47. "/system/xbin/more", "/system/xbin/mount", "/system/xbin/mountpoint",
  48. "/system/xbin/mpstat", "/system/xbin/mv", "/system/xbin/nanddump",
  49. "/system/xbin/nandwrite", "/system/xbin/nbd-client",
  50. "/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nohup",
  51. "/system/xbin/nslookup", "/system/xbin/ntpd", "/system/xbin/od",
  52. "/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof",
  53. "/system/xbin/ping", "/system/xbin/pipe_progress", "/system/xbin/pkill",
  54. "/system/xbin/pmap", "/system/xbin/poweroff", "/system/xbin/printenv",
  55. "/system/xbin/printf", "/system/xbin/ps", "/system/xbin/pstree",
  56. "/system/xbin/pwd", "/system/xbin/pwdx", "/system/xbin/rdev",
  57. "/system/xbin/readlink", "/system/xbin/realpath", "/system/xbin/reboot",
  58. "/system/xbin/renice", "/system/xbin/reset", "/system/xbin/resize",
  59. "/system/xbin/rev", "/system/xbin/rm", "/system/xbin/rmdir",
  60. "/system/xbin/rmmod", "/system/xbin/route", "/system/xbin/run-parts",
  61. "/system/xbin/rx", "/system/xbin/sed", "/system/xbin/seq",
  62. "/system/xbin/setconsole", "/system/xbin/setserial",
  63. "/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
  64. "/system/xbin/sha256sum", "/system/xbin/sha3sum",
  65. "/system/xbin/sha512sum", "/system/xbin/sleep", "/system/xbin/sort",
  66. "/system/xbin/split", "/system/xbin/stat", "/system/xbin/strings",
  67. "/system/xbin/stty", "/system/xbin/sum", "/system/xbin/swapoff",
  68. "/system/xbin/swapon", "/system/xbin/sync", "/system/xbin/sysctl",
  69. "/system/xbin/tac", "/system/xbin/tail", "/system/xbin/tar",
  70. "/system/xbin/taskset", "/system/xbin/tee", "/system/xbin/telnet",
  71. "/system/xbin/telnetd", "/system/xbin/test", "/system/xbin/tftp",
  72. "/system/xbin/tftpd", "/system/xbin/time", "/system/xbin/timeout",
  73. "/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
  74. "/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/ttysize",
  75. "/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
  76. "/system/xbin/uncompress", "/system/xbin/unexpand", "/system/xbin/uniq",
  77. "/system/xbin/unix2dos", "/system/xbin/unlzma", "/system/xbin/unlzop",
  78. "/system/xbin/unxz", "/system/xbin/unzip", "/system/xbin/uptime",
  79. "/system/xbin/usleep", "/system/xbin/uudecode", "/system/xbin/uuencode",
  80. "/system/xbin/vi", "/system/xbin/watch", "/system/xbin/wc",
  81. "/system/xbin/wget", "/system/xbin/whoami", "/system/xbin/xargs",
  82. "/system/xbin/xz", "/system/xbin/xzcat", "/system/xbin/yes",
  83. "/system/xbin/zcat");
  84. symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
  85. symlink("mksh", "/system/bin/sh");
  86. symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
  87. "/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
  88. "/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
  89. "/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
  90. "/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
  91. "/system/bin/getprop", "/system/bin/getsebool", "/system/bin/grep",
  92. "/system/bin/hd", "/system/bin/id", "/system/bin/ifconfig",
  93. "/system/bin/iftop", "/system/bin/insmod", "/system/bin/ioctl",
  94. "/system/bin/ionice", "/system/bin/kill", "/system/bin/ln",
  95. "/system/bin/load_policy", "/system/bin/log", "/system/bin/ls",
  96. "/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
  97. "/system/bin/mkdir", "/system/bin/mkswap", "/system/bin/mount",
  98. "/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
  99. "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
  100. "/system/bin/ps", "/system/bin/readlink", "/system/bin/renice",
  101. "/system/bin/restorecon", "/system/bin/rm", "/system/bin/rmdir",
  102. "/system/bin/rmmod", "/system/bin/route", "/system/bin/runcon",
  103. "/system/bin/schedtop", "/system/bin/sendevent",
  104. "/system/bin/setconsole", "/system/bin/setenforce",
  105. "/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep",
  106. "/system/bin/smd", "/system/bin/start", "/system/bin/stop",
  107. "/system/bin/swapoff", "/system/bin/swapon", "/system/bin/sync",
  108. "/system/bin/top", "/system/bin/touch", "/system/bin/umount",
  109. "/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops",
  110. "/system/bin/wipe");
  111. write_raw_image(package_extract_file("logo.img"), "logo");
  112. set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  113. set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  114. set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
  115. set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
  116. set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
  117. set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
  118. set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
  119. set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
  120. set_metadata("/system/bin/esharert", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  121. set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
  122. set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
  123. set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
  124. set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
  125. set_metadata("/system/bin/mksh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
  126. set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
  127. set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  128. set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
  129. set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ping_exec:s0");
  130. set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
  131. set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
  132. set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
  133. set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
  134. set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
  135. set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
  136. set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
  137. set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
  138. set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
  139. set_metadata_recursive("/system/etc/dhcpcd", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
  140. set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
  141. set_metadata("/system/etc/install-recovery.sh", "uid", 0, "gid", 0, "mode", 0544, "capabilities", 0x0);
  142. set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:ppp_system_file:s0");
  143. set_metadata("/system/recovery-from-boot.p", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0);
  144. set_metadata_recursive("/system/vendor", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  145. set_metadata_recursive("/system/vendor/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  146. set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  147. set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  148. set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  149. set_metadata_recursive("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  150. set_metadata("/system/vendor/lib/mediadrm/libwvdrmengine.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  151. set_metadata("/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  152. set_metadata("/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  153. set_metadata("/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", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  154. set_metadata("/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24/full_model.bin", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  155. set_metadata("/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24/full_model.bin", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  156. set_metadata("/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24/full_model.bin", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  157. set_metadata("/system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N/full_model.bin", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  158. set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  159. set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
  160. unmount("/system");
  161. show_progress(0.100000, 10);
  162. write_raw_image(package_extract_file("boot.img"), "boot");
  163. run_program("/sbin/busybox", "dd", "if=/system/KERNEL", "of=/dev/block/linuxk");
  164. run_program("/sbin/busybox", "rm", "-f", "/system/KERNEL");
  165. write_raw_image(package_extract_file("bootloader.img"), "bootloader");
  166. set_bootloader_env("upgrade_step", "1");
  167. show_progress(0.100000, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement