Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.18 KB | None | 0 0
  1. show_progress(0.500000, 0);
  2. ui_print(" _____________________ ");
  3. ui_print(" / www.slimroms.net|");
  4. ui_print(" / |");
  5. ui_print(" / ___________________|");
  6. ui_print(" / / ___ ");
  7. ui_print(" / / ___/ \ ");
  8. ui_print(" / / / \___/____ ____ ");
  9. ui_print(" / / | |___/ \_/ |");
  10. ui_print(" ___________/ / | | | |");
  11. ui_print("| / | | | | | |");
  12. ui_print("| / | | | | | |");
  13. ui_print("|_____________/ \___^___^___^___^___/");
  14. ui_print(" ");
  15. ui_print("");
  16. ui_print("Format and Mount System, Mount Data...");
  17. format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
  18. mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
  19. mount("f2fs", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
  20. package_extract_dir("system", "/system");
  21. package_extract_dir("data", "/data");
  22. ui_print("Symlinks and permissions...");
  23. symlink("../xbin/su", "/system/bin/su");
  24. symlink("/persist/WCNSS_qcom_wlan_factory_nv.bin", "/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_factory_nv.bin");
  25. symlink("/system/lib/modules/pronto/pronto_wlan.ko", "/system/lib/modules/wlan.ko");
  26. symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
  27. symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
  28. symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
  29. "/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
  30. "/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
  31. "/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
  32. "/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
  33. "/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
  34. "/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chcon",
  35. "/system/xbin/chgrp", "/system/xbin/chmod", "/system/xbin/chown",
  36. "/system/xbin/chroot", "/system/xbin/clear", "/system/xbin/cmp",
  37. "/system/xbin/comm", "/system/xbin/cp", "/system/xbin/cpio",
  38. "/system/xbin/crond", "/system/xbin/crontab", "/system/xbin/cut",
  39. "/system/xbin/date", "/system/xbin/dc", "/system/xbin/dd",
  40. "/system/xbin/depmod", "/system/xbin/devmem", "/system/xbin/df",
  41. "/system/xbin/diff", "/system/xbin/dirname", "/system/xbin/dmesg",
  42. "/system/xbin/dnsd", "/system/xbin/dos2unix", "/system/xbin/du",
  43. "/system/xbin/echo", "/system/xbin/ed", "/system/xbin/egrep",
  44. "/system/xbin/env", "/system/xbin/expand", "/system/xbin/expr",
  45. "/system/xbin/false", "/system/xbin/fbsplash", "/system/xbin/fdisk",
  46. "/system/xbin/fgrep", "/system/xbin/find", "/system/xbin/flash_lock",
  47. "/system/xbin/flash_unlock", "/system/xbin/flashcp",
  48. "/system/xbin/flock", "/system/xbin/fold", "/system/xbin/free",
  49. "/system/xbin/freeramdisk", "/system/xbin/fstrim", "/system/xbin/fsync",
  50. "/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
  51. "/system/xbin/getenforce", "/system/xbin/getopt",
  52. "/system/xbin/getsebool", "/system/xbin/grep", "/system/xbin/groups",
  53. "/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
  54. "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
  55. "/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
  56. "/system/xbin/install", "/system/xbin/ionice", "/system/xbin/iostat",
  57. "/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
  58. "/system/xbin/killall5", "/system/xbin/less", "/system/xbin/ln",
  59. "/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
  60. "/system/xbin/lsmod", "/system/xbin/lsusb", "/system/xbin/lzcat",
  61. "/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
  62. "/system/xbin/man", "/system/xbin/matchpathcon", "/system/xbin/md5sum",
  63. "/system/xbin/mesg", "/system/xbin/mkdir", "/system/xbin/mke2fs",
  64. "/system/xbin/mkfifo", "/system/xbin/mkfs.ext2",
  65. "/system/xbin/mkfs.vfat", "/system/xbin/mknod", "/system/xbin/mkswap",
  66. "/system/xbin/mktemp", "/system/xbin/modinfo", "/system/xbin/modprobe",
  67. "/system/xbin/more", "/system/xbin/mount", "/system/xbin/mountpoint",
  68. "/system/xbin/mpstat", "/system/xbin/mv", "/system/xbin/nanddump",
  69. "/system/xbin/nandwrite", "/system/xbin/nbd-client",
  70. "/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nohup",
  71. "/system/xbin/nslookup", "/system/xbin/ntpd", "/system/xbin/od",
  72. "/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof",
  73. "/system/xbin/ping", "/system/xbin/pipe_progress", "/system/xbin/pkill",
  74. "/system/xbin/pmap", "/system/xbin/poweroff", "/system/xbin/printenv",
  75. "/system/xbin/printf", "/system/xbin/ps", "/system/xbin/pstree",
  76. "/system/xbin/pwd", "/system/xbin/pwdx", "/system/xbin/rdev",
  77. "/system/xbin/readlink", "/system/xbin/realpath", "/system/xbin/renice",
  78. "/system/xbin/reset", "/system/xbin/resize", "/system/xbin/restorecon",
  79. "/system/xbin/rev", "/system/xbin/rm", "/system/xbin/rmdir",
  80. "/system/xbin/rmmod", "/system/xbin/route", "/system/xbin/run-parts",
  81. "/system/xbin/runcon", "/system/xbin/rx", "/system/xbin/sed",
  82. "/system/xbin/selinuxenabled", "/system/xbin/seq",
  83. "/system/xbin/sestatus", "/system/xbin/setconsole",
  84. "/system/xbin/setenforce", "/system/xbin/setfiles",
  85. "/system/xbin/setsebool", "/system/xbin/setserial",
  86. "/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
  87. "/system/xbin/sha256sum", "/system/xbin/sha3sum",
  88. "/system/xbin/sha512sum", "/system/xbin/sleep", "/system/xbin/sort",
  89. "/system/xbin/split", "/system/xbin/stat", "/system/xbin/strings",
  90. "/system/xbin/stty", "/system/xbin/sum", "/system/xbin/swapoff",
  91. "/system/xbin/swapon", "/system/xbin/sync", "/system/xbin/sysctl",
  92. "/system/xbin/tac", "/system/xbin/tail", "/system/xbin/tar",
  93. "/system/xbin/taskset", "/system/xbin/tee", "/system/xbin/telnet",
  94. "/system/xbin/telnetd", "/system/xbin/test", "/system/xbin/tftp",
  95. "/system/xbin/tftpd", "/system/xbin/time", "/system/xbin/timeout",
  96. "/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
  97. "/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/ttysize",
  98. "/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
  99. "/system/xbin/uncompress", "/system/xbin/unexpand", "/system/xbin/uniq",
  100. "/system/xbin/unix2dos", "/system/xbin/unlzma", "/system/xbin/unlzop",
  101. "/system/xbin/unxz", "/system/xbin/unzip", "/system/xbin/uptime",
  102. "/system/xbin/usleep", "/system/xbin/uudecode", "/system/xbin/uuencode",
  103. "/system/xbin/vi", "/system/xbin/watch", "/system/xbin/wc",
  104. "/system/xbin/wget", "/system/xbin/which", "/system/xbin/whoami",
  105. "/system/xbin/xargs", "/system/xbin/xz", "/system/xbin/xzcat",
  106. "/system/xbin/yes",
  107. "/system/xbin/zcat");
  108. symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
  109. symlink("mksh", "/system/bin/sh");
  110. symlink("toolbox", "/system/bin/cat", "/system/bin/chcon",
  111. "/system/bin/chmod", "/system/bin/chown", "/system/bin/clear",
  112. "/system/bin/cmp", "/system/bin/cp", "/system/bin/date",
  113. "/system/bin/dd", "/system/bin/df", "/system/bin/dmesg",
  114. "/system/bin/du", "/system/bin/getenforce", "/system/bin/getevent",
  115. "/system/bin/getprop", "/system/bin/getsebool", "/system/bin/grep",
  116. "/system/bin/hd", "/system/bin/id", "/system/bin/ifconfig",
  117. "/system/bin/iftop", "/system/bin/insmod", "/system/bin/ioctl",
  118. "/system/bin/ionice", "/system/bin/kill", "/system/bin/ln",
  119. "/system/bin/load_policy", "/system/bin/log", "/system/bin/ls",
  120. "/system/bin/lsmod", "/system/bin/lsof", "/system/bin/md5",
  121. "/system/bin/mkdir", "/system/bin/mkswap", "/system/bin/mount",
  122. "/system/bin/mv", "/system/bin/nandread", "/system/bin/netstat",
  123. "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/printenv",
  124. "/system/bin/ps", "/system/bin/readlink", "/system/bin/renice",
  125. "/system/bin/restorecon", "/system/bin/rm", "/system/bin/rmdir",
  126. "/system/bin/rmmod", "/system/bin/route", "/system/bin/runcon",
  127. "/system/bin/schedtop", "/system/bin/sendevent",
  128. "/system/bin/setconsole", "/system/bin/setenforce",
  129. "/system/bin/setprop", "/system/bin/setsebool", "/system/bin/sleep",
  130. "/system/bin/smd", "/system/bin/start", "/system/bin/stop",
  131. "/system/bin/swapoff", "/system/bin/swapon", "/system/bin/sync",
  132. "/system/bin/top", "/system/bin/touch", "/system/bin/umount",
  133. "/system/bin/uptime", "/system/bin/vmstat", "/system/bin/watchprops",
  134. "/system/bin/wipe");
  135. set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  136. set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  137. set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
  138. set_metadata("/system/bin/bridgemgrd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bridge_exec:s0");
  139. set_metadata("/system/bin/btnvtool", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bluetooth_loader_exec:s0");
  140. set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
  141. set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
  142. set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
  143. set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
  144. set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
  145. set_metadata("/system/bin/hci_qcomm_init", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hci_attach_exec:s0");
  146. set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
  147. set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
  148. set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
  149. set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
  150. set_metadata("/system/bin/mksh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
  151. set_metadata("/system/bin/mm-qcamera-daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:camera_exec:s0");
  152. set_metadata("/system/bin/mpdecision", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mpdecision_exec:s0");
  153. set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
  154. set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  155. set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
  156. set_metadata("/system/bin/netmgrd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netmgrd_exec:s0");
  157. set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ping_exec:s0");
  158. set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
  159. set_metadata("/system/bin/qmuxd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:qmux_exec:s0");
  160. set_metadata("/system/bin/qseecomd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tee_exec:s0");
  161. set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
  162. set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
  163. set_metadata("/system/bin/rmt_storage", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rmt_exec:s0");
  164. set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0xc0, "selabel", "u:object_r:runas_exec:s0");
  165. set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
  166. set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
  167. set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
  168. set_metadata("/system/bin/thermald", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:thermald_exec:s0");
  169. set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
  170. set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
  171. set_metadata_recursive("/system/etc/dhcpcd", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
  172. set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
  173. set_metadata("/system/etc/init.qcom.bt.sh", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:bluetooth_loader_exec:s0");
  174. set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:ppp_system_file:s0");
  175. set_metadata("/system/vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  176. set_metadata_recursive("/system/vendor/etc", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  177. set_metadata("/system/vendor/etc/audio_effects.conf", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  178. set_metadata("/system/vendor/lib", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  179. set_metadata_recursive("/system/vendor/lib/drm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  180. set_metadata("/system/vendor/lib/drm/libdrmwvmplugin.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  181. set_metadata("/system/vendor/lib/egl", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  182. set_metadata_recursive("/system/vendor/lib/hw", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  183. set_metadata("/system/vendor/lib/hw/power.msm8226.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  184. set_metadata_recursive("/system/vendor/lib/mediadrm", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  185. set_metadata("/system/vendor/lib/mediadrm/libwvdrmengine.so", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  186. set_metadata("/system/vendor/lib/rfsa", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  187. set_metadata("/system/vendor/lib/rfsa/adsp", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  188. set_metadata("/system/vendor/lib/soundfx", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  189. set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  190. set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
  191. set_metadata("/system/xbin/tcpdump", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
  192. show_progress(0.200000, 0);
  193. show_progress(0.200000, 10);
  194. ui_print("Flashing Boot Image...");
  195. package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
  196. show_progress(0.100000, 0);
  197. unmount("/data");
  198. unmount("/system");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement