Perka

aroma-config

Feb 5th, 2012
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.37 KB | None | 0 0
  1. ##
  2. #
  3. # AROMA Installer - AROMA Configuration
  4. # (c) 2011 by Ahmad Amarullah
  5. # amarullz - xda-developers
  6. # http://www.amarullz.com/
  7. #
  8. # Version 1.0
  9. #
  10. # INFO:
  11. # If you want the installer working, please sign your
  12. # script in http://www.amarullz.com/
  13. #
  14. # <aroma-assets> = META-INF/com/google/android/aroma
  15. # <dp> = Device Pixelate. WVGA/QHD = 3, HVGA = 2.
  16. ##
  17.  
  18.  
  19. ##
  20. # Calibrate Touchscreen
  21. # defaut: HTC Desire Touch Screen Calibrate Data [7.75,50,7.75,50]
  22. #
  23. # For other device, run the installer, then press "menu"
  24. # and select Calibrating Tools. Follow Instructions, and make
  25. # sure the touch screen has been valid in the testing step.
  26. #
  27. # In the end, there will be alert dialog with calibration data
  28. # ( green ), replace this calibrate() function with that data.
  29. #
  30. #-------- Uncomment This to insert calibrating data:
  31. # calibrate("7.75","50","7.75","50");
  32.  
  33.  
  34. ##
  35. # Custom Key Code - Usefull For Some Device which not used
  36. # Standard key code for up/down/select/back/menu
  37. #
  38. # You can capture the keycode in
  39. # recovery using "aroma-keycapture-flashable.zip" Available in
  40. # AROMA Installer Thread.
  41. #
  42. # Press some key when it run, it will return key code,
  43. # that key can override up/down/select/back/menu actions in
  44. # AROMA Installer, you can even set your home key for up, or
  45. # volume down for select item
  46. #
  47. #-------- Uncomment & Modify this Code:
  48. #
  49. # ini_set("customkeycode_up", "115");
  50. # ini_set("customkeycode_down", "114");
  51. # ini_set("customkeycode_select", "116");
  52. ini_set("customkeycode_menu", "229");
  53. # ini_set("customkeycode_back", "158");
  54. #
  55.  
  56.  
  57. ##
  58. # Set UI Color
  59. # foo = Main Color ( If Gradient, it was Top Color )
  60. # foo_g = Main Color Gradient ( Bottom Color )
  61. #
  62. # winbg : Main/Top Most Window Backgroud
  63. # textbg : Textbox, Checkbox, and any scrollable UI Background
  64. # textfg : Textbox, Checkbox, and any scrollable UI Text Foreground
  65. # textfg_gray : Gray Text ( on Optionbox/Checkbox Item Description )
  66. # controlbg : Control / Button / Checkbox border - Background Color
  67. # controlfg : Button Text Color
  68. # selectbg : Selected Element Background ( Pushed/focused Button/items, etc )
  69. # selectfg : Selected Element Text/Foreground Color
  70. # titlebg : Window Title Background
  71. # titlefg : Window Title Text Foreground Color
  72. # navbg : Bottom Bar (Navigation Bar) Background. Next-Previous Area
  73. # border : Common Border Color
  74. #
  75. #--- If not sets, It will use default colors ( Sense Like )
  76. #
  77. # Supported 3 & 6 Char Hex Colors:
  78. # #fff or #ffffff
  79. # #469 or #46689a
  80. #
  81. #--- Uncomment to use custom color scheme: (Dark)
  82. # setcolor("winbg", "#444");
  83. # setcolor("winbg_g", "#222");
  84. # setcolor("textbg", "#333");
  85. # setcolor("textfg", "#fff");
  86. # setcolor("textfg_gray", "#bbb");
  87. # setcolor("controlbg", "#444");
  88. # setcolor("controlbg_g", "#222");
  89. # setcolor("controlfg", "#fff");
  90. # setcolor("selectbg", "#653");
  91. # setcolor("selectbg_g", "#542");
  92. # setcolor("selectfg", "#ffd");
  93. # setcolor("titlebg", "#333");
  94. # setcolor("titlebg_g", "#000");
  95. # setcolor("titlefg", "#fff");
  96. # setcolor("navbg", "#333");
  97. # setcolor("navbg_g", "#222");
  98. # setcolor("border", "#666");
  99. # setcolor("border_g", "#444");
  100.  
  101.  
  102. ##
  103. # Initializing Rom Information
  104. #
  105. ini_set("rom_name", "AROMA ROM");
  106. ini_set("rom_version", "1.0");
  107. ini_set("rom_author", "amarullz");
  108. ini_set("rom_device", "HTC Desire (bravo)");
  109.  
  110.  
  111. ##
  112. # Show Splash for 4 seconds ( 1000 = 1 sec )
  113. # "sample" will read <aroma-assets>/"sample".png
  114. #
  115. # Image Will auto arrange into center horizontal&vertical
  116. #
  117. splash(4000, "sample");
  118.  
  119. #
  120. # Show Calibrating Tools Directly before anything
  121. #
  122. #--- Remove this calibtool if you already know the calibrate data
  123. calibtool("");
  124.  
  125. ##
  126. # View Box UI.
  127. #
  128. # Arguments:
  129. # 1. Title Text ( max: 31 chars )
  130. # 2. Text To Show In Window ( max: 1023 chars )
  131. # 3. PNG Icons, relative to <aroma-assets> ( max width & height: 70 * <dp> )
  132. #
  133. viewbox(
  134. # Arg 1
  135. "Welcome",
  136.  
  137. # Arg 2
  138. "You are about to Installing AROMA ROM for HTC Desire GSM (bravo).\n\n"+
  139. "AROMA ROM for HTC Desire GSM, Bring your old Desire Hardware "+
  140. "Into Stunning Android 5.0 Jelly with AROMA UI, yet "+
  141. "Powerfull, Stable and Fastest ROM for HTC Desire.\n\n\n"+
  142. " VERSION : <#080>1.0</#> Insane Edition\n"+
  143. " UPDATED : <#080>Dec, 30 2011</#>\n\n\n"+
  144. "Press Next to Continue the Installation...",
  145.  
  146. # Arg 3
  147. "icons/info"
  148. );
  149.  
  150.  
  151. ##
  152. # Agreement Box UI.
  153. #
  154. # Arguments:
  155. # 1. Title Text ( max: 31 chars )
  156. # 2. Info Text To Show below title ( max: 1023 chars )
  157. # 3. PNG Icons, relative to <aroma-assets> ( max width & height: 70 * <dp> )
  158. # 4. Text. ( can readed from file, with "readfile_aroma" )
  159. # 5. Agreement Text in checkbox
  160. # 6. Alert Text when user not checked the checkbox
  161. #
  162. agreebox(
  163. # Arg 1
  164. "Terms Of Use",
  165.  
  166. # Arg 2
  167. "Please read carefully The AROMA ROM Terms of Use Below...",
  168.  
  169. # Arg 3
  170. "icons/agreement",
  171.  
  172. # Arg 4
  173. ## Read From File: Will read <aroma-assets>/sample.txt
  174. readfile_aroma("sample.txt"),
  175.  
  176. # 5
  177. "I Agree with this Terms Of Use...",
  178.  
  179. # 6
  180. "Please check the agreement..."
  181. );
  182.  
  183.  
  184. ##
  185. # Text Box UI. - Same with Agreement, but without checkbox and alert.
  186. #
  187. # Arguments:
  188. # 1. Title Text ( max: 31 chars )
  189. # 2. Info Text To Show below title ( max: 1023 chars )
  190. # 3. PNG Icons, relative to <aroma-assets> ( max width & height: 70 * <dp> )
  191. # 4. Text. ( can readed from file, with "readfile_aroma" )
  192. #
  193. textbox(
  194. # Arg 1
  195. "Changelogs",
  196.  
  197. # Arg 2
  198. "AROMA ROM Changelogs",
  199.  
  200. # Arg 3
  201. "icons/info",
  202.  
  203. # Arg 4
  204. readfile_aroma("sample.txt")
  205. );
  206.  
  207.  
  208. ##
  209. #
  210. # Show please wait Interface.
  211. #
  212. pleasewait("Creating Test Temp File...");
  213.  
  214.  
  215. ##
  216. #
  217. # Create Temp text file. fill be store at
  218. # /tmp/aroma-data/"test.txt"
  219. #
  220. writetmpfile("test.txt","This is test txt...");
  221.  
  222.  
  223. ##
  224. #
  225. # Show Alert Dialog...
  226. #
  227. # Arguments:
  228. # 1. Title Text ( max: 31 chars )
  229. # 2. Info Text To Show below title ( max: 512 chars )
  230. # 3. PNG Icons, relative to <aroma-assets> ( max width & height: 70 * <dp> )
  231. # 4. OK Button Text. if not defined, it will use "OK"
  232. #
  233. alert(
  234. # Arg 1
  235. "Temp File Has Been Created",
  236.  
  237. # Arg 2
  238. "Test with: \n"+
  239. " > adb shell\n"+
  240. " # cd /tmp/aroma-data\n"+
  241. " # cat test.txt\n\n"+
  242. "Thanks...",
  243.  
  244. # Arg 3
  245. "icons/info",
  246.  
  247. # Arg 4
  248. "Yahoo..."
  249. );
  250.  
  251.  
  252.  
  253. pleasewait("Test Variable & Calculation...");
  254. ##
  255. #
  256. # Test Variable and Math Calculation
  257. #
  258. setvar("foo","Initial Value");
  259. appendvar("foo"," Append After");
  260. prependvar("foo","Prepend Before ");
  261.  
  262. #
  263. # result: "Prepend Before Initial Value Append After"
  264. #
  265. setvar("calculating",
  266. # 40 * (5+10)
  267. cal("40","*",cal("5","+","10"))
  268. );
  269.  
  270.  
  271. pleasewait("Get Partitions Size...");
  272. #
  273. # getdisksize( path to mount point, unit size - m=MB, k=KB, b=byte )
  274. #
  275. setvar("systemsize",getdisksize("/system","k"));
  276. setvar("sdextsize", getdisksize("/sd-ext","m"));
  277.  
  278.  
  279. #
  280. # Show Data In Alert
  281. #
  282. alert(
  283. # Arg 1
  284. "Test Variables & Calc",
  285.  
  286. # Arg 2
  287. "foo: \n"+
  288. getvar("foo")+"\n"+
  289.  
  290. "calculating: \n"+
  291. getvar("calculating")+"\n\n"+
  292.  
  293. "/system: "+
  294. getvar("systemsize")+"KB\n"+
  295.  
  296. "/sd-ext: \n"+
  297. getvar("sdextsize")+"MB\n"+
  298.  
  299. # Arg 3
  300. "icons/alert",
  301.  
  302. # Arg 4
  303. "Yeah"
  304. );
  305.  
  306. ##
  307. # Show Menubox
  308. #
  309. menubox(
  310. # Title
  311. "Install Type",
  312.  
  313. # Sub Title
  314. "Lorem Ipsum Dolore",
  315.  
  316. # Icon
  317. "icons/install",
  318.  
  319. # Will be saved in /tmp/aroma-data/type.prop
  320. "type.prop",
  321.  
  322. # Items ( per 3 arguments ): Title, Subtitle/description, Icon
  323. # Item 1
  324. "Typical", "Install default recommended packages into your phone.", "icons/install",
  325.  
  326. # Item 2
  327. "Customize", "Install only selected packages into your phone.", "icons/apps"
  328. );
  329.  
  330. ##
  331. # Select Box
  332. #
  333. selectbox(
  334. # Title
  335. "Select Main Mods",
  336.  
  337. # Sub Title
  338. "Please Select ROM Mods Below:",
  339.  
  340. # Icon
  341. "icons/apps",
  342.  
  343. # Will be saved in /tmp/aroma-data/mods.prop
  344. "mods.prop",
  345.  
  346. # Items ( per 3 arguments ): Title, Subtitle/description, Item Type
  347. # Item Type:
  348. # 0 = Unchecked by default
  349. # 1 = Checked by default
  350. # 2 = Item Group Title ( the subtitle won't be used )
  351. #
  352. # Group 1
  353. "SD-EXT Mods","",2,
  354.  
  355. # Item 1.1
  356. "Generic APP2SD",
  357. "Default Mods with APKs in sd-ext, and Data in Internal Storage", 1,
  358.  
  359. # Item 1.2
  360. "AD2SDX by amarullz",
  361. "Enhanced Mods with All non-system files in sd-ext",0,
  362.  
  363. # Group 2
  364. "Boot Animation","",2,
  365. # Item 2.1
  366. "Galaxy Nexus",
  367. "Boot Animation from Galaxy Nexus ROM.", 1,
  368.  
  369. # Item 2.2
  370. "Generic HTC",
  371. "Generic White HTC Quietly Briliant Boot Animation.",0
  372. );
  373.  
  374. ##
  375. # Check Box
  376. #
  377. checkbox(
  378. # Title
  379. "Select Main Mods",
  380.  
  381. # Sub Title
  382. "Please Select Apps To Install:",
  383.  
  384. # Icon
  385. "icons/personalize",
  386.  
  387. # Will be saved in /tmp/aroma-data/mods.prop
  388. "mods.prop",
  389.  
  390. # Items ( per 3 arguments ): Title, Subtitle/description, Item Type
  391. # Item Type:
  392. # 0 = Unchecked by default
  393. # 1 = Checked by default
  394. # 2 = Item Group Title ( the subtitle won't be used )
  395. #
  396. # Group 1
  397. "SD-EXT Mods","",2,
  398.  
  399. # Item 1.1
  400. "Generic APP2SD",
  401. "Default Mods with APKs in sd-ext, and Data in Internal Storage", 1,
  402.  
  403. # Item 1.2
  404. "AD2SDX by amarullz",
  405. "Enhanced Mods with All non-system files in sd-ext",1,
  406.  
  407. # Group 2
  408. "Boot Animation","",2,
  409. # Item 2.1
  410. "Galaxy Nexus",
  411. "Boot Animation from Galaxy Nexus ROM.", 1,
  412.  
  413. # Item 2.2
  414. "Generic HTC",
  415. "Generic White HTC Quietly Briliant Boot Animation.",1
  416. );
  417.  
  418. #
  419. # WONT DO ANYTHING IN TEST BUILD
  420. #
  421. install(
  422. "Installing",
  423. "Installing AROMA INSTALLER...\nPlease Wait Until it Finished...",
  424. "icons/install"
  425. );
  426.  
  427. # Set Next Text fo Finish
  428. ini_set("text_next", "Finish");
  429.  
  430. viewbox(
  431. "Installation Completed",
  432. "<#080>Congratulation...</#>\n\n"+
  433. "AROMA ROM Already Installed Into Your Phone\n"+
  434. "Press Finish, and Reboot your phone.\n\nThanks",
  435. "icons/info"
  436. );
Advertisement
Add Comment
Please, Sign In to add comment