Finally we've got a stable Aroma!
All credits to amarullz ! :good: Original Thread: http://forum.xda-developers.com/showthread.php?t=1461712
The attached file includes the files only for N7000 with Jelly Bean Rom.
I just share my knowledge, trying help to anyone who can not get it work!
There are already some threads how to make the first steps, so do not start from the beginning.
First the easy use.... (nothing complex)
1.) Rom Information
# Initializing Rom Information
Code:
ini_set("rom_name", "Your Rom Name");
ini_set("rom_version", "Your Rom Version");
ini_set("rom_author", "Your Name");
ini_set("rom_device", "Device");
ini_set("rom_date", "Release Datum");
Fill out with your Rom information..
result:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2.) How to use checkbox ( Checkbox to enable multiple selection)
# STEP 1 - How to use checkbox
Code:
checkbox("","<b>Add your selection title here</b>","@alert","checkbox.prop",
"Select what you want", "", 2, # <- Group the items with this line
"<b>Check 1</b>", "This is the first selectable item", 0, # Add items to select, <b> and </b> = bold text
"<b>Check 2</b>", "This is the second selectable item", 1, # First "Item Name" Second "Description"
"<b>Check 3</b>", "This is the third selectable item", 0, # 0, at the end = not selected to install (default)
"<b>Check 4</b>", "This is the fourth selectable item", 1, # 1, at the end = selected to install (default)
"<b>Check 5</b>", "This is the fifth selectable item", 1, # On one screen you can put about 7 items without scrolling
"<b>Check 6</b>", "This is the sixth selectable item", 0, # You can use any .prop name (checkbox.prop it's only sample)
"<b>Check 7</b>", "This is the seventh selectable item", 0); # Last line must be closed with: );
The second line it's important: "Select what you want", "", 2, Must group the items, then they can be called in the updater-script with item.1.1 to item.1.7
result:
updater-script:
Code:
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.1") == "1"
then
ui_print("Check 1");
package_extract_dir("sample/check1/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.2") == "1"
then
ui_print("Check 2");
package_extract_dir("sample/check2/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.3") == "1"
then
ui_print("Check 3");
package_extract_dir("sample/check3/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.4") == "1"
then
ui_print("Check 4");
package_extract_dir("sample/check4/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.5") == "1"
then
ui_print("Check 5");
package_extract_dir("sample/check5/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.6") == "1"
then
ui_print("Check 6");
package_extract_dir("sample/check6/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.7") == "1"
then
ui_print("Check 7");
package_extract_dir("sample/check7/system", "/system");
ui_print("Done");
endif;
If in checkbox.prop first item selected, then make something..
if file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.7") == "1" then
copy file, copy folder, delete file, delete folder...
The query must be closed with: endif;
Never use the same .prop name in the aroma-config!
So, I used checkbox.prop in the first selection, so for the next 7 apps use for example checkbox1.prop
3.) How to use selectbox ( Only one item can be selected)
# STEP 2 - How to use selectbox
Code:
selectbox("","<b>Add your selection title here</b>","@alert","selectbox.prop",
"Select what you want", "", 2, # <- Group the items with this line
"<b>Select 1</b>", "This is the first selectable item", 0, # Add items to select, <b> and </b> = bold text
"<b>Select 2</b>", "This is the second selectable item", 0, # First "Item Name" Second "Description"
"<b>Select 3</b>", "This is the third selectable item", 0, # 0, at the end = not selected to install (default)
"<b>Select 4</b>", "This is the fourth selectable item", 0, # 1, at the end = selected to install (default)
"<b>Select 5</b>", "This is the fifth selectable item", 1, # On one screen you can put about 7 items without scrolling
"<b>Select 6</b>", "This is the sixth selectable item", 0, # You can use any .prop name (selectbox.prop it's only sample)
"<b>Select 7</b>", "This is the seventh selectable item", 0); # Last line must be closed with: );
The second line it's important: "Select what you want", "", 2, Must group the items, then they can be called in the updater-script with selected.1
(if the items aren't grouped in selectbox, then selected.0 must be used)
If you are using selectbox, then set only one item as default, or you can deselect all.
1 = will be installed by default
0 = by default, it will not be installed
result:
updater-script:
Code:
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "1"
then
ui_print("Select 1");
package_extract_dir("sample/select1/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "2"
then
ui_print("Select 2");
package_extract_dir("sample/select2/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "3"
then
ui_print("Select 3");
package_extract_dir("sample/select3/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "4"
then
ui_print("Select 4");
package_extract_dir("sample/select4/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "5"
then
ui_print("Select 5");
package_extract_dir("sample/select5/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "6"
then
ui_print("Select 6");
package_extract_dir("sample/select6/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "7"
then
ui_print("Select 7");
package_extract_dir("sample/select7/system", "/system");
ui_print("Done");
endif;
As you can see selectbox it's a little different...
if file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "1" then
selected.1 it's the same for every item and only the item number must be given after == 1, 2, 3, etc..
So for the seventh item: (Select 7)
if file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "7" then
4.) Install Warning
# STEP 3 - Install Warning
Code:
viewbox(
"Ready to Install",
"The wizard is ready to begin installation.\n\n"+
"Press <b>Next</b> to begin the installation.\n\n"+
"If you want to review or change any of your installation settings, press <b>Back</b>. Press Menu Key -> Quit Installation to exit the wizard.",
"@install"
);
result:
5.) Installation
Because the last screen is coming you can set the Next button text to Exit..
Code:
ini_set("text_next", "Exit");
# STEP 4 - Installation
Code:
setvar("retstatus",
install(
"Installing",
"<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.",
"@install",
"The installation wizard has successfully installed <b>"+ini_get("rom_name")+
"</b>. Press Exit to continue."
)
);
result:
If you can't see text in the window, then you have an error in the updater script.
Save the log and find it.
and finally, the install log can be saved
Install the attached aroma-simple-template.zip from CWM recovery.
Won't modify anything, only writes text on your screen.
Second part complex Aroma Installer usage
Some information:
checkbox items can be used from item.x.1 to item.x.infinite
(more, then 7 items is not the best, because by scrolling can select, or deselect items)
selectbox items can be used from selected.x 1 to selected.x infinite
(Tested it already with 97 items)
1.) How to use checkbox with more groups on one screen
# STEP 1 - How to use checkbox with more groups (more item can be selected)
Code:
checkbox("","<b>Add your selection title here</b>","@alert","checkbox.prop",
[COLOR="blue"]"Select what you want", "", 2, [/COLOR] # <- Group the items with this line
"<b>Check 1</b>", "This is the first selectable item", 0,
"<b>Check 2</b>", "This is the second selectable item", 1,
"<b>Check 3</b>", "This is the third selectable item", 0[COLOR="blue"],[/COLOR] # <- Don't close this line with: ); use instead: ,
[COLOR="Red"]"Select what you want", "", 2,[/COLOR] # <- Group the next items with this line
"<b>Check 4</b>", "This is the fourt selectable item", 1,
"<b>Check 5</b>", "This is the fifth selectable item", 0,
"<b>Check 6</b>", "This is the sixth selectable item", 0[COLOR="red"]);[/COLOR] # <- Close the second (or last) selection with: );
Group one
Group two
result:
Now if Check 1, Check 2, or Check 3 selected, then it will open one new selection screen in the Aroma Installer.
# STEP 3 - Open new screen if items are selected from the first checkbox group
# If in the first selection Check 1 selected then we will open one new selection menu
# Sub Menu items are in selectbox
Code:
if prop("[COLOR="Blue"]checkbox.prop[/COLOR]","[COLOR="blue"]item.1.1[/COLOR]")=="1" then # This menu will be activated if Check 1 selected
selectbox("","<b>Add your selection title here</b>","@alert","submenu1.prop",
"<b>Sub menu item 1</b>", "This is the first selectable item", 0,
"<b>Sub menu item 2</b>", "This is the second selectable item", 1);
endif; # Close the Query with endif;
As you see I'm using one new .prop file "submenu1.prop" and I'll use for each sub menu one new .prop file name.
Second sub menu use submenu2.prop, third sub menu use submenu3.prop, etc.
result:
The items are without group in selectbox => selected.0
updater-script:
# Start the Query with the trigger for the Sub Menu
# Sub Menu under Check 1
Code:
[COLOR="Blue"]if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.1") == "1" # First the trigger (from STEP 1 in aroma-config)
then # Don't close it yet with: endif;
ui_print("Installing Sub Menu items, because Check 1 was selected");
if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "1"
then # Second the selection for sub menu (Step 3 in aroma-config)
ui_print("Sub menu item 1");
# Do something, extract, delete...
endif; # Close the first sub menu item with: endif;
if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "2"
then
ui_print("Sub menu item 2");
# Do something, extract, delete...
endif; # Close the second sub menu item with: endif;
endif; # Close the trigger Query with: endif;
# Sub Menu under Check 2
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.2") == "1"
then
ui_print("Installing Sub Menu items, because Check 2 was selected");
if
file_getprop("/tmp/aroma-data/submenu2.prop", "selected.0") == "1"
then
ui_print("Sub menu item 3");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu2.prop", "selected.0") == "2"
then
ui_print("Sub menu item 4");
# Do something, extract, delete...
endif;
endif;
# Sub Menu under Check 3
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.3") == "1"
then
ui_print("Installing Sub Menu items, because Check 2 was selected");
if
file_getprop("/tmp/aroma-data/submenu3.prop", "selected.0") == "1"
then
ui_print("Sub menu item 5");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu3.prop", "selected.0") == "2"
then
ui_print("Sub menu item 6");
# Do something, extract, delete...
endif;
endif; [/COLOR]
[COLOR="Red"]# Calling the selected items from second group (STEP 1 in aroma-config)
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.2.1") == "1"
then
ui_print("Check 4");
package_extract_dir("sample/check4/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.2.2") == "1"
then
ui_print("Check 5");
package_extract_dir("sample/check5/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.2.3") == "1"
then
ui_print("Check 6");
package_extract_dir("sample/check6/system", "/system");
ui_print("Done");
endif;[/COLOR]
When you add the Query to the updater-script, then never add it only for the sub menu.
If the upper level not selected, then you will have an error.
Example (easy way):
1.) Check 1 selected, or not ?
2.) Yes, then do something!
3.) No, do nothing!
Now with updater-script language:
1).
Code:
if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.1") == "1"
then
Don't close the query yet.
2.)
Code:
if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "1"
then
do something...
endif;
Now the query can be closed:
Code:
endif;
In one Piece:
Code:
[COLOR="Blue"]if
file_getprop("/tmp/aroma-data/checkbox.prop", "item.1.1") == "1"
then
ui_print("Installing Sub Menu items, because Check 1 was selected");[/COLOR]
[COLOR="Green"]if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "1"
then
ui_print("Sub menu item 1");
# Do something, extract, delete...
endif; [/COLOR]
[COLOR="Red"]if
file_getprop("/tmp/aroma-data/submenu1.prop", "selected.0") == "2"
then
ui_print("Sub menu item 2");
# Do something, extract, delete...
endif;[/COLOR]
[COLOR="blue"]endif; [/COLOR]
If the query starts with the submenu1.prop and Check 1 isn't selected, then you will have an error in the updater-script, because submenu1.prop will not exist!
2.) How to use selectbox with more groups on one screen
# STEP 2 - How to use selectbox with more groups(only one item can be selected in each group)
Code:
selectbox("","<b>Add your selection title here</b>","@alert","selectbox.prop",
[COLOR="Blue"]"Select what you want", "", 2, [/COLOR] # <- Group the items with this line
"<b>Select 1</b>", "This is the first selectable item", 0,
"<b>Select 2</b>", "This is the second selectable item", 1,
"<b>Select 3</b>", "This is the third selectable item", 0[COLOR="blue"], [/COLOR] # <- Don't close this line with: ); use instead: ,
[COLOR="Red"]"Select what you want", "", 2, [/COLOR] # <- Group the next items with this line
"<b>Select 4</b>", "This is the fourt selectable item", 1,
"<b>Select 5</b>", "This is the fifth selectable item", 0,
"<b>Select 6</b>", "This is the sixth selectable item", 0[COLOR="red"]);[/COLOR]
Group one
Group two
result:
Opening new screen if Select 4 selected:
Code:
if prop("[COLOR="Blue"]selectbox.prop[/COLOR]","[COLOR="blue"]selected.2[/COLOR]")=="[COLOR="blue"]1[/COLOR]" then # This menu will be activated if Select 4 selected (STEP 2)
checkbox("","<b>Add your selection title here</b>","@alert","submenu4.prop",
"<b>Sub menu item 7</b>", "This is the seventh selectable item", 1,
"<b>Sub menu item 8</b>", "This is the eighth selectable item", 0);
endif;
result:
updater-script:
Code:
[COLOR="Blue"]if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "1"
then
ui_print("Select 1");
package_extract_dir("sample/select1/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "2"
then
ui_print("Select 2");
package_extract_dir("sample/select2/system", "/system");
ui_print("Done");
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "3"
then
ui_print("Select 3");
package_extract_dir("sample/select3/system", "/system");
ui_print("Done");
endif; [/COLOR]
[COLOR="Red"]if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "1"
then
ui_print("Installing Sub Menu items, because Select 4 was selected");
if
file_getprop("/tmp/aroma-data/submenu4.prop", "item.0.1") == "1"
then
ui_print("Sub menu item 7");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu4.prop", "item.0.2") == "1"
then
ui_print("Sub menu item 8");
# Do something, extract, delete...
endif;
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "2"
then
ui_print("Installing Sub Menu items, because Select 5 was selected");
if
file_getprop("/tmp/aroma-data/submenu5.prop", "item.0.1") == "1"
then
ui_print("Sub menu item 9");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu5.prop", "item.0.2") == "1"
then
ui_print("Sub menu item 10");
# Do something, extract, delete...
endif;
endif;
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "3"
then
ui_print("Installing Sub Menu items, because Select 6 was selected");
if
file_getprop("/tmp/aroma-data/submenu6.prop", "item.0.1") == "1"
then
ui_print("Sub menu item 11");
# Do something, extract, delete...
endif;
if
file_getprop("/tmp/aroma-data/submenu6.prop", "item.0.2") == "1"
then
ui_print("Sub menu item 12");
# Do something, extract, delete...
endif;
endif; [/COLOR]
updater-script (only for one sub menu)
Code:
[COLOR="Blue"]if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "1"
then
ui_print("Installing Sub Menu items, because Select 4 was selected");[/COLOR]
[COLOR="SeaGreen"]if
file_getprop("/tmp/aroma-data/submenu4.prop", "item.0.1") == "1"
then
ui_print("Sub menu item 7");
# Do something, extract, delete...
endif;[/COLOR]
[COLOR="Red"]if
file_getprop("/tmp/aroma-data/submenu4.prop", "item.0.2") == "1"
then
ui_print("Sub menu item 8");
# Do something, extract, delete...
endif; [/COLOR]
[COLOR="blue"]endif; [/COLOR]
result with the default settings:
Install the attached aroma-complex-template.zip from CWM recovery.
Won't modify anything, only writes text on your screen.
Third part include VillainTheme system
First some info about the VillainTheme System: http://forum.xda-developers.com/showthread.php?t=1207017
With the VillainTheme System each image can be replaced in any app.
Edited xml or smali files must be used for the same firmware like XXLT?
Preparation
1.) Decompile your apk
2.) Modify the images
3.) Modify xml files
4.) Build the modified apk
5.) Take the modified files out
Don't change the 9.png files with normal png picture if possible.
Use instead this website: Android Asset Studio :good:
Don't add the values folder contents to your theme, because they are in the resources.arsc.
Changing pictures: add the pictures only
Changing colors in the xml files: add the modified xml files and resources.arsc to your project
Adding edited smali files: add only the classes.dex to your project
9.png must be token from compiled source, or will looks ugly...
As theming example chosen the HelpHub.apk
Can be themed to white, or back to black.
I think almost nobody use the HelpHub.apk so installation is included.
Uninstall will remove all remain.
Code:
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "3"
then
ui_print("HelpHub Uninstalled");
delete("/system/app/HelpHub.apk");
delete_recursive("/data/data/com.samsung.helphub");
delete("/data/dalvik-cache/[email protected]@[email protected]");
endif;
For example the script for white theme:
# White Theme
Code:
if
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.2") == "2"
then
ui_print("White Theme");
package_extract_dir("vrtheme/white", "/emmc/vrtemp");
package_extract_dir("vrtheme/white", "/emmc/vrtemp/preload/symlink");
package_extract_dir("vrscript/", "/emmc/vrtemp");
set_perm(0, 0, 0755, "/emmc/vrtemp/install.sh");
set_perm(0, 0, 0755, "/emmc/vrtemp/zip");
set_perm(0, 0, 0755, "/emmc/vrtemp/cleanup.sh");
set_perm(0, 0, 0755, "/emmc/vrtemp/zipalign");
run_program("/emmc/vrtemp/install.sh");
run_program("/emmc/vrtemp/cleanup.sh");
endif;
Just as Info:
Original file name for install.sh => installtheme.sh
Original file name for vrtemp => vrtheme
1.) The first line will copy the modified files from the white theme folder to emmc/vrtemp folder:
Code:
package_extract_dir("vrtheme/white", "/emmc/vrtemp");
- So, we will have emmc / vrtemp / system / app folders
2.) The second line will copy the modified files from the white theme folder to emmc/vrtemp/preload/symlink folder:
Don't need to include the files two times! (one for system app and one for preload apps, forget it)
Can do it with the script.
Code:
package_extract_dir("vrtheme/white", "/emmc/vrtemp/preload/symlink");
- So, we will have emmc / vrtemp / preload / symlink / system / app folders
3.) The third line will copy the vrtheme script files to the emmc/vrtemp folder
Code:
package_extract_dir("vrscript/", "/emmc/vrtemp");
here they are:
4.) With line 4, 5, 6, 7 setting permissions for vrtheme files
Code:
set_perm(0, 0, 0755, "/emmc/vrtemp/install.sh");
set_perm(0, 0, 0755, "/emmc/vrtemp/zip");
set_perm(0, 0, 0755, "/emmc/vrtemp/cleanup.sh");
set_perm(0, 0, 0755, "/emmc/vrtemp/zipalign");
5.) Line 8 it's the "Magic" the vrtheme script
Code:
run_program("/emmc/vrtemp/install.sh");
6.) With Line 9 we will clean all remain
Code:
run_program("/emmc/vrtemp/cleanup.sh");
Because I don't need the apps from the backup folder will be all folders deleted.
(Using Aroma instead)
cleanup.sh
Code:
#!/sbin/sh
rm -rf /emmc/vrtemp/
rm -rf /emmc/vrtemp-backup/
echo "Cleanup complete"
If you want to keep the backup folder, then delete the third line. (over echo command)
In the app folders must make on new folder with the app name.
In this case HelpHub.apk
In the root directory of the HelpHub.apk folder copy the modified classes.dex or resources.arsc or make res folder.
If you want to change pictures, colors, etc., then make the same folder names such as where you want to take them off:
How to use "or" command in the aroma-config or in the updater-script
Code:
[B][SIZE="3"]or = ||[/SIZE][/B]
"or" in the aroma-config:
Code:
[COLOR="blue"]if (prop("selectbox.prop","selected.1")=="2" || prop("selectbox.prop","selected.1")=="3")
then[/COLOR]
selectbox("","<b>Select what you want</b>","@alert","selectbox1.prop",
"Select what you want", "", 2,
"<b>Test 1</b>", "Only placeholder", 0,
"<b>Test 2</b>", "Only placeholder", 1);
[COLOR="blue"]endif; [/COLOR]
It's useful if want to make the same task after different selections in the Aroma.
Can save some lines with it.
"or" in the updater-script:
Code:
[COLOR="blue"]if
(file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "2" ||
file_getprop("/tmp/aroma-data/selectbox.prop", "selected.1") == "3")
then [/COLOR]
if
file_getprop("/tmp/aroma-data/selectbox1.prop", "selected.1") == "1"
then
ui_print("Test 1 selected");
# Do something extract, delete,..
endif;
if
file_getprop("/tmp/aroma-data/selectbox1.prop", "selected.1") == "2"
then
ui_print("Test 2 selected");
# Do something extract, delete,..
endif;
[COLOR="Blue"]endif; [/COLOR]
Code:
and = &&
The attached zip file installs the HelpHub.apk to system.
The included HelpHub.apk it's multi language. Black or White theme can be selected.
If it's already installed, then skip the installation.
The icons are removed from the help text, had some problem with them.
Thanks Toth for your time and sharing.
I was expecting it, tkari4 did it.
Thanks a lot mate
Cheers mate great guide
Sent from my Sweet ROM powered Note 2 via XDA Premium 4
wow, aroma did really need extra efforts,, but very excellent guide @tkari4
majdinj said:
wow, aroma did really need extra efforts,, but very excellent guide @tkari4
Click to expand...
Click to collapse
The second one is almost done.
I'm sorry about yesterday, have not seen your Logcat Manager Thread.
thanks a lot tkari !
tkari4 said:
The second one is almost done.
I'm sorry about yesterday, have not seen your Logcat Manager Thread.
Click to expand...
Click to collapse
No problem @tkari4. it is solved now (there were missing files from VODB folder).
Next level added to second post #2
Part three will be:
- How to use "or" in aroma-config and in updater-script
- How to include and use the VillainTheme System 0.4.1
- Some help "suggestion" for theming
A real great thanks for this guide and time you spent (and spend) on it, I'm nearly done with apk and jar modding for my new release, so I will soon try to code an aroma updater and installer for my new custom.
I'll wait for the VRTheme part because it's a very important part for me ^^.
Thanks again mate.
ezaechiel said:
A real great thanks for this guide and time you spent (and spend) on it, I'm nearly done with apk and jar modding for my new release, so I will soon try to code an aroma updater and installer for my new custom.
I'll wait for the VRTheme part because it's a very important part for me ^^.
Thanks again mate.
Click to expand...
Click to collapse
The third part is finished.
tkari4 said:
The third part is finished.
Click to expand...
Click to collapse
Nice, thanks a lot mate
@tkari4 thank you very much for your tutorial, we really need such thread in our forum, :good: though as a noob I got a bit confused how to implement may packed VRTheme like ARMAN Theme in Aroma.
I am trying to put all my themes and add some general mods like transparency for all of them,
The layout I am talking is like
Theme choose:
Code:
Arman Theme
Parsa Theme
Arya red Theme
Arya red Theme
Kamran
Stock
Modification choose(these would be added after a theme is chosen):
Code:
Status bar transparency
Battery choose
Maybe icon pack
I read post three but there are install/skip/uninstall, would be thankful if you could guide me thanks.
kmokhtar79 said:
@tkari4 tahnk you very much for your tutorial, we really need such thread in out forum, :good: though as a noob I got a bit confused how to implement may packed VRTheme like ARMAN Theme in Aroma.
I am trying to put all my themes and add some general mods like transparency for all of them,
The layout I am talking is like
Theme choose:
Code:
Arman Theme
Parsa Theme
Arya red Theme
Arya red Theme
Kamran
Stock
Modification choose(these would be added after a theme is chosen):
Code:
Status bar transparency
Battery choose
Maybe icon pack
I read post three but there are install/skip/uninstall, would be thankful if you could guide me thanks.
Click to expand...
Click to collapse
I'll do it for you tomorrow.
There is only one problem => Status bar transparency
With the VRTheme must add the resources.arsc if you want change something in the values folders.
Changing the resources.arsc can cause an error...
tkari4 said:
I'll do it for you tomorrow.
There is only one problem => Status bar transparency
With the VRTheme must add the resources.arsc if you want change something in the values folders.
Changing the resources.arsc can cause an error...
Click to expand...
Click to collapse
So I may forget about transparency mod. Just my themes, icon pack and icon battery choice.
Sent from my GT-N7000 using Tapatalk 4
kmokhtar79 said:
So I may forget about transparency mod. Just my themes, icon pack and icon battery choice.
Sent from my GT-N7000 using Tapatalk 4
Click to expand...
Click to collapse
You can still keep it by two ways
1.Include extra option for transparency in theme section in select box.
e.g.
arman theme
arman theme (transparent SB)
Kmokhtar theme
khokhtar theme (Transparent SB)
this will increase file size but this will be easy to make and noob friendly for users.
2. make transparent statusbar with vrtheme for each theme and keep otion it under checkbox (vrtheme section)
This will reduce size of zip but some noob may messup if they select it without selecting theme/with different theme.
@kmokhtar79
Job done!
I made for you both script. (aroma and updater)
You must add the .apk folders only in system / app folders.
The updater-script will copy them to preload.
So, long no classes.dex or resources.arsc included in your Theme it's universal!
If they are added then the theme must be limited to one firmware, like XXLT.
As I see almost every second user made his own SystemUI.apk already and after changing something in their apk, they can have FC.
Attention!
It seems at least one item must be set as default in every selection menu, or Aroma will freeze!
tkari4 said:
@kmokhtar79
Job done!
I made for you both script. (aroma and updater)
You must add the .apk folders only in system / app folders.
The updater-script will copy them to preload.
So, long no classes.dex or resources.arsc included in your Theme it's universal!
If they are added then the theme must be limited to one firmware, like XXLT.
As I see almost every second user made his own SystemUI.apk already and after changing something in their apk, they can have FC.
Attention!
It seems at least one item must be set as default in every selection menu, or Aroma will freeze!
Click to expand...
Click to collapse
Thumbs up tkari4:good:, I had been reading and puzzling over script and installer almost all afternoon to figure out how my pack's layout would be, and now it's easy for me to understand by seeing what you prepared for me, thanks a lot friend.
Related
This thread is intended for those of you who are currently creating updater scripts or using Aroma and need some help with your scripts. Be it syntax errors, or things just not working properly. Here you can post your script and get some quick-time help to get your work up and running. I have notified Amarullz, the creator of Aroma, and he will be dropping by here as well to help guide you on your way.
The reason I created this thread is to not clutter up the original Aroma thread will questions on Syntax errors. There were enough posts in there that I felt a dedicated thread was justified.
Click to expand...
Click to collapse
More stuff to come...
If you do not know what AROMA is then you are missing out. Check out the Installer here, created by Amarullz
Original Aroma Thread:
[MOD][2.00] AROMA Installer :: 120425-020 :: Open Source
List of stuff pasted from the original Aroma thread, thanks to Amarullz
Prop File FormatThe prop file format was simple plain text format with (=) token as delimiter between key and values, and newline as delimiter between one key=values with another key=values.
Code:
key1=value1
key2=value2
key_3=value3
last.name=amarullz
It can be easily accessed with file_getprop in updater-script like this:
Code:
file_getprop("example.prop","key1");
With above code, the file_getprop function will return the value of key1, it will returned "value1". We can use it for our needs in if/if else statement. We can use others characters in keys, like dot (.) and underscore, but please be careful, that you don't add some quotes in the values. Here the wrong prop file format:
Code:
key1="value1" [COLOR="Red"]# add quotes[/COLOR]
key2="value2" [COLOR="Red"]# add quotes[/COLOR]
first name=james [COLOR="Red"]# Key name with space[/COLOR]
AROMA Installer Default Prop Temporary Locations
When playing with AROMA Installer aroma-config files, almost all things that manipulated prop files will be saved relatively on AROMA temporary directory located in /tmp/aroma-data/, so if we pass the prop filename like this: writetmpfile("test.prop","key1=ok");, the test.prop will be located at /tmp/aroma-data/test.prop.
Quick Example
In this example case, the aroma-config will create temporary prop file that will be readed by updater-script:
aroma-config:
Code:
writetmpfile(
"kernel.prop",
"snq =yes\n"+
"call.2way=no\n"
);
updater-script:
Code:
if
file_getprop("/tmp/aroma-data/kernel.prop","snq") == "yes"
then
# Install Kernel
write_raw_image("/tmp/boot.img", "boot");
endif;
if
file_getprop("/tmp/aroma-data/kernel.prop","call.2way") == "yes"
then
# Do Something here
else
# Do Something here
endif;
With this feature, it's enough to archive customizable installation, and the aroma-config will be able to communicate with updater-script.
EDIFY SCRIPT
Edify Script was simple script sintax to configure the behavior of binaries executable. In AROMA Installer, there is 2 edify script in the META-INF/com/google/android folder. The aroma-config and updater-script. Both files has it own use, and accessed by different binary executable, but use the same sintax, It's called edify.
The aroma-config used to configuring the UI in AROMA Installer, it will accessed directly by AROMA Binary Executable ( update-binary ), and updater-script will be used to configuring commands for installations (extract files, create symlinks, change permissions, format, mount, etc), and will be accessed directly by update-binary-installer. This couple script use the same sintax but have different functions that can be used.Basic Edify SintaxEdify Script was function base script, similar to C language, but without any supported statement except if else. You also can't create function, only bundled functions available for the script. All commands will call functions name with some arguments, and ends by semicolon, like this:
Code:
function_name( argument1, argument2, argument3 );
Edify also supporting simple concat-ing string, just like some other languages like Javascript or Java. Using plus (+).
Code:
function_name("Concat this " + "Strings" + " as one argument");
All Edify function's arguments was in type string. Edify doesn't support others data type, however, we can insert some integer values into arguments, but it in the fact it will be treated as string.
Code:
function_name( 50, 20, "55" );
We can't do any math calculation in edify script, so the script below is invalid:
Code:
function_name( 50 + 50 );
If you use the string with plus operator, it will only concat the strings just like the 2nd example:
Code:
function_name( "50" + "50" ); [COLOR="Green"]# Result = "5050"[/COLOR]
For commenting the code, we can use the sign character (#), only line comment was supported, just like an unix shell comment sintax:
Code:
[B]# This is comments[/B]
function_name("Lorem ipsum dolore…");
Code writing isn't strict, so we can safely use space or new line between function and arguments:
Code:
function_name(
"First Argument",
getvar("config"),
"Third Argument"
);
The functions in Edify Script can returned values. But just like an arguments, it's only supported string type data. The good thing is this String can be converted into Boolean for conditions need. The string with contents will have true Boolean, and the empty string will have false Boolean.
"" = false
"1" = true
"yes" = true
"no" = true
"0" = true
Control StructuresEdify only supported limited control structure. Only if, and if else supported. But this control structures is enough to make an interactive installer. The basic sintax of if structure is:
Code:
if
"comparison"=="comparison"
then
.. commands ..
endif;
And for if else structure is:
Code:
if
"comparison"=="comparison"
then
.. true commands ..
else
.. false commands ..
endif;
We don't have any looping control structure, the Next and Back features in Wizard UI was handled by program automatically.Comparison & Logical OperatorsEdify script doesn't supporting arithmetic operators, but it supported simple comparison and logical operators, Just like other programming languages base on C (java, php, javascript). It use simple operator sintax:
Code:
# Equal
val1 == val2
# Not Equal
val1 != val2
# Or
val1 || val2
# And
val1 && val2
# Not
!val1
# Logical & Comparison
(val1 == val2)||(val3 != val4)
(val1 == val2)&&(val3 != val4)
!((val1 == val2)&&(val3 != val4))
Yes, it doesn't support less than and greater than comparison, because it's only supported with string and Boolean string only. For Integer comparison use cmp function, but it's only supported in aroma-config script.String and Escape CharactersFortunately Edify support common string sintax. It's also supported escape characters for newline. The string in Edify defined with double quoted (") and ended with double quoted. Here the basic manipulation of string in Edify:
Code:
# Newline use \n:
"Hi, AROMA Installer is\nAWSOME!!!"
# Concat multiple lines:
"Lorem Ipsum Dolore sit\n"+
"Amet, lorem ipsum dolore\n"+
"sit amet, lorem ipsum\n"+
"dolore sit amet."
# Escape Characters:
"You can add\tTabs, \" Quote, \\ Backslash…"
# Hex Characters:
"It was character A : \x41"
Not Supported Operators in EdifyThere is a lot of operator features in common programming languages that not supported by edify, like assignment operator for inserting something into variable, bitwise operator for manipulating bits within integer, and arithmetic operators for doing simple math calculations.
All this limited has been added via functions (except bitwise), but only available for aroma-config script, and only simple operations supported.
What UI's AROMA Installer Supported
AROMA Installer had 4 main type of Customizable User Interfaces, the Wizard UI, Dialog UI, Splash UI and Installer UI. And un-customizable Menu UI for selecting About, Help, Tools and Quit Installer.Wizard UI
The Wizard UI was the main User Interface in AROMA Installer, it's contain Back and Next button in navigation bar just like Computer common Installer programs (Windows Installer, NSIS Install System, InstallShield). Users can navigate trough the screens, or back to previous screens if something not right in configurations. Users can select Typical or Customize installations, and Users can customize what packages to install.
AROMA Installer support many Wizard UI, and here the completed list of it's UI:
checkbox – UI to show checkboxes in groupable list, the selected items will be saved in prop format, and can be accessed with file_getprop.
selectbox – It's like checkbox, but it's only able to check 1 items per group.
textbox – It will show the textbox, you can read text file to show it into the textbox
viewbox – It's like Textbox, but not scrollable, and only supported limited text length
agreebox – It's like Textbox, but with agree checkbox, user can't step to next page if the checkbox not already checked. Useful to show License or Terms of Use Interface.
menubox – This UI will show list of menu to select, there is no Next button, because when User select the item, it will automatically step into next page. And The selected menu will be saved in temporary prop file.
Dialog UIWhile Wizard UI will shown it's interface in Fullscreen, the Dialog UI will shown it's interface in Popup Window, It was useful for some needs, like show confirmation for "Are You Sure want to format the partitions?", or show Alert Dialog for "Thanks for using my ROM". Here the complete list of Dialog UI in AROMA Installer:
alert – Show popup dialog, with limited text length and Only the OK button.
confirm – Show popup dialog, with limited text length and contains 2 customizable Button "Yes" and "No", with return value true for "Yes" and false for "No".
textdialog – Show scrollable text popup dialog, with long text length support and Only OK Button.
Splash UIThis UI Simply show the Splash Screen from png files with custom delay before it show next page. The image will automatically position in center of screen depended from it's image size. The background will be blended in blur and darkest color.Installer UIWhen configuration invoke the install UI, it will start an installation, and show the installer UI with description text on top window, textbox for installer information in middle, and progress text and bar in bottom of screen. The installation will not cancelable, and there is no buttons or menu to select before installation finished, The Next and Save Logs button will be shown after installation finished. And next Wizard UI can't do Back command beyond this installer UI, so the Installer UI will only shown once time only in flash process.
What Functions AROMA Installer SupportedThere is so many functions that you can used for your needs, The available functions was the common functions that may be usable for installations, but not supported very complex things. AROMA Installer support simple comparison, math, system partition information, and simple set and get variables.
Here the list of functions that you can used:
setcolor – Set UI Color Scheme
ini_set – Set Aroma Configuration settings
calibrate – Calibrating Touch Screen
getvar – Get Variable
setvar – Set Variable
appendvar – Append string into variable
prependvar – Prepend string into variable
file_getprop – Get prop value of some key from prop file.
readfile – Read text file from zip content
readfile_aroma – Read text file from zip content relatively from aroma META-INF folder.
getdisksize – Get partition total size
getdiskfree – Get partition free size
getdiskusedpercent – Get partition used size in percentage
cmp – Simple integer comparison ( >, <, ==, >=, <=, != )
cal – Simple math calculator ( +, -, /, * )
iif – Inline if
if else – If and Else Statement
pleasewait – Show please wait/loading progress when calculating/doing hard process that took a lot of time.
writetmpfile – Write/create temporary file with text contents
exit – terminate installation.
Custom Fonts
You can customize your AROMA Installer Fonts. The AROMA Installer use 2 type of fonts "Big" and "Small", the Big font used in Title and the Small Font used in almost any controls. To use the custom fonts, copy the big.png or small.png into META-INF/com/google/android/aroma/fonts.
List of Custom Fonts Currently Available to Download - by amarullz
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Download Custom Fonts ( 5 Fonts ) [+]Create Your Own Font
You can also create your own fonts, it was plain png (32 bit color depth). All letter was arranged in ASCII order Start from ASCII 32 (space) to ASCII 95 ( ~ char) then ( © - Copyright ) character.
Here the letter list:
Code:
!”#$%&’()*+,-./0123456789:;<=>[email protected] JKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~©
In the first row picture, there is pixel to seperate one letter to next letter, because AROMA Installer didn't use fixed size fonts ( console fonts like courier ). The fonts will rendering from 2nd row into end of rows. Here the example:
NOTE: AROMA Installer only need alpha channel for this, the color of fonts will using the AROMA color scheme defined in aroma-config. The width separator (in first row pixel) should be full opaque (alpha=100% or 255).
If you make your own fonts, please fell free to post here...Other Custom Fonts
You can also use third party custom fonts created by other xda-developers users. Here some custom font list:
Monospace Font - by mickey-r
Click to expand...
Click to collapse
Functions Reference
__________________________________________________________________________________________________________
amarullz said:
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")
);
Click to expand...
Click to collapse
XDA forum topic on Edify Script Syntax:
Edify script language
Tutorial on Edify Script Syntax
[TUT] Edify Installation Script Syntax's
Information on Edify scripts and CWM
[INFO] Edify scripts in CWM recovery
Aroma Log/Tmp Puller V1
This can pull log files/tmp files and other files from an aroma execution. It also allows packaging of just aroma or whole rom files
Aroma Log/Tmp Puller V1
By: Kevinrocksman
Common Errors
This post is intended to display the most common errors made while writing a script:
1.
Adding that damn extra comma that we all know you do not need:
Code:
selectbox(
#-- Title
"Main Title",
#-- Sub Title
"Your lovely subtitle:",
#-- Icon: <AROMA Resource Dir>/icons/default.png or <ThemeDir>/icon.default.png
"@default",
#-- Will be saved in /tmp/aroma/mods.prop
"mods.prop",
#----------------[ Selectbox With Groups ]--------------------#
# TITLE | SUBTITLE | Initial Value #
#-------------+------------------------------------+-----------------#
"Words", "", 2, #-- Group 1. key = "selected.1"
"Words", "", 1, #-- selected.1 = 1
"Words", "", 0 #-- selected.1 = 2
);
NO COMMA AFTER THAT LAST '0'
****************************************************************************************************************************************
****************************************************************************************************************************************
****************************************************************************************************************************************
****************************************************************************************************************************************
2.
End all of your if statements:
Code:
if
something then
if
something then
Do stuff
stuff happens
endif;
endif;
Many nested if statements can be difficult to track, and it is very easy to forget to end them all.
You can go down your list of code to count your if and endif statements.
When I write code and write any ifs, I also write the endif so I do not forget to add it later.
If you get a random syntax error on the LAST LINE of your script, it is usually caused by an expected end statement.
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
3.
Selected options are not executed but no error is reported.
aroma-config
Code:
menubox(
#-- Title
"Would you like to rdo stuff?",
#-- Sub Title
"Please Select:",
#-- Icon
"icons/apps",
#-- Will be saved in /tmp/aroma/whatever.prop
"whatever.prop",
#-------------------------+-----------------[ Menubox Items ]-------------------+---------------#
# TITLE | SUBTITLE | Something #
#-------------------------+-----------------------------------------------------------+-----------------#
"Option 1","This will do some stuff",0, #-- selected.0
"Option 2","This will something different",0, #-- selected.0
"Option 4","This will probably explode",0, #-- selected.0
"Option 4!","This option doesn't do sh*t but you can select if you want",1 #-- selected.0
);
Notice #-- selected.0
updater-script
Code:
if prop("whatever.prop","selected.0")=="1" then
#-- Do Option 1
alert(
#-- Title
"This is option 1",
#-- Text
"Option 1, do some stuff."
);
Notice the key is selected.0 also. If these are not matched, nothing will happen, or something else will happen depending on the key specified.
Makes sure your key values in your select boxes, check boxes, menu boxes etc. translate properly to your updater-script.
Here is a way to find out if you have your keys coded correctly:
Turge said:
if you guys use "adb shell" and verify the contents of the prop file before running the install script (or immediately after moving to the next menu), you can see exactly what to expect and update your aroma/updater-script code accordingly:
Code:
adb shell
cat /tmp/aroma/choice.prop
cat /tmp/aroma/tweaks.prop
Click to expand...
Click to collapse
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
************************************************** ************************************************** ************************************
4. not really an error
icon usage:
Icons of any size can be supplied. But they will automatically be rendered at 72x72 pixels.
and this one
another one???
ok, last one...
First lol
Great thread idea! I know you didn't exactly come up with it but glad someone finally decided to post it...
Thanks for all your efforts. Let me kick the start off, my aroma-config is attached since it is long. I get a syntax error in line 744 which doesn't exist, last line is 740. Before that there was a code but I removed it but still get an error in the same line.
abo_mara7 said:
Thanks for all your efforts. Let me kick the start off, my aroma-config is attached since it is long. I get a syntax error in line 744 which doesn't exist, last line is 740. Before that there was a code but I removed it but still get an error in the same line.
Click to expand...
Click to collapse
What error does it give you?
EDIT:
Code:
#-- Uninstall button mapping
if prop("cammode-clean.prop","selected")=="1" then
#-- Confirm Demo 1
if
confirm(
#-- Title
"Stock mapping",
#-- Text
"Are you sure that you want to return to stock button mapping?",
#-- Icon (Optional)
"@info"
)=="yes"
then
alert("Result","Done...");
else
alert("Result","Cancelled...");
endif;
Line 668, I think you need another endif here. You have two 'if' but one 'endif'
a great idea for all us newbie's and the blind!
I have a problem I think we my updater script. for some reason, that I can't see, when it gets to the end after installing the kernel I selected it seems to peform an additional extract of another kernels lib files. Could someone take a look and tell me if they can see what I can't!
Code:
####
## MOUNT & FORMAT
####
ui_print(" ");
ui_print("@Formatting SYSTEM and DATA Partitions");
# unmount
ui_print(" -Unmounting partitions...");
unmount("/system");
unmount("/data");
set_progress(0.05);
# format
ui_print(" -Formatting partitions & cache...");
format("MTD", "system");
format("MTD", "userdata");
format("MTD", "cache");
set_progress(0.1);
# re-mount
ui_print(" -Re-mounting partitions...");
mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
set_progress(0.15);
####
## EXTRACT BASE PACKAGES
####
ui_print(" ");
ui_print("@Extracting Base ROM Files");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
set_progress(0.20);
ui_print(" -Extracting /data files...");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_progress(0.25);
ui_print(" -Extracting /system files...");
package_extract_dir("system", "/system");
set_progress(0.3);
####
## EXTRACT SELECTED MODS
####
ui_print(" ");
ui_print("@Extracting Launcher");
# Launcher
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "1"
then
ui_print(" -Installing SS Launcher (Free Version)..");
package_extract_file("opt/launchers/com.ss.launcher.apk", "/data/app/com.ss.launcher.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "2"
then
ui_print(" -Installing Go Launcher EX...");
package_extract_file("opt/launchers/com.gau.go.launcherex-1.apk", "/data/app/com.gau.go.launcherex-1.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "3"
then
ui_print(" -Installing ADW Launcher (Free Version)...");
package_extract_file("opt/launchers/org.adw.launcher-1.apk", "/data/app/org.adw.launcher-1.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "4"
then
ui_print(" -Installing Rosie Launcher (Ghost Edition)...");
package_extract_file("opt/launchers/Rosie.apk", "/data/app/Rosie.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "5"
then
ui_print(" -Installing AOSP Launcher...");
package_extract_file("opt/launchers/Launcher2.apk", "/data/app/Launcher2.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "6"
then
ui_print(" -Installing Holo Launcher...");
package_extract_file("opt/launchers/com.mobint.hololauncher-1.apk", "/data/app/com.mobint.hololauncher-1.apk");
endif;
set_progress(0.35);
ui_print(" ");
ui_print(" ");
ui_print("@Extracting Statusbar and Animation Mods");
#Statusbar & Animation
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "1"
then
ui_print(" -Installing Blurange with 4.0 animation...");
package_extract_file("opt/Blurange/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Blurange/framework-res.apk", "/system/framework/framework-res.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "2"
then
ui_print(" -Installing Black & White with Fly animation...");
package_extract_file("opt/Black&White/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Black&White/framework-res.apk", "/system/framework/framework-res.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "3"
then
ui_print(" -Installing Colourful with Ruldolf animation...");
package_extract_file("opt/Colourful/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Colourful/framework-res.apk", "/system/framework/framework-res.apk");
endif;
set_progress(0.4);
####
## EXTRACT ROSIE ADD-ONS
####
ui_print(" ");
ui_print("@Extracting & Installing Add-ons ");
# Rosie Utility
if
file_getprop("/tmp/aroma/customize.prop","item.1.1") == "1"
then
ui_print(" -Installing Rosie Utility add-on...");
package_extract_dir("opt/rosie/app/", "/sytem/app");
endif;
set_progress(0.45);
# Wallpaper Chooser
if
file_getprop("/tmp/aroma/customize.prop","item.1.2") == "1"
then
ui_print(" -Installing Wallpaper Chooser...");
package_extract_dir("opt/wallpaper/app/", "/system/app");
endif;
set_progress(0.5);
ui_print("@Half way there. I hope you're sitting comfortably!");
ui_print("If you're reading this then");
ui_print(". ");
ui_print(".. ");
ui_print("... ");
ui_print(".... ");
set_progress(0.55);
####
## SYMLINKS
####
ui_print(" ");
ui_print("@Configuring SYSTEM Files");
ui_print(" -Creating Toolbox...");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/chownto");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
set_progress(0.60);
####
## ACCESS CONTROL & PERMISSIONS
####
ui_print(" ");
ui_print("@Configuring Access Control Lists");
ui_print(" -Configuring Busybox...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_progress(0.65);
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
set_progress(0.70);
####
## EXTRACT SELECTED KERNEL
####
ui_print(" ");
ui_print("@Extracting & Installing Selected Kernel Package");
#Underworld w/SBC
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "1"
then
ui_print(" -Installing Underworld Kernel w/SBC...");
assert(package_extract_file("opt/kernels/underworld_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/underworld_sbc/system/lib/modules", "/system/lib/modules/");
endif;
#Underworld
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "2"
then
ui_print(" -Installing Underworld Kernel...");
assert(package_extract_file("opt/kernels/underworld/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/underworld/system/lib/modules", "/system/lib/modules/");
endif;
#Classic
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "3"
then
ui_print(" -Installing Classic Kernel...");
assert(package_extract_file("opt/kernels/classic/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/sytem/lib/modules", "/system/lib/modules/");
endif;
#Classic w/sbc
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "4"
then
ui_print(" -Installing Classic Kernel w/SBC...");
assert(package_extract_file("opt/kernels/classic_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/system/lib/modules", "/system/lib/modules/");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "5"
then
ui_print(" -Installing Lionfish Kernel...");
assert(package_extract_file("opt/kernels/lionfish/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/lionfish/system/lib/modules", "/system/lib/modules/");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "6"
then
ui_print(" -Installing Lionfish Kernel w/SBC...");
assert(package_extract_file("opt/kernels/lionfish_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/lionfish_sbc/system/lib/modules", "/system/lib/modules/");
endif;
set_progress(0.75);
####
## BUSYBOX, DALVIK2SD
####
ui_print(" ");
ui_print("Configuring Base Modifications");
ui_print(" -Extracting busybox...");
package_extract_file("installbusybox", "/tmp/installbusybox");
set_perm(0, 0, 0777, "/tmp/installbusybox");
run_program("/tmp/installbusybox");
set_progress(0.8);
ui_print(" -Moving Dalvik-cache to SD...");
package_extract_file("move_cache_sd", "/tmp/move_cache_sd");
set_perm(0, 0, 0777, "/tmp/move_cache_sd");
run_program("/tmp/move_cache_sd");
set_progress(0.85);
set_progress(0.9);
set_progress(0.95);
####
## INSTALLATION COMPLETE
####
set_progress(1.0);
ui_print(" ");
ui_print("@Finished!");
ui_print("@Urayamashi Installation Complete. A B.o.B is now in your hands");
thanks if anyone can help
Dblfstr said:
What error does it give you?
Click to expand...
Click to collapse
SYNTAX ERROR!!! aroma-config on line 691 col 1 >> Which is the last line,, and it is empty
E:ERROR in /sdcard/.....zip
(Status 1)
Installation aborted
abo_mara7 said:
SYNTAX ERROR!!! aroma-config on line 691 col 1 >> Which is the last line,, and it is empty
E:ERROR in /sdcard/.....zip
(Status 1)
Installation aborted
Click to expand...
Click to collapse
Did you see my edit?
Besides, I had 740 lines? Either way, a syntax error on the last line means it is expecting an "end" there. That does not mean that the "end" should be at the last line, it means that you left an 'end' off else where that it does not recognize until the script is finished. Thus, it reports syntax error on the last line.
Robobob1221 said:
a great idea for all us newbie's and the blind!
I have a problem I think we my updater script. for some reason, that I can't see, when it gets to the end after installing the kernel I selected it seems to peform an additional extract of another kernels lib files. Could someone take a look and tell me if they can see what I can't!
Code:
####
## MOUNT & FORMAT
####
ui_print(" ");
ui_print("@Formatting SYSTEM and DATA Partitions");
# unmount
ui_print(" -Unmounting partitions...");
unmount("/system");
unmount("/data");
set_progress(0.05);
# format
ui_print(" -Formatting partitions & cache...");
format("MTD", "system");
format("MTD", "userdata");
format("MTD", "cache");
set_progress(0.1);
# re-mount
ui_print(" -Re-mounting partitions...");
mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
set_progress(0.15);
####
## EXTRACT BASE PACKAGES
####
ui_print(" ");
ui_print("@Extracting Base ROM Files");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
set_progress(0.20);
ui_print(" -Extracting /data files...");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_progress(0.25);
ui_print(" -Extracting /system files...");
package_extract_dir("system", "/system");
set_progress(0.3);
####
## EXTRACT SELECTED MODS
####
ui_print(" ");
ui_print("@Extracting Launcher");
# Launcher
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "1"
then
ui_print(" -Installing SS Launcher (Free Version)..");
package_extract_file("opt/launchers/com.ss.launcher.apk", "/data/app/com.ss.launcher.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "2"
then
ui_print(" -Installing Go Launcher EX...");
package_extract_file("opt/launchers/com.gau.go.launcherex-1.apk", "/data/app/com.gau.go.launcherex-1.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "3"
then
ui_print(" -Installing ADW Launcher (Free Version)...");
package_extract_file("opt/launchers/org.adw.launcher-1.apk", "/data/app/org.adw.launcher-1.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "4"
then
ui_print(" -Installing Rosie Launcher (Ghost Edition)...");
package_extract_file("opt/launchers/Rosie.apk", "/data/app/Rosie.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "5"
then
ui_print(" -Installing AOSP Launcher...");
package_extract_file("opt/launchers/Launcher2.apk", "/data/app/Launcher2.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.1") == "6"
then
ui_print(" -Installing Holo Launcher...");
package_extract_file("opt/launchers/com.mobint.hololauncher-1.apk", "/data/app/com.mobint.hololauncher-1.apk");
endif;
set_progress(0.35);
ui_print(" ");
ui_print(" ");
ui_print("@Extracting Statusbar and Animation Mods");
#Statusbar & Animation
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "1"
then
ui_print(" -Installing Blurange with 4.0 animation...");
package_extract_file("opt/Blurange/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Blurange/framework-res.apk", "/system/framework/framework-res.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "2"
then
ui_print(" -Installing Black & White with Fly animation...");
package_extract_file("opt/Black&White/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Black&White/framework-res.apk", "/system/framework/framework-res.apk");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.3") == "3"
then
ui_print(" -Installing Colourful with Ruldolf animation...");
package_extract_file("opt/Colourful/SystemUI.apk", "/system/app/SystemUI.apk");
package_extract_file("opt/Colourful/framework-res.apk", "/system/framework/framework-res.apk");
endif;
set_progress(0.4);
####
## EXTRACT ROSIE ADD-ONS
####
ui_print(" ");
ui_print("@Extracting & Installing Add-ons ");
# Rosie Utility
if
file_getprop("/tmp/aroma/customize.prop","item.1.1") == "1"
then
ui_print(" -Installing Rosie Utility add-on...");
package_extract_dir("opt/rosie/app/", "/sytem/app");
endif;
set_progress(0.45);
# Wallpaper Chooser
if
file_getprop("/tmp/aroma/customize.prop","item.1.2") == "1"
then
ui_print(" -Installing Wallpaper Chooser...");
package_extract_dir("opt/wallpaper/app/", "/system/app");
endif;
set_progress(0.5);
ui_print("@Half way there. I hope you're sitting comfortably!");
ui_print("If you're reading this then");
ui_print(". ");
ui_print(".. ");
ui_print("... ");
ui_print(".... ");
set_progress(0.55);
####
## SYMLINKS
####
ui_print(" ");
ui_print("@Configuring SYSTEM Files");
ui_print(" -Creating Toolbox...");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/chownto");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
set_progress(0.60);
####
## ACCESS CONTROL & PERMISSIONS
####
ui_print(" ");
ui_print("@Configuring Access Control Lists");
ui_print(" -Configuring Busybox...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_progress(0.65);
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
set_progress(0.70);
####
## EXTRACT SELECTED KERNEL
####
ui_print(" ");
ui_print("@Extracting & Installing Selected Kernel Package");
#Underworld w/SBC
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "1"
then
ui_print(" -Installing Underworld Kernel w/SBC...");
assert(package_extract_file("opt/kernels/underworld_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/underworld_sbc/system/lib/modules", "/system/lib/modules/");
endif;
#Underworld
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "2"
then
ui_print(" -Installing Underworld Kernel...");
assert(package_extract_file("opt/kernels/underworld/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/underworld/system/lib/modules", "/system/lib/modules/");
endif;
#Classic
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "3"
then
ui_print(" -Installing Classic Kernel...");
assert(package_extract_file("opt/kernels/classic/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/sytem/lib/modules", "/system/lib/modules/");
endif;
#Classic w/sbc
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "4"
then
ui_print(" -Installing Classic Kernel w/SBC...");
assert(package_extract_file("opt/kernels/classic_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/system/lib/modules", "/system/lib/modules/");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "5"
then
ui_print(" -Installing Lionfish Kernel...");
assert(package_extract_file("opt/kernels/lionfish/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/lionfish/system/lib/modules", "/system/lib/modules/");
endif;
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "6"
then
ui_print(" -Installing Lionfish Kernel w/SBC...");
assert(package_extract_file("opt/kernels/lionfish_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/lionfish_sbc/system/lib/modules", "/system/lib/modules/");
endif;
set_progress(0.75);
####
## BUSYBOX, DALVIK2SD
####
ui_print(" ");
ui_print("Configuring Base Modifications");
ui_print(" -Extracting busybox...");
package_extract_file("installbusybox", "/tmp/installbusybox");
set_perm(0, 0, 0777, "/tmp/installbusybox");
run_program("/tmp/installbusybox");
set_progress(0.8);
ui_print(" -Moving Dalvik-cache to SD...");
package_extract_file("move_cache_sd", "/tmp/move_cache_sd");
set_perm(0, 0, 0777, "/tmp/move_cache_sd");
run_program("/tmp/move_cache_sd");
set_progress(0.85);
set_progress(0.9);
set_progress(0.95);
####
## INSTALLATION COMPLETE
####
set_progress(1.0);
ui_print(" ");
ui_print("@Finished!");
ui_print("@Urayamashi Installation Complete. A B.o.B is now in your hands");
thanks if anyone can help
Click to expand...
Click to collapse
Does it doe this for all kernals, meaning which ever kernal you pick, you get different kernal libs?
Or just the classic kernal?
I ask because for each kernal you pick, you have two options: Kernal and Kernal with SBC.
Furthermore, you have specified a different directory for each option:
opt/kernels/lionfish/sytem/lib/modules
opt/kernels/lionfish_sbc/sytem/lib/modules
Except for classic, you have:
Code:
#Classic
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "3"
then
ui_print(" -Installing Classic Kernel...");
assert(package_extract_file("opt/kernels/classic/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/sytem/lib/modules", "/system/lib/modules/");
endif;
#Classic w/sbc
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "4"
then
ui_print(" -Installing Classic Kernel w/SBC...");
assert(package_extract_file("opt/kernels/classic_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/system/lib/modules", "/system/lib/modules/");
endif;
Which both point to opt/kernels/classic/sytem/lib/modules for the libs instead of opt/kernels/classic_sbc/sytem/lib/modules
Dblfstr said:
Does it doe this for all kernals, meaning which ever kernal you pick, you get different kernal libs?
Or just the classic kernal?
I ask because for each kernal you pick, you have two options: Kernal and Kernal with SBC.
Furthermore, you have specified a different directory for each option:
opt/kernels/lionfish/sytem/lib/modules
opt/kernels/lionfish_sbc/sytem/lib/modules
Except for classic, you have:
Code:
#Classic
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "3"
then
ui_print(" -Installing Classic Kernel...");
assert(package_extract_file("opt/kernels/classic/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/sytem/lib/modules", "/system/lib/modules/");
endif;
#Classic w/sbc
if
file_getprop("/tmp/aroma/mods.prop","selected.2") == "4"
then
ui_print(" -Installing Classic Kernel w/SBC...");
assert(package_extract_file("opt/kernels/classic_sbc/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("opt/kernels/classic/system/lib/modules", "/system/lib/modules/");
endif;
Which both point to opt/kernels/classic/sytem/lib/modules for the libs instead of opt/kernels/classic_sbc/sytem/lib/modules
Click to expand...
Click to collapse
Thanks for the reply.
I missed that! But actually on complete there seemed to be an additional extract which pulls the lionfish lib file, no matter which kernel is installed. For both lionfish kernel this isn't a problem as they use the same modules I'm guessing.
I pulled the log and this is what happens after installation complete
Code:
Finished!
Urayamashi Installation Complete. A B.o.B is now in your hands
script result was [@Urayamashi Installation Complete. A B.o.B is now in your hands]
stem/usr/srec/config/en.us/dictionary/basic.ok"
Extract: /system/usr/srec/config/en.us/dictionary/cmu6plus.ok.zip
Extract: /system/usr/srec/config/en.us/dictionary/enroll.ok
Extract: /system/usr/srec/config/en.us/g2p/en-US-ttp.data
Extract: /system/usr/srec/config/en.us/grammars/VoiceDialer.g2g
Extract: /system/usr/srec/config/en.us/grammars/boolean.g2g
Extract: /system/usr/srec/config/en.us/grammars/phone_type_choice.g2g
Extract: /system/usr/srec/config/en.us/models/generic.swiarb
Extract: /system/usr/srec/config/en.us/models/generic11.lda
Extract: /system/usr/srec/config/en.us/models/generic11_f.swimdl
Extract: /system/usr/srec/config/en.us/models/generic11_m.swimdl
Extract: /system/usr/srec/config/en.us/models/generic8.lda
Extract: /system/usr/srec/config/en.us/models/generic8_f.swimdl
Extract: /system/usr/srec/config/en.us/models/generic8_m.swimdl
Extract: /system/xbin/a2sd
Extract: /system/xbin/apps2sd
Extract: /system/xbin/busybox
Extract: /system/xbin/dexdump
Extract: /system/xbin/nano
Extract: /system/xbin/pascal_link
Extract: /system/xbin/sqlite3
Extract: /system/xbin/sysro
Extract: /system/xbin/sysrw
Extract: /system/xbin/wireless_modem
Extract: /system/app/WallpaperChooser.apk
wrote boot partition from /tmp/boot.img
Extract: /system/lib/modules/bcm4329.ko
Extract: /system/lib/modules/cifs.ko
Extract: /system/lib/modules/sequans_sdio.ko
Extract: /system/lib/modules/tun.ko
Extract: /system/lib/modules/wimaxdbg.ko
Extract: /system/lib/modules/wimaxuart.ko
Installer Sucessfull (Status 0)
End at : Thu Jul 12 17:27:51 2012
I have removed a bit of code from the end of the updater but I haven't got round to testing it yet
Will add it in the main thead when i got my laptop... Thanks
Sent from my HTC Sensation XE with Beats Audio Z715e using xda app-developers app
Ok this seems to be very good thread
How to obtain screen calibration data and fix it in aroma-config?
For few phones calibration takes lots of time, so how to collect that data and define it in aroma config to avoid irritating calibration every time you flash the zip?
varun.chitre15 said:
Ok this seems to be very good thread
How to obtain screen calibration data and fix it in aroma-config?
For few phones calibration takes lots of time, so how to collect that data and define it in aroma config to avoid irritating calibration every time you flash the zip?
Click to expand...
Click to collapse
If you look in the aroma-config near the top it tells you what to do
##
# Calibrate Touchscreen
#
# For other device, run the installer, then press "menu"
# and select Calibrating Tools. Follow Instructions, and make
# sure the touch screen has been valid in the testing step.
#
# In the end, there will be alert dialog with calibration data
# ( green ), replace this calibrate() function with that data.
#
calibrate("1.7794","33","1.0941","40");
Click to expand...
Click to collapse
Once you done this record the calibration number and add it below this text unquoted in the aroma-config. You can see my calibration above
Robobob1221 said:
If you look in the aroma-config near the top it tells you what to do
Once you done this record the calibration number and add it below this text unquoted in the aroma-config. You can see my calibration above
Click to expand...
Click to collapse
Yes correct.. And please dont include calibration proccess for user, it was annoyed, user only will think the installer was suck. I found that in some rom before, ask user to calibrate the touch screen before starting installation proccess.
Sent from my HTC Sensation XE with Beats Audio Z715e using xda app-developers app
Hi,
My below question is for updater-script:
Can I put one function within another?
For instance: ui_print(file_getprop("/tmp/aroma-data/install.prop","selected.0"));
I have tried this, and it returns nothing and it doesn't give me syntax error.
I know it is possible for aroma-config.
Thanks in advance!
Hi the crazy flash,
I open this topic for help creating a fix
CM10 ROM is Divided into 2 parts and some of the applications are installed on the / data partition due to Lack of space for full Jellybean installation.
Hence you will Have to reflash the rom you factory reset or Effective wipe / data partition.
Click to expand...
Click to collapse
After a restart install CM10 patch to system/app did not effect ?§!
Here is the solution I use busybox to inject App
I take this opportunity to fix some permission
If you have time of need flashable zip of this topic and for you!
Kernel or gapps or questions to ask permission
FixSysPartCM10
Code:
assert(getprop("ro.product.device") == "galaxysl" || getprop("ro.build.product") == "galaxysl" ||
getprop("ro.product.device") == "GT-I9003" || getprop("ro.build.product") == "GT-I9003");
ui_print(" ");
ui_print(" ********************************************** ");
ui_print(" * Fix reboot sys-parts/app by LoLaTiOn * ");
ui_print(" ********************************************** ");
show_progress(0.500000, 0);
mount("ext4", "EMMC", "/dev/block/stl9", "/system");
run_program("/sbin/busybox", "mount", "/dev/block/mmcblk0p3", "/data");
package_extract_dir("data", "/data");
symlink("/data/sys-parts/app","/system/app");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/framework");
set_perm_recursive(0, 0, 0755, 0644, "/data/app");
unmount("system");
run_program("/sbin/reboot");
instruction
Open zip with winrar
Add your app in \data\sys-parts\app
Create other folder in the system if time of need
Made you happy to share your patch and help the community
Enjoy...
my rom do not need this fix
Worked perfectly for me! Thanks
This is needed because CM10 with gapps does not fit our NAND aka ROM size.
Hence, the system apps are pushed into /data/sys-apps so that the entire ROM can work properly.. else full /system of jellybean does not fit on our small partition.
Hello...
I have made Aroma Installer for Galaxy 3, You can find more Information about Aroma from Official thread
http://forum.xda-developers.com/showthread.php?t=1461712
Downloads:
Aroma For Galaxy 3 v 1.0
All ROM Devs are Allowed to Use my aroma-config and updater-script File Without My Permission so don't PM For Permissions.
Just Give Me Credit and Link to My Thread
Details About Releases:
Version 1.0
Kernel Included:
G3MOD 2.5 OC,
CM7 A9 Default,
CM7 A9 Ultra
Tweaks Included:
AdBlock
ZipAlign
Kyrillos App2Sd v2 and Aps2Sd v3
Cron Universal App2Sd (INT2EXTV2+)
Beats Audio
Apps:
Google Apps for GB/CM7
Seeder
SMS Backup And Restore
Others:
BLN for CM7 A9 With G3MOD 2.5 Kernel
BLN for CM7 A9 With CM7 Default Kernels
Credits:
Amarullz for Aroma Installer Link
Croniccorey for Universal App2Sd Script Link
Kyrillos For App2Sd Scripts
RockoDev for Beats Audio Link
Idcrisis for CrossBreeder Mod link
+
+
+
Awesome! I had an experience to port AROMA for our G3 (you can check here: http://youtu.be/-N6-HBF1A4c) a year ago. But as mounting system wasn't working on CM9 i gave up Glad to see that somebody finally did it! Good luck with it! And make it more multiple
sad96 said:
Awesome! I had an experience to port AROMA for our G3 (you can check here: http://youtu.be/-N6-HBF1A4c) a year ago. But as mounting system wasn't working on CM9 i gave up Glad to see that somebody finally did it! Good luck with it! And make it more multiple
Click to expand...
Click to collapse
I m using cm7 right now, so i did not included froyo features, maybe in next releses........
Mohanshbhr said:
I m using cm7 right now, so i did not included froyo features, maybe in next releses........
Click to expand...
Click to collapse
I understand. Cm7 is better than froyo in some development cases. Especially in this.
I wish to make aroma for my ROM (2.2). But as froyo can't be installed fully through cwm it's useless.
Would you pls write a few lines on what it actually does...In the actual thread it is too much of info to consume. Is it only for ROM devs? Is my phone going to explode if I try to install this on my own, being a layman? :silly:
Nil253259 said:
Would you pls write a few lines on what it actually does...In the actual thread it is too much of info to consume. Is it only for ROM devs? Is my phone going to explode if I try to install this on my own, being a layman? :silly:
Click to expand...
Click to collapse
It's a windows like installer for android, U can do Next>Next>Next>Next>Finish and can install ONLY and ONLY your desired tweaks and mod.
Nil253259 said:
Would you pls write a few lines on what it actually does...In the actual thread it is too much of info to consume. Is it only for ROM devs? Is my phone going to explode if I try to install this on my own, being a layman? :silly:
Click to expand...
Click to collapse
Check screens in original thread.
You can choose whatever you want. For example in roms you can choose which kernel to install. Or which tweaks you want to. Or apps.
It's a thing that offer you to customise like you want. It' very comfortatble. For e.g. how can i use it in my rom:
1. You can choose between g3mod of fugu
2. You can choose between Memo or Tasks
3. You can choose between stock music player and miui.
And much more.
Thanks Mohanshbhr & sad...Got the point...Things look easier now...:good:
Nice to see this in G3 i have used it in Xperia x10
Version 1.0 realesed
I cant download this on my phone it says file corrupted
Sent from my GT-I5800 using xda app-developers app
its working and so nyc to have it on g3
gogozx said:
I cant download this on my phone it says file corrupted
Sent from my GT-I5800 using xda app-developers app
Click to expand...
Click to collapse
austin266 confirmed that it's working , redownload and try again.......:angel::angel:
Nice work!
Should make rom customisation a lot easier.
Could you provide options for which gapps to install?
Example of code(i was searching for such a installer,used on ics.)
Aroma-config:
Code:
###################################################################################################################
# #
# INSTALLATION #
# #
###################################################################################################################
###################################################################################################################
#
# STEP 1 - SHOW VIEWBOX - SOFTWARE 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.updated>\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+
"<~welcome.text2>\n\n"+
"<~welcome.next>",
#-- Icon
"@welcome"
);
###################################################################################################################
#
# STEP 2 - LICENSE
#
agreebox(
#-- Title
"License Terms",
#-- Subtitle / Description
"Please note:",
#-- Icon
"@license",
#-- Text Content ( Read from <AROMA Resource Dir>/license.txt )
resread("license.txt"),
#-- Checkbox Text
"Accept",
#-- Unchecked Alert Message
"You must accept the license terms first!"
);
###################################################################################################################
#
# STEP 3 - CHANGELOG
#
textbox(
#-- Title
"Changelog",
#-- Subtitle
"",
#-- Icon
"@update",
#-- Arg 4
resread("changelog.txt")
);
###################################################################################################################
#
# STEP 4 - SHOW MENUBOX - INSTALLATION TYPE
#
menubox(
#-- Title
"Select Install-Type",
#-- Sub Title
"Choose your prefered installation type:",
#-- Icon
"@info",
#-- Will be saved in /tmp/aroma/type.prop
"type.prop",
#-------------------------+-----------------[ Menubox Items ]-------------------------+---------------#
# TITLE | SUBTITLE | Item Icons #
#-------------------------+-----------------------------------------------------------+---------------#
"Full Install", "Installs 27 APKs with a total size of 53.42 Mb (+ 15.2 Mb libs).", "@install", #-- selected = 1
"Custom Install", "Choose which Apps you want to be installed. ", "@personalize" #-- selected = 2
);
###################################################################################################################
#
# STEP 5 - SET CUSTOMIZED INSTALLATION FLAGS (PROP VALUES)
#
###
# 3.a - If installation type IS NOT "Custom", skip select view and write defaults.
# NOTE: customize.prop should exists, or updater-script will error
#
if (prop("type.prop","selected")!="2") then
writetmpfile(
#-- Prop file will write to /tmp/aroma/customize.prop
"customize.prop",
#-- Full-Install Values ( all selected )
"item.1.1=1\n"+ #-- Gallery
"item.1.2=1\n"+ #-- Gmail
"item.1.3=1\n"+ #-- Maps
"item.1.4=1\n"+ #-- Market
"item.1.5=1\n"+ #-- Music
"item.1.6=1\n"+ #-- YouTube
"item.2.1=1\n"+ #-- Genie Widget
"item.2.2=1\n"+ #-- Google Play Magazines
"item.2.3=1\n"+ #-- Talk
"item.2.4=1\n"+ #-- TTS
"item.2.5=1\n"+ #-- Voice
"item.2.6=1\n"+ #-- Quick Search
"item.2.7=1\n" #-- Voice Search
);
###
# 3.b - If installation type IS "Custom", show App selection view.
#
else
checkbox(
#-- Title
"Customize Your Installation",
#-- Sub Title
"Select the Apps you want to be 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 #
#------------------+-------------------------------------------------------------------------------------+---------------#
"Common Apps", "", 2, #-- Group 1. key = "item.1.x"
"Gallery", "Filesize: 1.54 mb", 1, #-- item.1.1 = Selected by default
"Gmail", "Filesize: 2.67 mb", 1, #-- item.1.2 = Selected by default
"Google Maps", "Filesize: 8.26 mb + Steetview (259 kb)", 1, #-- item.1.3 = Selected by default
"Google Play Store", "Filesize: 3.82 mb", 1, #-- item.1.4 = Selected by default
"Google Play Music", "Filesize: 4.82 mb", 1, #-- item.1.5 = Selected by default
"YouTube", "Filesize: 5.76 mb", 1, #-- item.1.6 = Selected by default
"More Apps", "", 2, #-- Group 2. key = "item.2.x"
"Genie Widget", "Filesize: 1.08 mb", 0, #-- item.2.1 = Un-Selected by default
"Google Play Magazines", "Filesize: 5.18 mb", 0, #-- item.2.2 = Un-Selected by default
"Google Talk", "Filesize: 1.58 mb + Libs (7.67 mb)", 0, #-- item.2.3 = Un-Selected by default
"Google TTS Engine", "Filesize: 4.12 mb + Libs (7.25 mb)", 1, #-- item.2.4 = Selected by default
"Google Voice", "Filesize: 4.53 mb", 0, #-- item.2.5 = Un-Selected by default
"Quick Search Box", "Filesize: 583 kb", 0, #-- item.2.6 = Un-Selected by default
"Voice-Search", "Filesize: 1.76 mb", 1 #-- item.2.7 = Selected by default
#--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
);
endif;
#-- Change confirm button value from "Next >" to "Install Now".
ini_set("text_next", "Install Now");
###################################################################################################################
#
# STEP 6 - SHOW VIEWBOX - CONFIRM INSTALLATION
#
viewbox(
#-- Title
"Confirm selection",
#-- Text
"The wizard is ready to begin installation.\n\n"+
"Press <b>Install Now</b> to begin the installation.\n\n"+
"If you want to review or change any of your installation settings, press <b>Back</b>.\n\n"+
"To abort installation, press Menu Key -> Quit Installation.",
#-- Icon
"@install"
);
#-- Change confirm button value back from "Install Now" to "Finish".
ini_set("text_next", "Finish");
###################################################################################################################
#
# STEP 7 - INSTALL
#
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>.",
#-- Installation Icon
"@install",
#-- Installation Finish Message
"The installation wizard has successfully installed <b>"+ini_get("rom_name")+
"</b>."
)
);
###################################################################################################################
#
# STEP 8 - SHOW CHECKVIEWBOX - EXIT TO RECOVERY, OR REBOOT SYSTEM
#
checkviewbox(
#-- Title
"Installation completed!",
#-- Text
"<#selectbg_g><b>Congratulation...</b></#>\n\n"+
"<b>"+ini_get("rom_name")+"</b> have been installed on your device.\n\n",
#-- Icon
"@welcome",
#-- Checkbox Text
"Reboot your device now.",
#-- Initial Checkbox value ( 0=unchecked, 1=checked ) - (Optional, default:0)
"1",
#-- Save checked value in variable "reboot_it" (Optional)
"reboot_it"
);
##
# Check if reboot checkbox was checked
#
if
getvar("reboot_it")=="1"
then
reboot("onfinish");
endif;
#---- FINISH
Updater Script:
Code:
##
#
# AROMA Installer - Installer Script
# (c) 2011 by Ahmad Amarullah
# amarullz - xda-developers
#
##
#####################################################################################################
#
# Installer Script for ICS Google-Apps
# (c) 2012 by Stephan Schmitz <[email protected]>
#
#
# Mount system partition
#
set_progress(0.05);
ui_print("Mounting /system...");
ui_print(" ");
set_progress(0.1);
run_program("/sbin/busybox", "mount", "/system");
#
# Extract files to /system/etc, /system/framework, /system/lib
#
ui_print("Copying libs and other requirements...");
show_progress(0.35, 23);
package_extract_dir("system", "/system");
ui_print(" ");
#
# Extract new APKs
#
ui_print("Installing Google Apps...");
ui_print(" ");
show_progress(0.4, 14);
##---- Customize Packages
#
# Most common APKs (select group one)
#
# Gallery
if
file_getprop("/tmp/aroma/customize.prop","item.1.1") == "1"
then
ui_print("@ Installing Gallery");
delete("/system/app/Gallery2.apk");
package_extract_dir("custom/gallery", "/system/app");
endif;
# Gmail
if
file_getprop("/tmp/aroma/customize.prop","item.1.2") == "1"
then
ui_print("@ Installing Gmail");
delete("/system/app/Gmail.apk", "/data/app/Gmail.apk");
package_extract_dir("custom/gmail", "/system/app");
endif;
# Google Maps
if
file_getprop("/tmp/aroma/customize.prop","item.1.3") == "1"
then
ui_print("@ Installing Google Maps");
delete("/system/app/Maps.apk", "/data/app/Maps.apk",
"/system/app/Street.apk", "/data/app/Street.apk");
package_extract_dir("custom/maps", "/system/app");
package_extract_dir("custom/_lib/tts", "/system/lib");
endif;
# Market / Play Store
if
file_getprop("/tmp/aroma/customize.prop","item.1.4") == "1"
then
ui_print("@ Installing Play Store");
delete("/system/app/Vending.apk");
package_extract_dir("custom/market", "/system/app");
endif;
# Play Music
if
file_getprop("/tmp/aroma/customize.prop","item.1.5") == "1"
then
ui_print("@ Installing Play Music");
delete("/system/app/Music2.apk", "/system/app/Music.apk");
package_extract_dir("custom/music", "/system/app");
endif;
# Youtube
if
file_getprop("/tmp/aroma/customize.prop","item.1.6") == "1"
then
ui_print("@ Installing YouTube");
delete("/system/app/YouTube.apk", "/data/app/com.google.android.youtube-1.apk");
package_extract_dir("custom/yt", "/system/app");
endif;
#
# Not that common APKs (select group two)
#
# Genie Widget
if
file_getprop("/tmp/aroma/customize.prop","item.2.1") == "1"
then
ui_print("@ Installing Genie Widget");
delete("/system/app/GenieWidget.apk");
package_extract_dir("custom/genie", "/system/app");
endif;
# Google Play Magazines
if
file_getprop("/tmp/aroma/customize.prop","item.2.2") == "1"
then
ui_print("@ Installing Play Magazines");
delete("/system/app/Magazines.apk");
package_extract_dir("custom/magazines", "/system/app");
endif;
# Google Talk
if
file_getprop("/tmp/aroma/customize.prop","item.2.3") == "1"
then
ui_print("@ Installing Google Talk");
delete("/system/app/Talk.apk");
package_extract_dir("custom/talk", "/system/app");
package_extract_dir("custom/_lib/talk", "/system/lib");
endif;
# Google TTS Engine
if
file_getprop("/tmp/aroma/customize.prop","item.2.4") == "1"
then
ui_print("@ Installing Google TTS Engine");
delete("/system/app/GoogleTTS.apk");
package_extract_dir("custom/tts", "/system/app");
package_extract_dir("custom/_lib/tts", "/system/lib");
endif;
# Google Voice
if
file_getprop("/tmp/aroma/customize.prop","item.2.5") == "1"
then
ui_print("@ Installing Google Voice");
delete("/system/app/Voice.apk");
package_extract_dir("custom/voice", "/system/app");
endif;
# Quick Search
if
file_getprop("/tmp/aroma/customize.prop","item.2.6") == "1"
then
ui_print("@ Installing Quick Search");
delete("/system/app/QuickSearchBox.apk", "/system/app/GoogleQuickSearchBox.apk");
package_extract_dir("custom/quicksearch", "/system/app");
endif;
# Voice Search
if
file_getprop("/tmp/aroma/customize.prop","item.2.7") == "1"
then
ui_print("@ Installing Voice Search");
delete("/system/appa/VoiceSearch.apk");
package_extract_dir("custom/voicesearch", "/system/app");
endif;
#--- END OF Customize
ui_print(" ");
#
# Fix permissions
#
ui_print("Setting permissions for new APKs...");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system/framework");
set_perm_recursive(0, 0, 0755, 0644, "/system/lib");
set_progress(0.85);
ui_print(" ");
#
# Unmount system partition
#
ui_print("Unmounting /system...");
run_program("/sbin/busybox", "umount", "/system");
set_progress(0.90);
ui_print(" ");
ui_print("Formatting /cache...");
format("yaffs2", "MTD", "cache");
set_progress(0.91);
ui_print(" ");
#
# Mount data partition
#
ui_print("Mounting data...");
run_program("/sbin/busybox", "mount", "/data");
set_progress(0.93);
ui_print(" ");
#
# Wipe DC
#
ui_print("Deleting Dalvik-Cache...");
delete_recursive("/data/dalvik-cache");
set_progress(0.96);
ui_print(" ");
#
# Unmount data partition
#
ui_print("Unmounting data...");
run_program("/sbin/busybox", "umount", "/data");
ui_print(" ");
set_progress(0.99);
#run_program("/sbin/busybox", "mount", "/cache");
#-- Finish
ui_print("----------------------");
ui_print("Installation complete!");
set_progress(1);
Also use radio buttons for app2sd script selection,so multiple scripts aren't installed by mistake.
coolfire92 said:
Nice work!
Should make rom customisation a lot easier.
Could you provide options for which gapps to install?
Example of code(i was searching for such a installer,used on ics.)
Aroma-config:
Code:
###################################################################################################################
# #
# INSTALLATION #
# #
###################################################################################################################
###################################################################################################################
#
# STEP 1 - SHOW VIEWBOX - SOFTWARE 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.updated>\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+
"<~welcome.text2>\n\n"+
"<~welcome.next>",
#-- Icon
"@welcome"
);
###################################################################################################################
#
# STEP 2 - LICENSE
#
agreebox(
#-- Title
"License Terms",
#-- Subtitle / Description
"Please note:",
#-- Icon
"@license",
#-- Text Content ( Read from <AROMA Resource Dir>/license.txt )
resread("license.txt"),
#-- Checkbox Text
"Accept",
#-- Unchecked Alert Message
"You must accept the license terms first!"
);
###################################################################################################################
#
# STEP 3 - CHANGELOG
#
textbox(
#-- Title
"Changelog",
#-- Subtitle
"",
#-- Icon
"@update",
#-- Arg 4
resread("changelog.txt")
);
###################################################################################################################
#
# STEP 4 - SHOW MENUBOX - INSTALLATION TYPE
#
menubox(
#-- Title
"Select Install-Type",
#-- Sub Title
"Choose your prefered installation type:",
#-- Icon
"@info",
#-- Will be saved in /tmp/aroma/type.prop
"type.prop",
#-------------------------+-----------------[ Menubox Items ]-------------------------+---------------#
# TITLE | SUBTITLE | Item Icons #
#-------------------------+-----------------------------------------------------------+---------------#
"Full Install", "Installs 27 APKs with a total size of 53.42 Mb (+ 15.2 Mb libs).", "@install", #-- selected = 1
"Custom Install", "Choose which Apps you want to be installed. ", "@personalize" #-- selected = 2
);
###################################################################################################################
#
# STEP 5 - SET CUSTOMIZED INSTALLATION FLAGS (PROP VALUES)
#
###
# 3.a - If installation type IS NOT "Custom", skip select view and write defaults.
# NOTE: customize.prop should exists, or updater-script will error
#
if (prop("type.prop","selected")!="2") then
writetmpfile(
#-- Prop file will write to /tmp/aroma/customize.prop
"customize.prop",
#-- Full-Install Values ( all selected )
"item.1.1=1\n"+ #-- Gallery
"item.1.2=1\n"+ #-- Gmail
"item.1.3=1\n"+ #-- Maps
"item.1.4=1\n"+ #-- Market
"item.1.5=1\n"+ #-- Music
"item.1.6=1\n"+ #-- YouTube
"item.2.1=1\n"+ #-- Genie Widget
"item.2.2=1\n"+ #-- Google Play Magazines
"item.2.3=1\n"+ #-- Talk
"item.2.4=1\n"+ #-- TTS
"item.2.5=1\n"+ #-- Voice
"item.2.6=1\n"+ #-- Quick Search
"item.2.7=1\n" #-- Voice Search
);
###
# 3.b - If installation type IS "Custom", show App selection view.
#
else
checkbox(
#-- Title
"Customize Your Installation",
#-- Sub Title
"Select the Apps you want to be 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 #
#------------------+-------------------------------------------------------------------------------------+---------------#
"Common Apps", "", 2, #-- Group 1. key = "item.1.x"
"Gallery", "Filesize: 1.54 mb", 1, #-- item.1.1 = Selected by default
"Gmail", "Filesize: 2.67 mb", 1, #-- item.1.2 = Selected by default
"Google Maps", "Filesize: 8.26 mb + Steetview (259 kb)", 1, #-- item.1.3 = Selected by default
"Google Play Store", "Filesize: 3.82 mb", 1, #-- item.1.4 = Selected by default
"Google Play Music", "Filesize: 4.82 mb", 1, #-- item.1.5 = Selected by default
"YouTube", "Filesize: 5.76 mb", 1, #-- item.1.6 = Selected by default
"More Apps", "", 2, #-- Group 2. key = "item.2.x"
"Genie Widget", "Filesize: 1.08 mb", 0, #-- item.2.1 = Un-Selected by default
"Google Play Magazines", "Filesize: 5.18 mb", 0, #-- item.2.2 = Un-Selected by default
"Google Talk", "Filesize: 1.58 mb + Libs (7.67 mb)", 0, #-- item.2.3 = Un-Selected by default
"Google TTS Engine", "Filesize: 4.12 mb + Libs (7.25 mb)", 1, #-- item.2.4 = Selected by default
"Google Voice", "Filesize: 4.53 mb", 0, #-- item.2.5 = Un-Selected by default
"Quick Search Box", "Filesize: 583 kb", 0, #-- item.2.6 = Un-Selected by default
"Voice-Search", "Filesize: 1.76 mb", 1 #-- item.2.7 = Selected by default
#--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
);
endif;
#-- Change confirm button value from "Next >" to "Install Now".
ini_set("text_next", "Install Now");
###################################################################################################################
#
# STEP 6 - SHOW VIEWBOX - CONFIRM INSTALLATION
#
viewbox(
#-- Title
"Confirm selection",
#-- Text
"The wizard is ready to begin installation.\n\n"+
"Press <b>Install Now</b> to begin the installation.\n\n"+
"If you want to review or change any of your installation settings, press <b>Back</b>.\n\n"+
"To abort installation, press Menu Key -> Quit Installation.",
#-- Icon
"@install"
);
#-- Change confirm button value back from "Install Now" to "Finish".
ini_set("text_next", "Finish");
###################################################################################################################
#
# STEP 7 - INSTALL
#
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>.",
#-- Installation Icon
"@install",
#-- Installation Finish Message
"The installation wizard has successfully installed <b>"+ini_get("rom_name")+
"</b>."
)
);
###################################################################################################################
#
# STEP 8 - SHOW CHECKVIEWBOX - EXIT TO RECOVERY, OR REBOOT SYSTEM
#
checkviewbox(
#-- Title
"Installation completed!",
#-- Text
"<#selectbg_g><b>Congratulation...</b></#>\n\n"+
"<b>"+ini_get("rom_name")+"</b> have been installed on your device.\n\n",
#-- Icon
"@welcome",
#-- Checkbox Text
"Reboot your device now.",
#-- Initial Checkbox value ( 0=unchecked, 1=checked ) - (Optional, default:0)
"1",
#-- Save checked value in variable "reboot_it" (Optional)
"reboot_it"
);
##
# Check if reboot checkbox was checked
#
if
getvar("reboot_it")=="1"
then
reboot("onfinish");
endif;
#---- FINISH
Updater Script:
Code:
##
#
# AROMA Installer - Installer Script
# (c) 2011 by Ahmad Amarullah
# amarullz - xda-developers
#
##
#####################################################################################################
#
# Installer Script for ICS Google-Apps
# (c) 2012 by Stephan Schmitz <[email protected]>
#
#
# Mount system partition
#
set_progress(0.05);
ui_print("Mounting /system...");
ui_print(" ");
set_progress(0.1);
run_program("/sbin/busybox", "mount", "/system");
#
# Extract files to /system/etc, /system/framework, /system/lib
#
ui_print("Copying libs and other requirements...");
show_progress(0.35, 23);
package_extract_dir("system", "/system");
ui_print(" ");
#
# Extract new APKs
#
ui_print("Installing Google Apps...");
ui_print(" ");
show_progress(0.4, 14);
##---- Customize Packages
#
# Most common APKs (select group one)
#
# Gallery
if
file_getprop("/tmp/aroma/customize.prop","item.1.1") == "1"
then
ui_print("@ Installing Gallery");
delete("/system/app/Gallery2.apk");
package_extract_dir("custom/gallery", "/system/app");
endif;
# Gmail
if
file_getprop("/tmp/aroma/customize.prop","item.1.2") == "1"
then
ui_print("@ Installing Gmail");
delete("/system/app/Gmail.apk", "/data/app/Gmail.apk");
package_extract_dir("custom/gmail", "/system/app");
endif;
# Google Maps
if
file_getprop("/tmp/aroma/customize.prop","item.1.3") == "1"
then
ui_print("@ Installing Google Maps");
delete("/system/app/Maps.apk", "/data/app/Maps.apk",
"/system/app/Street.apk", "/data/app/Street.apk");
package_extract_dir("custom/maps", "/system/app");
package_extract_dir("custom/_lib/tts", "/system/lib");
endif;
# Market / Play Store
if
file_getprop("/tmp/aroma/customize.prop","item.1.4") == "1"
then
ui_print("@ Installing Play Store");
delete("/system/app/Vending.apk");
package_extract_dir("custom/market", "/system/app");
endif;
# Play Music
if
file_getprop("/tmp/aroma/customize.prop","item.1.5") == "1"
then
ui_print("@ Installing Play Music");
delete("/system/app/Music2.apk", "/system/app/Music.apk");
package_extract_dir("custom/music", "/system/app");
endif;
# Youtube
if
file_getprop("/tmp/aroma/customize.prop","item.1.6") == "1"
then
ui_print("@ Installing YouTube");
delete("/system/app/YouTube.apk", "/data/app/com.google.android.youtube-1.apk");
package_extract_dir("custom/yt", "/system/app");
endif;
#
# Not that common APKs (select group two)
#
# Genie Widget
if
file_getprop("/tmp/aroma/customize.prop","item.2.1") == "1"
then
ui_print("@ Installing Genie Widget");
delete("/system/app/GenieWidget.apk");
package_extract_dir("custom/genie", "/system/app");
endif;
# Google Play Magazines
if
file_getprop("/tmp/aroma/customize.prop","item.2.2") == "1"
then
ui_print("@ Installing Play Magazines");
delete("/system/app/Magazines.apk");
package_extract_dir("custom/magazines", "/system/app");
endif;
# Google Talk
if
file_getprop("/tmp/aroma/customize.prop","item.2.3") == "1"
then
ui_print("@ Installing Google Talk");
delete("/system/app/Talk.apk");
package_extract_dir("custom/talk", "/system/app");
package_extract_dir("custom/_lib/talk", "/system/lib");
endif;
# Google TTS Engine
if
file_getprop("/tmp/aroma/customize.prop","item.2.4") == "1"
then
ui_print("@ Installing Google TTS Engine");
delete("/system/app/GoogleTTS.apk");
package_extract_dir("custom/tts", "/system/app");
package_extract_dir("custom/_lib/tts", "/system/lib");
endif;
# Google Voice
if
file_getprop("/tmp/aroma/customize.prop","item.2.5") == "1"
then
ui_print("@ Installing Google Voice");
delete("/system/app/Voice.apk");
package_extract_dir("custom/voice", "/system/app");
endif;
# Quick Search
if
file_getprop("/tmp/aroma/customize.prop","item.2.6") == "1"
then
ui_print("@ Installing Quick Search");
delete("/system/app/QuickSearchBox.apk", "/system/app/GoogleQuickSearchBox.apk");
package_extract_dir("custom/quicksearch", "/system/app");
endif;
# Voice Search
if
file_getprop("/tmp/aroma/customize.prop","item.2.7") == "1"
then
ui_print("@ Installing Voice Search");
delete("/system/appa/VoiceSearch.apk");
package_extract_dir("custom/voicesearch", "/system/app");
endif;
#--- END OF Customize
ui_print(" ");
#
# Fix permissions
#
ui_print("Setting permissions for new APKs...");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system/framework");
set_perm_recursive(0, 0, 0755, 0644, "/system/lib");
set_progress(0.85);
ui_print(" ");
#
# Unmount system partition
#
ui_print("Unmounting /system...");
run_program("/sbin/busybox", "umount", "/system");
set_progress(0.90);
ui_print(" ");
ui_print("Formatting /cache...");
format("yaffs2", "MTD", "cache");
set_progress(0.91);
ui_print(" ");
#
# Mount data partition
#
ui_print("Mounting data...");
run_program("/sbin/busybox", "mount", "/data");
set_progress(0.93);
ui_print(" ");
#
# Wipe DC
#
ui_print("Deleting Dalvik-Cache...");
delete_recursive("/data/dalvik-cache");
set_progress(0.96);
ui_print(" ");
#
# Unmount data partition
#
ui_print("Unmounting data...");
run_program("/sbin/busybox", "umount", "/data");
ui_print(" ");
set_progress(0.99);
#run_program("/sbin/busybox", "mount", "/cache");
#-- Finish
ui_print("----------------------");
ui_print("Installation complete!");
set_progress(1);
Also use radio buttons for app2sd script selection,so multiple scripts aren't installed by mistake.
Click to expand...
Click to collapse
aroma is so time consuming thing, i m learning about aroma, i have made this installer in two days only, two days before release i know zero about aroma configs... i will include more option later:good::good::good:
Hello!
Can someone pull for me "update-binary-installer" (meta-inf/com/google/android/) from this installer?
Link doesn't work for me.
Only META-INF Folder,View attachment aroma-for-g3-v1.0.zip
Mohanshbhr said:
Details About Releases:
Tweaks Included:
AdBlock
ZipAlign
Kyrillos App2Sd v2 and Aps2Sd v3
Cron Universal App2Sd (INT2EXTV2+)
Beats Audio
Click to expand...
Click to collapse
could someone explain the difference between the third and fourth scripts? ( "Kyrillos app2sd" and "universal App2SD")
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
Click to expand...
Click to collapse
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--
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
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!
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
I.1- CREATING DIFFERENT TYPES OF SUB WINDOWS
Now Lets create a sub window to be displayed when the first option of the Menu is selected in the Installer
Scroll n Find this code
Code:
##
# Select Type of Install
#
if prop("menu.prop","selected")=="1" then
Since this is the first option in menu window, that's why we have =="1" here
I.1.1 SELECT BOX SUB WINDOW
Now Scroll down and find this Code-
Code:
##
# Sub Window 1
#
selectbox(
#-- Title
"TITLE 1",
#-- Sub Title
"SUB TITLE 1",
#-- Icon:
"icons/install",
#-- Will be saved in /tmp/aroma/window1.prop
"window1.prop",
#----------------------------------[ Selectbox With Groups ]-----------------------------------#
# TITLE | SUBTITLE | Initial Value #
#------------------+-----------------------------------------------------------+---------------#
"Select One", "", 2, #-- Group 1. key = "selected.1"
"OPTION 1", "OPTION 1 DESCRIPTION", 0, #-- selected.1 = 1
"OPTION 2", "OPTION 2 DESCRIPTION", 1 #-- selected.1 = 2
#--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
);
The type of window used is of selectbox attribute, Which means that only one out of the above Option can be selected at a time
Edit the TITLE, SUBTITLE, OPTION 1 and OPTION 2 as well as their DESCRIPTION as per your requirement
Here OPTION 2 has initial value 1 which means that It is selected by default,
(1 stands for Selected n 0 stands for Unselected)
NOTE: The last string has no comma "," after its initial value, Its not a typo
Method to add new Option--
Add this--
Code:
"OPTION 3", "OPTION 3 DESCRIPTION", 0 #-- selected.1 = 3
Note that if this is your 3rd Option then then in 2nd option add "," after its initial value
So after adding new option this is how it looks on Text Editor
And this is how it looks in Installer
-> SUB WINDOW 1 HAS BEEN SUCCESSFULLY CREATED
So now lets create sub window 2
Now Scroll down and find this Code-
Code:
##
# Sub Window 2
#
selectbox(
#-- Title
"TITLE 2",
#-- Sub Title
"SUB TITLE 2",
#-- Icon:
"@default",
#-- Will be saved in /tmp/aroma/window2.prop
"window2.prop",
#----------------------------------[ Selectbox With Groups ]-----------------------------------#
# TITLE | SUBTITLE | Initial Value #
#------------------+-----------------------------------------------------------+---------------#
"Select One", "", 2, #-- Group 1. key = "selected.1"
"OPTION 1", "OPTION 1 SUBTITLE", 1, #-- selected.1 = 1
"OPTION 2", "OPTION 2 SUBTITLE", 0, #-- selected.1 = 2
"OPTION 3", "OPTION 3 SUBTITLE", 0, #-- selected.1 = 3
"OPTION 4", "OPTION 4 SUBTITLE", 0 #-- selected.1 = 4
#--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
);
The type of window used is of selectbox attribute, Which means that only one out of the above Option can be selected at a time
Edit the TITLE, SUBTITLE, OPTIONS as well as their DESCRIPTION as per your requirement
Here OPTION 1 has initial value 1 which means that It is selected by default,
(1 stands for Selected n 0 stands for Unselected)
NOTE: The last string has no comma "," after its initial value, Its not a typo
NOTE: The same method as described above is to be used to create more options
And this is how it looks in Installer
NOTE: If you just want a single sub window, delete the entire code for sub window 2
NOTE: If you want to add a new sub window, add the above code again but edit some values as listed below-
TITLE, SUBTITLE, OPTIONS as well as their DESCRIPTION as per your requirement
Also edit "window2.prop", to "window3.prop",
NOTE: The same method as described above is to be used to create more options
-> SUB WINDOW 2 HAS BEEN SUCCESSFULLY CREATED
NOW I ASSUME THAT YOU HAVE SUCCESSFULLY LEARNT TO CREATE THE SUB WINDOWS of selectbox attribute,
RE READ THE CODE AGAIN TO DEVELOP MORE UNDERSTANDING,
IF THIS IS YOUR FIRST TIME IT MIGHT TAKE SOME TIME TO FIGURE OUT THINGS, BUT ITS NEITHER TOO DIFFICULT
Click to expand...
Click to collapse
I.1.2- CREATING CHECKBOX SUB WINDOW
NOW WE SHALL LEARN TO CREATE A CHECKBOX BASED SUB WINDOW FROM WHICH WE CAN SELECT MORE THAN ONE OPTION
Scroll and find this code in aroma-config-
Code:
##
# Sub Window with CheckBoxes
#
checkbox(
# Title
"TITLE OF CHECKBOX",
# Sub Title
"SUB TITLE OF CHECKBOX HERE",
# Icon
"@update",
# Will be saved in /tmp/aroma/checkbox1.prop
"checkbox1.prop",
#----------------------------------[ Selectbox With Groups ]-----------------------------------#
# TITLE | SUBTITLE | Initial Value #
#------------------+-----------------------------------------------------------+---------------#
"AVAILABLE OPTIONS", "", 2, #-- group 1
"I AM A REAL DEV", "IF YOU ARE THE REAL DEVELOPER", 1, #-- item.1.1
"I AM A NOOBS", "IF YOU ARE THE REAL NOOBS", 0, #-- item.1.2
"I AM XDA-DEVELOPERS","IF YOU HAVE AN ACCOUNT IN XDA-DEVELOPERS.COM", 0, #-- item.1.3
"YOUR PROJECTS", "", 2, #-- Group 2
"CUSTOM ROM", "IF YOU MADE A CUSTOM ROM", 1, #-- item.2.1
"CUSTOM TROLL", "IF YOU POST MANY TROLLS IN FORUM", 0 #-- item.2.2
#--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
);
The type of window used is of checkbox attribute, Which means that only one out of the above Option can be selected at a time
Edit the TITLE, SUBTITLE, THE OPTIONS VALUE, AND THE OPTIONS' DESCRIPTION as per your requirement
Here item.1.1 and item.2.1 has initial value 1 which means that It is selected by default,
(1 stands for Selected n 0 stands for Unselected)
NOTE: The last string has no comma "," after its initial value, Its not a typo
NOTE: If you want to create a new item add this string
Code:
"CUSTOM TROLL 2", "IF YOU BLAH BLAH", 0 #-- item.2.3
Note that if this is your 3rd item in 2nd Group, so now add "," after item.2.2's initial value
So after adding new option this is how it looks on Text Editor
And this is how it looks in Installer
NOTE: If you dont want a sub window with checkboxes, delete the above code
NOTE: If you want to add a new sub window with checkboxes, add the above code again but edit some values as listed below-
TITLE, SUBTITLE, OPTIONS as well as their DESCRIPTION as per your requirement
Also edit "checkbox1.prop", to "checkbox2.prop",
NOTE: The same method as described above is to be used to create more options
-> SUB WINDOW WITH CHECKBOXES HAS BEEN SUCCESSFULLY CREATED
NOW I ASSUME THAT YOU HAVE SUCCESSFULLY LEARNT TO CREATE THE SUB WINDOWS of checkbox attribute,
RE READ THE CODE AGAIN TO DEVELOP MORE UNDERSTANDING,
IF THIS IS YOUR FIRST TIME IT MIGHT TAKE SOME TIME TO FIGURE OUT THINGS, BUT ITS NEITHER TOO DIFFICULT
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Now I am going to teach you some additional optional commands
1- ALERT BOX
Scroll and Find this Code-
Code:
##
# Alert Window
#
alert( "Attention", "PLACE YOUR TEXT HERE");
This code is for creating additional popup alert
Edit the text to be displayed as per your desire
If you don't want alert popup simply delete the Code above
This is how it looks in Installer
-> NOW YOU HAVE SUCCESSFULLY CREATED A POPUP ALERT BOX
2. PRE INSTALLATION UI
Now scroll and find this code-
Code:
# Installation UI
ini_set("text_next", "Install Now");
ini_set("icon_next", "@installbutton");
viewbox(
#-- Title
"Ready to Install",
#-- Text
"ROM is ready to be installed.\n\n"+
"Press <b>Install</b> to begin the installation.\n\n"+
"To review or change any of your installation settings, press <b>Back</b>.\n\n"+
"Press Menu -> Quit Installation to quit.",
#-- Icon
"@install"
);
This is to create a window just before installation process starts
If you don't want Pre installation window simply delete the Code above,
This is how it looks in Installer
Now you have successfully learnt to create the above Optional windows n popups
These are the two Optional windows which are frequently used in the Installer to make it more Interactive
Click to expand...
Click to collapse
Now scroll and find this code just below the Installation UI Window
Code:
endif;
REMEMER DONT DELETE THE "endif;" It is in the continuation from the above "if prop("menu.prop","selected")=="1" then" code
Now comes the last and Important window for Installer
Scroll and find this code in aroma-config-
Code:
##
# INSTALLATION PROCESS
#
if prop("menu.prop","selected")== "1"
then
ini_set("text_next", "Next");
ini_set("icon_next", "@next");
install(
"YOUR ROM/Mod NAME™ Installation",
getvar("rom_name") + "\n" +
"Please wait while this ROM blows up your device :P" +
"",
"icons/install"
);
ini_set("text_next", "Finish");
ini_set("icon_next", "@finish");
checkviewbox(
#-- Title
"Installation Completed",
#-- Text
"<#selectbg_g><b>Congrats...</b></#>\n\n"+
"<b>"+ini_get("rom_name")+"</b> has been installed into your device.\n\n",
#-- Icon
"@welcome",
#-- Checkbox Text
"Reboot your device now.",
#-- Initial Checkbox value ( 0=unchecked, 1=checked ) - (Optional, default:0)
"1",
#-- Save checked value in variable "reboot_it" (Optional)
"reboot_it"
);
endif;
###
# Check if reboot checkbox was checked
if
getvar("reboot_it")=="1"
then
#
# reboot("onfinish"); - Reboot if anything finished
# reboot("now"); - Reboot Directly
# reboot("disable"); - If you set reboot("onfinish") before, use this command to revert it.
#
reboot("onfinish");
endif;
This is the code for creating an Installation Progress and logs User Interface and the Reboot Now Option
Edit this string in above code to your ROM/Mod name
"YOUR ROM/Mod NAME™ Installation",
Rest of all the code is fine
This is how it looks like in Installer
Click to expand...
Click to collapse
Now save the file aroma-config with Ctrl+S or save button
Click to expand...
Click to collapse
NOW YOU HAVE SUCCESSFULLY CREATED THE AROMA-CONFIG FILE FOR INSTALLER
THIS WAS ALL ABOUT CREATING THE AROMA INSTALLER USER INTERFACE...
I HAVE COVERED ALL THE FREQUENTLY USED COMMANDS IN THE TUTORIAL
THANKS TO @amarullz FOR WONDERFUL AROMA INSTALLER
IF ANY DOUBTS/ERRORS POST THEM HERE
IN THE NEXT POST WE ARE GOING TO LEARN ABOUT UPDATER-SCRIPT CORRESPONDING TO THE AROMA-CONFIG
Tutorial for updater-script corresponding to the aroma-config
In this tutorial we are going to learn about creating updater script corresponding to the Aroma config we have created
This part is very easy indeed if you have read all my aroma-config guide
So the very first thing you have to do manually is to take a update-binary from any custom rom/mod from your device forum...
You can find update-binary in this directory- meta-inf\com\google\android\
replace it with custom update-binary so that your installer will not give errors while installing the mod/rom
Click to expand...
Click to collapse
1.) understanding the basics
so now lets start, open the updater-script file located in the directory- meta-inf\com\google\android\ in notepad++
scroll and find this code-
Code:
if
file_getprop("/tmp/aroma-data/menu.prop","selected") == "1"
then
so now you know why "menu.prop" was declared there in aroma-config
the == "1" signifies here that the we are now going to define the sub windows inside the first option of menu.prop
now edit this code to your mod/rom name
Code:
ui_print("-> installing rom/mod name");
scroll and find this code-
Code:
ui_print("-> mounting system...");
run_program("/sbin/busybox", "mount", "/system");
this is for mounting the system partition so that you can add/delete files from system partition
Click to expand...
Click to collapse
2.) Defining the sub windows
Now we will define the coding for working of sub menus we created in aroma-config
2.1.) For sub window 1
Scroll and find this code-
Code:
if
file_getprop("/tmp/aroma/window1.prop","selected.1") == "1"
then
ui_print("-> installing option 1...");
package_extract_dir("aroma/window1/option1", "/system");
endif;
edit the ui_print("-> installing option 1..."); string as per your rom/mod option you defined in aroma-config
now place your option 1 customisation app to the folder aroma\window1\option1\app
if it is a framework folder file, place it to aroma\window1\option1\framework folder
now use have successfully defined option1 for the window 1
repeat the same for option 2, and for 3,4.... If you have created them also
now you might have learnt how to define the corresponding options for mods/rom sub window 1 you created in aroma-config
2.2.) For sub window 2
now scroll and find this code-
Code:
if
file_getprop("/tmp/aroma/window2.prop","selected.1") == "1"
then
ui_print("-> installing option 1...");
package_extract_dir("aroma/window2/option1", "/system");
endif;
edit the ui_print("-> installing option 1..."); string as per your rom/mod option you defined in aroma-config
now place your option 1 customisation app to the folder aroma\window1\option2\app
if it is a framework folder file, place it to aroma\window1\option2\framework folder
now use have successfully defined option1 for the window 2
repeat the same for option 2, and for 3,4.... If you have created them also
now you might have learnt how to define the corresponding options for mods/rom sub window 2 you created in aroma-config
2.3.) for check box sub window
scroll and find this code-
Code:
if
file_getprop("/tmp/aroma/checkbox1.prop","item.1.1") == "1"
then
ui_print("-> installing item 1.1 ");
package_extract_dir("aroma/checkbox1/item-1.1", "/system");
endif;
edit the ui_print("-> installing item 1.1 "); string as per your rom/mod option you defined in aroma-config
now place your item 1.1 customisation app to the folder aroma\checkbox1\item-1.1\app
if it is a framework folder file, place it to aroma\checkbox1\item-1.1\framework folder
now use have successfully defined option1 for the check box window
repeat the same for item 1.2, 1.3 and for 2.1, 2.2 too (and also for additional items if you have created them)
now you might have learnt how to define the corresponding items for mods/rom checkbox window you created in aroma-config
Click to expand...
Click to collapse
3.) Important for rom developers!
Now if you have made this aroma installer for a rom, you have to make aymlinks and fix permissions for your rom binaries
for that open the updater script from any rom from your forum and find the word "symlink" and then copy all the lines to your updater script
if you are not able to find the code, try adding this code to your updater script-
Code:
ui_print("-> making symlinks...");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/r");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/reboot1");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/uptime");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/ctrlaltdel");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/ln");
ui_print("-> fixing permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(0 ,0 , 0755, 0755, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/be_movie");
set_perm(0, 0, 0755, "/system/etc/be_photo");
set_perm(0, 0, 0755, "/system/etc/be_album");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 2000, 0755, "/system/bin/sysinit");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 04755, "/system/xbin/busybox");
set_perm(0, 0, 06755, "/system/xbin/su");
Click to expand...
Click to collapse
3.) Fixing permissions for both rom and mod users
now scroll and find this code-
Code:
ui_print("-> fixing permits :p");
package_extract_file("fix_permissions", "/tmp/fix_permissions");
set_perm(0, 0, 0777, "/tmp/fix_permissions");
run_program("/tmp/fix_permissions");
ui_print("-> finished installation...!");
ui_print("-> enjoy...");
ui_print("-> ...");
ui_print("-> done....");
endif;
run_program("/sbin/busybox", "umount", "/system");
show_progress(1, 0);
run_program("/tmp/fix_permissions"); is for fixing the permissions
the endif; present here is in the continuation from file_getprop("/tmp/aroma-data/menu.prop","selected") == "1"
the command run_program("/sbin/busybox", "umount", "/system"); is for unmounting system partition as the installation is complete now
Click to expand...
Click to collapse
now save the file updater-script with ctrl+s or save button
Click to expand...
Click to collapse
NOW YOU HAVE SUCCESSFULLY CREATED THE UPDATER-SCRIPT FILE FOR INSTALLER
THIS WAS ALL ABOUT CREATING THE CORRESPONDING AROMA INSTALLER UPDATER-SCRIPT...
I HAVE COVERED ALL THE FREQUENTLY USED COMMANDS IN THE TUTORIAL
IF ANY DOUBTS/ERRORS POST THEM HERE
Liked My Guide?
Press Thanks, Rate my Thread 5 ***** And Thanks for making this thread to portal
Click to expand...
Click to collapse
F.A.Q SOON!
nice guide bro...
thanks !! i'll try it to makes a custom ROM
@Ayush Singh Awesome work as usual bro.. keep up the good spirit :good: :highfive:
Dude you are awesome...Ive been looking for a guide like this I can use Aroma in my rom. Thank you very much!!
I really appreciate what you have done for noobs (new developers) like me
thanks a ton, buddy for this Guide... :laugh:
Closed per OP request
he has moved the discussion to the thread below
http://forum.xda-developers.com/showthread.php?t=2422457
Hello XDA member, i have little guide to add Aroma In your rom, this guide very easy to use, just need little change, and i gave the clues what you can change and can't change
Ok, to the point of the guide
Download the latest AROMA installer from this thread or my edited Aroma installer here
Then follow these little instructions
loadlang("langs/en.lang");
change "langs/en.lang" to change language, see in the aroma folder
theme("sense");
change "sense" to change aroma theme, see in the aroma folder
Added changelog/features
write your rom features or changelog in this files the file is in META-INF\com\android\google\android\aroma\changelog.txt
Little tutorial
Note :
> "xxx" means the words inside this ""
> you can change all xxx words
Option 1 : Option for select devices
> In aroma-config
);
selectbox(
#-- Title
"xxx", > you can change the "xxx" words
#-- Sub Title
"xxx", > you can change the "xxx" words
#-- Icon: <AROMA Resource Dir>/icons/default.png or <ThemeDir>/icon.default.png
"@default",
#-- Will be saved in /tmp/aroma/mods.prop
"system.prop",
"xxx","", 2, > you can change the "xxx" words
"xxx","xxx",1, > you can change the "xxx" words
"xxx","xxx",0, > you can change the "xxx" words
"xxx","xxx",0 > you can change the "xxx" words
#--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#
);
> In updater-script
# xxx
# xxx
if
file_getprop("/tmp/aroma/system.prop","selected.1") == "1"
then
ui_print("xxx");
package_extract_dir("model/p760", "/system");
endif;
> you can change the "xxx" after "package_extract_dir" words depend on your own,
i use p760, which is the file is located in model/p760 folder,
make sure you put the right position of the file,
example :
i want to put "ducati-m3.bin" file in system/vendor/firmware
then that file should be in model/p760/vendor/firmware (look at the folder)
do the same thing for the rest of it
Option 2 : Option for add or remove apps
You can edit what you to install or remove from your rom, i used "Live Wallpapers" and some apps, you can edit yourself
> In aroma-config
checkbox(
"Install apps", > you can change the "xxx" words
"Uncheck items to remove", > you can change the "xxxx" words
"@default", > you can't change the "xxx" words
"remove.prop", > you can't change the "xxxx" words
"Live Wallpapers","",2, > you can change the "xxx" words
"Basic Dreams","",1, > you can change the "xxx" words
"Cosmic Flow","",1, > you can change the "xxx" words
"Photo Table","",1, > you can change the "xxx" words
"Applications","",2, > you can change the "xxx" words
"Carhome.apk","Carhome",1, > you can change the "xxx" words
"Protips.apk","Pro tips",1, > you can change the "xxx" words
"QuickBoot.apk","Quick Boot",1, > you can change the "xxx" words
);
> In updater-script
For install apps
# xxx > you can change the xxx words
# xxx > you can change the xxx words
if
file_getprop("/tmp/aroma/xxx.prop","selected.1") == "1" > you can change the xxx.prop words
then
ui_print("xxxx"); > you can change the "xxx" words
package_extract_file("camera/GoogleCamera.apk", "/system/app/GoogleCamera.apk");
endif;
> you can change the "xxx" after "package_extract_file" words depend on your own,
i use camera, which is the file is located in camera folder, then name of camera app
then i want to install in system/app folder, do the same thing for the rest of it
For remove apps
# xxx > you can change the xxx words
# xxx > you can change the xxx words
if
file_getprop("/tmp/aroma/remove.prop","item.1.1") == "0"
then
delete("/system/app/CarHome");
endif;
> change this "/system/app/CarHome" depend on what you want to remove, i used CarHome app
do the same thing for the rest of it
Last step : Change Updater script for installing rom
=> Step one : Device initial
Fine these lines
assert(getprop("ro.product.device") == "p760" || getprop("ro.build.product") == "p760" || abort("This package is for \"p760\" devices; this is a \"" + getprop("ro.product.device") + "\"."); );
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "/system");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
set_perm(0, 0, 0644, "/tmp/backuptool.functions");
run_program("/tmp/backuptool.sh", "backup");
unmount("/system");
show_progress(0.200000, 0); >until this
Replace those lines with your updater.scirpt until show_progress line
=> Step Two : Format system
Fine these lines
format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.1/by-name/system", "/system");
Replace those lines with your updater.scirpt
=> Step Three : Extracting files and setup symlink
"xxx" means skiping
Fine these lines
ui_print("@ Extracting System Files..");
package_extract_dir("system", "/system");
symlink("../bin/fsck.f2fs", "/system/bin/dump.f2fs");
symlink("../xbin/su", "/system/bin/su");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
"/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
"/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
xxxxx
xxxxx
show_progress(0.600000, 0);
Replace those lines with your updater.scirpt until show_progress line
=> Step Four : Setting permission
"xxx" means skiping
Fine these lines
ui_print("@ Setting Permissions");
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u: object_r:system_file:s0");
set_metadata_recursive("/system/addon.d", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u: object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u: object_r:system_file:s0");
set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u: object_r:zygote_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u: object_r:clatd_exec:s0");
xxxx
xxxx
ui_print("@ Done");
ui_print("@ By nasheich");
ui_print("@ If you like this new build");
ui_print("@ Go back to my thread and press THANKS button");
show_progress(1.000000, 0);
unmount("/system");
Replace those lines with your updater.scirpt until unmount("/system"); line
Click to expand...
Click to collapse
Credit :
- amarullz for Aroma Installer
- nasheich for this little guide
Tips and Trick
- For rom under Android 4.4.2 (Kitkar), skip the step 3 and step four,
- After installation, take a log, it's easier if your get installation failed, like status 6, status 7, etc
note : status 0 it's mean working or installation successful
Questions and Answers
Q : Can i use this on my rom ?
A : Yes, this cam be used for any roms
Q : I got error on installation, status 6/7
A : Check your updater.script, there must be something wrong
Q : I've checked it all, look like nothing wrong in updater.script, any idea ?
A : Try another recovery, in some device, aroma didn't work
@Nasheich Xfiles the link to your installer is broken.