Search This thread

jokersax11

Inactive Recognized Developer
Aug 13, 2009
4,155
7,006
www.jokersax.com
Do you have different mod.props for each version of the ROM?

The problem for me is I have mods that work for one version of my ROM that I don't want to show up for another version.

Right now it goes:

First Screen - select ROM
SOS X
SOS S
SOS N

Second Screen - select "DEX"
DEODEX
ODEX

Third Screen - select install type
Typical Installation
Custom Installation

Fourth Screen - mods.prop for each ROM Type

...

At this screen I want a separate screen for each possible choice. I have it coded in my aroma-config, but unfortunately, my updater-script needs to reference EACH *.prop during install. I have tried putting blank *.props and .props with values that SHOULD let it install. But I'm still getting: cannot stat sosx.prop (this is the first custom .prop mentioned in updater-script).

So, I'm just trying to figure out the best way to implement this :)

Maybe a master prop. Each screen could be a section of that master prop and of its own.



Sent from my MB855 using XDA
 

Turge

Inactive Recognized Developer
Sep 20, 2008
4,789
20,760
Hamilton
venomroms.com
I'm currently having a problem with Aroma Installer on my ROM...

After updater-script has been installed, I click on Save Logs and it starts writing the .txt file in the same folder as the zip but it never completes.. it just hangs.

Any idea why this would happen? Is there a temporary location for the log file before it gets saved to the folder?
 

carl1961

Senior Member
Dec 5, 2010
7,521
6,201
Tickfaw
Do you have different mod.props for each version of the ROM?

The problem for me is I have mods that work for one version of my ROM that I don't want to show up for another version.

Right now it goes:

First Screen - select ROM
SOS X
SOS S
SOS N

Second Screen - select "DEX"
DEODEX
ODEX

Third Screen - select install type
Typical Installation
Custom Installation

Fourth Screen - mods.prop for each ROM Type

...

At this screen I want a separate screen for each possible choice. I have it coded in my aroma-config, but unfortunately, my updater-script needs to reference EACH *.prop during install. I have tried putting blank *.props and .props with values that SHOULD let it install. But I'm still getting: cannot stat sosx.prop (this is the first custom .prop mentioned in updater-script).

So, I'm just trying to figure out the best way to implement this :)

In my opinon this would be a rather large rom (over 800MB ++) to download, 3 sets of roms deodex and odex for each rom and really complicated to keep up with in scripts

much easer to do 6 diffrent roms and not be double roms so If I want deodex rom why should I have to download odex? and your downloaders would be happy, look at just a sample would be like ( and the code here is yet to be worked out)

Code:
#First Screen - select ROM
selectbox(
  "Select Your Rom",
  "<Please select Your ROM Choice Below",
  "icons/install",
  "selectrom.prop",
  
 "Your ROM Choice","",2,
  "SOS X",
  "install SOS X",1,
  "SOS S",
  "Install SOS S",0,
   "SOS N",
  "Install SOS N",0
	
);

#Second Screen - select "DEX"
selectbox(
  "DEODEX or ODEX Files",
  "<Please select DEODEX or ODEX Choice Below",
  "icons/install",
  "deodex.prop",
  
 "DEODEX or ODEX","",2,
  "DEODEX",
  "install DEODEX Files",1,
  "ODEX",
  "Install ODEX Files",0
  	
);

# Third Screen - select install type

selectbox(
  "Select Rom Setup Type",
  "Please select ROM setup type below",
  "icons/install",
  "type.prop",
  
 "Stock Or Customized Install","",2,
  "Custom Install",
  "Install only selected packages into your phone",1,
  "Default Stock Install",
  "Install default stock recommended packages into your phone",0
	
);


# Fourth Screen - mods.prop for each ROM Type

if
      file_getprop("/tmp/aroma-data/selectrom.prop","selected.1") == "1" &&
      file_getprop("/tmp/aroma-data/type.prop","selected.1") == "1"
  then

checkbox(
  "Customized Install",
  "Please UnCheck any Applications, Mods, Services which you do not want Install in the list below:",
  "icons/personalize",
  "mod1.prop",
#1  
# Applications:
  "Applications","",2,
    "Adobe FlashPlayer","Bring the FULL web to your device with Flash Player",1,
    "Adobe Reader",     "The global standard for reliably viewing and sharing PDF documents",1,
    "FBReader",         "Free (GPL) e-book reader for Android",1,

#2	
  "Internet & Social Networking","",2,  
    "Facebook",         "Share and stay connected with your friends with the Facebook for Android app",1,
    "Twitter",          "Follow your interests: instant updates from your friends",1,

#4	
  
  "HTC Applications","",2,
    "Friendstream",       "Show your friends update via HTC Sense Friendstream", 1,
    "News Reader",        "RSS Reader with HTC Sense News Widget",1,

);
else
  # Default .prop
  writetmpfile(
    "mod1.prop",
      "item.1.1=1\n"+
      "item.1.2=1\n"+
      "item.1.3=1\n"+
	  
      "item.2.1=1\n"+
      "item.2.2=1\n"+  

	  "item.3.1=0\n"+
      "item.3.2=0\n"+
	  
	  "item.4.1=1\n"+
      "item.4.2=1\n"+
 );
endif;	  
	  
# Fourth Screen - mods.prop for each ROM Type

if
      file_getprop("/tmp/aroma-data/selectrom.prop","selected.1") == "2" &&
      file_getprop("/tmp/aroma-data/type.prop","selected.1") == "1"
  then

checkbox(
  "Customized Install",
  "Please UnCheck any Applications, Mods, Services which you do not want Install in the list below:",
  "icons/personalize",
  "mod2.prop",
#1  
# Applications:
  "Applications","",2,
    "Adobe FlashPlayer","Bring the FULL web to your device with Flash Player",1,
    "Adobe Reader",     "The global standard for reliably viewing and sharing PDF documents",1,
    "FBReader",         "Free (GPL) e-book reader for Android",1,

#2	
  "Internet & Social Networking","",2,  
    "Facebook",         "Share and stay connected with your friends with the Facebook for Android app",1,
    "Twitter",          "Follow your interests: instant updates from your friends",1,

#4	
  
  "HTC Applications","",2,
    "Friendstream",       "Show your friends update via HTC Sense Friendstream", 1,
    "News Reader",        "RSS Reader with HTC Sense News Widget",1,

);
else
  # Default .prop
  writetmpfile(
    "mod2.prop",
      "item.1.1=1\n"+
      "item.1.2=1\n"+
      "item.1.3=1\n"+
	  
      "item.2.1=1\n"+
      "item.2.2=1\n"+  

	  "item.3.1=0\n"+
      "item.3.2=0\n"+
	  
	  "item.4.1=1\n"+
      "item.4.2=1\n"+
 );
endif;	  
	  
# Fourth Screen - mods.prop for each ROM Type

if
      file_getprop("/tmp/aroma-data/selectrom.prop","selected.1") == "3" &&
      file_getprop("/tmp/aroma-data/type.prop","selected.1") == "1"
  then

checkbox(
  "Customized Install",
  "Please UnCheck any Applications, Mods, Services which you do not want Install in the list below:",
  "icons/personalize",
  "mod3.prop",
#1  
# Applications:
  "Applications","",2,
    "Adobe FlashPlayer","Bring the FULL web to your device with Flash Player",1,
    "Adobe Reader",     "The global standard for reliably viewing and sharing PDF documents",1,
    "FBReader",         "Free (GPL) e-book reader for Android",1,

#2	
  "Internet & Social Networking","",2,  
    "Facebook",         "Share and stay connected with your friends with the Facebook for Android app",1,
    "Twitter",          "Follow your interests: instant updates from your friends",1,

#4	
  
  "HTC Applications","",2,
    "Friendstream",       "Show your friends update via HTC Sense Friendstream", 1,
    "News Reader",        "RSS Reader with HTC Sense News Widget",1,

);
else
  # Default .prop
  writetmpfile(
    "mod3.prop",
      "item.1.1=1\n"+
      "item.1.2=1\n"+
      "item.1.3=1\n"+
	  
      "item.2.1=1\n"+
      "item.2.2=1\n"+  

	  "item.3.1=0\n"+
      "item.3.2=0\n"+
	  
	  "item.4.1=1\n"+
      "item.4.2=1\n"+
 );
endif;	  
	  
If you want multi language then you'll need to set symbolic links (keys)

# Third Screen - select install type symbolic links (keys)  example:
selectbox(
  "<~selectromsetuptype>",
  "<~pleaseselectromsetuptypebelow>",
  "icons/install",
  "type.prop",
  
 "<~stockorcustomizeinstall>","",2,
  "<~customizeinstall>",
  "<~iospiyp>",1,
  "<~defaultstockinstall>",
  "<~idsrpiyp>",0
	
);





en.lang (in langs folder)

selectromsetuptype=Select ROM Setup Type
pleaseselectromsetuptypebelow=Please Select ROM Setup Type Below:
stockorcustomizeinstall=Stock Or Customize Install
customizeinstall=Customize Install
iospiyp=Install only selected packages into your phone
defaultstockinstall=Default Stock Install
idsrpiyp=Install default stock recommended packages into your phone

cn.lang (in langs folder)  has to be (UTF-8 file to see special letters cn, ar lang)

selectromsetuptype=選擇ROM安裝類型
pleaseselectromsetuptypebelow=請選擇下面的ROM安裝類型:
stockorcustomizeinstall=股票或自定義安裝
customizeinstall=自定義安裝
iospiyp=只有選擇的軟件包安裝到您的手機
defaultstockinstall=安裝默認的股票推薦
idsrpiyp=安裝默認的股票推薦到您的手機


setting up updater.script will be the hardest part to work out

# Deodex files

if
    file_getprop("/tmp/aroma-data/selectrom.prop","selected.1") == "1" &&
    file_getprop("/tmp/aroma-data/customize.prop","item.1.1") == "1" &&
    file_getprop("/tmp/aroma-data/deodex.prop","selected.1") == "1" 
	
then


i##---- Customize Packages
# Applications:
set_progress(0.7);
# app_adobe_flashplayer
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.1.1") == "1"
then
  ui_print("@  Installing Package: app_adobe_flashplayer");
  package_extract_dir("customize/app/deodex/app_adobe_flashplayer", "/data");
endif;


# app_adobe_reader
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.1.2") == "1"
then
  ui_print("@  Installing Package: app_adobe_reader");
  package_extract_dir("customize/app/deodex/app_adobe_reader", "/data");
endif;

# app_fbjreader 
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.1.3") == "1"
then
  ui_print("@  Installing  FBReader");
  package_extract_dir("customize/app/deodex/app_fbjreader", "/data");
endif;  

# app_social_facebook
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.2.1") == "1"
then
  ui_print("@  Installing Package: app_social_facebook");
  package_extract_dir("customize/app/deodex/app_social_facebook", "/data");
endif;

# app_twitter
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.2.2") == "1"
then
  ui_print("@  Installing Package: app_twitter");
  package_extract_dir("customize/app/deodex/app_twitter", "/data");
endif;

 # Tools & File Manager
   
# app_filemanager_estrongs
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.3.1") == "1"
then
  ui_print("@  Installing Package: app_filemanager_estrongs");
  package_extract_dir("customize/app/deodex/app_filemanager_estrongs", "/data");
endif;

# app_tools_backupeverything
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.3.2") == "1"
then
  ui_print("@  Installing Package: app_tools_backupeverything");
  package_extract_dir("customize/app/deodex/app_tools_backupeverything", "/data");
endif;
set_progress(0.9);
	
# htc_friendstream
if
  file_getprop("/tmp/aroma-data/customize.prop","item.4.1") == "1"
then
  ui_print("@  Installing Package: htc_friendstream");
  package_extract_dir("customize/app/deodex/htc_friendstream", "/data");
endif;


# htc_greader
if
  file_getprop("/tmp/aroma-data/customize.prop","item.4.2") == "1"
then
  ui_print("@  Installing Package: htc_greader");
  package_extract_dir("customize/app/deodex/htc_greader", "/data");
endif;

else
# Odex files

if
    file_getprop("/tmp/aroma-data/selectrom.prop","selected.1") == "1" &&  
	file_getprop("/tmp/aroma-data/type.prop","selected.1") == "1" &&
    file_getprop("/tmp/aroma-data/deodex.prop","selected.1") == "2"
	
then


i##---- Customize Packages
# Applications:
set_progress(0.7);
# app_adobe_flashplayer
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.1.1") == "1"
then
  ui_print("@  Installing Package: app_adobe_flashplayer");
  package_extract_dir("customize/app/odex/app_adobe_flashplayer", "/data");
endif;


# app_adobe_reader
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.1.2") == "1"
then
  ui_print("@  Installing Package: app_adobe_reader");
  package_extract_dir("customize/app/odex/app_adobe_reader", "/data");
endif;

# app_fbjreader 
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.1.3") == "1"
then
  ui_print("@  Installing  FBReader");
  package_extract_dir("customize/app/odex/app_fbjreader", "/data");
endif;  

# app_social_facebook
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.2.1") == "1"
then
  ui_print("@  Installing Package: app_social_facebook");
  package_extract_dir("customize/app/odex/app_social_facebook", "/data");
endif;

# app_twitter
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.2.2") == "1"
then
  ui_print("@  Installing Package: app_twitter");
  package_extract_dir("customize/app/odex/app_twitter", "/data");
endif;

 # Tools & File Manager
   
# app_filemanager_estrongs
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.3.1") == "1"
then
  ui_print("@  Installing Package: app_filemanager_estrongs");
  package_extract_dir("customize/app/odex/app_filemanager_estrongs", "/data");
endif;

# app_tools_backupeverything
if
  file_getprop("/tmp/aroma-data/mod1.prop","item.3.2") == "1"
then
  ui_print("@  Installing Package: app_tools_backupeverything");
  package_extract_dir("customize/app/odex/app_tools_backupeverything", "/data");
endif;
set_progress(0.9);
	
# htc_friendstream
if
  file_getprop("/tmp/aroma-data/customize.prop","item.4.1") == "1"
then
  ui_print("@  Installing Package: htc_friendstream");
  package_extract_dir("customize/app/odex/htc_friendstream", "/data");
endif;


# htc_greader
if
  file_getprop("/tmp/aroma-data/customize.prop","item.4.2") == "1"
then
  ui_print("@  Installing Package: htc_greader");
  package_extract_dir("customize/app/odex/htc_greader", "/data");
endif;

else


you would need this for each mod    mod1 (rom1), mod2, rom2)and mod3 rom3)


---------- Post added at 05:31 AM ---------- Previous post was at 05:03 AM ----------

I'm currently having a problem with Aroma Installer on my ROM...

After updater-script has been installed, I click on Save Logs and it starts writing the .txt file in the same folder as the zip but it never completes.. it just hangs.

Any idea why this would happen? Is there a temporary location for the log file before it gets saved to the folder?

Turge do you have anything in updater script that uses /tmp folder?

like a alignment for /ext I had that issue when trying to add coole's alignment script, it messed with aroma installer and froze aroma when ypr press log or finish

---------- Post added at 05:57 AM ---------- Previous post was at 05:31 AM ----------

ROM That Already Uses AROMA Installer
If you release the ROM with AROMA Installer, please inform me here, I will add your ROM in this post.


UrDroid_2.0_CLK_MGLDR_EU_TMOUS_Runnymede_1.27.1400.4_Sense_3.5_marc1706_0.2.0_kernel.zip

Using amarullz AROMA Installer DAHLIA - 2.00 - NIGHTLY BUILD 120414-010
Multi Language "English,Indonesian,Espanol,Simplified Chinese,Arabic,French,
Russian,Italian,Dutch,Polish,Serbian

12 languages ( I'm sure google made mistakes, not me :D ) also I'm sure there or maybe better ways I could have done the script's

test run of just aroma installer (Just a Dummy Updater Script, Updater Script Does not Install Anything)

UrDroid_2.0_aroma_script_test_META-INF.zip
 
Last edited:

dk_zero-cool

Senior Member
Nov 6, 2010
3,529
4,996
Horsens
@amarullz

The disable option works fine, however just a small issue.

Let's say I have a selectbox with 6 items, and in some cases either option 5 or 6 or both might be disabled depending on certain settings.

If option 5 is disabled while option 6 is enabled, then option 6 will become option 5 in the prop file. Since I only have two options that can be either disabled or enabled, it is easily handled by a simple iif() function. But in more complex situations it would be easier if the option numbers was kept original in the prop file.

And for people using the prop file in the updater-script (I create custom prop from within Aroma using variables), it might be a good idea to append the number 3 (disabled) to the disabled options. That way people don't get errors trying to fetch none existing properties.

Just some ideas for the otherwise brilliant installer :)
 

varun.chitre15

Inactive Recognized Developer
Oct 23, 2011
3,153
15,403
Sangli
@amarullz
Yippe Yippe!
At last with the 1.64 build my problem is solved!!!
Now resolution is superbly fine!!!
Now I can proceed my development with peace :D :D :D

Sent from my Micromax_A70 using Tapatalk 2
 

varun.chitre15

Inactive Recognized Developer
Oct 23, 2011
3,153
15,403
Sangli
But still some glitches.
Please see these shots
P4160235.JPG

P4160238.JPG

P4160240.JPG

P4160241.JPG

P4160243.JPG

P4160244.JPG


P4160246.JPG


Previously as the dimensions were big so couldn't verify touch as the UI is perfect now(these glitches :()just got to know touch is not working and only softkeys are working.

Waiting for help

Sent from my Micromax_A70 using Tapatalk 2
 

Jabbacks

Senior Member
Aug 1, 2011
90
3
Hi guys, do you have other links besides the ones posted. I'm having problem with dl.xda-developers... It takes a while to read and when download is ready, it gives server errors. I tried the nightly, no luck.

Scripts seen here are quite impressive. I'm sure you have 1 for Exhibit II.

Thanks.... :cool:
 

Turge

Inactive Recognized Developer
Sep 20, 2008
4,789
20,760
Hamilton
venomroms.com
Turge do you have anything in updater script that uses /tmp folder?

like a alignment for /ext I had that issue when trying to add coole's alignment script, it messed with aroma installer and froze aroma when ypr press log or finish

Yup.. using the /tmp folder like crazy. :D

I'll try creating a different folder and using it as temp to see if it fixes it. Thanks.
 

tantrums

Senior Member
Apr 1, 2011
705
2,253
Inside my house
Using amarullz AROMA Installer DAHLIA - 2.00 - NIGHTLY BUILD 120414-010
Multi Language "English,Indonesian,Espanol,Simplified Chinese,Arabic,French,
Russian,Italian,Dutch,Polish,Serbian

12 languages ( I'm sure google made mistakes, not me :D ) also I'm sure there or maybe better ways I could have done the script's

test run of just aroma installer (Just a Dummy Updater Script, Updater Script Does not Install Anything)

UrDroid_2.0_aroma_script_test_META-INF.zip

Wow 12 languages, I would like to test your 12 languages. But I cannot download the dummy. It says "Invalid ID"
 

denkext

Senior Member
Feb 20, 2011
274
94
Bandar Lampung
anybody knows how to fit this installer to ldpi devices? eg. Galaxy Mini (240x320)
i mean the resolution / dimension

thanks in advance
 
Last edited:

darkmantra

Senior Member
Oct 11, 2011
648
320
Sur, Oman
Hi everyone, hope someone can help on my script. Been trying this to run on my phone this past few days and no luck that my script is getting executed. I replace the update-binary-installer with the one from my previous working rom and download the latest v1.64. Somehow just after I select the last option it shows Installing but after few sec 3 or 5 i think it just ended and it looks like nothing happen.
 
Last edited:

anryl

Inactive Recognized Developer
Jan 27, 2007
2,961
1,651
prague
POCO M3
Redmi Note 10 Pro
Hi everyone, hope someone can help on my script. Been trying this to run on my phone this past few days and no luck that my script is getting executed. I replace the update-binary-installer with the one from my previous working rom and download the latest v1.64. Somehow just after I select the last option it shows Installing but after few sec 3 or 5 i think it just ended and it looks like nothing happen.

setvar("retstatus",
install(
#-- Title
"Installing",

#-- Installation Process message
"<b>"+ini_get("rom_name")+"</b> are being installed.\n\n"+
"Please wait while installation wizard installs <b>"+ini_get("rom_name")+
"</b>. This may take several minutes.",

#-- Installation Icon
"@install",

#-- Installation Finish Message
"The installation wizard has successfully installed <b>"+ini_get("rom_name")+
"</b>. Press Next to continue."
)
);
 

Turge

Inactive Recognized Developer
Sep 20, 2008
4,789
20,760
Hamilton
venomroms.com
Hi everyone, hope someone can help on my script. Been trying this to run on my phone this past few days and no luck that my script is getting executed. I replace the update-binary-installer with the one from my previous working rom and download the latest v1.64. Somehow just after I select the last option it shows Installing but after few sec 3 or 5 i think it just ended and it looks like nothing happen.

In your updater-script, you have if... else... endif

AFAIK, ifelse is used like this:
Code:
ifelse(condition,true,false);
From what I noticed so far, if you have more than 1 expression for true, they need to be surrounded with brackets ()

so:
Code:
ifelse (file_getprop("/tmp/aroma-data/wipe.prop","selected.1") == "1",
(     ui_print("@ >>> Executing Super-Wipe Script");
      ui_print("      ");
      ui_print("               Sensation Super-Wipe Script      ");
),
      ui_print("@ >>> Skipping Super-Wipe");
);

This works as well:
Code:
ifelse(condition1 || condition2,true);
ifelse(condition1 || condition2,true,false);
ifelse(condition1 || condition2,,false);
I didn't check the rest of your code. I ran into these problems myself though and here are some ways I resolved it:

1. Save and evaluate the logs after it's done installing and view it via ADB Shell (cat /sdcard/rom.zip.log.txt)
2. Reduce the size of your updater-script to make it easier to pinpoint the problematic code (eg. remove sections you have already identified to be working)
3. Comment out (#) all the commands that perform actions (find & replace "run_program" with "#run_program", "format" with "#format") and create a ZIP with just the META-INF folder. Once you're done modifying and saving updater-script, recreate the ZIP (should be about 2MB's in size) and push it to your phone to quickly run through to identify any errors. This is the same way I created my aroma-config script.
 
Last edited:

darkmantra

Senior Member
Oct 11, 2011
648
320
Sur, Oman
setvar("retstatus",
install(
#-- Title
"Installing",

#-- Installation Process message
"<b>"+ini_get("rom_name")+"</b> are being installed.\n\n"+
"Please wait while installation wizard installs <b>"+ini_get("rom_name")+
"</b>. This may take several minutes.",

#-- Installation Icon
"@install",

#-- Installation Finish Message
"The installation wizard has successfully installed <b>"+ini_get("rom_name")+
"</b>. Press Next to continue."
)
);

Maybe would try this option first. Thanks

In your updater-script, you have if... else... endif

AFAIK, ifelse is used like this:
Code:
ifelse(condition,true,false);
From what I noticed so far, if you have more than 1 expression for true, they need to be surrounded with brackets ()

so:
Code:
ifelse (file_getprop("/tmp/aroma-data/wipe.prop","selected.1") == "1",
(     ui_print("@ >>> Executing Super-Wipe Script");
      ui_print("      ");
      ui_print("               Sensation Super-Wipe Script      ");
),
      ui_print("@ >>> Skipping Super-Wipe");
);

This works as well:
Code:
ifelse(condition1 || condition2,true);
ifelse(condition1 || condition2,true,false);
ifelse(condition1 || condition2,,false);
I didn't check the rest of your code. I ran into these problems myself though and here are some ways I resolved it:

1. Save and evaluate the logs after it's done installing and view it via ADB Shell (cat /sdcard/rom.zip.log.txt)
2. Reduce the size of your updater-script to make it easier to pinpoint the problematic code (eg. remove sections you have already identified to be working)
3. Comment out (#) all the commands that perform actions (find & replace "run_program" with "#run_program", "format" with "#format") and create a ZIP with just the META-INF folder. Once you're done modifying and saving updater-script, recreate the ZIP (should be about 2MB's in size) and push it to your phone to quickly run through to identify any errors. This is the same way I created my aroma-config script.

Now im a bit confuse on ifelse statement, most of the roms is using the same if else statement i used :confused:

SELF RESOLVE ALREADY.. THANKS FOR YOUR TIME PEEPS.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1437
    logo.png

    The World's First ANDROID Touch And Customizable ROM Installer


    DEVELOPMENT AND UPDATE NOW ON XDA-DEVDB
    AROMA INSTALLER THREAD


    Don't Forget To Donate To Me:



    When you install Linux, Windows, Mac or applications on the PC
    You can always customize your installation as you want.


    WHY CAN'T WE DO THE SAME INSTALLING AN ANDROID ROM?

    BECAUSE NOW
    AROMA Installer
    GIVES YOU THIS POSSIBILITY!




    For Questions and Answer about scripting and customizing your Installer, please post your problems in Q&A Thread below:
    AROMA Installer & Edify
    Q & A THREAD



    Need stunning AROMA Installer Package Creator in GUI:
    Aroma App Package Creator

    by commandersafi​
    YOU DON'T NEED TO USE TOUCH RECOVERY TO MAKE THE TOUCH SCREEN WORKS
    If your Recovery Kernel include Touch Screen Driver, even if the recovery not supported touch screen, it will works.
    And Almost any recovery included touch screen driver in its kernel (Except some trimmed versions)


    -------------------------A-R-O-M-A---I-n-s-t-a-l-l-e-r-------------------------



    Benefits For Users
    AROMA Installer gives users the possibility to choose which mods and applications they want to Install on to their device. Sometimes we want the clean install, without bloatware; and sometimes we want the full set of applications on our device. With AROMA Installer, you are your phone's master!



    Benefits For Chefs/Developers
    AROMA Installer gives chefs many benefits:

    You don't ever again have to hear someone ask to remove or include something they like into your ROM, just for you to yell "Hey, that is only your opinion! Only you and some other people like it; most people don't! Go remove the apps on your own with WINRAR, you ^$#&*&#$", remember they are still a customer :cool:, and with AROMA Installer, this problem can be solved.

    If you are good at customizing the AROMA Installer it was possible to make your ROM compatible with many devices using just one ROM File. You save your time, bandwith and hosting maintanance.

    With the great user interface in your ROM installation, users will be very happy with it.

    With AROMA Installer, You Are The Greatest ROM Developer


    -------------------------A-R-O-M-A---I-n-s-t-a-l-l-e-r-------------------------




    -------------------------A-R-O-M-A---I-n-s-t-a-l-l-e-r-------------------------


    Videos
    Watch this video to learn about AROMA Installer. Thanks to XsMagical for creating this awesome video...





    426
    Downloads & Resources

    FOR ROM CHEFS ONLY

    ROM CHEF? WHAT IS THAT? ... HERE IS A VIDEO


    DON'T ASK ABOUT HOW TO INSTALL IT, BECAUSE IT MEANS YOU DON'T KNOW WHAT IT IS FOR

    IT ISN'T AN APPLICATION YOU CAN USE OR INSTALL ON TO YOUR PHONE LIKE ANGRY BIRDS OR FACEBOOK

    IF YOU JUST A USER, THEN FIND A ROM THAT ALREADY USES THIS INSTALLER

    MOST IMPORTANT THING BEFORE CUSTOMIZING IT

    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

    Download Binary

    Version 3.00b1 - MELATI
    BUILD:15022833

    NOTE WILL ONLY WORKS ON DEVICE WITH ARM NEON SUPPORT
    Recent Changelogs:
    • FLAMBOYAN MELATI- 3.00b1
    • new engine fb & input driver
    • support msmfb overlay
    • more neon improve
    • tweaks some ui
    • graphics processing

    Download Binary

    Version 2.70 RC2 - FLAMBOYAN
    BUILD:130903

    NOTE WILL ONLY WORKS ON DEVICE WITH ARM NEON SUPPORT

    Recent Changelogs (FLAMBOYAN BETA):
    • FLAMBOYAN BETA - 2.70B1-B6
    • -
    • BETA-6
    • Fix some back sequence (thanks Electronic Punk) - Small but Important fix aparse_current_position++ to ++aparse_current_position. ( https://github.com/amarullz/AROMA-In...1bba2d02988c60 )
    • -
    • BETA-5
    • Fix Commented NEON - Now Fast Again
    • New Themes
    • New Stack Transition, and smoother dialog transitions
    • Add ini_set("transition","stack");
    • Add Screenshoot (Volume Down+Power Button) - Image Format BMP-565 16 bit
    • fix ini_get function
    • Whole new input driver
    • Optimize alphablend processes
    • Optimize and Add Drawing Scale Nearest Neighbor
    • Add drawing functions for alphablend
    • Dialog In & Out Transition
    • Cache recovery display for exit transition
    • Add Exit transition
    • fix force_colorspace issue
    • add colorspace change demo
    • remove unneeded sleep for faster start and exit
    • -
    • BETA-4
    • Fix Icon Themes Error
    • Change Transition Animation - Slides for next/back - Smoother than alpha blend animation
    • Remove any transition effect for Dialog Window
    • Use Bold Text for Navigation Button
    • Fix Installer UI for text log position
    • Add ini_set/ini_get for Vibrate Intensity (0-10). ini_set("vibrate","5") = Half Intensity, ini_set("vibrate","0") = No Vibrate At All
    • Add ini_set/ini_get for icon_back and icon_next. ini_set("icon_next","@install"), ini_set("icon_back","icons/back")
    • Fix Installer Freeze on (pthread_detach) - Compileable for Android Build Environment
    • BUILD WITH ANDROID BUILD ENVIRONMENT - Binary Size Reduce By ~60% - BUILD COMMAND: make aroma_installer; make aroma_installer.zip
    • Add zip build command in building the source
    • Rewrite building script for windows and linux with Android Build Environment
    • Modify aroma-config in demo zip to includes some new features
    • Change update-binary-installer from Galaxy Nexus binary. Sensation user should replace it binary with sensation binary
    • Beautifier Source Code. Add beautifier tools in source code tree
    • -
    • BETA-3
    • Fix Include Back Error
    • Improve Back Sequence Capability
    • ADD EVAL Function to execute the script inline from string
    • ADD GOTO Function to jump back into GOTO Label. gotolabel(), goto().
    • Update More Demo in Example Zip
    • Improving Efficiency processes when loading and reloading themes
    • -
    • BETA-2
    • Fix color handling on themes
    • Using bilinear scaling in png.9p
    • Re-add hebrew support
    • Add Italic Support with tag \<i>Italic\</i>
    • ADD include function, to include script from different file. look at new aroma-config file and language_select.edify file
    • -
    • BETA-1
    • reboot("now","recovery"); and reboot("now","fastbot");
    • Refresh look and feel
    • Remove RTL and Arabic Support (For faster and freeing resource, because the features still unusable)
    • Subpixel rendering for Fonts (Clear Type Like)
    • Improve performance with NEON here and there.
    • Tweaks some input driver
    • May fix some colorspace issue
    • Bilinear scaling for png icons, Now it look smooth even if it resized
    • FIX MANY BACK SEQUENCE BUGS
    • Font will only loaded if the font is really changed - Faster-faster performance improvement
    • Change Navigation Bar Buttons. Now next and back can be using Icons
    • Add Menu Button for buttonless devices.


    • EDELWEIS - 2.56 - BUILD 121004-031
    • Fix capacitive button
    • Remove calibration tools

    • EDELWEIS - 2.55 - BUILD 121003-030
    • Completely new Input/Touchscreen Handler - Thanks to agrabren from TWRP
    • Remove all calibration need. calibtool(), calibrate() and calibrate_matrix() won't do anything now. :)

    • EDELWEIS - 2.51 - BUILD 120810-026
    • Supported Galaxy Nexus Touch Screen - And maybe other devices now supported

    • EDELWEIS - 2.50 - BUILD 120716-025
    • Add Calibration Matrix for More Accurate Touch screen calibration
    • Set ROBOTO as Default True Type Font

    • DAHLIA - 2.00 - BUILD 120425-020
    • Fix Installation Save Logs
    • Fix framebuffer mmap size
    • Fix status 0 error
    • Add Multilanguage functions
    • Change list bullet drawing method
    • Add support for kerning font when use TrueType/OpenType
    • Add AROMA Memory management and memory debuging build (COMPILE FROM SOURCE ONLY)
    • Add more limit size for AROMA texts
    • Add font glyph cache for faster freetype drawing & processing
    • Add support for Modern Standard Arabic
    • Add support for RTL
    • Add support for TrueType and OpenType fonts
    • Add support for UTF8 encoding in aroma-config and all AMS text. For updater-script use NO-BOM UTF8
    • Fix Memory leaks
    • Add ini_set("force_colorspace","rgba");
    • Add support for atmel_maxtouch - Asus Transformer Touch Screen

    • CEMPAKA- 1.64 - BUILD 120414-040
    • Fix framebuffer mmap size
    • Fix status 0 error


    Previous Changelogs:
    Code:
    [LEFT]
    * [B]CEMPAKA- 1.63 - BUILD 120306-032[/B]
    * Add support for atmel_maxtouch (Down Event SYN) - Asus Transformer Prime Touch Screen
    
    * [B]CEMPAKA- 1.62 - BUILD 120303-030[/B]
    * Fix some memory leaks ([COLOR="Red"]Important[/COLOR]).
    * Add ini_set("[COLOR="Green"]force_colorspace[/COLOR]","rgba");
    
    * [B]CEMPAKA- 1.60 - BUILD 120227-026[/B]
    * Add msb_right check for Endianess video memory
    * Fix Installer text log drawing
    * Add ini_get
    * Add rom_date in ini_get
    * Fix reboot and back function
    * Add more and recreate Icons for themes and generic
    * Rewrite text handler
    * Add alignment, indentation and list in AROMA Markup String
    * Change temp directory to /tmp/aroma, /tmp/aroma-data stil works
    * Add Theme Support
    * Add AROMA Markup for <b> Bold
    * Add More Colorset
    * Add More Text to Customize
    * Add PNG Icon Load From Theme (Default Icons)
    * Add Tab support in AROMA Markup String
    * Change int to long for partition info, now support big storage information
    * Config Init All/Theme Only
    * Recreate new example (release) for binary release
    * Customizable Font Runtime
    * Reformat About Dialog
    * Add show progress per time in installer (now support by files and by time).
    * Themeable Progressbar
    * Enhance Exec Functions to return exit status and autosave buffer into variable
    * Fix glibc error in ag_close - Need workaround
    * Move ai_trim to system libs
    * Add Stretch function for png
    * Add 9 Patch drawing function for png
    * Fix Reboot Function
    * Add Alternative Touch Method
    * Add ziptotmp & restotmp
    * Add support for mxt224 touch screen (SYN_MT_REPORT event)
    * [B]BOUGENVILLE - 1.10 - BUILD 120208-13[/B]
    * Add Alternative Touch Method
    * Added New Functions
      - anisplash - ANIMATED SPLASH SCREEN
      - prop - GET PROP FROM AROMA TMP
      - zipprop - GET PROP FROM ZIP
      - resprop - GET PROP FROM AROMA RESOURCE ZIP
      - sysprop - GET RECOVERY PROP
      - property_get - GET RECOVERY PROP
      - write - WRITE STRING INTO FILESYSTEM
      - readtmpfile - READ TEMPORARY FILE AS STRINF
      - read - READ FILESYSTEM AS STRING
      - zipread - Read String From Zip
      - resread - Read Strinf From Resource
      - zipexec - Exec Program From Zip
      - resexec - Exec Program From Resource
      - run_program - Run Program/Exec
      - exec - Run Prohram/Exec
      - back - BACK TO PREVIOUS WIZARD
      - reboot - REBOOT DEVICE
    * Deprecated Funcrions
      - readfile - Will Renamed to zipread
      - readfile_aroma - Will Renamed to resread
    * Add Some Fix in Touch Up Handler
    * Prop parsing, File Handling & Zip Handling has been managed in efficient functions
    * Remove CERT.SA - Not Needed
    * Add Licence Headers in all aroma source code Apache 2.0
    * Add More Comments & Documentation in Souce Code
    * Renamed functions for fit needs
    
    * [B]ANGGREK -1.00 - BUILD:120204-011[/B]
    * Fix calibrating function not working when set in aroma-config
    * Update and fix firmware command from update-binary-installer into recovery.
    
    * [B]ANGGREK -1.00 - BUILD:120202-10[/B]
    * Improve touch handler compatibility. Now more accurate in every devices
    * Add more chars into ROM Infos from only 31 to 63max
    * Detail changelog from commit: [URL="https://github.com/amarullz/AROMA-Installer/commit/f49e2969e3b3514e180dcb15bed5a48298b19046"]10[/URL]
    
    * [B]ANGGREK -1.00 - BUILD:120201-009[/B]
    * Stride/Pitch/Padding Framebuffer support for non multiply 8 screen size like qhd on sensation and evo3d
    * Rewrite input handler, better keys & touch screen compatibility.
    * Change calibration division data from integer to float, more accurate calibrating
    * Improve fling and scrolling engine
    * Add support for all possible screen bit depth 32/24/16bit. ARGB, ABGR, RGBA, BGRA. No problem now.
    * Detail changelog from commit: [URL="https://github.com/amarullz/AROMA-Installer/commit/b9daae9151e6ec4e1054725722b6f507f621f065"]006[/URL], [URL="https://github.com/amarullz/AROMA-Installer/commit/65fdbb9a2f7c12a799f320b3759ab60d6b00d3b1"]007[/URL], [URL="https://github.com/amarullz/AROMA-Installer/commit/f49e2969e3b3514e180dcb15bed5a48298b19046"]009[/URL]
    
    [B]ANGGREK -1.00 - BUILD:120129-005[/B]
    * Remove Signature Check - Now You don't need to sign aroma-config and updater-script
    * Calibration Tool now show before anything, so you can directly do calibration. you can disabled it in aroma-config by deleting [B]calibtool("");[/B] command.
    * Fix some touch screen input handler
    * Add 229 in menu keycode (F2 used in emulator as menu key)
    
    [B]ANGGREK -1.00 - BUILD:120128-004[/B]
    * Open Source - Binary No Released
    
    [B]ANGGREK -1.00 - BUILD:120126-003[/B]
    * Refer to defy recovery source code found [URL="https://github.com/CyanogenDefy/android_device_motorola_jordan/blob/gingerbread/recovery_ui.c"]HERE[/URL] (Thanks [URL="http://xdaforums.com/showthread.php?t=1356767"]walter79[/URL] for github source code) I add some keycode into input reader : [URL="http://xdaforums.com/showpost.php?p=21826756&postcount=32"]Read Here[/URL]
    * Add confirmation if calibrated data will be used in current process (After Calibrating) - So you can try touchscreen without editing [COLOR="Green"]aroma-config[/COLOR] after you calibrate it.
    * Remove precision calculation in scrolling thread (Natural calculation but less fluid)... Feel faster now.
    * Add function for [COLOR="Green"]aroma-config[/COLOR] to define custom key code for up/down/select/back/menu, just like [COLOR="Green"]calibrate()[/COLOR] function. with format like this: [COLOR="DarkRed"]ini_set("customkeycode_up",130);[/COLOR] or [COLOR="DarkRed"]ini_set("customkeycode_select",13);[/COLOR], the keycode can be capture by [URL="http://xdaforums.com/attachment.php?attachmentid=872892&d=1327550395"]aroma-keycapture-flashable.zip[/URL]
    
    [B]ANGGREK -1.00 - BUILD:120125-002[/B]
    * Add Home & Power Button To Select Items
    * Unsigned Script Now Not Terminated Installer, but just show Alert That the script should be signed to pass install ui
    * Add More Documentation in aroma-config
    
    [B]ANGGREK -1.00 - BUILD:120124-001[/B]
    * Initial Release ( AROMA UI, AROMA Touch Handler, AROMA Markup String )
    * Customizable ( Custom Theme Colors, Customizable Fonts and Images )
    * Optimized Build ( Static, -o2, remove unused functions, remove png-write and zlib deflate functions )
    [/LEFT]

    Open Source?
    There may be some people who will ask if the project is Open Source, and the quick answer is YES. It is an Open Source Project Now.

    Why Release The Source?
    • I used some other work (modified) from the Open Source Community, especially Koush's recovery source code for getting the input mode, PNG, ZLIB, and some Framebuffer programming samples.
    • I want to make all chefs feel safe, so I guarantee that I won't make this into a money making program.
    • I got something from the community, and I want to give something back to it.

    What Benefits?
    • Rapid development
    • I can get code review & patches - Not just bug reports
    • There are many innovations that I wrote in the program that may be useful for other needs, like the AROMA Graphic Framebuffer, the AROMA UI, the Amarullz Dithering Method, and the AROMA Simple PNG Fonts. It may be used in recovery, so recovery can use the AROMA Installer Interface
    • :cool: I can learn more about Open Sourcing programs (especially the CVS and licensing things - that always drive me to the question - what is it?)

    I Need Help
    As I said before, I am just a newbie at Android Development, or even as a user. I need someone who has a lot of knowledge about Open Sourcing the software, and a lot of knowledge about licencing (I don't know much, I just tried to make my software compatible with them: GPL, Apache, etc.)...

    Thanks.
    Source Code


    TOOLS: AROMA Key Capture
    I also created "aroma-keycapture-flashable.zip" to capture the keycodes of your device (flashable in recovery - won't flash anything :cool:). And in case the keys don't work, report the keycodes in this thread, with information like this example:


    Code:
    Prev Item/Up Key = 120
    Next Item/Up Key = 110
    Select Item/Enter/Select Key = 13
    Back Key = 200
    Menu Key = 193

    To customize keycodes, open aroma-config and modify this code:
    Code:
    ##
    # Custom Key Code - Usefull For Some Device which not used
    #                   Standard key code for up/down/select/back/menu
    #
    # You can capture the keycode in
    # recovery using "aroma-keycapture-flashable.zip" Available in
    # AROMA Installer Thread.
    #
    # Press some key when it run, it will return key code,
    # that key can override up/down/select/back/menu actions in
    # AROMA Installer, you can even set your home key for up, or
    # volume down for select item
    #
    #-------- Uncomment & Modify this Code:
    #
    # ini_set("customkeycode_up",     "115");
    # ini_set("customkeycode_down",   "114");
    # ini_set("customkeycode_select", "116");
    # ini_set("customkeycode_menu",   "139");
    # ini_set("customkeycode_back",   "158");
    #
    260
    AROMA Installer Resources

    The Codenames
    AROMA Installer codename based on Alphabetical Indonesian Flower Names. Here the list of already used codename:

    ANGGREK - 1.00
    anggrek.jpg


    BOUGENVILLE - 1.10
    bougenville.jpg


    CEMPAKA - 1.60 - 1.64
    cempaka.jpg


    DAHLIA - 2.00
    dahlia.jpg


    EDELWEIS - 2.50
    edeilweis.jpg


    FLAMBOYAN - 2.70
    flamboyan.jpg



    Programming Language
    It was application which runs on Android device but not on Android OS Environment that the native applications usually use Java. AROMA Installer use C (Pure C, not C++), so it may run on another platform like x86 with small modifications ofcourse.​


    Used Libraries
    • ZLIB - ofcourse, it was the most awesome thing in computer world :good:
    • PNG
    • MinZIP
    • Freetype
    All library need to compiled as static to make sure it runs without any dependency issue in any devices.​


    Official Binary
    I Only support ARM device, but it was opensourced, so anyone can play with the source and compiled it for they own devices.


    ROM That Already Uses AROMA Installer

    MOD/THEMES Uses AROMA Installer
    3rd Party AROMA Installer Resources



    If you release the ROM with AROMA Installer, please inform me here, I will add your ROM in this post.​

    Thanks for Donators


    Thanks To
    • Sebastiaan15 - For using and test it for the first time
    • avss - For helping me to make it works in sgs2 and many samsung devices
    • DemonWav - For helping grammar in the thread, Testing and give many great ideas.
    • -viperboy- - For intensively testing & feedback the touch screen in EVO3D CDMA
    • baadnwz - For Testing the touch input in sensation
    • capychimp - For Testing Display
    • Prof Peach - For helping and testing
    • V6-Maniac - Creating Video
    208
    About AROMA Installer

    Background
    Android has an advanced system for installing the OS and updates, unlike other mobile OS's that distribute the contents of the OS in static ROM image(s), Android distributes the OS and updates in a plain .zip file that contains all of the packages, files, and the updater for processing the installation.

    The updater splits in 2 types, the binary (update-binary) and script (updater-script), while the binary is an executable file, and the script was a configuration script that tells the binary executable what to do.

    But this advanced technology never expanded into its highest potential ability. The update-binary was simply the linux executable wrote in C that runs in root mode, and can do anything to your system; including accessing the Display FrameBuffer, accessing keys and the touch screen, set vibrate, run programs, parse files, load png(s) and .zip's, and read and write to the filesystem.

    The old update-binary only supported a few functions that can controlled only by the updater-script to instal the files. It didn't have a single function that allowed the installer to interact with the user. There is a program called "yesno" that shows a "Yes" or "No" interface, but it wasn't enough to create a more customizable updater.

    Now with AROMA Installer update-binary, all of this limitation is gone, and this advanced technology is expanded to the highest level of its pontential.


    What is AROMA Installer
    "AROMA" was taken from Bahasa Indonesia (Indonesian Language) and it means "Scent", but it is also an abbreviation of "AMARULLZ ANDROID ROM MANIFESTATION". It is an advanced update-binary for Android that contains many features like Wizard Installation, Touch User Interface (AROMA UI), Customizable Packages, System Inspecting, Themeable, and User Interactive. All release versions will have "flower" codenames, for example, the 1st version is codenamed "Anggrek", which mean "Orchid".​


    How AROMA Installer Works
    How can it work in recovery mode, and how can it so smooth when it scrolls? It works because I hired Chuck Norris to force the recovery to run the installer, and the phone is too afraid to show any lag :cool:.

    No, seriously, when the user selects the .zip file to install it, the recovery will extract the update-binary and run it with a few arguments. All processes are handled by the update-binary, and the recovery will only show the information passed by update-binary via a custom pipe. The great thing is that the update-binary can do anything if we can code it in C/C++, but not all people can easily play with C/C++. Its also not very effective or fun to compile it every time we need to change the process. That's why the custom script is used in AROMA Installer, it is simply edify scripting that is used as the normal updater-script, but with expanded functions available.

    It wasn't a simple thing to archive something like this, because the update-binary is simply the "linux executable" that doesn't even support dynamic links of libraries, basic drawing functions like drawrect, drawline, and I don't think it OpenGL can be included in it's binary. It runs on it's own. Even User Interface was wrote from scratch to manipulate directly into the display framebuffer, user input was read directly from the raw kernel input device, png and .zip was read with a static link library, and the configuration was parsed in it's own program. It is the result of one full month of developing, but you can learn it instantly, without any need to know how to manage memory usage and pointers.

    The AROMA Installer will read, parse, and run the script commands to show it's UI, calculate partition sizes, create, read, and write temporary prop files, set & get variables, do simple integer comparisons and math sequences, do the if else or inline if conditions, configure the UI color scheme, configure rom information, and much more.

    Because it was very complicated and needed a lot of time to develope, did I earn some reason to get donations?.​

    Flowchart How It Works

    more at amarullz.com [+]​
    164
    Functions Reference

    CONFIGURATION FUNCTIONS

    setcolor

    Descriptions:
    Set AROMA Installer Color Scheme. It can also defined in themes with theme.prop file
    Sintax:

    void setcolor(colorname, hexcolor);
    Parameters:
    • colorname - Name of color to be set. colorname with "_g" for gradient color.
      • winbg, winbg_g : Main/Top Most Window Backgroud
      • winfg : Main/Top Most Window Text Foreground
      • winfg_gray : Main/Top Most Window Gray Text Foreground
      • dialogbg, dialogbg_g : Popup Window Backgroud (Alert, Confirm, About)
      • dialogfg : Popup Window Text Foreground
      • textbg, textbg_g : Textbox, Checkbox, and any scrollable UI Background
      • textfg : Textbox, Checkbox, and any scrollable UI Text Foreground
      • textfg_gray : Gray Text ( on Optionbox/Checkbox Item Description )
      • controlbg, controlbg_g : Control / Button / Checkbox border - Background Color
      • controlfg : Button Text Color
      • selectbg, selectbg_g : Selected Element Background ( Pushed/focused Button/items, etc )
      • selectfg : Selected Element Text/Foreground Color
      • titlebg, titlebg_g : Window Title Background
      • titlefg : Window Title Text Foreground Color
      • navbg, navbg_g : Bottom Bar (Navigation Bar) Background. Next-Previous Area
      • scrollbar : Scrollbar indicator color
      • border, border_g : Common Border Color
      • progressglow : Progress Animation Color
    • hexcolor - Hexadecimal Color in RGB. it support 3 and 6 characters hexadecimal started with #. example: "#a8e" or "#ff5599".
    Return Value: none
    Examples:
    Code:
    # Set Color with 3 chars hexcolor
    setcolor("winbg", "#444");
    setcolor("winbg_g", "#222");
    setcolor("textbg", "#333");
    setcolor("textfg", "#fff");
    
    # Set Color with 6 chars hexcolor
    setcolor("textfg_gray", "#bbbbbb");
    setcolor("controlbg", "#446699");
    setcolor("controlbg_g", "#223355");

    ini_set

    Descriptions:
    Sets the value of a AROMA Installer configuration option
    Sintax:

    void setcolor(configname, newvalue);

    Parameters:
    • configname - Configuration name to be set.
      • roundsize : Set Corner size of rounded rectangle for common controls (default:"3")
      • button_roundsize: Set Corner size of rounded rectangle for button controls (default:"2")
      • window_roundsize : Set Corner size of rounded rectangle for main window (default:"4")
      • transition_frame : Set number of frames for transition (default:"5")
      • text_ok : Set text for common OK text (default:"OK")
      • text_next : Set text for wizard next button (default:"Next >")
      • text_back : Set text for wizard back button (default:"< Back")
      • text_yes : Set text for default yes button (default:"Yes")
      • text_no : Set text for default no button (default:"No")
      • text_about : Set text for About menu (default:"About & Informations")
      • text_calibrating : Set text for Calibration Menu (default:"Calibrating Tools")
      • text_quit : Set text for Quit Menu (default:"Quit Installation")
      • text_quit_msg : Set text for Quit Confirmation Message (default:"Are you sure to quit the Installer?")
      • rom_name : Set ROM Name Information
      • rom_version : Set ROM Version Information
      • rom_author : Set ROM Author Information
      • rom_device : Set ROM Device Information
      • customkeycode_up : Set Alternative keycode for up key (navigate up)
      • customkeycode_down : Set Alternative keycode for down key (navigate down)
      • customkeycode_select : Set Alternative keycode for select key (select an item)
      • customkeycode_back : Set Alternative keycode for back key
      • customkeycode_menu : Set Alternative keycode for menu key
    • newvalue - New value to be set for configname
    Return Value: none
    Examples:
    Code:
    # Set ROM Informations
    ini_set("rom_name", "AROMA ROM");
    ini_set("rom_version", "1.0");
    ini_set("rom_author", "amarullz");
    ini_set("rom_device", "HTC Desire (bravo)");
    
    # Set Custom Text
    ini_set("text_ok", "OK Man");
    ini_set("text_next", ">>");
    ini_set("text_back", "<<");
    
    # Set Alternative Key Code - You can use keycapture tool
    # to capture your device keycode
    ini_set("customkeycode_up", "115");
    ini_set("customkeycode_down", "114");
    ini_set("customkeycode_select", "116");
    ini_set("customkeycode_menu", "229");
    ini_set("customkeycode_back", "158");

    calibrate

    Descriptions:
    Set Touch Screen Calibration Data. Different device may had different touch screen calibration data. To get calibration data, press menu, select calibration tools then follow the intructions.
    Sintax:

    void calibrate(divx, addx, divy, addy [, alternative_method]);
    Parameters:
    • divx - Division value for horizontal touchscreen to display resolution.
    • addx - Add value for horizontal alignment.
    • divy - Division value for vertical touchscreen to display resolution.
    • addy - Add value for vertical alignment.
    • alternative_method [Optional] - Use alternative method for touch screen handling if normal method not works in your device (default:"no")
    Return Value: none
    Examples:
    Code:
    # HTC Desire Calibrated Data
    calibrate("7.90","20","7.90","20");
    
    # Alternative method Calibrated Data
    calibration("1.8447", "37", "1.2158", "27", "yes");


    calibtool

    Descriptions:
    Start calibration tool.
    Sintax:

    void calibtool(dummy_arguments);
    Parameters:
    • dummy_arguments - Edify should pass at least 1 arguments. Just Pass "" for it
    Return Value: none
    Examples:
    Code:
    # Start Calibrating Tools
    calibtool("");

    theme

    Descriptions:
    Set AROMA Installer Theme will be used in next display.
    Sintax:

    void theme(theme_name);
    Parameters:
    • theme_name - Theme Name will be used. It was theme directory name located in "META-INF/com/google/android/aroma/themes"
    Return Value: none
    Examples:
    Code:
    # Use ICS Theme located at:
    # META-INF/com/google/android/aroma/themes/ics
    theme("ics");

    VARIABLE FUNCTIONS

    getvar

    Descriptions:
    Get Variable
    Sintax:

    variable_value getvar(varname);
    Parameters:
    • varname - Variable Name
    Return Value: Variable Value
    Examples:
    Code:
    # Show "testvar" value in alert
    alert(
     "Value of testvar",
     getvar("testvar")
    );

    setvar

    Descriptions:
    Set Variable
    Sintax:

    void setvar(varname, value);
    Parameters:
    • varname - Variable Name to be set
    • value - New Value for Variable
    Return Value: none
    Examples:
    Code:
    # Set new value for "testvar"
    setvar("testvar", "This is only test!!");
    
    # Now Show the "testvar" value in alert
    alert(
     "Value of testvar",
     getvar("testvar")
    );

    appendvar

    Descriptions:
    Append new value after previous value, it's like concating strings ( previous_value + newvalue )
    Sintax:

    void appendvar(varname, value);
    Parameters:
    • varname - Variable Name to be set
    • value - New Value to be appended in variable
    Return Value: none
    Examples:
    Code:
    # Set new value for "testvar"
    setvar("testvar", "This is only test!!");
    
    # Append new value
    appendvar("testvar", "Add String");
    
    # "testvar" now will contain "This is only test!!Add String"

    prependvar

    Descriptions:
    Prepend new value before previous value, it's like concating strings ( newvalue + previous_value )
    Sintax:

    void prependvar(varname, value);
    Parameters:
    • varname - Variable Name to be set
    • value - New Value to be prepended in variable
    Return Value: none
    Examples:
    Code:
    # Set new value for "testvar"
    setvar("testvar", "This is only test!!");
    
    # Prepend new value
    prependvar("testvar", "Add String!! ");
    
    # "testvar" now will contain "Add String!! This is only test!!"

    PROP FILE HANDLER FUNCTIONS

    file_getprop

    Descriptions:
    Read prop file value for given keyname
    Sintax:

    prop_value file_getprop(filename, keyname);
    Parameters:
    • filename - Absolute path of prop file in filesystem
    • keyname - Prop Key Name
    Return Value: Value of prop for given keyname
    Examples:
    Code:
    # Get value of "item.1.1" from /tmp/aroma-data/custom.prop
    alert(
     "Value of Prop",
     file_getprop("/tmp/aroma-data/custom.prop", "item.1.1")
    );

    prop

    Descriptions:
    Same with file_getprop, but will read relatively from AROMA Temporary Directory "/tmp/aroma-data/"
    Sintax:

    prop_value prop(filename, keyname);
    Parameters:
    • filename - Relative path of prop file in AROMA Temporary Directory "/tmp/aroma-data/"
    • keyname - Prop Key Name
    Return Value: Value of prop for given keyname
    Examples:
    Code:
    # Get value of "item.1.1" from /tmp/aroma-data/custom.prop
    alert(
     "Value of Prop",
     prop("custom.prop", "item.1.1")
    );

    zipprop

    Descriptions:
    Same with file_getprop, but will read the prop file from Zip
    Sintax:

    prop_value zipprop(zip_path, keyname);
    Parameters:
    • zip_path - Absolute path of prop file in Zip ( don't add "/" in first character )
    • keyname - Prop Key Name
    Return Value: Value of prop for given keyname
    Examples:
    Code:
    # Get value of "item.1.1" from META-INF/com/google/android/aroma/custom.prop
    alert(
     "Value of Prop",
     zipprop("META-INF/com/google/android/aroma/custom.prop", "item.1.1")
    );

    resprop

    Descriptions:
    Same with zipprop, but will read the prop file from Zip relatively from AROMA Resource Directory "META-INF/com/google/android/aroma/"
    Sintax:

    prop_value resprop(zip_path, keyname);
    Parameters:
    • zip_path - Relative path of prop file in Zip from AROMA Resource Directory "META-INF/com/google/android/aroma/"
    • keyname - Prop Key Name
    Return Value: Value of prop for given keyname
    Examples:
    Code:
    # Get value of "item.1.1" from META-INF/com/google/android/aroma/custom.prop
    alert(
     "Value of Prop",
     resprop("custom.prop", "item.1.1")
    );

    sysprop, property_get

    Descriptions:
    Read system property value for given keyname
    Sintax:

    prop_value property_get(keyname);

    prop_value sysprop(keyname);
    Parameters:
    • keyname - Prop Key Name
    Return Value: Value of prop for given keyname
    Examples:
    Code:
    # Get Device Board Name
    alert(
     "Device Board Name",
     sysprop("ro.product.board")
    );
    
    # Get Board Platform
    alert(
     "Device Board Name",
     property_get("ro.board.platform")
    );

    FILESYSTEM FUNCTIONS

    writetmpfile

    Descriptions:
    Write string into file in AROMA temporary
    Sintax:

    void writetmpfile(filename, value);
    Parameters:
    • filename - Destination file in AROMA temporary directory
    • value - String that will be write into the file
    Return Value: none
    Examples:
    Code:
    # It will saved in from /tmp/aroma-data/test.txt
    writetmpfile("test.txt", "This is test text");
    
    # Show the content in alert with readtmpfile
    alert(
     "Value of test.txt",
     readtmpfile("test.txt")
    );
    
    # Show the content in alert with read
    alert(
     "Value of test.txt",
     read("/tmp/aroma-data/test.txt")
    );

    write

    Descriptions:
    Write string into file in filesystem
    Sintax:

    void write(filename, value);
    Parameters:
    • filename - Absolute path to Destination file
    • value - String that will be write into the file
    Return Value: none
    Examples:
    Code:
    # It will saved in from /sdcard/test.txt
    writetmpfile("/sdcard/test.txt", "This is test text");
    
    # Show the content in alert with read
    alert(
     "Value of test.txt",
     read("/sdcard/test.txt")
    );

    readtmpfile

    Descriptions:
    Read string from file in AROMA temporary directory
    Sintax:

    content_of_file readtmpfile(filename);
    Parameters:
    • filename - File in AROMA temporary directory that will be readed
    Return Value: Content of file in String
    Examples:
    Code:
    # It will read data from /tmp/aroma-data/test.txt
    # then save it in variable
    setvar(
     "testvar",
     readtmpfile("test.txt")
    );

    read

    Descriptions:
    Read string from file in filesysten
    Sintax:

    content_of_file read(filename);
    Parameters:
    • filename - Absolute path to Destination file that will be readed
    Return Value: Content of file in String
    Examples:
    Code:
    # It will read data from /sdcard/test.txt
    # then save it in variable
    setvar(
     "testvar",
     read("/sdcard/test.txt")
    );

    ZIP CONTENT HANDLING FUNCTIONS

    readfile

    DEPRECATED!!! - Identical with zipread. Will be deleted soon.

    readfile_aroma

    DEPRECATED!!! - Identical with resread. Will be deleted soon.

    zipread

    Descriptions:
    Read string from file in zip
    Sintax:

    content_of_file zipread(zip_path);
    Parameters:
    • zip_path - Absolute path to Destination file in zip that will be readed
    Return Value: Content of file in String
    Examples:
    Code:
    # It will read data from zip content "META-INF/com/google/android/aroma/text.txt"
    # then save it in variable
    setvar(
     "testvar",
     zipread("META-INF/com/google/android/aroma/text.txt")
    );
    
    # It will read data from zip content "tmp/text.txt"
    # then save it in variable
    setvar(
     "testvar2",
     zipread("tmp/text.txt")
    );

    resread

    Descriptions:
    Read string from file in zip relatively from AROMA Resource Directory "META-INF/com/google/android/aroma/"
    Sintax:

    content_of_file resread(zip_path);
    Parameters:
    • zip_path - Relative path of file in Zip from AROMA Resource Directory "META-INF/com/google/android/aroma/" that will be readed
    Return Value: Content of file in String
    Examples:
    Code:
    # It will read data from zip content "META-INF/com/google/android/aroma/text.txt"
    # then save it in variable
    setvar(
     "testvar",
     resread("text.txt")
    );


    ZIP EXTRACT FUNCTIONS

    ziptotmp

    Descriptions:
    Extract file from zip content into AROMA Temporary directory, and automatically chmod it for executable.
    Sintax:

    void ziptotmp(zip_path, destination_name);
    Parameters:
    • zip_path - Absolute path to Destination file in zip that will be extracted
    • destination_name - Extracted target filename
    Return Value: none
    Examples:
    Code:
    # It will extract "tmp/busybox" into "/tmp/aroma-data/busybox"
    ziptotmp("tmp/busybox", "busybox");
    
    # Now we can execute it
    exec("/tmp/aroma-data/busybox","ls","-l");

    restotmp

    Descriptions:
    Extract file from zip content in AROMA Resource Directory "META-INF/com/google/android/aroma/" into AROMA Temporary directory, and automatically chmod it for executable.
    Sintax:

    void restotmp(zip_path, destination_name);
    Parameters:
    • zip_path - Relative path of file in Zip from AROMA Resource Directory "META-INF/com/google/android/aroma/" that will be extracted
    • destination_name - Extracted target filename
    Return Value: none
    Examples:
    Code:
    # It will extract "META-INF/com/google/android/aroma/busybox" into "/tmp/aroma-data/busybox"
    restotmp("busybox", "busybox");
    
    # Now we can execute it
    exec("/tmp/aroma-data/busybox","ls","-l");

    EXEC FUNCTIONS

    zipexec

    Descriptions:
    Extract file from zip into AROMA temporary, chmod it, and execute it.
    Sintax:

    exit_status zipexec(zip_path [, argument1, argument2, ... ]);
    Parameters:
    • zip_path - Absolute path of zip content that will be executed
    • arguments [Optional] - Command line Arguments
    Return Value: Return exit status. "0" for common success status
    The output buffer/stdout will be automatically saved into "exec_buffer"
    Examples:
    Code:
    # It will extract and run "META-INF/com/google/android/aroma/test.sh"
    zipexec("META-INF/com/google/android/aroma/test.sh");
    
    # With Arguments
    zipexec("META-INF/com/google/android/aroma/test.sh", "argument1", "argument2");
    
    # Get Return Status
    if
     zipexec("META-INF/com/google/android/aroma/test.sh") == "0"
    then
     alert(
     "Exec Status",
     "Shell was executed successfully"
     );
    endif;
    
    # Get STDOUT
    zipexec("META-INF/com/google/android/aroma/test.sh");
    alert(
     "Exec STDOUT",
     getvar("exec_buffer")
     );

    resexec

    Descriptions:
    Same as zipexec, but it will extract and run the file from zip relatively from AROMA Resource Directory "META-INF/com/google/android/aroma"
    Sintax:

    exit_status resexec(zip_path [, argument1, argument2, ... ]);
    Parameters:
    • zip_path - Relative path of zip content from AROMA Resource Directory "META-INF/com/google/android/aroma/" that will be executed
    • arguments [Optional] - Command line Arguments
    Return Value: Return exit status. "0" for common success status
    The output buffer/stdout will be automatically saved into "exec_buffer"
    Examples:
    Code:
    # It will extract and run "META-INF/com/google/android/aroma/test.sh"
    resexec("test.sh");
    
    # With Arguments
    resexec("test.sh", "argument1", "argument2");
    
    # Get Return Status
    if
     resexec("test.sh") == "0"
    then
     alert(
     "Exec Status",
     "Shell was executed successfully"
     );
    endif;
    
    # Get STDOUT
    resexec("test.sh");
    alert(
     "Exec STDOUT",
     getvar("exec_buffer")
     );


    run_program, exec

    Descriptions:
    Run executable from filesystem
    Sintax:

    exit_status run_program(path [, argument1, argument2, ... ]);
    exit_status exec(path [, argument1, argument2, ... ]);
    Parameters:
    • zip_path - Absolute path to executable
    • arguments [Optional] - Command line Arguments
    Return Value: Return exit status. "0" for common success status
    The output buffer/stdout will be automatically saved into "exec_buffer"
    Examples:
    Code:
    # It will run "ls" command
    run_program("/sbin/ls");
    
    # or
    exec("/sbin/ls");
    
    # With some Arguments
    run_program("/sbin/ls", "-l", "/sdcard");
    
    # Mounting Device
    exec("/sbin/mount", "-t", "auto", "/system");
    
    # Get Return Status
    if
     exec("/sbin/mount", "-t", "auto", "/system") == "0"
    then
     alert(
     "Exec Status",
     "Mount was executed successfully"
     );
    endif;
    
    # Get STDOUT
    exec("/sbin/ls", "-l", "/sdcard/*.zip");
    alert(
     "List of Zip in SDCARD",
     getvar("exec_buffer")
     );