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--
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--
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
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
-> 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
-> 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
-> 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-
-> 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
-> 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
-> 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
-> 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: