• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[TUTORIAL] Comprehensive Guide for AROMA Installer For Beginners!! | 27/08/13

Was this guide helpful?


  • Total voters
    231
Search This thread

Ayush Singh

Senior Member
Nov 1, 2012
332
1,602
India
www.ayushsingh.net



Comprehensive Guide for Beginners to Create AROMA Installer Packages



Hello Friends, We all are aware about the most powerful Android recovery based installer..
Aroma Installer has simplified our ROMs, made them highly customisable n interactive too
This guide will help you to learn to create beautiful, interactive n customisable AROMA Installer Packages for your ROM n Mods




PRE-REQUISITES
  • A PC for making scripts
  • A ROM/Mod for which you want to make AROMA Installer
  • NotePad++ software for editing Installer files
  • A phone with CWM/TWRP recovery for Testing your AROMA Installer zip
  • 7z or WinRAR or any other compressing tool for making zip
  • A creative mind n some basic knowledge of using a computer


So Lets Start your journey now!


1.) SETTING UP


Download this zip

n extract it in the folder where your ROM or Mod is present

So that it will look like this--
1236460_548527435202666_1889608749_n.jpg

2.) BASIC EDITING

Now lets start, Go to this directory- META-INF\com\google\android\

We are interested in editing "aroma-config" n "updater-script" only

First of all open aroma-config in NotePad++

You will be able to see a window like this--
1236283_548527511869325_1887634418_n.jpg


A. SETTING UP SCREEN RESOLUTION

Now the very first thing we are going to do is to declare our screen resolution for the AROMA Installer

Remove the "# " from the front of the line according to your screen resolution

For Example my device is 320x480, so this is for me--
Code:
# ini_set("dp","1"); #-- LDPI ( 240x320 / QVGA )
ini_set("dp","2"); #-- MDPI ( 320x480 / HVGA )
# ini_set("dp","3"); #-- HDPI ( 480x800 / WVGA )
# ini_set("dp","4"); #-- XHDPI ( 1280x720 / WVGA )
# ini_set("dp","5"); #-- XXHDPI ( 1920x1080 / WVGA )

Optional- You may remove the other unused strings from the above code

-> NOW YOU HAVE SUCCESSFULLY DECLARED YOUR SCREEN RESOLUTION, WHICH CAN BE INTERPRETED BY THE INSTALLER!

B. SETTING UP BASIC DETAILS

The next thing we are going to declare is our ROM/Mod name, date, device name and version

You will be able to find this code inside your aroma-config

Code:
ini_set("rom_name",             "YOUR ROM NAME HERE™ ");
ini_set("rom_version",          "YOUR VERSION");
ini_set("rom_author",           "YOUR NAME");
ini_set("rom_device",           "YOUR DEVICE NAME");
ini_set("rom_date",             "25/8/2013 - DATE OF YOUR MOD");

Edit it according to your ROM/Mod detail, Fill the respective details inside the above " ");

-> NOW YOU HAVE SUCCESSFULLY DECLARED YOUR ROM/MOD NAME N OTHER RELEVANT DETAILS

C. SHOWING A DISPLAY IMAGE

Now to make our Installer beautiful we will add a png image which will be displayed when a user will start the installer

You will be able to find this code inside your aroma-config

Code:
# Show Simple Splash
#

splash(
  #-- Duration 5000ms / 5 seconds
    5000,
  
  #-- <AROMA Resource Dir>/SPLASH.png
    "SPLASH"
);

This will display SPLASH.png for 5 seconds, you can edit the no of seconds the image should be displayed
Edit 5000 to the no the seconds you want


For 1 Second- 1000
2 Seconds- 2000
n so on


The image to be displayed is located in the folder- META-INF\com\google\android\aroma
Here you can find the SPLASH.png , replace it with yours, remember that it should be of the same resolution as that of your device
also it must be of .png format only

-> NOW YOU HAVE SUCCESSFULLY ADDED A DISPLAY IMAGE FOR YOUR AROMA INSTALLER MOD


D. SHOWING ANIMATION AS AFTER DISPLAY IMAGE (Optional)

You can also add an animation to your AROMA Installer package

You will be able to find this code inside your aroma-config

Code:
##
# Show Animated Splash
#
anisplash(
#  #-- Number of Loop
    4,
  
  #-- Frame  [ Image, duration in millisecond ]
    "anim/a1", 30,
    "anim/a2", 30,
    "anim/a3", 30,
    "anim/a4", 30,
    "anim/a5", 30,
    "anim/a6", 30
);

Here png a1 to a6 will be displayed for 30 millisecond each for 4 times (number of loop is 4)

You can also edit Number of Loop to any desired number
Here it is 4, edit as per your desire

The images which will be displayed are in META-INF\com\google\android\aroma\anim folder
Replace the pngs with your pngs

NOTE: If you dont want animated splash, delete the above code from your aroma-config

-> NOW YOU HAVE SUCCESSFULLY CREATED THE ANIMATION TO BE DISPLAYED BEFORE INSTALLER STARTS


E. FONT SELECTION CODE (No need to edit)

This CODE is for language selection dialogue in the installer

Code:
##
# Font Selection
#

endif;

This will look like below in AROMA Installer
1238237_548526578536085_1193718404_n.jpg


F. WINDOW FOR SELECTING THE INSTALLER THEME

Now we will create a window to Select theme to be used while installation of the ROM/Mod

Scroll n find this code in aroma-config

Code:
##
#   SELECT THEME
#

selectbox(
  #-- Title
    "<~themes.title>",
  
  #-- Sub Title
    "<~themes.desc>",
  
  #-- Icon:
    "@personalize",
  
  #-- Will be saved in /tmp/aroma/theme.prop
    "theme.prop",
  
    "Generic",            "Unthemed AROMA Installer",                                    0,      #-- selected.0 = 1
    "MIUI Theme",         "MIUI Theme by mickey-r & amarullz",                           0,      #-- selected.0 = 2
    "NXT Theme",          "NXT Theme by Pranav Pandey",                                  0,      #-- selected.0 = 3
    "NextGen Theme",      "NextGen Theme by amarullz edit by Ayush",                     0,      #-- selected.0 = 4
    "Sense Theme",        "HTC Sense Theme by amarullz",                                 0,      #-- selected.0 = 5
    "Honami Theme",       "Xperia i1 Theme by Ayush",                                    1       #-- selected.0 = 6

);

The type of window used is of selectbox attribute, Which means that only one out of the above Themes can be selected at a time

Here theme.prop is the temporary file in which user selection will be stored

Here Honami Theme has initial value 1 which means that It is selected by default,
(1 stands for Selected n 0 stands for Unselected)

NOTE: The last string has no comma "," after its initial value, Its not a typo

The above themes are already included in the package, you can find the stored themes in the directory- META-INF\com\google\android\aroma\themes
and also edit them as per your desire, edit them only if you have knowledge of .png n .9.png editing
otherwise included themes are perfect according to me

Now scroll n find this CODE in aroma-config

Code:
##
# SET THEME
#

if prop("theme.prop","selected.0")=="2" then
  theme("miui");
endif;

if prop("theme.prop","selected.0")=="3" then
  theme("xNXT");
endif;

if prop("theme.prop","selected.0")=="4" then
  theme("NextGen");
endif;

if prop("theme.prop","selected.0")=="5" then
  theme("sense");
endif;

if prop("theme.prop","selected.0")=="6" then
  theme("i1");
endif;

No need to edit this, it is already perfect, it declares the Theme selection

This is how it looks like in AROMA Installer
968811_548526588536084_580677883_n.jpg


-> NOW YOU HAVE SUCCESSFULLY CREATED A WINDOW TO SHOW AVAILABLE THEME SELECTIONS


G. SHOW BASIC INFORMATION

Now we will create a window to display the ROM/Mod information before installation

Scroll n find this code-

Code:
##
#   SHOW ROM/Mod INFORMATION
#

viewbox(
  #-- Title
    "<~welcome.title>",
  
  #-- Text
    "<~welcome.text1> <b>"+
	  #-- Get Config Value
	  ini_get("rom_name")+
	"</b> <~common.for> <b>"+ini_get("rom_device")+"</b>.\n\n"+
    
    "<~welcome.text2>\n\n"+
	
      "  <~welcome.version>\t: <b><#selectbg_g>"+ini_get("rom_version")+"</#></b>\n"+
      "  <~welcome.codename>\t\t: <b><#selectbg_g> </#></b>\n"+
	  "  <~welcome.updated>\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+

    "<~welcome.next>",
  
  #-- Icon
    "@welcome"
);

No need to edit this code, It is already perfect

Here the window is of viewbox attribute, we have just the back and next button in the window

This is how it will look in the installer
558560_548526988536044_904807097_n.jpg


-> NOW YOU HAVE SUCCESSFULLY CREATED A WINDOW TO DISPLAY ROM/MOD INFORMATION IN THE INSTALLER


H. LICENSE WINDOW (Optional)

Now we will create a window for displaying License/Terms n Conditions of using the ROM/Mod

Scroll n find this Code-

Code:
##
# LICENSE
#

agreebox(
  #-- Title
    "YOUR ROM/Mod NAME™ T&C",
  
  #-- Subtitle / Description
    "Read Carefully",
  
  #-- Icon:
    "@license",
  
  #-- Text Content 
    resread("license.txt"),
  
  #-- Checkbox Text
    "Do you agree??",
  
  #-- Unchecked Alert Message
    "You've to agree!!"
);

Edit the title "YOUR ROM/Mod NAME™ T&C", to your ROM/Mod name

The license which is displayed is stored in directory- META-INF\com\google\android\aroma
You can edit the license.txt as per your ROM/Mod needs

If you don't want the license window delete the above code

This is how it will look in the installer
1237075_548526931869383_503265807_n.jpg


-> NOW YOU HAVE SUCCESSFULLY CREATED A WINDOW WHICH WILL DISPLAY LICENSE

I. CREATING MAIN MENU

Now we will create a window for menu of options available in our ROM/Mod

Scroll and find this code-

Code:
##
# MAIN MENU- INSTALLER n MISC
#
menubox(
  #-- Title
    "ROM/MOD NAME™ Menu",
  
  #-- Sub Title
    "Please select from the Menu Below to Modify the required features",
  
  #-- Icon
    "@apps",
    
  #-- Will be saved in /tmp/aroma/menu.prop
    "menu.prop",
    
     #-------------------------+-----------------[ Menubox Items ]-------------------------+---------------#
     # TITLE                   |  SUBTITLE                                                 |   Item Icons  #
     #-------------------------+-----------------------------------------------------------+---------------#	
	
    "Custom Installation",        "ROM Installation with Various Features",                    "@install",      #-- selected = 1
    "System Info",                "Get and show device/partition informations",                "@info",         #-- selected = 2
    "ChangeLog",                  "ROM/Mod ChangeLog",                                         "@agreement",    #-- selected = 3
    "Quit Install",               "Leave Setup :(",                                            "@install"       #-- selected = 4

);

Edit the title above as per your ROM/Mod name
The selection made by user in the above window will be stored in a temporary file- menu.prop
I have added only 4 options in the menu which I Recommend, You may remove any of the above string only if you have proper knowledge

This is how it looks in Installer-
1186076_548526925202717_900073740_n.jpg


-> NOW YOU HAVE SUCCESSFULLY CREATED THE MAIN MENU OF YOUR INSTALLER


I.1-> The first option is for Installer sub window, we will create it later

I.2-> the second option is for Displaying system information,

I.3-> the third option is for Displaying Changelog of Mod/ROM,

I.4-> the fourth option is for Exiting the installer


I.2- SYSTEM INFORMATION

Now lets create the sub window for Displaying system information

Scroll down n find this code in aroma-config-

Code:
##
# System Info 
#

if prop("menu.prop","selected")=="2" then

  #-- Show Please Wait
  pleasewait("Getting System Information...");

  #-- Fetch System Information
  setvar(
    #-- Variable Name
      "sysinfo",
    
    #-- Variable Value
      "<@center><b>Your Device System Information</b></@>\n\n"+
      
      "Device Name\t\t: <#469>YOUR DEVICE NAME</#>\n"+
      "Board Name\t\t: <#469>YOUR MODEL NAME</#>\n"+
      "Manufacturer\t\t: <#469>YOUR MANUFACTURER</#>\n"+
	  
	  "\n"+
	  
      "System Size\t\t: <b><#selectbg_g>"+getdisksize("/system","m")+" MB</#></b>\n"+
        "\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/system","m")+" MB</#></b>\n\n"+
      "Data Size\t\t: <b><#selectbg_g>"+getdisksize("/data","m")+" MB</#></b>\n"+
        "\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/data","m")+" MB</#></b>\n\n"+
      "SDCard Size\t\t: <b><#selectbg_g>"+getdisksize("/sdcard","m")+" MB</#></b>\n"+
        "\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/sdcard","m")+" MB</#></b>\n\n"+

      ""
  );
  
  #-- Show Textbox
  textbox(
    #-- Title
      "System Information",
    
    #-- Subtitle
      "Current system Information on your Xperia MDPI",
    
    #-- Icon
      "@info",
    
    #-- Text
      getvar("sysinfo")
  );
  
  #-- Show Alert
  alert(
    #-- Alert Title
      "Finished",
    
    #-- Alert Text
      "You will be back to Menu",
    
    #-- Alert Icon
      "@alert"
  );
  
  #-- Back to Menu ( 2 Wizard UI to Back )
  back("2");
  
endif;

Here the command for displaying system information is under this argument

if prop("menu.prop","selected")=="2" then
..
..
endif;

Since this is the second option in menu window, that's why we have =="2" here

Edit these fields as per your requirements

"Device Name\t\t: <#469>YOUR DEVICE NAME</#>\n"+
"Board Name\t\t: <#469>YOUR MODEL NAME</#>\n"+
"Manufacturer\t\t: <#469>YOUR MANUFACTURER</#>\n"+

Rest of the code is fine, no other editing is required

This is how it looks in Installer
1148738_548527001869376_691873786_n.jpg


-> NOW YOU HAVE SUCCESSFULLY ADDED A WINDOW FOR DISPLAYING SYSTEM INFORMATION


I.3- DISPLAY CHANGELOG

Now we will create a popup for Displaying changelog of the ROM/Mod

Scroll n find this code in aroma-config

Code:
##
# CHANGELOG DISPLAY
#

if prop("menu.prop","selected")=="3" then

    #-- TextDialog 
 textdialog(
    #-- Title
    "YOUR ROM NAME Changelog",
	#-- Text
    resread("changelog.txt"),
    #-- Custom OK Button Text (Optional)
    "Close"
 );
 
  #-- Back to Menu ( 2 Wizard UI to Back )
  back("1");
  
endif;

Here the command for displaying system information is under this argument

if prop("menu.prop","selected")=="3" then
..
..
endif;

Since this is the third option in menu window, that's why we have =="3" here

Edit the title as per your ROM/Mod name

The changelog file is stored in the directory- META-INF\com\google\android\aroma
Edit changelog.txt as per your ROM/Mod changelog

This is how it looks in Installer
1173880_548527011869375_1216882662_n.jpg


-> NOW YOU HAVE SUCCESSFULLY CREATED A POPUP FOR DISPLAYING CHANGELOG

I.4- EXIT POPUP
Now we will create a dialogue for exiting the installer

Scroll n find this code in aroma-config

Code:
##
# QUIT INSTALLER
#

if prop("menu.prop","selected")=="4" then

#-- Exit
	if
	  confirm(
		#-- Title
		  "Exit",
		#-- Text
		  "Are you sure want to exit the Installer?",
		#-- Icon (Optional)
		  "@alert"
	  )=="yes"
	then
	  #-- Exit 
	  exit("");
	endif;

endif;

Here the command for displaying system information is under this argument

if prop("menu.prop","selected")=="4" then
..
..
endif;

Since this is the fourth option in menu window, that's why we have =="4" here

This is how it looks in Installer
1174829_548527075202702_1574234733_n.jpg


-> NOW YOU HAVE SUCCESSFULLY CREATED A DIALOGUE BOX FOR EXITING THE INSTALLER



CONGRATULATIONS! YOU HAVE CREATED ALL BASIC WINDOWS REGARDING THE INSTALLATION PROCESS! :)


NOW I WILL TEACH YOU TO CREATE THE ADVANCED INSTALLATION SUB WINDOWS (I.1) IN NEXT POST
 
Last edited:

Ayush Singh

Senior Member
Nov 1, 2012
332
1,602
India
www.ayushsingh.net
I.1- CREATING DIFFERENT TYPES OF SUB WINDOWS

Now Lets create a sub window to be displayed when the first option of the Menu is selected in the Installer

Scroll n Find this code

Code:
##
#  Select Type of Install
#

if prop("menu.prop","selected")=="1" then

Since this is the first option in menu window, that's why we have =="1" here

I.1.1 SELECT BOX SUB WINDOW

Now Scroll down and find this Code-

Code:
##
# Sub Window 1
#

selectbox(
  #-- Title
    "TITLE 1",
  
  #-- Sub Title
    "SUB TITLE 1",
  
  #-- Icon:
     "icons/install",
	 
  #-- Will be saved in /tmp/aroma/window1.prop
    "window1.prop",
  
	  #----------------------------------[ Selectbox With Groups ]-----------------------------------#
	  # TITLE            |  SUBTITLE                                                 | Initial Value #
	  #------------------+-----------------------------------------------------------+---------------#  
  
       "Select One",        "",                                                        2,         #-- Group 1. key = "selected.1"
        "OPTION 1",         "OPTION 1 DESCRIPTION",                                       0,      #-- selected.1 = 1
        "OPTION 2",         "OPTION 2 DESCRIPTION",                                       1       #-- selected.1 = 2
   
	  #--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#

);

The type of window used is of selectbox attribute, Which means that only one out of the above Option can be selected at a time

Edit the TITLE, SUBTITLE, OPTION 1 and OPTION 2 as well as their DESCRIPTION as per your requirement

Here OPTION 2 has initial value 1 which means that It is selected by default,
(1 stands for Selected n 0 stands for Unselected)

NOTE: The last string has no comma "," after its initial value, Its not a typo

Method to add new Option--
Add this--
Code:
        "OPTION 3",         "OPTION 3 DESCRIPTION",                                       0       #-- selected.1 = 3

Note that if this is your 3rd Option then then in 2nd option add "," after its initial value

So after adding new option this is how it looks on Text Editor
1174684_548527401869336_807520864_n.jpg


And this is how it looks in Installer
1236042_548527058536037_632630072_n.jpg


-> SUB WINDOW 1 HAS BEEN SUCCESSFULLY CREATED


So now lets create sub window 2

Now Scroll down and find this Code-

Code:
##
# Sub Window 2
#

selectbox(
  #-- Title
	"TITLE 2",
	  
  #-- Sub Title
    "SUB TITLE 2",
	  
  #-- Icon:
	"@default",
	  
  #-- Will be saved in /tmp/aroma/window2.prop
	"window2.prop",

  
	  #----------------------------------[ Selectbox With Groups ]-----------------------------------#
	  # TITLE            |  SUBTITLE                                                 | Initial Value #
	  #------------------+-----------------------------------------------------------+---------------#  
  
	
      "Select One",          "",                                                        2,         #-- Group 1. key = "selected.1"
      "OPTION 1",            "OPTION 1 SUBTITLE",                         			      1,       #-- selected.1 = 1
	  "OPTION 2",   		 "OPTION 2 SUBTITLE",                  				          0,       #-- selected.1 = 2
	  "OPTION 3",            "OPTION 3 SUBTITLE",                                         0,       #-- selected.1 = 3
	  "OPTION 4",         	 "OPTION 4 SUBTITLE",                    	                  0        #-- selected.1 = 4

  	  #--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#

);

The type of window used is of selectbox attribute, Which means that only one out of the above Option can be selected at a time

Edit the TITLE, SUBTITLE, OPTIONS as well as their DESCRIPTION as per your requirement

Here OPTION 1 has initial value 1 which means that It is selected by default,
(1 stands for Selected n 0 stands for Unselected)

NOTE: The last string has no comma "," after its initial value, Its not a typo

NOTE: The same method as described above is to be used to create more options

And this is how it looks in Installer
7841_548527081869368_422007364_n.jpg


NOTE: If you just want a single sub window, delete the entire code for sub window 2

NOTE: If you want to add a new sub window, add the above code again but edit some values as listed below-

TITLE, SUBTITLE, OPTIONS as well as their DESCRIPTION as per your requirement
Also edit "window2.prop", to "window3.prop",

NOTE: The same method as described above is to be used to create more options

-> SUB WINDOW 2 HAS BEEN SUCCESSFULLY CREATED

NOW I ASSUME THAT YOU HAVE SUCCESSFULLY LEARNT TO CREATE THE SUB WINDOWS of selectbox attribute,
RE READ THE CODE AGAIN TO DEVELOP MORE UNDERSTANDING,
IF THIS IS YOUR FIRST TIME IT MIGHT TAKE SOME TIME TO FIGURE OUT THINGS, BUT ITS NEITHER TOO DIFFICULT


I.1.2- CREATING CHECKBOX SUB WINDOW

NOW WE SHALL LEARN TO CREATE A CHECKBOX BASED SUB WINDOW FROM WHICH WE CAN SELECT MORE THAN ONE OPTION

Scroll and find this code in aroma-config-

Code:
##
# Sub Window with CheckBoxes
#

checkbox(
  # Title
	"TITLE OF CHECKBOX",
  
  # Sub Title
	"SUB TITLE OF CHECKBOX HERE",
 
  # Icon
	"@update",
  
  # Will be saved in /tmp/aroma/checkbox1.prop
	"checkbox1.prop",
  
  #----------------------------------[ Selectbox With Groups ]-----------------------------------#
  # TITLE            |  SUBTITLE                                                 | Initial Value #
  #------------------+-----------------------------------------------------------+---------------#
  
	"AVAILABLE OPTIONS",     "",                                                            2,      #-- group 1
	"I AM A REAL DEV",    "IF YOU ARE THE REAL DEVELOPER",                               1,      #-- item.1.1
	"I AM A NOOBS",       "IF YOU ARE THE REAL NOOBS",                                   0,      #-- item.1.2
	"I AM XDA-DEVELOPERS","IF YOU HAVE AN ACCOUNT IN XDA-DEVELOPERS.COM",                0,      #-- item.1.3
	
	"YOUR PROJECTS",      "",                                                            2,      #-- Group 2
	"CUSTOM ROM",         "IF YOU MADE A CUSTOM ROM",                                    1,      #-- item.2.1
	"CUSTOM TROLL",       "IF YOU POST MANY TROLLS IN FORUM",                            0       #-- item.2.2
	
	  #--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
);

The type of window used is of checkbox attribute, Which means that only one out of the above Option can be selected at a time

Edit the TITLE, SUBTITLE, THE OPTIONS VALUE, AND THE OPTIONS' DESCRIPTION as per your requirement

Here item.1.1 and item.2.1 has initial value 1 which means that It is selected by default,
(1 stands for Selected n 0 stands for Unselected)

NOTE: The last string has no comma "," after its initial value, Its not a typo

NOTE: If you want to create a new item add this string
Code:
	"CUSTOM TROLL 2",       "IF YOU BLAH BLAH",                                          0       #-- item.2.3

Note that if this is your 3rd item in 2nd Group, so now add "," after item.2.2's initial value

So after adding new option this is how it looks on Text Editor
1184750_548527548535988_1998232765_n.jpg


And this is how it looks in Installer
1175623_548527118536031_473323682_n.jpg


NOTE: If you dont want a sub window with checkboxes, delete the above code

NOTE: If you want to add a new sub window with checkboxes, add the above code again but edit some values as listed below-

TITLE, SUBTITLE, OPTIONS as well as their DESCRIPTION as per your requirement
Also edit "checkbox1.prop", to "checkbox2.prop",

NOTE: The same method as described above is to be used to create more options

-> SUB WINDOW WITH CHECKBOXES HAS BEEN SUCCESSFULLY CREATED

NOW I ASSUME THAT YOU HAVE SUCCESSFULLY LEARNT TO CREATE THE SUB WINDOWS of checkbox attribute,
RE READ THE CODE AGAIN TO DEVELOP MORE UNDERSTANDING,
IF THIS IS YOUR FIRST TIME IT MIGHT TAKE SOME TIME TO FIGURE OUT THINGS, BUT ITS NEITHER TOO DIFFICULT :)


Now I am going to teach you some additional optional commands


1- ALERT BOX
Scroll and Find this Code-

Code:
##
# Alert Window
#

alert( "Attention", "PLACE YOUR TEXT HERE");

This code is for creating additional popup alert
Edit the text to be displayed as per your desire

If you don't want alert popup simply delete the Code above

This is how it looks in Installer
1150786_548527108536032_1058776177_n.jpg


-> NOW YOU HAVE SUCCESSFULLY CREATED A POPUP ALERT BOX

2. PRE INSTALLATION UI

Now scroll and find this code-

Code:
# Installation UI

ini_set("text_next", "Install Now");
ini_set("icon_next", "@installbutton");
  
viewbox(
  #-- Title
    "Ready to Install",

  #-- Text
    "ROM is ready to be installed.\n\n"+
	"Press <b>Install</b> to begin the installation.\n\n"+
	"To review or change any of your installation settings, press <b>Back</b>.\n\n"+
	"Press Menu -> Quit Installation to quit.",

  #-- Icon
    "@install"
);

This is to create a window just before installation process starts

If you don't want Pre installation window simply delete the Code above,


This is how it looks in Installer
1187044_548527191869357_1224071688_n.jpg


Now you have successfully learnt to create the above Optional windows n popups
These are the two Optional windows which are frequently used in the Installer to make it more Interactive

Now scroll and find this code just below the Installation UI Window

Code:
endif;

REMEMER DONT DELETE THE "endif;" It is in the continuation from the above "if prop("menu.prop","selected")=="1" then" code

Now comes the last and Important window for Installer

Scroll and find this code in aroma-config-

Code:
##
# INSTALLATION PROCESS
#

if prop("menu.prop","selected")== "1" 
then

ini_set("text_next", "Next");
ini_set("icon_next", "@next");

install(
  "YOUR ROM/Mod NAME™ Installation",
  getvar("rom_name") + "\n" +
  "Please wait while this ROM blows up your device :P" +
  "",
  "icons/install"
);

ini_set("text_next", "Finish");
ini_set("icon_next", "@finish");

checkviewbox(
  #-- Title
    "Installation Completed",
	
  #-- Text
    "<#selectbg_g><b>Congrats...</b></#>\n\n"+
    "<b>"+ini_get("rom_name")+"</b> has been installed into your device.\n\n",
    
#-- Icon
    "@welcome",

  #-- Checkbox Text
    "Reboot your device now.",

  #-- Initial Checkbox value ( 0=unchecked, 1=checked ) -  (Optional, default:0)
    "1",

  #-- Save checked value in variable "reboot_it" (Optional)
    "reboot_it"
);
endif;

###
# Check if reboot checkbox was checked

if
  getvar("reboot_it")=="1"
then
  #
  # reboot("onfinish");   - Reboot if anything finished
  # reboot("now");        - Reboot Directly
  # reboot("disable");    - If you set reboot("onfinish") before, use this command to revert it.
  #
  reboot("onfinish");
endif;

This is the code for creating an Installation Progress and logs User Interface and the Reboot Now Option

Edit this string in above code to your ROM/Mod name
"YOUR ROM/Mod NAME™ Installation",

Rest of all the code is fine

This is how it looks like in Installer
1239752_548527188536024_87051489_n.jpg

Now save the file aroma-config with Ctrl+S or save button


NOW YOU HAVE SUCCESSFULLY CREATED THE AROMA-CONFIG FILE FOR INSTALLER :)

THIS WAS ALL ABOUT CREATING THE AROMA INSTALLER USER INTERFACE...
I HAVE COVERED ALL THE FREQUENTLY USED COMMANDS IN THE TUTORIAL
THANKS TO @amarullz FOR WONDERFUL AROMA INSTALLER
IF ANY DOUBTS/ERRORS POST THEM HERE :)

IN THE NEXT POST WE ARE GOING TO LEARN ABOUT UPDATER-SCRIPT CORRESPONDING TO THE AROMA-CONFIG
 
Last edited:

Ayush Singh

Senior Member
Nov 1, 2012
332
1,602
India
www.ayushsingh.net
Tutorial for updater-script corresponding to the aroma-config


In this tutorial we are going to learn about creating updater script corresponding to the Aroma config we have created
This part is very easy indeed if you have read all my aroma-config guide :)


So the very first thing you have to do manually is to take a update-binary from any custom rom/mod from your device forum...

You can find update-binary in this directory- meta-inf\com\google\android\
replace it with custom update-binary so that your installer will not give errors while installing the mod/rom

1.) understanding the basics
so now lets start, open the updater-script file located in the directory- meta-inf\com\google\android\ in notepad++

scroll and find this code-

Code:
if
    file_getprop("/tmp/aroma-data/menu.prop","selected") == "1"
     then

so now you know why "menu.prop" was declared there in aroma-config
the == "1" signifies here that the we are now going to define the sub windows inside the first option of menu.prop

now edit this code to your mod/rom name
Code:
		ui_print("-> installing rom/mod name");

scroll and find this code-
Code:
		ui_print("-> mounting system...");
	run_program("/sbin/busybox", "mount", "/system");

this is for mounting the system partition so that you can add/delete files from system partition


2.) Defining the sub windows

Now we will define the coding for working of sub menus we created in aroma-config

2.1.) For sub window 1

Scroll and find this code-
Code:
if
    file_getprop("/tmp/aroma/window1.prop","selected.1") == "1"
     then
    ui_print("-> installing option 1...");
	package_extract_dir("aroma/window1/option1", "/system");
endif;

edit the ui_print("-> installing option 1..."); string as per your rom/mod option you defined in aroma-config

now place your option 1 customisation app to the folder aroma\window1\option1\app
if it is a framework folder file, place it to aroma\window1\option1\framework folder

now use have successfully defined option1 for the window 1

repeat the same for option 2, and for 3,4.... If you have created them also

now you might have learnt how to define the corresponding options for mods/rom sub window 1 you created in aroma-config


2.2.) For sub window 2
now scroll and find this code-
Code:
if
    file_getprop("/tmp/aroma/window2.prop","selected.1") == "1"
     then
    ui_print("-> installing option 1...");
	package_extract_dir("aroma/window2/option1", "/system");
endif;

edit the ui_print("-> installing option 1..."); string as per your rom/mod option you defined in aroma-config

now place your option 1 customisation app to the folder aroma\window1\option2\app
if it is a framework folder file, place it to aroma\window1\option2\framework folder

now use have successfully defined option1 for the window 2

repeat the same for option 2, and for 3,4.... If you have created them also

now you might have learnt how to define the corresponding options for mods/rom sub window 2 you created in aroma-config

2.3.) for check box sub window

scroll and find this code-
Code:
if
	file_getprop("/tmp/aroma/checkbox1.prop","item.1.1") == "1"
		then
		ui_print("-> installing item 1.1 ");
	package_extract_dir("aroma/checkbox1/item-1.1", "/system");
endif;

edit the ui_print("-> installing item 1.1 "); string as per your rom/mod option you defined in aroma-config

now place your item 1.1 customisation app to the folder aroma\checkbox1\item-1.1\app
if it is a framework folder file, place it to aroma\checkbox1\item-1.1\framework folder

now use have successfully defined option1 for the check box window

repeat the same for item 1.2, 1.3 and for 2.1, 2.2 too (and also for additional items if you have created them)

now you might have learnt how to define the corresponding items for mods/rom checkbox window you created in aroma-config


3.) Important for rom developers!

Now if you have made this aroma installer for a rom, you have to make aymlinks and fix permissions for your rom binaries
for that open the updater script from any rom from your forum and find the word "symlink" and then copy all the lines to your updater script
if you are not able to find the code, try adding this code to your updater script-
Code:
ui_print("-> making symlinks...");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/r");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/reboot1");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/uptime");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/ctrlaltdel");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/ln");

ui_print("-> fixing permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(0 ,0 , 0755, 0755, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/be_movie");
set_perm(0, 0, 0755, "/system/etc/be_photo");
set_perm(0, 0, 0755, "/system/etc/be_album");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 2000, 0755, "/system/bin/sysinit");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 04755, "/system/xbin/busybox");
set_perm(0, 0, 06755, "/system/xbin/su");

3.) Fixing permissions for both rom and mod users

now scroll and find this code-
Code:
ui_print("-> fixing permits :p");
package_extract_file("fix_permissions", "/tmp/fix_permissions");
set_perm(0, 0, 0777, "/tmp/fix_permissions");
run_program("/tmp/fix_permissions");
ui_print("-> finished installation...!");
ui_print("-> enjoy...");
ui_print("-> ...");
ui_print("-> done....");

endif;

run_program("/sbin/busybox", "umount", "/system");

show_progress(1, 0);

run_program("/tmp/fix_permissions"); is for fixing the permissions

the endif; present here is in the continuation from file_getprop("/tmp/aroma-data/menu.prop","selected") == "1"

the command run_program("/sbin/busybox", "umount", "/system"); is for unmounting system partition as the installation is complete now
now save the file updater script with ctrl+s or save button



NOW YOU HAVE SUCCESSFULLY CREATED THE UPDATER-SCRIPT FILE FOR INSTALLER :)


THIS WAS ALL ABOUT CREATING THE CORRESPONDING AROMA INSTALLER UPDATER-SCRIPT...
I HAVE COVERED ALL THE FREQUENTLY USED COMMANDS IN THE TUTORIAL
IF ANY DOUBTS/ERRORS POST THEM HERE
 
Last edited:

ChinmayKunkikar

Senior Member
Nov 15, 2012
1,035
1,119
Pune
Thank you so much man! This came into my mind just today about making/installing aroma to my sola.
And now..i have the whole tutorial!! :D
I havent tried this yet.. But definately will in 2-3 days.. ;)
Thanks!

Sent from my MT27i using xda premium
 
  • Like
Reactions: EnvyBot and ozcann

Kaushik.Vapiwala

Senior Member
Dec 8, 2012
144
86
Mumbai
Help!! Error

@Ayush Singh

I am getting error while flashing zip file. The error log is as follows:

Installing update...
-> Initializing...
->Please Wait...
file_getprop: failed to stat "/tmp/aroma-data/menu.prop": No such file or directory
E:Error in /sdcard/aroma-test.zip
(status 7)
Installation aborted
 
  • Like
Reactions: ozcann

Ayush Singh

Senior Member
Nov 1, 2012
332
1,602
India
www.ayushsingh.net
I am getting error while flashing zip file. The error log is as follows:

Installing update...
-> Initializing...
->Please Wait...
file_getprop: failed to stat "/tmp/aroma-data/menu.prop": No such file or directory
E:Error in /sdcard/aroma-test.zip
(status 7)
Installation aborted

Make sure that in your aroma config this prop file is defined for menu--
Code:
 "menu.prop",

and in updater script, you have defined options like this--
Code:
    file_getprop("/tmp/aroma-data/menu.prop","selected") == "1"

 

ydaud

Senior Member
Sep 9, 2012
223
445
Bandung
Thanks for the very useful guide. I have a problem, just a strange case (for me), try to edit aroma-config from the zip.
It says lines syntax error on line xxx col xx . I look on that with notepad++ on the line but it just ");" which is needed to close "selectbox(" statement.

I try the demo installer first and it runs fine, then I try to re-replace any value (even with same value) but it has syntax error on line xxx
No changes on value, just open and save.
Thanks in advance.

edit: take your zip (not the original one) and it's fine then :D. Also mistakes in last line on initial values .. thanks anyway
 
Last edited:
  • Like
Reactions: Ayush Singh

The Sickness

Retired Recognized Developer
Oct 27, 2012
9,780
22,733
Somewhere in Texas
Your guide is very well detailed. Thank you for doing this.
I will be following your guide to set Aroma up in my rom. I will have to edit the themes tho. What I didnt see was info on kernels. I would like to have my rom for Tmobile and AT&T.
Do you have a guide for that as well?
 
  • Like
Reactions: Ayush Singh

slsamg7112

Senior Member
Last edited:
  • Like
Reactions: Ayush Singh

Ayush Singh

Senior Member
Nov 1, 2012
332
1,602
India
www.ayushsingh.net
nice guide
thanks & pressed :D

i have a question.when i press the "install now" button,nothing display in the field and there is nothing install on my phone
here is my updater-script and aroma-config.would you mind take a look?thx :)
https://www.dropbox.com/s/wt4ful20tjt8cbd/aroma-config
https://www.dropbox.com/s/rwlxcc189cq4srm/updater-script
the two files are saved in ANSI,is it right code?

btw, i deleted the folder "checkbox1" and "window2" since i don't need them.is it fine?

Your updater-script is correct n the aroma-config as well,
n theres no problem in deleting checkbox n windows if not reqd.

But if installation progress completes on its own with no data installed then this is how to troubleshoot--

-> Have you replaced update-binary-installer from any working mod/rom for your device??

-> Are the mount commands correct for your device?

I hope this will help :)

Your guide is very well detailed. Thank you for doing this.
I will be following your guide to set Aroma up in my rom. I will have to edit the themes tho. What I didnt see was info on kernels. I would like to have my rom for Tmobile and AT&T.
Do you have a guide for that as well?


You mean guide for Flashing kernels??

Sorry I dont have that at this moment, coz I own 2011 Xperia device from which we cannot flash kernels via aroma :(
 
Last edited:
  • Like
Reactions: Benelshaddai

slsamg7112

Senior Member
-> Have you replaced update-binary-installer from any working mod/rom for your device??
---i replaced the file with working aroma and now it works. thx:)

-> Are the mount commands correct for your device?
---no lines display when installing.after replacing it works well
 
Last edited:

The Sickness

Retired Recognized Developer
Oct 27, 2012
9,780
22,733
Somewhere in Texas
I am currently using Aroma in my rom (still editing). Your guide was VERY helpful. I do have a question...

On the main menu (full rom installation, change log, etc) how can I go about "adding" a mods/themes selection that will only flash selected mods without flashing the rom? Is ithere a way to implement this? I know i can add it to the menu, but im not to sure on how to write the script so
It will flash just selected mods, etc.

Any help would be greatly appreciated.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 123



    Comprehensive Guide for Beginners to Create AROMA Installer Packages



    Hello Friends, We all are aware about the most powerful Android recovery based installer..
    Aroma Installer has simplified our ROMs, made them highly customisable n interactive too
    This guide will help you to learn to create beautiful, interactive n customisable AROMA Installer Packages for your ROM n Mods




    PRE-REQUISITES
    • A PC for making scripts
    • A ROM/Mod for which you want to make AROMA Installer
    • NotePad++ software for editing Installer files
    • A phone with CWM/TWRP recovery for Testing your AROMA Installer zip
    • 7z or WinRAR or any other compressing tool for making zip
    • A creative mind n some basic knowledge of using a computer


    So Lets Start your journey now!


    1.) SETTING UP


    Download this zip

    n extract it in the folder where your ROM or Mod is present

    So that it will look like this--
    1236460_548527435202666_1889608749_n.jpg

    2.) BASIC EDITING

    Now lets start, Go to this directory- META-INF\com\google\android\

    We are interested in editing "aroma-config" n "updater-script" only

    First of all open aroma-config in NotePad++

    You will be able to see a window like this--
    1236283_548527511869325_1887634418_n.jpg


    A. SETTING UP SCREEN RESOLUTION

    Now the very first thing we are going to do is to declare our screen resolution for the AROMA Installer

    Remove the "# " from the front of the line according to your screen resolution

    For Example my device is 320x480, so this is for me--
    Code:
    # ini_set("dp","1"); #-- LDPI ( 240x320 / QVGA )
    ini_set("dp","2"); #-- MDPI ( 320x480 / HVGA )
    # ini_set("dp","3"); #-- HDPI ( 480x800 / WVGA )
    # ini_set("dp","4"); #-- XHDPI ( 1280x720 / WVGA )
    # ini_set("dp","5"); #-- XXHDPI ( 1920x1080 / WVGA )

    Optional- You may remove the other unused strings from the above code

    -> NOW YOU HAVE SUCCESSFULLY DECLARED YOUR SCREEN RESOLUTION, WHICH CAN BE INTERPRETED BY THE INSTALLER!

    B. SETTING UP BASIC DETAILS

    The next thing we are going to declare is our ROM/Mod name, date, device name and version

    You will be able to find this code inside your aroma-config

    Code:
    ini_set("rom_name",             "YOUR ROM NAME HERE™ ");
    ini_set("rom_version",          "YOUR VERSION");
    ini_set("rom_author",           "YOUR NAME");
    ini_set("rom_device",           "YOUR DEVICE NAME");
    ini_set("rom_date",             "25/8/2013 - DATE OF YOUR MOD");

    Edit it according to your ROM/Mod detail, Fill the respective details inside the above " ");

    -> NOW YOU HAVE SUCCESSFULLY DECLARED YOUR ROM/MOD NAME N OTHER RELEVANT DETAILS

    C. SHOWING A DISPLAY IMAGE

    Now to make our Installer beautiful we will add a png image which will be displayed when a user will start the installer

    You will be able to find this code inside your aroma-config

    Code:
    # Show Simple Splash
    #
    
    splash(
      #-- Duration 5000ms / 5 seconds
        5000,
      
      #-- <AROMA Resource Dir>/SPLASH.png
        "SPLASH"
    );

    This will display SPLASH.png for 5 seconds, you can edit the no of seconds the image should be displayed
    Edit 5000 to the no the seconds you want


    For 1 Second- 1000
    2 Seconds- 2000
    n so on


    The image to be displayed is located in the folder- META-INF\com\google\android\aroma
    Here you can find the SPLASH.png , replace it with yours, remember that it should be of the same resolution as that of your device
    also it must be of .png format only

    -> NOW YOU HAVE SUCCESSFULLY ADDED A DISPLAY IMAGE FOR YOUR AROMA INSTALLER MOD


    D. SHOWING ANIMATION AS AFTER DISPLAY IMAGE (Optional)

    You can also add an animation to your AROMA Installer package

    You will be able to find this code inside your aroma-config

    Code:
    ##
    # Show Animated Splash
    #
    anisplash(
    #  #-- Number of Loop
        4,
      
      #-- Frame  [ Image, duration in millisecond ]
        "anim/a1", 30,
        "anim/a2", 30,
        "anim/a3", 30,
        "anim/a4", 30,
        "anim/a5", 30,
        "anim/a6", 30
    );

    Here png a1 to a6 will be displayed for 30 millisecond each for 4 times (number of loop is 4)

    You can also edit Number of Loop to any desired number
    Here it is 4, edit as per your desire

    The images which will be displayed are in META-INF\com\google\android\aroma\anim folder
    Replace the pngs with your pngs

    NOTE: If you dont want animated splash, delete the above code from your aroma-config

    -> NOW YOU HAVE SUCCESSFULLY CREATED THE ANIMATION TO BE DISPLAYED BEFORE INSTALLER STARTS


    E. FONT SELECTION CODE (No need to edit)

    This CODE is for language selection dialogue in the installer

    Code:
    ##
    # Font Selection
    #
    
    endif;

    This will look like below in AROMA Installer
    1238237_548526578536085_1193718404_n.jpg


    F. WINDOW FOR SELECTING THE INSTALLER THEME

    Now we will create a window to Select theme to be used while installation of the ROM/Mod

    Scroll n find this code in aroma-config

    Code:
    ##
    #   SELECT THEME
    #
    
    selectbox(
      #-- Title
        "<~themes.title>",
      
      #-- Sub Title
        "<~themes.desc>",
      
      #-- Icon:
        "@personalize",
      
      #-- Will be saved in /tmp/aroma/theme.prop
        "theme.prop",
      
        "Generic",            "Unthemed AROMA Installer",                                    0,      #-- selected.0 = 1
        "MIUI Theme",         "MIUI Theme by mickey-r & amarullz",                           0,      #-- selected.0 = 2
        "NXT Theme",          "NXT Theme by Pranav Pandey",                                  0,      #-- selected.0 = 3
        "NextGen Theme",      "NextGen Theme by amarullz edit by Ayush",                     0,      #-- selected.0 = 4
        "Sense Theme",        "HTC Sense Theme by amarullz",                                 0,      #-- selected.0 = 5
        "Honami Theme",       "Xperia i1 Theme by Ayush",                                    1       #-- selected.0 = 6
    
    );

    The type of window used is of selectbox attribute, Which means that only one out of the above Themes can be selected at a time

    Here theme.prop is the temporary file in which user selection will be stored

    Here Honami Theme has initial value 1 which means that It is selected by default,
    (1 stands for Selected n 0 stands for Unselected)

    NOTE: The last string has no comma "," after its initial value, Its not a typo

    The above themes are already included in the package, you can find the stored themes in the directory- META-INF\com\google\android\aroma\themes
    and also edit them as per your desire, edit them only if you have knowledge of .png n .9.png editing
    otherwise included themes are perfect according to me

    Now scroll n find this CODE in aroma-config

    Code:
    ##
    # SET THEME
    #
    
    if prop("theme.prop","selected.0")=="2" then
      theme("miui");
    endif;
    
    if prop("theme.prop","selected.0")=="3" then
      theme("xNXT");
    endif;
    
    if prop("theme.prop","selected.0")=="4" then
      theme("NextGen");
    endif;
    
    if prop("theme.prop","selected.0")=="5" then
      theme("sense");
    endif;
    
    if prop("theme.prop","selected.0")=="6" then
      theme("i1");
    endif;

    No need to edit this, it is already perfect, it declares the Theme selection

    This is how it looks like in AROMA Installer
    968811_548526588536084_580677883_n.jpg


    -> NOW YOU HAVE SUCCESSFULLY CREATED A WINDOW TO SHOW AVAILABLE THEME SELECTIONS


    G. SHOW BASIC INFORMATION

    Now we will create a window to display the ROM/Mod information before installation

    Scroll n find this code-

    Code:
    ##
    #   SHOW ROM/Mod INFORMATION
    #
    
    viewbox(
      #-- Title
        "<~welcome.title>",
      
      #-- Text
        "<~welcome.text1> <b>"+
    	  #-- Get Config Value
    	  ini_get("rom_name")+
    	"</b> <~common.for> <b>"+ini_get("rom_device")+"</b>.\n\n"+
        
        "<~welcome.text2>\n\n"+
    	
          "  <~welcome.version>\t: <b><#selectbg_g>"+ini_get("rom_version")+"</#></b>\n"+
          "  <~welcome.codename>\t\t: <b><#selectbg_g> </#></b>\n"+
    	  "  <~welcome.updated>\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+
    
        "<~welcome.next>",
      
      #-- Icon
        "@welcome"
    );

    No need to edit this code, It is already perfect

    Here the window is of viewbox attribute, we have just the back and next button in the window

    This is how it will look in the installer
    558560_548526988536044_904807097_n.jpg


    -> NOW YOU HAVE SUCCESSFULLY CREATED A WINDOW TO DISPLAY ROM/MOD INFORMATION IN THE INSTALLER


    H. LICENSE WINDOW (Optional)

    Now we will create a window for displaying License/Terms n Conditions of using the ROM/Mod

    Scroll n find this Code-

    Code:
    ##
    # LICENSE
    #
    
    agreebox(
      #-- Title
        "YOUR ROM/Mod NAME™ T&C",
      
      #-- Subtitle / Description
        "Read Carefully",
      
      #-- Icon:
        "@license",
      
      #-- Text Content 
        resread("license.txt"),
      
      #-- Checkbox Text
        "Do you agree??",
      
      #-- Unchecked Alert Message
        "You've to agree!!"
    );

    Edit the title "YOUR ROM/Mod NAME™ T&C", to your ROM/Mod name

    The license which is displayed is stored in directory- META-INF\com\google\android\aroma
    You can edit the license.txt as per your ROM/Mod needs

    If you don't want the license window delete the above code

    This is how it will look in the installer
    1237075_548526931869383_503265807_n.jpg


    -> NOW YOU HAVE SUCCESSFULLY CREATED A WINDOW WHICH WILL DISPLAY LICENSE

    I. CREATING MAIN MENU

    Now we will create a window for menu of options available in our ROM/Mod

    Scroll and find this code-

    Code:
    ##
    # MAIN MENU- INSTALLER n MISC
    #
    menubox(
      #-- Title
        "ROM/MOD NAME™ Menu",
      
      #-- Sub Title
        "Please select from the Menu Below to Modify the required features",
      
      #-- Icon
        "@apps",
        
      #-- Will be saved in /tmp/aroma/menu.prop
        "menu.prop",
        
         #-------------------------+-----------------[ Menubox Items ]-------------------------+---------------#
         # TITLE                   |  SUBTITLE                                                 |   Item Icons  #
         #-------------------------+-----------------------------------------------------------+---------------#	
    	
        "Custom Installation",        "ROM Installation with Various Features",                    "@install",      #-- selected = 1
        "System Info",                "Get and show device/partition informations",                "@info",         #-- selected = 2
        "ChangeLog",                  "ROM/Mod ChangeLog",                                         "@agreement",    #-- selected = 3
        "Quit Install",               "Leave Setup :(",                                            "@install"       #-- selected = 4
    
    );

    Edit the title above as per your ROM/Mod name
    The selection made by user in the above window will be stored in a temporary file- menu.prop
    I have added only 4 options in the menu which I Recommend, You may remove any of the above string only if you have proper knowledge

    This is how it looks in Installer-
    1186076_548526925202717_900073740_n.jpg


    -> NOW YOU HAVE SUCCESSFULLY CREATED THE MAIN MENU OF YOUR INSTALLER


    I.1-> The first option is for Installer sub window, we will create it later

    I.2-> the second option is for Displaying system information,

    I.3-> the third option is for Displaying Changelog of Mod/ROM,

    I.4-> the fourth option is for Exiting the installer


    I.2- SYSTEM INFORMATION

    Now lets create the sub window for Displaying system information

    Scroll down n find this code in aroma-config-

    Code:
    ##
    # System Info 
    #
    
    if prop("menu.prop","selected")=="2" then
    
      #-- Show Please Wait
      pleasewait("Getting System Information...");
    
      #-- Fetch System Information
      setvar(
        #-- Variable Name
          "sysinfo",
        
        #-- Variable Value
          "<@center><b>Your Device System Information</b></@>\n\n"+
          
          "Device Name\t\t: <#469>YOUR DEVICE NAME</#>\n"+
          "Board Name\t\t: <#469>YOUR MODEL NAME</#>\n"+
          "Manufacturer\t\t: <#469>YOUR MANUFACTURER</#>\n"+
    	  
    	  "\n"+
    	  
          "System Size\t\t: <b><#selectbg_g>"+getdisksize("/system","m")+" MB</#></b>\n"+
            "\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/system","m")+" MB</#></b>\n\n"+
          "Data Size\t\t: <b><#selectbg_g>"+getdisksize("/data","m")+" MB</#></b>\n"+
            "\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/data","m")+" MB</#></b>\n\n"+
          "SDCard Size\t\t: <b><#selectbg_g>"+getdisksize("/sdcard","m")+" MB</#></b>\n"+
            "\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/sdcard","m")+" MB</#></b>\n\n"+
    
          ""
      );
      
      #-- Show Textbox
      textbox(
        #-- Title
          "System Information",
        
        #-- Subtitle
          "Current system Information on your Xperia MDPI",
        
        #-- Icon
          "@info",
        
        #-- Text
          getvar("sysinfo")
      );
      
      #-- Show Alert
      alert(
        #-- Alert Title
          "Finished",
        
        #-- Alert Text
          "You will be back to Menu",
        
        #-- Alert Icon
          "@alert"
      );
      
      #-- Back to Menu ( 2 Wizard UI to Back )
      back("2");
      
    endif;

    Here the command for displaying system information is under this argument

    if prop("menu.prop","selected")=="2" then
    ..
    ..
    endif;

    Since this is the second option in menu window, that's why we have =="2" here

    Edit these fields as per your requirements

    "Device Name\t\t: <#469>YOUR DEVICE NAME</#>\n"+
    "Board Name\t\t: <#469>YOUR MODEL NAME</#>\n"+
    "Manufacturer\t\t: <#469>YOUR MANUFACTURER</#>\n"+

    Rest of the code is fine, no other editing is required

    This is how it looks in Installer
    1148738_548527001869376_691873786_n.jpg


    -> NOW YOU HAVE SUCCESSFULLY ADDED A WINDOW FOR DISPLAYING SYSTEM INFORMATION


    I.3- DISPLAY CHANGELOG

    Now we will create a popup for Displaying changelog of the ROM/Mod

    Scroll n find this code in aroma-config

    Code:
    ##
    # CHANGELOG DISPLAY
    #
    
    if prop("menu.prop","selected")=="3" then
    
        #-- TextDialog 
     textdialog(
        #-- Title
        "YOUR ROM NAME Changelog",
    	#-- Text
        resread("changelog.txt"),
        #-- Custom OK Button Text (Optional)
        "Close"
     );
     
      #-- Back to Menu ( 2 Wizard UI to Back )
      back("1");
      
    endif;

    Here the command for displaying system information is under this argument

    if prop("menu.prop","selected")=="3" then
    ..
    ..
    endif;

    Since this is the third option in menu window, that's why we have =="3" here

    Edit the title as per your ROM/Mod name

    The changelog file is stored in the directory- META-INF\com\google\android\aroma
    Edit changelog.txt as per your ROM/Mod changelog

    This is how it looks in Installer
    1173880_548527011869375_1216882662_n.jpg


    -> NOW YOU HAVE SUCCESSFULLY CREATED A POPUP FOR DISPLAYING CHANGELOG

    I.4- EXIT POPUP
    Now we will create a dialogue for exiting the installer

    Scroll n find this code in aroma-config

    Code:
    ##
    # QUIT INSTALLER
    #
    
    if prop("menu.prop","selected")=="4" then
    
    #-- Exit
    	if
    	  confirm(
    		#-- Title
    		  "Exit",
    		#-- Text
    		  "Are you sure want to exit the Installer?",
    		#-- Icon (Optional)
    		  "@alert"
    	  )=="yes"
    	then
    	  #-- Exit 
    	  exit("");
    	endif;
    
    endif;

    Here the command for displaying system information is under this argument

    if prop("menu.prop","selected")=="4" then
    ..
    ..
    endif;

    Since this is the fourth option in menu window, that's why we have =="4" here

    This is how it looks in Installer
    1174829_548527075202702_1574234733_n.jpg


    -> NOW YOU HAVE SUCCESSFULLY CREATED A DIALOGUE BOX FOR EXITING THE INSTALLER



    CONGRATULATIONS! YOU HAVE CREATED ALL BASIC WINDOWS REGARDING THE INSTALLATION PROCESS! :)


    NOW I WILL TEACH YOU TO CREATE THE ADVANCED INSTALLATION SUB WINDOWS (I.1) IN NEXT POST
    84
    I.1- CREATING DIFFERENT TYPES OF SUB WINDOWS

    Now Lets create a sub window to be displayed when the first option of the Menu is selected in the Installer

    Scroll n Find this code

    Code:
    ##
    #  Select Type of Install
    #
    
    if prop("menu.prop","selected")=="1" then

    Since this is the first option in menu window, that's why we have =="1" here

    I.1.1 SELECT BOX SUB WINDOW

    Now Scroll down and find this Code-

    Code:
    ##
    # Sub Window 1
    #
    
    selectbox(
      #-- Title
        "TITLE 1",
      
      #-- Sub Title
        "SUB TITLE 1",
      
      #-- Icon:
         "icons/install",
    	 
      #-- Will be saved in /tmp/aroma/window1.prop
        "window1.prop",
      
    	  #----------------------------------[ Selectbox With Groups ]-----------------------------------#
    	  # TITLE            |  SUBTITLE                                                 | Initial Value #
    	  #------------------+-----------------------------------------------------------+---------------#  
      
           "Select One",        "",                                                        2,         #-- Group 1. key = "selected.1"
            "OPTION 1",         "OPTION 1 DESCRIPTION",                                       0,      #-- selected.1 = 1
            "OPTION 2",         "OPTION 2 DESCRIPTION",                                       1       #-- selected.1 = 2
       
    	  #--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
    
    );

    The type of window used is of selectbox attribute, Which means that only one out of the above Option can be selected at a time

    Edit the TITLE, SUBTITLE, OPTION 1 and OPTION 2 as well as their DESCRIPTION as per your requirement

    Here OPTION 2 has initial value 1 which means that It is selected by default,
    (1 stands for Selected n 0 stands for Unselected)

    NOTE: The last string has no comma "," after its initial value, Its not a typo

    Method to add new Option--
    Add this--
    Code:
            "OPTION 3",         "OPTION 3 DESCRIPTION",                                       0       #-- selected.1 = 3

    Note that if this is your 3rd Option then then in 2nd option add "," after its initial value

    So after adding new option this is how it looks on Text Editor
    1174684_548527401869336_807520864_n.jpg


    And this is how it looks in Installer
    1236042_548527058536037_632630072_n.jpg


    -> SUB WINDOW 1 HAS BEEN SUCCESSFULLY CREATED


    So now lets create sub window 2

    Now Scroll down and find this Code-

    Code:
    ##
    # Sub Window 2
    #
    
    selectbox(
      #-- Title
    	"TITLE 2",
    	  
      #-- Sub Title
        "SUB TITLE 2",
    	  
      #-- Icon:
    	"@default",
    	  
      #-- Will be saved in /tmp/aroma/window2.prop
    	"window2.prop",
    
      
    	  #----------------------------------[ Selectbox With Groups ]-----------------------------------#
    	  # TITLE            |  SUBTITLE                                                 | Initial Value #
    	  #------------------+-----------------------------------------------------------+---------------#  
      
    	
          "Select One",          "",                                                        2,         #-- Group 1. key = "selected.1"
          "OPTION 1",            "OPTION 1 SUBTITLE",                         			      1,       #-- selected.1 = 1
    	  "OPTION 2",   		 "OPTION 2 SUBTITLE",                  				          0,       #-- selected.1 = 2
    	  "OPTION 3",            "OPTION 3 SUBTITLE",                                         0,       #-- selected.1 = 3
    	  "OPTION 4",         	 "OPTION 4 SUBTITLE",                    	                  0        #-- selected.1 = 4
    
      	  #--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
    
    );

    The type of window used is of selectbox attribute, Which means that only one out of the above Option can be selected at a time

    Edit the TITLE, SUBTITLE, OPTIONS as well as their DESCRIPTION as per your requirement

    Here OPTION 1 has initial value 1 which means that It is selected by default,
    (1 stands for Selected n 0 stands for Unselected)

    NOTE: The last string has no comma "," after its initial value, Its not a typo

    NOTE: The same method as described above is to be used to create more options

    And this is how it looks in Installer
    7841_548527081869368_422007364_n.jpg


    NOTE: If you just want a single sub window, delete the entire code for sub window 2

    NOTE: If you want to add a new sub window, add the above code again but edit some values as listed below-

    TITLE, SUBTITLE, OPTIONS as well as their DESCRIPTION as per your requirement
    Also edit "window2.prop", to "window3.prop",

    NOTE: The same method as described above is to be used to create more options

    -> SUB WINDOW 2 HAS BEEN SUCCESSFULLY CREATED

    NOW I ASSUME THAT YOU HAVE SUCCESSFULLY LEARNT TO CREATE THE SUB WINDOWS of selectbox attribute,
    RE READ THE CODE AGAIN TO DEVELOP MORE UNDERSTANDING,
    IF THIS IS YOUR FIRST TIME IT MIGHT TAKE SOME TIME TO FIGURE OUT THINGS, BUT ITS NEITHER TOO DIFFICULT


    I.1.2- CREATING CHECKBOX SUB WINDOW

    NOW WE SHALL LEARN TO CREATE A CHECKBOX BASED SUB WINDOW FROM WHICH WE CAN SELECT MORE THAN ONE OPTION

    Scroll and find this code in aroma-config-

    Code:
    ##
    # Sub Window with CheckBoxes
    #
    
    checkbox(
      # Title
    	"TITLE OF CHECKBOX",
      
      # Sub Title
    	"SUB TITLE OF CHECKBOX HERE",
     
      # Icon
    	"@update",
      
      # Will be saved in /tmp/aroma/checkbox1.prop
    	"checkbox1.prop",
      
      #----------------------------------[ Selectbox With Groups ]-----------------------------------#
      # TITLE            |  SUBTITLE                                                 | Initial Value #
      #------------------+-----------------------------------------------------------+---------------#
      
    	"AVAILABLE OPTIONS",     "",                                                            2,      #-- group 1
    	"I AM A REAL DEV",    "IF YOU ARE THE REAL DEVELOPER",                               1,      #-- item.1.1
    	"I AM A NOOBS",       "IF YOU ARE THE REAL NOOBS",                                   0,      #-- item.1.2
    	"I AM XDA-DEVELOPERS","IF YOU HAVE AN ACCOUNT IN XDA-DEVELOPERS.COM",                0,      #-- item.1.3
    	
    	"YOUR PROJECTS",      "",                                                            2,      #-- Group 2
    	"CUSTOM ROM",         "IF YOU MADE A CUSTOM ROM",                                    1,      #-- item.2.1
    	"CUSTOM TROLL",       "IF YOU POST MANY TROLLS IN FORUM",                            0       #-- item.2.2
    	
    	  #--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
    );

    The type of window used is of checkbox attribute, Which means that only one out of the above Option can be selected at a time

    Edit the TITLE, SUBTITLE, THE OPTIONS VALUE, AND THE OPTIONS' DESCRIPTION as per your requirement

    Here item.1.1 and item.2.1 has initial value 1 which means that It is selected by default,
    (1 stands for Selected n 0 stands for Unselected)

    NOTE: The last string has no comma "," after its initial value, Its not a typo

    NOTE: If you want to create a new item add this string
    Code:
    	"CUSTOM TROLL 2",       "IF YOU BLAH BLAH",                                          0       #-- item.2.3

    Note that if this is your 3rd item in 2nd Group, so now add "," after item.2.2's initial value

    So after adding new option this is how it looks on Text Editor
    1184750_548527548535988_1998232765_n.jpg


    And this is how it looks in Installer
    1175623_548527118536031_473323682_n.jpg


    NOTE: If you dont want a sub window with checkboxes, delete the above code

    NOTE: If you want to add a new sub window with checkboxes, add the above code again but edit some values as listed below-

    TITLE, SUBTITLE, OPTIONS as well as their DESCRIPTION as per your requirement
    Also edit "checkbox1.prop", to "checkbox2.prop",

    NOTE: The same method as described above is to be used to create more options

    -> SUB WINDOW WITH CHECKBOXES HAS BEEN SUCCESSFULLY CREATED

    NOW I ASSUME THAT YOU HAVE SUCCESSFULLY LEARNT TO CREATE THE SUB WINDOWS of checkbox attribute,
    RE READ THE CODE AGAIN TO DEVELOP MORE UNDERSTANDING,
    IF THIS IS YOUR FIRST TIME IT MIGHT TAKE SOME TIME TO FIGURE OUT THINGS, BUT ITS NEITHER TOO DIFFICULT :)


    Now I am going to teach you some additional optional commands


    1- ALERT BOX
    Scroll and Find this Code-

    Code:
    ##
    # Alert Window
    #
    
    alert( "Attention", "PLACE YOUR TEXT HERE");

    This code is for creating additional popup alert
    Edit the text to be displayed as per your desire

    If you don't want alert popup simply delete the Code above

    This is how it looks in Installer
    1150786_548527108536032_1058776177_n.jpg


    -> NOW YOU HAVE SUCCESSFULLY CREATED A POPUP ALERT BOX

    2. PRE INSTALLATION UI

    Now scroll and find this code-

    Code:
    # Installation UI
    
    ini_set("text_next", "Install Now");
    ini_set("icon_next", "@installbutton");
      
    viewbox(
      #-- Title
        "Ready to Install",
    
      #-- Text
        "ROM is ready to be installed.\n\n"+
    	"Press <b>Install</b> to begin the installation.\n\n"+
    	"To review or change any of your installation settings, press <b>Back</b>.\n\n"+
    	"Press Menu -> Quit Installation to quit.",
    
      #-- Icon
        "@install"
    );

    This is to create a window just before installation process starts

    If you don't want Pre installation window simply delete the Code above,


    This is how it looks in Installer
    1187044_548527191869357_1224071688_n.jpg


    Now you have successfully learnt to create the above Optional windows n popups
    These are the two Optional windows which are frequently used in the Installer to make it more Interactive

    Now scroll and find this code just below the Installation UI Window

    Code:
    endif;

    REMEMER DONT DELETE THE "endif;" It is in the continuation from the above "if prop("menu.prop","selected")=="1" then" code

    Now comes the last and Important window for Installer

    Scroll and find this code in aroma-config-

    Code:
    ##
    # INSTALLATION PROCESS
    #
    
    if prop("menu.prop","selected")== "1" 
    then
    
    ini_set("text_next", "Next");
    ini_set("icon_next", "@next");
    
    install(
      "YOUR ROM/Mod NAME™ Installation",
      getvar("rom_name") + "\n" +
      "Please wait while this ROM blows up your device :P" +
      "",
      "icons/install"
    );
    
    ini_set("text_next", "Finish");
    ini_set("icon_next", "@finish");
    
    checkviewbox(
      #-- Title
        "Installation Completed",
    	
      #-- Text
        "<#selectbg_g><b>Congrats...</b></#>\n\n"+
        "<b>"+ini_get("rom_name")+"</b> has been installed into your device.\n\n",
        
    #-- Icon
        "@welcome",
    
      #-- Checkbox Text
        "Reboot your device now.",
    
      #-- Initial Checkbox value ( 0=unchecked, 1=checked ) -  (Optional, default:0)
        "1",
    
      #-- Save checked value in variable "reboot_it" (Optional)
        "reboot_it"
    );
    endif;
    
    ###
    # Check if reboot checkbox was checked
    
    if
      getvar("reboot_it")=="1"
    then
      #
      # reboot("onfinish");   - Reboot if anything finished
      # reboot("now");        - Reboot Directly
      # reboot("disable");    - If you set reboot("onfinish") before, use this command to revert it.
      #
      reboot("onfinish");
    endif;

    This is the code for creating an Installation Progress and logs User Interface and the Reboot Now Option

    Edit this string in above code to your ROM/Mod name
    "YOUR ROM/Mod NAME™ Installation",

    Rest of all the code is fine

    This is how it looks like in Installer
    1239752_548527188536024_87051489_n.jpg

    Now save the file aroma-config with Ctrl+S or save button


    NOW YOU HAVE SUCCESSFULLY CREATED THE AROMA-CONFIG FILE FOR INSTALLER :)

    THIS WAS ALL ABOUT CREATING THE AROMA INSTALLER USER INTERFACE...
    I HAVE COVERED ALL THE FREQUENTLY USED COMMANDS IN THE TUTORIAL
    THANKS TO @amarullz FOR WONDERFUL AROMA INSTALLER
    IF ANY DOUBTS/ERRORS POST THEM HERE :)

    IN THE NEXT POST WE ARE GOING TO LEARN ABOUT UPDATER-SCRIPT CORRESPONDING TO THE AROMA-CONFIG
    79
    Tutorial for updater-script corresponding to the aroma-config


    In this tutorial we are going to learn about creating updater script corresponding to the Aroma config we have created
    This part is very easy indeed if you have read all my aroma-config guide :)


    So the very first thing you have to do manually is to take a update-binary from any custom rom/mod from your device forum...

    You can find update-binary in this directory- meta-inf\com\google\android\
    replace it with custom update-binary so that your installer will not give errors while installing the mod/rom

    1.) understanding the basics
    so now lets start, open the updater-script file located in the directory- meta-inf\com\google\android\ in notepad++

    scroll and find this code-

    Code:
    if
        file_getprop("/tmp/aroma-data/menu.prop","selected") == "1"
         then

    so now you know why "menu.prop" was declared there in aroma-config
    the == "1" signifies here that the we are now going to define the sub windows inside the first option of menu.prop

    now edit this code to your mod/rom name
    Code:
    		ui_print("-> installing rom/mod name");

    scroll and find this code-
    Code:
    		ui_print("-> mounting system...");
    	run_program("/sbin/busybox", "mount", "/system");

    this is for mounting the system partition so that you can add/delete files from system partition


    2.) Defining the sub windows

    Now we will define the coding for working of sub menus we created in aroma-config

    2.1.) For sub window 1

    Scroll and find this code-
    Code:
    if
        file_getprop("/tmp/aroma/window1.prop","selected.1") == "1"
         then
        ui_print("-> installing option 1...");
    	package_extract_dir("aroma/window1/option1", "/system");
    endif;

    edit the ui_print("-> installing option 1..."); string as per your rom/mod option you defined in aroma-config

    now place your option 1 customisation app to the folder aroma\window1\option1\app
    if it is a framework folder file, place it to aroma\window1\option1\framework folder

    now use have successfully defined option1 for the window 1

    repeat the same for option 2, and for 3,4.... If you have created them also

    now you might have learnt how to define the corresponding options for mods/rom sub window 1 you created in aroma-config


    2.2.) For sub window 2
    now scroll and find this code-
    Code:
    if
        file_getprop("/tmp/aroma/window2.prop","selected.1") == "1"
         then
        ui_print("-> installing option 1...");
    	package_extract_dir("aroma/window2/option1", "/system");
    endif;

    edit the ui_print("-> installing option 1..."); string as per your rom/mod option you defined in aroma-config

    now place your option 1 customisation app to the folder aroma\window1\option2\app
    if it is a framework folder file, place it to aroma\window1\option2\framework folder

    now use have successfully defined option1 for the window 2

    repeat the same for option 2, and for 3,4.... If you have created them also

    now you might have learnt how to define the corresponding options for mods/rom sub window 2 you created in aroma-config

    2.3.) for check box sub window

    scroll and find this code-
    Code:
    if
    	file_getprop("/tmp/aroma/checkbox1.prop","item.1.1") == "1"
    		then
    		ui_print("-> installing item 1.1 ");
    	package_extract_dir("aroma/checkbox1/item-1.1", "/system");
    endif;

    edit the ui_print("-> installing item 1.1 "); string as per your rom/mod option you defined in aroma-config

    now place your item 1.1 customisation app to the folder aroma\checkbox1\item-1.1\app
    if it is a framework folder file, place it to aroma\checkbox1\item-1.1\framework folder

    now use have successfully defined option1 for the check box window

    repeat the same for item 1.2, 1.3 and for 2.1, 2.2 too (and also for additional items if you have created them)

    now you might have learnt how to define the corresponding items for mods/rom checkbox window you created in aroma-config


    3.) Important for rom developers!

    Now if you have made this aroma installer for a rom, you have to make aymlinks and fix permissions for your rom binaries
    for that open the updater script from any rom from your forum and find the word "symlink" and then copy all the lines to your updater script
    if you are not able to find the code, try adding this code to your updater script-
    Code:
    ui_print("-> making symlinks...");
    symlink("toolbox", "/system/bin/start");
    symlink("toolbox", "/system/bin/lsmod");
    symlink("toolbox", "/system/bin/r");
    symlink("toolbox", "/system/bin/vmstat");
    symlink("toolbox", "/system/bin/ifconfig");
    symlink("toolbox", "/system/bin/ionice");
    symlink("toolbox", "/system/bin/schedtop");
    symlink("toolbox", "/system/bin/wipe");
    symlink("toolbox", "/system/bin/reboot1");
    symlink("toolbox", "/system/bin/rmdir");
    symlink("toolbox", "/system/bin/route");
    symlink("toolbox", "/system/bin/chown");
    symlink("toolbox", "/system/bin/lsof");
    symlink("toolbox", "/system/bin/getevent");
    symlink("toolbox", "/system/bin/mkdir");
    symlink("toolbox", "/system/bin/netstat");
    symlink("toolbox", "/system/bin/renice");
    symlink("toolbox", "/system/bin/uptime");
    symlink("mksh", "/system/bin/sh");
    symlink("toolbox", "/system/bin/smd");
    symlink("toolbox", "/system/bin/sync");
    symlink("toolbox", "/system/bin/mount");
    symlink("toolbox", "/system/bin/printenv");
    symlink("toolbox", "/system/bin/top");
    symlink("toolbox", "/system/bin/log");
    symlink("toolbox", "/system/bin/sendevent");
    symlink("toolbox", "/system/bin/ps");
    symlink("toolbox", "/system/bin/dmesg");
    symlink("toolbox", "/system/bin/umount");
    symlink("toolbox", "/system/bin/kill");
    symlink("toolbox", "/system/bin/stop");
    symlink("toolbox", "/system/bin/newfs_msdos");
    symlink("toolbox", "/system/bin/iftop");
    symlink("toolbox", "/system/bin/chmod");
    symlink("toolbox", "/system/bin/rmmod");
    symlink("toolbox", "/system/bin/setconsole");
    symlink("toolbox", "/system/bin/mv");
    symlink("toolbox", "/system/bin/rm");
    symlink("toolbox", "/system/bin/id");
    symlink("toolbox", "/system/bin/watchprops");
    symlink("toolbox", "/system/bin/hd");
    symlink("toolbox", "/system/bin/ctrlaltdel");
    symlink("toolbox", "/system/bin/sleep");
    symlink("toolbox", "/system/bin/ls");
    symlink("toolbox", "/system/bin/cmp");
    symlink("toolbox", "/system/bin/insmod");
    symlink("toolbox", "/system/bin/nandread");
    symlink("toolbox", "/system/bin/date");
    symlink("toolbox", "/system/bin/dd");
    symlink("toolbox", "/system/bin/getprop");
    symlink("toolbox", "/system/bin/cat");
    symlink("toolbox", "/system/bin/df");
    symlink("toolbox", "/system/bin/touch");
    symlink("toolbox", "/system/bin/ioctl");
    symlink("toolbox", "/system/bin/setprop");
    symlink("toolbox", "/system/bin/notify");
    symlink("toolbox", "/system/bin/ln");
    
    ui_print("-> fixing permissions...");
    set_perm_recursive(0, 0, 0755, 0644, "/system");
    set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
    set_perm(0, 3003, 02750, "/system/bin/netcfg");
    set_perm(0, 3004, 02755, "/system/bin/ping");
    set_perm(0, 2000, 06750, "/system/bin/run-as");
    set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
    set_perm(0, 0, 0755, "/system/etc/bluetooth");
    set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
    set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
    set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
    set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
    set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
    set_perm_recursive(0 ,0 , 0755, 0755, "/system/etc/init.d");
    set_perm(0, 0, 0755, "/system/etc/be_movie");
    set_perm(0, 0, 0755, "/system/etc/be_photo");
    set_perm(0, 0, 0755, "/system/etc/be_album");
    set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
    set_perm(0, 2000, 0755, "/system/bin/sysinit");
    set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
    set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
    set_perm(0, 0, 04755, "/system/xbin/busybox");
    set_perm(0, 0, 06755, "/system/xbin/su");

    3.) Fixing permissions for both rom and mod users

    now scroll and find this code-
    Code:
    ui_print("-> fixing permits :p");
    package_extract_file("fix_permissions", "/tmp/fix_permissions");
    set_perm(0, 0, 0777, "/tmp/fix_permissions");
    run_program("/tmp/fix_permissions");
    ui_print("-> finished installation...!");
    ui_print("-> enjoy...");
    ui_print("-> ...");
    ui_print("-> done....");
    
    endif;
    
    run_program("/sbin/busybox", "umount", "/system");
    
    show_progress(1, 0);

    run_program("/tmp/fix_permissions"); is for fixing the permissions

    the endif; present here is in the continuation from file_getprop("/tmp/aroma-data/menu.prop","selected") == "1"

    the command run_program("/sbin/busybox", "umount", "/system"); is for unmounting system partition as the installation is complete now
    now save the file updater script with ctrl+s or save button



    NOW YOU HAVE SUCCESSFULLY CREATED THE UPDATER-SCRIPT FILE FOR INSTALLER :)


    THIS WAS ALL ABOUT CREATING THE CORRESPONDING AROMA INSTALLER UPDATER-SCRIPT...
    I HAVE COVERED ALL THE FREQUENTLY USED COMMANDS IN THE TUTORIAL
    IF ANY DOUBTS/ERRORS POST THEM HERE
    60
    Liked My Guide?
    Press Thanks, Rate my Thread 5 ***** And Thanks for making this thread to portal :)


    F.A.Q SOON!
    4
    Thanks friends for keeping the thread alive and helping the ones in need :)

    I will join you guys after a few months of studies and update this thread with new version/commands if any :)