Guest User

Untitled

a guest
Aug 7th, 2012
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.94 KB | None | 0 0
  1. ui_print("");
  2. ui_print("");
  3. ui_print("");
  4. ui_print(" _____ ___ ____ _____ __ __ _____");
  5. ui_print(" | ___| \|____| ___| | |__| |");
  6. ui_print(" |___ | |____|___ | | | | | |");
  7. ui_print(" |_____|___/|____|_____|__|_____|__|__|");
  8. ui_print("");
  9. ui_print("");
  10. ui_print("");
  11. show_progress(0.01, 0);
  12. ui_print("-- Checking phone ID");
  13. assert(getprop("ro.product.device") == "d2vzw" || getprop("ro.build.product") == "d2vzw" || getprop("ro.product.board") == "d2vzw");
  14. ui_print("-- Phone ID: Verizon Samsung Galaxy S3");
  15. ui_print("-- Preparing SDesign for installation");
  16. ui_print("");
  17.  
  18. # Full Wipe
  19. if
  20. file_getprop("/tmp/aroma-data/wipe.prop","selected.0") == "2"
  21. then
  22.  
  23. ui_print("");
  24. ui_print(".:: Executing Full Wipe");
  25.  
  26. set_progress(0.01);
  27. ui_print("@ Formatting /system");
  28. format("ext4", "EMMC", "/dev/block/mmcblk0p14");
  29.  
  30. set_progress(0.03);
  31. ui_print("@ Formatting /cache");
  32. run_program("/sbin/erase_image", "system");
  33. format("ext4", "EMMC", "/dev/block/mmcblk0p17");
  34.  
  35. set_progress(0.05);
  36. ui_print("@ Formatting /data");
  37. format("ext4", "EMMC", "/dev/block/mmcblk0p15");
  38.  
  39. ui_print(".:: Wipe Complete!");
  40. mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/data");
  41. mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
  42. package_extract_dir("system", "/system");
  43.  
  44. # Running user choice settings.
  45. ui_print(" ");
  46. ui_print(".:: Installing custom packages");
  47. # Custom options
  48.  
  49. # Color
  50. if
  51. file_getprop("/tmp/aroma-data/customize.prop","item.1.1") == "1"
  52. then
  53. ui_print("-- Installing Color");
  54. package_extract_dir("extras/apps/color", "/system/app");
  55. endif;
  56.  
  57. # All Share Play
  58. if
  59. file_getprop("/tmp/aroma-data/customize.prop","item.1.2") == "1"
  60. then
  61. ui_print("-- Installing All Share Play");
  62. package_extract_dir("extras/apps/asp", "/system/app");
  63. endif;
  64.  
  65. # Kies Air
  66. if
  67. file_getprop("/tmp/aroma-data/customize.prop","item.1.3") == "1"
  68. then
  69. ui_print("-- Installing Kies Air");
  70. package_extract_dir("extras/apps/ka", "/system/app");
  71. endif;
  72.  
  73. # Facebook
  74. if
  75. file_getprop("/tmp/aroma-data/customize.prop","item.1.4") == "1"
  76. then
  77. ui_print("-- Installing Facebook");
  78. package_extract_dir("extras/apps/fb", "/system/app");
  79. endif;
  80.  
  81. # Gmail
  82. if
  83. file_getprop("/tmp/aroma-data/customize.prop","item.1.5") == "1"
  84. then
  85. ui_print("-- Installing Gmail");
  86. package_extract_dir("extras/apps/gmail", "/system/app");
  87. endif;
  88.  
  89. # Twitter
  90. if
  91. file_getprop("/tmp/aroma-data/customize.prop","item.1.6") == "1"
  92. then
  93. ui_print("-- Installing Twitter");
  94. package_extract_dir("extras/apps/twitter", "/system/app");
  95. endif;
  96.  
  97. # Amazon Kindle
  98. if
  99. file_getprop("/tmp/aroma-data/customize.prop","item.1.7") == "1"
  100. then
  101. ui_print("-- Installing Amazon Kindle");
  102. package_extract_dir("extras/apps/ak", "/system/app");
  103. endif;
  104.  
  105. # ICS Messaging
  106. if
  107. file_getprop("/tmp/aroma-data/customize.prop","item.1.8") == "1"
  108. then
  109. ui_print("-- Installing ICS Messaging");
  110. package_extract_dir("extras/apps/mms", "/system/app");
  111. endif;
  112.  
  113. # VPN Client
  114. if
  115. file_getprop("/tmp/aroma-data/custom.prop","item.1.9") == "1"
  116. then
  117. ui_print("-- Installing VPN Client");
  118. package_extract_dir("extras/apps/vpn", "/system/app");
  119. endif;
  120.  
  121. # Verizon Navigator
  122. if
  123. file_getprop("/tmp/aroma-data/customize.prop","item.1.10") == "1"
  124. then
  125. ui_print("-- Installing Verizon Navigator");
  126. package_extract_dir("extras/apps/vzn", "/system/app");
  127. endif;
  128.  
  129. # Verizon Apps
  130. if
  131. file_getprop("/tmp/aroma-data/customize.prop","item.1.11") == "1"
  132. then
  133. ui_print("-- Installing Verizon Apps");
  134. package_extract_dir("extras/apps/vza", "/system/app");
  135. endif;
  136.  
  137. # My Verizon
  138. if
  139. file_getprop("/tmp/aroma-data/customize.prop","item.1.12") == "1"
  140. then
  141. ui_print("-- Installing My Verizon");
  142. package_extract_dir("extras/apps/mvz", "/system/app");
  143. endif
  144.  
  145. # Apex Launcher
  146. if file_getprop("/tmp/aroma/launcher.prop","selected.1") == "1"
  147. then
  148. ui_print("-- Installing Apex Launcher");
  149. package_extract_dir("extras/launchers/apex", "/system/app");
  150. endif;
  151.  
  152. # TouchWiz Launcher
  153. if file_getprop("/tmp/aroma/launcher.prop","selected.1") == "2"
  154. then
  155. ui_print("-- Installing TouchWiz Launcher");
  156. package_extract_dir("extras/launchers/tw56", "/system/app");
  157. endif;
  158.  
  159. # Tw Original S3 Launcher
  160. if file_getprop("/tmp/aroma/launcher.prop","selected.1") == "3"
  161. then
  162. ui_print("-- Installing TouchWiz Launcher");
  163. package_extract_dir("extras/launchers/tw", "/system/app");
  164. endif;
  165.  
  166. # Tw S3 Launcher Enable Wallpaper Scroll
  167. if file_getprop("/tmp/aroma/launcher.prop","selected.1") == "4"
  168. then
  169. ui_print("-- Installing TouchWiz Launcher");
  170. package_extract_dir("extras/launchers/twscroll", "/system/app");
  171. endif;
  172.  
  173. # Nova Launcher
  174. if file_getprop("/tmp/aroma/launcher.prop","selected.1") == "5"
  175. then
  176. ui_print("-- Installing Nova Launcher");
  177. package_extract_dir("extras/launchers/nova", "/system/app");
  178. endif;
  179.  
  180. # Trebuchet Launcher
  181. if file_getprop("/tmp/aroma/launcher.prop","selected.1") == "6"
  182. then
  183. ui_print("-- Installing Trebuchet Launcher");
  184. package_extract_dir("extras/launchers/trebuchet", "/system/app");
  185. endif;
  186.  
  187. # HomeButtonHack
  188. if file_getprop("/tmp/aroma/mods.prop","selected.1") == "1"
  189. then
  190. ui_print("-- Implementing Home Button Hack");
  191. package_extract_dir("extras/fwm/lagfix/y", "/system/framework");
  192. endif;
  193.  
  194. # No HomebuttonHack
  195. if file_getprop("/tmp/aroma/mods.prop","selected.1") == "2"
  196. then
  197. package_extract_dir("extras/fwm/lagfix/n", "/system/framework");
  198. endif;
  199.  
  200. # Mute Camera
  201. if file_getprop("/tmp/aroma/mods.prop","selected.2") == "2"
  202. then
  203. ui_print("-- Removing Camera Sound");
  204. package_extract_file("extras/fwm/camsound/off/Volume.db", "/system/etc/Volume.db");
  205. endif;
  206.  
  207. # Dont Mute Cam
  208. if file_getprop("/tmp/aroma/mods.prop","selected.2") == "1"
  209. then
  210. package_extract_file("extras/fwm/camsound/on/Volume.db", "/system/etc/Volume.db");
  211. endif;
  212.  
  213. # AM PM On
  214. if file_getprop("/tmp/aroma/mods.prop","selected.3") == "1"
  215. then
  216. ui_print("-- Installing AM/PM");
  217. package_extract_file("extras/fwm/ampm/y/SystemUI.apk", "/system/app/SystemUI.apk");
  218. endif;
  219.  
  220. # AM PM Off
  221. if file_getprop("/tmp/aroma/mods.prop","selected.3") == "2"
  222. then
  223. package_extract_file("extras/fwm/ampm/n/SystemUI.apk", "/system/app/SystemUI.apk");
  224. endif;
  225.  
  226. # Input Notification On
  227. if file_getprop("/tmp/aroma/mods.prop","selected.4") == "1"
  228. then
  229. package_extract_dir("extras/fwm/input/y", "/system/framework");
  230. endif;
  231.  
  232. # Input Notification Off
  233. if file_getprop("/tmp/aroma/mods.prop","selected.4") == "2"
  234. then
  235. ui_print("@ Removing Input Notification");
  236. delete("/system/framework/services.jar");
  237. package_extract_dir("extras/fwm/input/n", "/system/framework");
  238. endif;
  239.  
  240. #Sony Bravia Engine
  241. if
  242. file_getprop("/tmp/aroma-data/image.prop","selected.1") == "1"
  243. then
  244. ui_print("-- Adding Sony Bravia Engine");
  245. package_extract_dir("extras/bravia", "/system");
  246. set_perm(0, 0, 0755, "/system/etc/be_photo");
  247. set_perm(0, 0, 0755, "/system/etc/be_movie");
  248. endif;
  249.  
  250. #Sony XLoud Engine
  251. if
  252. file_getprop("/tmp/aroma-data/audio.prop","selected.1") == "1"
  253. then
  254. ui_print("-- Adding Sony XLoud Engine");
  255. package_extract_dir("extras/xloud", "/system");
  256. endif;
  257.  
  258. set_progress(0.20);
  259.  
  260. #GPS Configuration for your location
  261. ui_print("");
  262. ui_print(".:: Installing custom GPS configuration");
  263. set_progress(0.30);
  264. if
  265. file_getprop("/tmp/aroma-data/gpsconf.prop","item.0.1") == "1"
  266. then
  267. ui_print("-> Asia specific GPS configuration");
  268. package_extract_dir("extras/gps/asi", "/system");
  269. endif;
  270. if
  271. file_getprop("/tmp/aroma-data/gpsconf.prop","item.0.2") == "1"
  272. then
  273. ui_print("-> Australia specific GPS configuration");
  274. package_extract_dir("extras/gps/aus", "/system");
  275. endif;
  276. if
  277. file_getprop("/tmp/aroma-data/gpsconf.prop","item.0.3") == "1"
  278. then
  279. ui_print("-> Europe specific GPS configuration");
  280. package_extract_dir("extras/gps/eur", "/system");
  281. endif;
  282. if
  283. file_getprop("/tmp/aroma-data/gpsconf.prop","item.0.4") == "1"
  284. then
  285. ui_print("-> North America specific GPS configuration");
  286. package_extract_dir("extras/gps/nam", "/system");
  287. endif;
  288. if
  289. file_getprop("/tmp/aroma-data/gpsconf.prop","item.0.5") == "1"
  290. then
  291. ui_print("-> South America specific GPS configuration");
  292. package_extract_dir("extras/gps/sam", "/system");
  293. endif;
  294. if
  295. file_getprop("/tmp/aroma-data/gpsconf.prop","item.0.6") == "1"
  296. then
  297. ui_print("-> Oceania specific GPS configuration");
  298. package_extract_dir("extras/gps/oce", "/system");
  299. endif;
  300. if
  301. file_getprop("/tmp/aroma-data/gpsconf.prop","item.0.7") == "1"
  302. then
  303. ui_print("-> Aouth Africa specific GPS configuration");
  304. package_extract_dir("extras/gps/saf", "/system");
  305. endif;
  306.  
  307. ui_print("");
  308. ui_print(".:: Symlinking");
  309. symlink("dumpstate", "/system/bin/dumpcrash");
  310. symlink("toolbox", "/system/bin/cat");
  311. symlink("toolbox", "/system/bin/chmod");
  312. symlink("toolbox", "/system/bin/chown");
  313. symlink("toolbox", "/system/bin/cmp");
  314. symlink("debuggerd", "/system/bin/csview");
  315. symlink("toolbox", "/system/bin/date");
  316. symlink("toolbox", "/system/bin/dd");
  317. symlink("toolbox", "/system/bin/df");
  318. symlink("toolbox", "/system/bin/dmesg");
  319. symlink("toolbox", "/system/bin/getevent");
  320. symlink("toolbox", "/system/bin/getprop");
  321. symlink("toolbox", "/system/bin/hd");
  322. symlink("toolbox", "/system/bin/id");
  323. symlink("toolbox", "/system/bin/ifconfig");
  324. symlink("toolbox", "/system/bin/iftop");
  325. symlink("toolbox", "/system/bin/insmod");
  326. symlink("toolbox", "/system/bin/ioctl");
  327. symlink("toolbox", "/system/bin/ionice");
  328. symlink("toolbox", "/system/bin/kill");
  329. symlink("toolbox", "/system/bin/ln");
  330. symlink("toolbox", "/system/bin/log");
  331. symlink("toolbox", "/system/bin/ls");
  332. symlink("toolbox", "/system/bin/lsmod");
  333. symlink("toolbox", "/system/bin/lsof");
  334. symlink("toolbox", "/system/bin/mkdir");
  335. symlink("toolbox", "/system/bin/mount");
  336. symlink("toolbox", "/system/bin/mv");
  337. symlink("toolbox", "/system/bin/nandread");
  338. symlink("toolbox", "/system/bin/netstat");
  339. symlink("toolbox", "/system/bin/newfs_msdos");
  340. symlink("toolbox", "/system/bin/notify");
  341. symlink("toolbox", "/system/bin/printenv");
  342. symlink("toolbox", "/system/bin/ps");
  343. symlink("toolbox", "/system/bin/reboot");
  344. symlink("toolbox", "/system/bin/renice");
  345. symlink("toolbox", "/system/bin/rm");
  346. symlink("toolbox", "/system/bin/rmdir");
  347. symlink("toolbox", "/system/bin/rmmod");
  348. symlink("toolbox", "/system/bin/route");
  349. symlink("toolbox", "/system/bin/schedtop");
  350. symlink("toolbox", "/system/bin/sendevent");
  351. symlink("toolbox", "/system/bin/setconsole");
  352. symlink("toolbox", "/system/bin/setprop");
  353. symlink("mksh", "/system/bin/sh");
  354. symlink("toolbox", "/system/bin/sleep");
  355. symlink("toolbox", "/system/bin/smd");
  356. symlink("toolbox", "/system/bin/start");
  357. symlink("toolbox", "/system/bin/stop");
  358. symlink("toolbox", "/system/bin/sync");
  359. symlink("toolbox", "/system/bin/top");
  360. symlink("toolbox", "/system/bin/touch");
  361. symlink("toolbox", "/system/bin/umount");
  362. symlink("toolbox", "/system/bin/uptime");
  363. symlink("toolbox", "/system/bin/vmstat");
  364. symlink("toolbox", "/system/bin/watchprops");
  365. symlink("toolbox", "/system/bin/wipe");
  366.  
  367. ui_print("");
  368. ui_print(".:: Setting Permissions");
  369. set_perm_recursive(0, 0, 0755, 0644, "/system");
  370. set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
  371. set_perm(0, 3003, 06755, "/system/bin/ip");
  372. set_perm(0, 3003, 02750, "/system/bin/netcfg");
  373. set_perm(0, 3004, 02755, "/system/bin/ping");
  374. set_perm(0, 2000, 06750, "/system/bin/run-as");
  375. set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
  376. set_perm(0, 0, 0755, "/system/etc/bluetooth");
  377. set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
  378. set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
  379. set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
  380. set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
  381. set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
  382. set_perm(0, 0, 0755, "/system/etc/init.d");
  383. set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
  384. set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
  385. set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
  386. set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
  387. set_perm(0, 2000, 0755, "/system/vendor/firmware");
  388. set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
  389. set_perm(0, 0, 06755, "/system/xbin/su");
  390. set_perm(0, 1000, 0755, "/system/bin/busybox");
  391. symlink("/system/bin/busybox", "/system/xbin/busybox");
  392. package_extract_file("installbusybox", "/tmp/installbusybox");
  393. set_perm(0, 0, 0777, "/tmp/installbusybox");
  394. run_program("/tmp/installbusybox");
  395. set_perm(0, 0, 0755, "/system/etc/be_movie");
  396. set_perm(0, 0, 0755, "/system/etc/be_photo");
  397. show_progress(0.1, 10);
  398. unmount("/data");
  399. unmount("/system");
  400. ui_print("Done");
Advertisement
Add Comment
Please, Sign In to add comment