[Samsung Galaxy Mini] dany547:
You all know Aroma Installer, in the past, with the early versions it didnt work properly with LDPI devices, now i must confirm that it works preatty well; and there was no noob frendly tutorial out there ...

So i decided to make a very short, simple as possible tutorial on how to set it up for your build(no advanced backup setup etc), you must have basic knowledge of the system tree, editing scripts. and kitchen work. If you got any questions or bugs please report them here.

ALL THE CREDIT IS FOR AMARULLZ FOR HIS WORK ON THIS PROJECT,AND DSIXDA FOR THE KITCHEN

ORIGINAL TOPIC

KITCHEN

1. THE START​

First of all you must download the installer HERE and THE KITCHEN if you dont have it.

2. AROMA-CONFIG​

I wont explain how to set up the kitchen, you just have to go on the development topic and check that out.

Now, lets focus on the installer, you got the zip file, on the time of this topic it is v2.51, extract it where you want.

Create a folder (name it as you desire) lets say: DANY here you'll put all the apps/tweeks, in separate subfolders( will use this later)

Inside you will see a META-INF folder, i want you to open it, then navigate to the android subfolder.

Here you will see alot of stuff, that you may or may not be familiar with. For those who dont really know whats in there i suggest to leave this topic...now, for the people that are 5% familiar with the tree/editing (as i); all our focus is on 2 config files updater-script, aroma-config and one folder aroma

The starting point of the installer is the aroma-config from there the update-binary-installer, update-binary pull the instructions and send it to the updater-script so it will know what to install or what not... ok.

Next i want you to open the aroma-config, here you will see aalooot of info that maybe you have no ideea what it is for or what is does, no proplem i will try to explain as explicit as i can be.

Here in the config, as i said above are the main instructions that are sent to the updater-script, but also the main settings so that the installer can work on your device, here you set the : touch screen calibration settings, hardware keys, res of the installer...now note that all these resources so that the installer could display data are pulled from the aroma folder,witch will get to that later on.

Now what you have to do is: 1. on line 54 of the config remove the "#"

ini_set("force_colorspace","rgba");

what this does, its "For device which have a problem with color ( not displaying the correct color ) " as it says above on the config, so we must prevent that from happening.

2. lines 66-71 delete them.Here we must set our devices PPi, you just copy this

if sysprop("ro.sf.lcd_density")=="120" then
ini_set("dp","1"); #-- LDPI ( 240x320 / QVGA )
endif;
if sysprop("ro.sf.lcd_density")=="160" then
ini_set("dp","2"); #-- MDPI ( 340x480 / HVGA )
endif;
if sysprop("ro.sf.lcd_density")=="240" then
ini_set("dp","3"); #-- HDPI ( 480x800 / WVGA )
endif;

3. line 87, the touch screen calibration,delete the old one and copy this line of code

calibrate_matrix(
"11583.00", "432.00", "5356.50", "105.00",
"11830.00", "-28077.50", "12079.50", "0"
);

4. line 119 to 123, hardware buttons

ini_set("customkeycode_up", "115");
ini_set("customkeycode_down", "114");
ini_set("customkeycode_select", "102");
ini_set("customkeycode_menu", "139");
ini_set("customkeycode_back", "158");

5. line 129-133, i think that you can figure this out

6. 139-144, here you can define a .png splash screen 235X99

7. 172, 211-268 here you can define the font size, and the languages that you want in the build, recommanded font size is 19-20 or you can let it be as it is, but it will be small, you have to test it to see

if prop("lang.prop","selected.0")=="6" then
loadlang("langs/fr.lang");
fontresload( "0", "ttf/Roboto-Regular.ttf", "19" );
fontresload( "1", "ttf/Roboto-Regular.ttf", "20" );
endif;

8. 295-370, are the themes for Aroma Installer, we wont touch this

9. Now, from where you'll see STEP5( i dunno the exact line :cyclops:) delete all the way down to STEP6, here the installer starts a demo, and we dont want all those options/tests and Copy this ---->

# STEP 5 - SHOW MENUBOX - AROMA INSTALLER MENU
#
menubox(
#-- Title
"MENU",

#-- Sub Title
"Select a menu to start:",

#-- Icon
"@apps",

#-- Will be saved in /tmp/aroma/demo.prop
"menu.prop",

#-------------------------+-----------------[ Menubox Items ]-------------------------+---------------#
# TITLE | SUBTITLE | Item Icons #
#-------------------------+-----------------------------------------------------------+---------------#

"Install "+ini_get("rom_name"), "Install Rom using AROMA Installer", "@install", #-- selected = 1
"System Info",	"Info about Device/Partions", "@info", #-- selected = 2
"Return to...",	"Retun to a previous Menu...", "@customize", #-- selected = 3
"Other Option",	"Show Other Optionsi", "@apps" #-- selected = 4
);

###################################################################################################################
# #
# AROMA INSTALLER #
# #
###################################################################################################################

##--------------------------------------
#
# 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>Device Information!</b></@>\n\n"+

"Model\t\t\t: <b><#selectbg_g>"+sysprop("ro.product.model")+"</#></b>\n"+
"Name\t\t\t: <b><#selectbg_g>"+sysprop("ro.product.name")+"</#></b>\n"+
"Device Name\t\t: <b><#selectbg_g>"+sysprop("ro.product.device")+"</#></b>\n"+
"Board Name\t\t: <b><#selectbg_g>"+sysprop("ro.product.board")+"</#></b>\n"+
"Manufacturer\t\t: <b><#selectbg_g>"+sysprop("ro.product.manufacturer")+"</#></b>\n\n"+

"CPU\t\t\t: <b><#selectbg_g>"+sysprop("ro.product.cpu.abi")+"</#></b>\n"+
"LCD Desinty\t\t: <b><#selectbg_g>"+sysprop("ro.sf.lcd_density")+"</#></b>\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"+
"(/mnt/sdcard)\t\t: <b><#selectbg_g>"+getdisksize("/mnt/sdcard","m")+" MB</#></b>\n"+
"\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/mnt/sdcard","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"+
"SD-EXT Size\t\t: <b><#selectbg_g>"+getdisksize("/sd-ext","m")+" MB</#></b>\n"+
"\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/sd-ext","m")+" MB</#></b>\n\n"+

""
);

#-- Show Textbox
textbox(
#-- Title
"System info",

#-- Subtitle
"Loading...",

#-- Icon
"@info",

#-- Text
getvar("sysinfo")
);

#-- Show Alert
#alert(
#-- Alert Title
#"Info",

#-- Alert Text
#"You will get back to main menu now",

#-- Alert Icon
#"@alert"
#);

#-- Back to Demo Menu ( 2 Wizard UI to Back )
back("2");

endif;

##--------------------------------------
#
# Back Sequence Demo
#
if prop("menu.prop","selected")=="3" then

#-- Show Back Menu
menubox(
#-- Title
"Main Menu",

#-- Sub Title
"Please select the option that suits your needs.",

#-- Icon
"@customize",

#-- Will be saved in /tmp/aroma/back_demo.prop
"back_demo.prop",

#-------------------------+-----------------[ Menubox Items ]-------------------------+---------------#
# TITLE | SUBTITLE | Item Icons #
#-------------------------+-----------------------------------------------------------+---------------#

"Main Menu", "Return to main menu", "@apps", #-- selected = 1
"Changelog", "Return to changelog", "@update", #-- selected = 2
"Terms and Conditions", "Agreement", "@license", #-- selected = 3
"Start Menu", "Return to start menu", "@welcome", #-- selected = 4
"Select theme", "Return to theme menu", "@personalize" #-- selected = 5
);

#-- Back Size will be saved in "back_value" variable
setvar(
#-- Variable Name
"back_value",

#-- Variable Value ( use calculate to set selected+1 )
cal(
#-- First Value
prop("back_menu.prop","selected"),

#-- Operator (+ = add)
"+",

#-- Second Value
"1"
)
);

#-- Do Back Action
back(
getvar("back_value")
);
endif;

##--------------------------------------
#
# Other Demo
#
if prop("menu.prop","selected")=="4" then

#-- Show Other Demo
menubox(
#-- Title
"Other Options",

#-- Sub Title
"Select a option below.",

#-- Icon
"@apps",

#-- Will be saved in /tmp/aroma/other_demo.prop
"other_demo.prop",

#-------------------------+-----------------[ Menubox Items ]-------------------------+---------------#
# TITLE | SUBTITLE | Item Icons #
#-------------------------+-----------------------------------------------------------+---------------#

"Reboot", "Reboot the device", "@alert", #-- selected = 1
"Exit", "Exit rom installation, "@install" #-- selected = 2
);

#-- Reboot
if prop("other_demo.prop","selected")=="1" then
if
confirm(
#-- Title
"Rebooting",
#-- Text
"Do you really want to reboot the Device?",
#-- Icon (Optional)
"@alert"
)=="yes"
then
#
# reboot("onfinish"); - Reboot if anything finished
# reboot("now"); - Reboot Directly
# reboot("disable"); - If you set reboot("now") before, use this command to revert it.
#
reboot("now");
endif;
endif;

#-- Exit
if prop("other_demo.prop","selected")=="2" then
if
confirm(
#-- Title
"Exit",
#-- Text
"Are you sure want to exit to CWM??",
#-- Icon (Optional)
"@alert"
)=="yes"
then
#-- Exit - NOTE: Add dummy argument
exit("");
endif;
endif;

#-- Back To Other Demo Menu
back(
getvar("1")
);
endif;

###################################################################################################################
# #
# INSTALLATION #
# #
###################################################################################################################

###################################################################################################################
#
# STEP 6 - SHOW MENUBOX - INSTALLATION TYPE
#
menubox(
#-- Title
"Installation Type",

#-- Sub Title
"Choose the installation type that best suits your needs.",

#-- Icon
"@install",

#-- Will be saved in /tmp/aroma/type.prop
"type.prop",

#-------------------------+-----------------[ Menubox Items ]-------------------------+---------------#
# TITLE | SUBTITLE | Item Icons #
#-------------------------+-----------------------------------------------------------+---------------#

"Default", "Will install default features and configurations", "@install", #-- selected = 1
"Typical", "All recommended features will be installed", "@default", #-- selected = 2
"Minimalist", "Only required features will be installed", "@apps", #-- selected = 3
"Custom", "Choose which program or mod features you want to installed. "+
"Recommended for advanced users", "@customize" #-- selected = 4
);

10. Here starts the fun part, as seen above in the STEP6 code, there are 4 options "DEFAULT, TYPICAL, MINIMALISTIC, CUSTOM", you can keep only 2 or 1 option, that depends to you and what you need. You will also notice this line #-- Will be saved in /tmp/aroma/type.prop

"type.prop", what this mean is that for each option you press, the info in stored in a so called TYPE.PROP file that later on the updater-script will pull the info from, and this is not present just here, this is how aroma stores the information in .prop files

11. STEP 7- STEP 8 here we gonna define what kernel we want to install/mod/bootanimation, default or custom install.

Lets Focus on STEP7 to explain a little , line 1431-1443, what we see here,( i will translate :laugh: ) IF we selected the Default installation, then it will install by default 2.6.0 kernel, Nexus boot animation, generic app2sd etc.

The Code Part!!!

You can define here, witch apps,mods will be installed by default by pressing Default installation button. In mods.prop the binary wrote the option 1 so the updater script now what to do THEN the binary olso wrote the default app config on another .prop file, mods.prop.Applications are defined by a syntax so its easyer to assign selected1.=1, selected.2=2 you get the ideea.

Below now, on line 1464 (i guess), where the kernel, boot animation is, you can define the names of the Kernel, Mods

ex:

"Select Kernel", "", 2, #-- Group 1. key = "selected.1"
"SUPER EXTREME KERNEL", "YOU WILL SH*T BUTTER IF YOU INSTALL IT", [color=red]1, #-- selected.1 = 1[/color]

Note that the

1

, it shows if i want to installet or not and

selected.1 = 1

is for reference so you now with syntax is for witch application, and also

selected.

X.X

the red X shows the group of the apps,the blue the order.

12. Now that you understood a lil, i will show you a CUSTOM config, so you can understand better

#-- IF Installation type = "Custom" Show Customize Selection
checkbox(
#-- Title
"Customize Your Installation",

#-- Sub Title
"Select the program or mod features you want to installed.\n"+ witch
"Select an item in the list below to change how a feature is installed.",

#-- Icon: <AROMA Resource Dir>/icons/personalize.png or <ThemeDir>/icon.personalize.png
"@personalize",

#-- Will be saved in /tmp/aroma/customize.prop
"customize.prop",

#------------------------------------------------[ Checkbox Without Group ]----------------------------------------------#
# TITLE | SUBTITLE | Initial Value #
#------------------+-------------------------------------------------------------------------------------+---------------#

"Applications", "",
2, #-- Group 1. key = "item.1.x"
"Deezer", "Listen to music online", 1,
"ES File Explorer ", "File manager", 1,
"Facebook", "Facebook app", 1,
"Google +", "Google Plus App", 1,
"Instagram", "Capture photos and share them", 1,
"No Frills CPU", "Overclock cpu change i/o", 1,
"Shazam", "Music/video recognison", 1,
"Swype", "Keyboard", 1,
"Twitter", "Twitter app", 1,
"Zedge", "Wallpapers/ringtones/live wp", 1,
"FM Radio", "FM Radio", 1,
"Terminal", "Terminal Emulator", 1,
"DPS Manager", "Phone equalizer", 1,
"Jelly Walls", "Jb wallpapers", 1,
"ICS Standard", "theme", 1,
"ICS Standard2", "theme", 1,
"ICS Blue", "theme", 1,
"Holo Locker", "Screen Locker", 1

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

Here in the code, you wil see the the info it will be writen to customize.prop,

Grop Key: Group 1. key = "item.1.x

, the Select values , all the apps are selected, but on the top, you saw something new, and that is checkbox, now, with this syntax on the screen will be displayed a menu where you can select the apps that you need and the info stored on customize.prop, not like in the previous type.prop that a set of apps was selected and you couldent do anything. Also note that checkbox is similar to menu box, but the menu box displays the option that you want to start with, and then displays a checkbox. But i will stop here so i wont confuse you.

3.UPDATER-SCRIPT​

That was the aroma script basic understanding, editing. Now the updater script, now we need to pull the info from the aroma config, i wont explain edify-script you must search that on google, im just showing you the the updater-script pulls the data from the aroma-config.

I dont know if i mentioned this before...but all the .prop files will be stored in /tmp/aroma this is the path of the temporary folder.

Now lets open the default updater-script you will see on line73 ui_print("@INFORMATIONS"); in brackets you can insert what text you want, next on lines81 to 109 is all the mounting that must occur so that the installation process can happen, here are the syntaxes that you will need at first.

package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "backup");
ui_print("FORMATING SYSTEM");
format("ext4", "EMMC", "/dev/block/stl12");
ui_print("MOUNTING SYSTEM")
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
ui_print(" Mounting /data");
ui_print("|||||||||||");
unmount("/data");
mount("ext4", "EMMC", "/dev/block/stl13", "/data");
set_progress(0.04);
ui_print("Please Wait...");
ui_print("|||||||||||");
set_progress(0.05);
ui_print("|||||||||||");
ui_print("@ Wiping Data");
if
file_getprop("/tmp/aroma/wipe.prop","selected") == "1"
then
set_progress(0.06);
ui_print(" Formatting /data");
format("ext4", "EMMC", "/dev/block/stl13");
ui_print(" Formatting /cache");
format("ext4", "EMMC", "/dev/block/stl14");
ui_print(" Mounting /data");
ui_print(" Formatting /sd-ext");
format("ext4", "EMMC", "/dev/block/mmcblk0p2");
ui_print("|||||||||||");
set_progress(0.08);
ui_print(" Wiping /sdcard/.android_secure");
delete_recursive("/sdcard/.android_secure");
endif;
if
file_getprop("/tmp/aroma/wipe.prop","selected") == "0"
then
ui_print("SKIPING RESET");
endif;

Is like in linux, define the path: mount, unmount or format ,search on google for a better understanding.

Lets say in the aroma-config we defined that /system will be wiped, how does updater-script figure that out? Easy, will invoke the file where the date is stored plus a if sentance, the file is in tmp/aroma/wipe.prop and here is the code

if
file_getprop("/tmp/aroma/wipe.prop","selected") == "1"
then
set_progress(0.06);
ui_print(" Formatting /data");
unmount("/data");
format("ext4", "EMMC", "/dev/block/stl13");
ui_print(" Mounting /data");
mount("ext4", "EMMC", "/dev/block/stl13", "/data");
set_progress(0.07);
ui_print(" Formatting /sd-ext");
unmount("/sd-ext");
format("ext4", "EMMC", "/dev/block/mmcblk0p2");
ui_print("|||||||||||");
set_progress(0.08);
ui_print(" Wiping /sdcard/.android_secure");
delete_recursive("/sdcard/.android_secure");
endif;

TRANSLATED:if we selected to wipe the previous rom it will wipe the data partition, the EXT4 partition and .android_secure

But if we selected not to wipe?!

if
file_getprop("/tmp/aroma/wipe.prop","selected") == "0"
then
ui_print(" SKIP Wipe Data!");
set_progress(0.08);
endif;

and it will do nothing, wil move to the next step.

For the apps, the code is in customize.prop and the syntax looks like this

if
file_getprop("/tmp/aroma/customize.prop","item.1.1") == "0"
then
delete("/system/app/FM.apk");
ui_print("Deleting FM");
endif;

# Bootanim
if
file_getprop("/tmp/aroma/customize.prop","item.1.2") == "1"
then
ui_print(" Bootanimation");
package_extract_file("DANY/animationname.zip", "/system/media/animationname.zip");
endif;

TRANSLATED: IF item FM radio was selected to be installed then so it will be, if 0, (not) then it will be deleted. If the boot animation is selected to be installed, ( remember that i wanted you to create a folder in step 2?! we called it DANY there is the custom bootanimation stored as you can see, and keep attention on this folder cuz we gonna use it in our update.zip) it will be moved to /system/media.

4.AROMA FOLDER​

Here we are not gonna edit much, in the langs folder you can edit some text that that will apare in the installer itself, and in the main folder of aroma replace the sample.png with one that you desire, and in the splash folder you can resize the animation at startup 235X99 and the icons.

5.KITCHEN​

Now all you have to do is save all the work, grab your META-INF and DANY folder place them on the working folder of the kitchen, but take note that you must delete the old META-INF in the kitchen also make sure You took an

update-binary

from a working ROM,

renamed it to update-binary-installer and overwrote the one in my AROMA Installer zip

Build the rom. but the zip on SD card, reboot into CWM then wipe cache ,reboot recovery, next install zip from SD card ,choose the zip and hope for the best :D

That covers it, enjoy now testing aroma in your device, and im sorry if i misspeled something, say thanks if i helped you and

please, please correct me if i wrote something wrong!!!, i was so tired.