yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] moddroid:
Whit this code the installer work and don't tell me status=6 but the kernel don't change in the folder of kernel i have only Zimage and don't have the boot.img

if
file_getprop("/tmp/aroma-data/kernel.prop","selected.1") == "3"
then
ui_print(" install harsh kernel");
run_program("/sbin/busybox", "mkdir", "/temp");
package_extract_dir("customize/kernel/harsh/system", "/");
package_extract_dir("customize/kernel/harsh/kernel", "/temp");
set_perm(0, 0, 0777, "/temp/dump_image");
set_perm(0, 0, 0777, "/temp/mkbootimg.sh");
set_perm(0, 0, 0777, "/temp/mkbootimg");
set_perm(0, 0, 0777, "/temp/unpackbootimg");
run_program("/sbin/busybox", "cp", "/boot.img", "/temp");
run_program("/temp/dump_image", "boot", "/temp/boot.img");
run_program("/temp/unpackbootimg", "/temp/boot.img", "/temp/");
run_program("/temp/mkbootimg.sh");
package_extract_file("/temp/newboot.img", "/dev/block/mmcblk0p5");
endif;
[Android Software/Hacking General [Developers Only]] jaapteeuw12:
This is really amazing:D
[Android Software/Hacking General [Developers Only]] digetx:
Good idea, but source code quality makes me cry :(
[Android Software/Hacking General [Developers Only]] Dunc001:
I've read through the OP and scripts from several ROMs but I must be missing the answer to one very basic question. In aroma.config for the page titles:

"SD-EXT Mods","",2,

What does the "" and 2 do in this line? Also why in some scripts do I see in updater-script for checkbox items on the first page of several being designated item.0.x and in some scripts the first page items are designated item.1.x - why do page numbers start 0 in some cases and 1 in others?

Like I said, basic questions but I can't seem to find the logic anywhere.
[Android Software/Hacking General [Developers Only]] carl1961:
that 2 means the SD-EXT Mods will be in the black menu that you see

like a heading for the next items to choose

check boxes with one heading seem to have item.0.x and check boxes with more than one heading have item.1.1 for first heading ,item.2.1 for second heading,item.3.1 for third heading etc...
[Android Software/Hacking General [Developers Only]] Dunc001:
Thanks Carl :) So where do I find a list of the options for that variable then? And also, any idea what the empty quotes are for ("" before the 2)?
[Android Software/Hacking General [Developers Only]] carl1961:
I have no idea why, other than just code for the aroma's update-binary to use to signal what is what, I never looked at the source code for arroma installer, maybe there is doc's there like the kernels sources have
[Android Software/Hacking General [Developers Only]] Dunc001:
K, just found most outstanding answers in the source code examples on GitHub - only place I hadn't looked previously. Slightly confused by this though:

# show_progress(0.2, 400);
# show_progress( progress size, number of files to be extracted );
# if we had 50 files, and want to "add" 0.2 into progress after all finished
# use (0.2, 400)

So how does the 50 files relate to the 400 variable there then? I have checked in the Runnymede AIO scripts and can see these examples:

set_progress(0.2);
show_progress(0.2,953);

set_progress(0.4);
show_progress(0.05,60);

so am I right in reading it that the show_progress will gradually increase the progress bar by 20% (0.2) as the 953 files extract (and 5% as the subsequent 60 extract)?
[Android Software/Hacking General [Developers Only]] carl1961:
I think 0.05 is a lot less than 5% , I made F's in math LOL (0.05,60)
[Android Software/Hacking General [Developers Only]] Dunc001:
LOL, nope 1.0 = 100% therefor 0.05 = 5% ;)
[Android Software/Hacking General [Developers Only]] carl1961:
thanks for correcting me:D
[Android Software/Hacking General [Developers Only]] mrRobinson:
I have a very simple aroma installer for gapps and inverted google apps, and a couple launchers. my device is the sgs2 i777 and currently running AOKP (cm9 kernel).

No matter what I try even if i just use aroma to try to install nova launcher to system the files written end up 0 byte. I've tried different mounting methods in the updater-script:

mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");

or

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

Neither have changed anything. I've tried different update-binary-installers and built the same update-script as a flashable zip (no aroma) and it works fine there.

No errors in installer, exit status 0 and everything says completed successfully, yet everything copied is 0 byte file after i boot system and look at it.

I've also tried with 1.63 aroma, 1.64, and 2.00, with no change. :confused:

Does anyone have ANY suggestions on how i could troubleshoot this? I've posted before one of my update-scripts but if you want me to upload my entire flashable zip i can.

Edit:

Basically comes down to this:

if
file_getprop("/tmp/aroma/apps.prop","item.1.2") == "1"
then
ui_print("@ Installing Nova Launcher...");
package_extract_file("launchers/NovaLauncher.apk", "/system/app/NovaLauncher.apk");
endif;

if i have no NovaLauncher installed and chose to install it in aroma after i reboot my system and with fileexplorer i see the NovaLauncher.apk but it is a 0 byte file.

If i remove the if, then logic and make this a normal flashable zip than all is fine...

is aroma involved in the package_extract_file???
[Android Software/Hacking General [Developers Only]] carl1961:
mrRobinson what does the "Save Logs" file show? I see your using the package_extract_file command,

package_extract_file("launchers/ApexLauncher.apk", "/system/app/ApexLauncher.apk");

also can you get your prop files from /tmp/aroma folder before they get deleted ( before you press finish) I use droid explorer, but there may be other ways to get to NAND, get them and edit them and verifi the file locations seen by aroma installer

example:

selectbox(

"<~selectkernel>",

"<~selectkernelinfo>",

"icons/apps",

"kernel.prop",

"<~magldrorclkkernelinstall>","",2,

"<~fmki>",

"<~fmkiinfo>",0,

"<~fcki>",

"<~fckiinfo>",1 <---- selected.1=2

);

kernel.prop is selected.1=2 "<~fckiinfo>",1 ( For CLK kernel)
[Android Software/Hacking General [Developers Only]] mrRobinson:
unfortunately save log files never works. I click it but when i check my /sdcard location nothing is there.

I did write a shell script that read the lines of the prop files in /tmp/aroma/ and echo them out and had that as an option in the aroma menu to run that. It does show my prop files gettting all the correct values. And they would have to as whatever i pick to install does attempt to be installed. it just ends up a 0byte file in /system/app. So i know the prop files are getting correctly set and correctly acting on my if statements in the updater script. Its jst the actual package_extract_file is not writing data.

edit: and file locations must be correct as the .apk is in the right place at the end it is just a 0 byte file, never fully written.
[Android Software/Hacking General [Developers Only]] carl1961:
have you been able to run the aroma installer demo? and able to save log with it.

for the log to not work is not good, or is telling you something, without that log file I would have never figured all the error's out, I think your first step is trying to get the log files to save to sd-card, make a test aroma installer without all the files, so you can rerun it until you get the log files t work
[Android Software/Hacking General [Developers Only]] grayn0de:
Having a similar issue as mrRobinson. When attempting to create a simple update.zip using AROMA (any version), it does nothing. However, without the options in aroma-config and if statements in the updater-script, the update.zip works properly.

I have in aroma-config:

menubox(
#-- Title
"AlterROM 0.0.4-RC1 Hotfix 1",

#-- Sub Title
"Choose the Quick Settings version you wish to use...",

#-- Icon
"@install",

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

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

"Standard QS", "Patch transparency level to 70%",	"@install", #-- selected = 1
"Extended QS",	"Patch transparency level to 70%",	"@install", #-- selected = 2
"Standard QS w/ Battery Bar","Patch transparency level to 70%",	"@install", #-- selected = 3
"Extended QS w/ Battery Bar","Patch transparency level to 70%",	"@install" #-- selected = 4
);

in updater-script:

mount("MTD", "system", "/system");

ui_print("	");
ui_print("@Patching Quick Settings Transparency Level");
ui_print("	-Changing transparency level...");
if
file_getprop("/tmp/aroma/opt.prop","selected.1") == "1"
then
package_extract_dir("standard/system", "/system");
endif;

if
file_getprop("/tmp/aroma/opt.prop","selected.1") == "2"
then
package_extract_dir("extended/system", "/system");
endif;

if
file_getprop("/tmp/aroma/opt.prop","selected.1") == "3"
then
package_extract_dir("standard-bb/system", "/system");
endif;

if
file_getprop("/tmp/aroma/opt.prop","selected.1") == "4"
then
package_extract_dir("extended-bb/system", "/system");
endif;
ui_print("	-Fixing permissions...");
set_perm(0, 0, 0644, "/system/app/SystemUI.apk");
ui_print("	-Wiping cache and dalvik-cache...");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/dalvik-cache");
format("MTD", "cache");
format("MTD", "cache");
format("MTD", "cache");
ui_print("	");
ui_print("@Finished!");

Output in saved log is:

Patching Quick Settings Transparency Level
-Changing transparency level...
-Fixing permissions...
-Wiping cache and dalvik-cache...

Finished!
script result was [@Finished!]

Installer Sucessfull (Status 0)

My ROM installs using AROMA just fine doing the full gambit of unmount, format, mount, etc.. However, for some reason, I cannot get any update zips i try to create to actually make changes. I've also tried various mount methods. Following through the updater-script, all of the logic looks sound, but... :confused:

EDIT: Also tried:

run_program("/sbin/busybox", "mount", "/system");
[Android Software/Hacking General [Developers Only]] mrRobinson:
I flashed another kernel and noticed that the log file message said it was trying to save to /emmc this time. on the stock kernel (AOSP/CM9) it always tried /sdcard.

Is there a little demo i can write where i try to mount sdcard and do an ls? then if it fails try /emmc and do an ls. if fail try /mnt/sdcard/ etc.

once found can i get log file there?
[Android Software/Hacking General [Developers Only]] Turge:
If you use ADB Shell, you'll see that "cat /tmp/aroma/opt.prop" shows "selected=1" or "selected=2" and not "selected.1=1"
[Android Software/Hacking General [Developers Only]] grayn0de:
LOL. I copied that out of my existing script for the ROM and changed everything but that... :rolleyes: Thank you for the fresh set of eyes! Works perfectly, now.
[Android Software/Hacking General [Developers Only]] amarullz:
How do you expected from big project by only one person?

Why dont you just say, source was too messy, I can help you to fix it..

That was the worst insult for me :( .

I am not the type that like copying others works, almost everythings in this program was wrote by me from the scratch (except offcourse the libs).

In first page I already stated that I need more time to release the source, but anyone push me to release it.

I dont have a time to comments, indent, etc. It was just my part time.

Leaks free, no freeze, runs well, compatible with all device was more important for me rather that formatting the source code...

And NOTE: THIS IS MY FIRST OPEN SOURCE PROJECT EVER.

This is why I always thinks 1000 times before I open sourced it... Please be mature and support any developers who opened it source rather that insulting around.

With source code, you are safe, even I dont continue this project again..
[Android Software/Hacking General [Developers Only]] Turge:
Agreed.

Fully working Aroma installer > properly formatted source code
[Android Software/Hacking General [Developers Only]] Zen Arcade:
+1 .. I'll take working code over pretty code every day
[Android Software/Hacking General [Developers Only]] RockoDev:
a lil help fellas im trying to make this updater-script work and its messing something up the files install but my wifi doesnt connect any help i would appreciate it

[/code]##

#

# AROMA Installer - Installer Script

# (c) 2011 by Ahmad Amarullah

# amarullz - xda-developers

#

# Version 1.60 - TEST updater-script

# FOR LEARNING PORPOSE ONLY

#

# Pre Stuff

mount("ext3", "EMMC", "/dev/block/mmcblk0p12", "/system");

ui_print("");

ui_print("@Unmount Partitions");

package_extract_dir("system", "/system");

set_progress(0.96);

ui_print(" Unmount /system");

unmount("/system");

unmount("/system");[/code]
[Android Software/Hacking General [Developers Only]] moddroid:
now the installer work i have compiled the ramdisk and the Zimage file whit the kitchen and add this code :)

#HARSH KERNEL 3.0.8
if
file_getprop("/tmp/aroma-data/kernel.prop","selected.1") == "3"
then
ui_print(" install harsh kernel");
package_extract_dir("customize/kernel/harsh/files", "/");
package_extract_file("customize/kernel/harsh/boot.img", "/dev/block/mmcblk0p5");
endif;

in the update script and

this:

"Harsh kernel 3.0.8", "new kernel from harsh", 0 #-- selected.1 = 3

in aroma config :D:D
[Android Software/Hacking General [Developers Only]] Dunc001:
Can I use this code:

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

in my aroma.config to move to the next item only if items 1 or 2 are selected in a four item menubox? This is the full section of code:

menubox(
"<#2AF>Install Type</#>",
getvar("installmsg"),
"icons/install",
"type.prop",
"<#2AF>Typical</#>", "Install default recommended packages into your phone.", "icons/install",
"<#2AF>Customize</#>", "Install only selected packages into your phone.", "icons/apps"
"<#2AF>Update</#>", "Update from previous version of TBD & keep user settings.", "icons/install"
"<#2AF>Maintenance</#>","Use this option to add or remove apps and system files without reflashing the ROM.", "icons/apps"

);

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

selectbox(
"<#2AF>Perform A Full Wipe Before Flashing?</#>",
"Please make your selection",
"icons/install",
"wipe.prop",

"Wipe options","",2,
"Perform a full wipe",
"<#2AF>"Will Wipe all NAND Partitions"</#>",0,
"Install ROM without wiping",
"<#2AF>"Will Not Wipe NAND Partitions"</#>",1

);
else
writetmpfile(
"wipe.prop",
"selected=2\n"
);
endif;
[Android Software/Hacking General [Developers Only]] Xperiment2012:
I cant get touch working on my AT&T Samsung Galaxy S2. Any ideas on what I can do?
[Android Software/Hacking General [Developers Only]] Dunc001:
Another question - can I use exit in the updater-script to abort an installation and does this then return to the Aroma UI or will it just freeze? Alternatively can anyone else tell me how to make the phone reboot from within the updater script (ie if certain criteria are not met which our temp scripts detect the installation would abort and the device reboot without going any further)?
[Android Software/Hacking General [Developers Only]] tantrums:
Yes, you can exit anytime before the installation by pressing Menu key, then "Quit Installation". After you press "Install Now" and the installation starts, no way to cancel.
[Android Software/Hacking General [Developers Only]] Dunc001:
Yeah I know you can do that whilst you're running through the Aroma screens. What I was asking was in my updater-script we also use a temp checksys.sh to check correct device setup (partition sizes, presence of sd-ext, bootloader type and so on) and it setup doesn't meet requirements the install aborts, wipes what little has been flashed at that point and ends. But now in Aroma I have added several extra scenarios (Typical Install, Customize Full Install, Update Only and Maintenance) so I need to restructure the logic in the updater-script. I have had to move the abort install section to earlier on in script but I need it to exit at the end of that if...then section rather than carry on through the rest of the script. So I need to add in before endif an exit function. How do I do that?
[Android Software/Hacking General [Developers Only]] amarullz:
exit in updater-script mean Installation finished, and the Save Logs & Next button will shown in bottom. It won't exit the Aroma Installer, just exit the Installation proccess...

Version 2.00 has been released
[Android Software/Hacking General [Developers Only]] Dunc001:
Fantastic, just what I needed :D Thanks for the answer and for this amazing addition. So now I have another question regarding comparison and logical operator use in the updater-script. In aroma.config I have:

menubox(
"<#2AF>Install Type</#>",
getvar("installmsg"),
"icons/install",
"type.prop",
"<#2AF>Typical</#>", "Install default recommended packages into your phone.", "icons/install",
"<#2AF>Customize</#>", "Install only selected packages into your phone.", "icons/apps"
"<#2AF>Update</#>", "Update from previous version of TBD & keep user settings.", "icons/install"
"<#2AF>Maintenance</#>","Use this option to add or remove apps and system files without reflashing the ROM.", "icons/apps"

);

Also in our ROM setup during flash we use a checksys.sh to check device setup and if it doesn't meet requirements it generates in tmp/abort.prop abort=true. But this only applies to the Typical and Customize install options above, not to the Update of Maintenance (the latter just flashes the user apps and removes system apks as selected so the ROM zip can be reflashed at any time but just lets user add/remove stuff from existing install). So I need to add into the updater script before the add-ons install/remove section the following:

if
((file_getprop("/tmp/aroma-data/type.prop","selected.0") == "1" || "2") && file_getprop("/tmp/abort.prop","abort") == "false") || (file_getprop("/tmp/aroma-data/type.prop","selected.0") == "3" || "4")
then

So basically the addon/remove install will proceed if install type is Typical or Customize AND abort == false, OR if install type is Update or Maintenance. Is that syntax correct to do this? I was unsure of the bracketing...
[Android Software/Hacking General [Developers Only]] amarullz:
Sadly you can't do it.

And if it was on updater-script, I can't do/add anything.
[Android Software/Hacking General [Developers Only]] Dunc001:
Damn. OK, I have a way round that. But can I do this in the updater-script:

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

???
[Android Software/Hacking General [Developers Only]] amarullz:
No you can't.. In other programming language, this sintax also incorrect..

you should do something like this:

if
file_getprop("/tmp/aroma-data/type.prop","selected.0") == "1" ||
file_getprop("/tmp/aroma-data/type.prop","selected.0") == "2"
then
[Android Software/Hacking General [Developers Only]] jokersax11:
I have a request. I have a massive rom, kitchen sink(5 different aosp builds plus dozens of options and modifications to choose from). You can tell its quite big. Any way to load a second zip instead of the reboot option. This would make updating a lot easier if I split my zip into base/options.
[Android Software/Hacking General [Developers Only]] :
DELETE
[Android Software/Hacking General [Developers Only]] pimpmaneaton:
Hey I am implementing this awesome installer into my aokp rom, but am having an issue where on the newer CM9 and AOKP roms they go through and retouch all the binaries, but get an error when aroma attempts to do this.

line 169 col 16867: unknown function "retouch_binaries"

1 parse errors

Installer Error (Status 6)

Attached orginal updater-script and update-binary, wonder if something needs to be added to Aroma Update binary if possible.
[Android Software/Hacking General [Developers Only]] el_liberator:
Hi

Great great works ;)

i have a question,

it's possible to return to the main menu after installing a ROM ? , now after installing the ROM, it returns in recovery
[Android Software/Hacking General [Developers Only]] grayn0de:
Use the back() function. Example: back(4);
[Android Software/Hacking General [Developers Only]] el_liberator:
Thanks ;)

but i have another problem , :mad:

i have a "status 0 error"

and no installation, nothing happens

EDIT : it's OK , i change update-binary in update-binary-installer , and it's works ;)
[Android Software/Hacking General [Developers Only]] Stoux2:
First off: Great mod :D! one of the most awesome things I have seen in a while.

Im quite the beginner @ Coding but i ran into a little problem.

I have the 10 languages like this:

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

"Italian", "Benvenuti nell' Installer", 1, #-- selected.0 = 1
"English", "Welcome to Installer", 0, #-- selected.0 = 2
"Indonesian", "Selamat datang di Installer", 0, #-- selected.0 = 3
"Espanol", "Bienvenido al Instalador", 0, #-- selected.0 = 4
"Simplified Chinesse","欢迎到安装", 0, #-- selected.0 = 5
"Netherlands", "Welkom bij de Installer", 0, #-- selected.0 = 6
"French", "Bienvenue dans l'installateur", 0, #-- selected.0 = 7
"Russian", "Добро пожаловать в установщик", 0, #-- selected.0 = 8
"Hebrew", "ברוכים הבאים להתקנה",	0,	#-- selected.0 = 9
"Germany", "Willkommen bei Installer",	0	#-- selected.0 = 10
#--------[ Initial Value = 0: Unselected, 1: Selected, 2: Group Item, 3: Not Visible ]---------#

But when i want to add another language (Copy'd Germany beneath it, changed 10 > 11, changed germany's name + additional text. and added this:

if prop("lang.prop","selected.0")=="1" then
loadlang("langs/nu.lang");
fontresload( "0", "ttf/DroidSans.ttf", "12" );
fontresload( "1", "ttf/DroidSans.ttf", "18" );
endif;

And added the nu.lang file in the /lang map.

It gives an error that it isnt expecting the , after the language name.

Any Idea's? is there a max limit for languages or something?

Edit: Just found that only 10 languages work. Deleted one and got the same error as when i added one. So change of question: how do i add or remove languages :D?
[Android Software/Hacking General [Developers Only]] amarullz:
The AROMA Installer process doesn't allowing back trough installation process.. I mean:

Before installation, you can go back into previous screen trough the first screen/wizard. But after installation process, you can only go back trough the first screen after installation.

Counter:

1 - 1st screen

2 - 2nd screen

3 - 3rd screen

Installation

1 - 4th screen

2 - 5th screen

If you back() in 5th screen, you can only go back (at maximum) to 4th screen, but if you are in 3rd scree, you can go back trough 1st screen...

But if there is request to be able to back to any screen (not seperated with installation) I can implement force_back() :D
[Android Software/Hacking General [Developers Only]] varun.chitre15:
Can you please make text a little big please in aroma 2.0.

I have the ROM release planned on 13 May before which I want to implement aroma :(

And what to do with touch?

Its not working

I have already posted shoots a few posts back

Edit: link to screenshot

http://xdaforums.com/showthread.php?p=25127505

Burned from my laser torch using pencil cells
[Android Software/Hacking General [Developers Only]] amarullz:
in version 2.00, you can easily resize the font size in aroma-config:

fontresload( "0", "ttf/DroidSans.ttf", "14" ); #-- small
fontresload( "1", "ttf/DroidSans.ttf", "20" ); #-- big

# Make even bigger
fontresload( "0", "ttf/DroidSans.ttf", "16" ); #-- small
fontresload( "1", "ttf/DroidSans.ttf", "22" ); #-- big

And I'll update/uploaded (WIP) lastest aroma filemanager: http://www.amarullz.com/_downloads/nightly/secret/angklung/