yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] CosmicDan:
update-binary is probably crashing. Do cat /tmp/recovery.log (I think, check /tmp/ for log files) to see the reason.
[Android Software/Hacking General [Developers Only]] carl1961:
I see a " ! " in

if file_getprop("/tmp/aroma/install.prop","selected.1") != "3"

and

if file_getprop("/tmp/aroma/install.prop","selected.1") != "1"

should be =
[Android Software/Hacking General [Developers Only]] CosmicDan:
No, that means "not equal" and is perfectly valid. Do your research before suggesting incorrect solutions please.

The scipt looks perfectly fine to me, as I said - he needs to check /tmp/recovery.log to get the output of the updater binary to find why it crashed.
[Android Software/Hacking General [Developers Only]] kevinrocksman:
ur prop file doesnt create the right "read" for what your looking for.If you upload it here or send it to me ill look at it. I need the aroma script though to troubleshoot
[Android Software/Hacking General [Developers Only]] CosmicDan:
Menu prop files generated by Aroma can be read perfectly in updater-script, I do it all the time.

At this stage it is impossible to know what the problem is, that's why we need to see log files in /tmp/ because Status 0 could be anything.
[Android Software/Hacking General [Developers Only]] carl1961:
I think he meant what was being read in the install.prop
[Android Software/Hacking General [Developers Only]] CosmicDan:
The format? That's possible, status 0 means no error really but being a "if not" check it should still follow that path, even if the prop file has no key called selected.1. For that reason I'm still convinced it's an issue with the update-binary, which is what the logs in /tmp/ will explain better.

Anyway, he's in bed so no point talking about i more, he can try all suggestions.
[Android Software/Hacking General [Developers Only]] kevinrocksman:
I meant the prop file and variable isn't correct from the aroma config
[Android Software/Hacking General [Developers Only]] CosmicDan:
As I said, if it's not correct then the condition would be true because it's a not-equal check. Unless the prop file doesn't exist at all, the contents shouldn't matter - as long as it's not an out-of-date update-binary with that bug.
[Android Software/Hacking General [Developers Only]] kevinrocksman:
Wouldn't it create a error code if the prop didn't exist though?
[Android Software/Hacking General [Developers Only]] CosmicDan:
On old update binaries yeah. Doesn't for my ROM's though, just returns "not equal" if the prop doesn't exist.

EDIT: The old version of the binary I used would also say in Aroma GUI that "prop 'whatever' not found" before crashing with status 0. So either you are right and he's using very old binary or something else is wrong.

But the logs in /tmp/ will say what the problem is, always does.
[Android Software/Hacking General [Developers Only]] kevinrocksman:
True. He should use my log file puller on the 1st or 2nd post
[Android Software/Hacking General [Developers Only]] Yank555:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

You may have pointed me in the right direction !!

Will test it and explain my mistake if it's that ;)

Thanx guys !

JP.

Sent from my custom Sotmax V13 / Yank555.lu SGS3 U7 kernel v3.2 Aroma (Linux 3.0.62) powered Galaxy S3 i9300 using Tapatalk 2

EDIT :

Yes, was that in fact ;)

I had added an if condition in aroma-config :

if file_getprop("/tmp/aroma/install.prop", "selected.1") != "3" then

checkbox(
#-- Title
"Samsung & AOSP Light only Tweaks",

#-- Sub Title
"Select the Samsung & AOSP Light only tweaks you'd like to install.",

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

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

and updater hang because it didn't find the prop file (even though I don't quite get why it would look for it as the if !=3 should have excluded that bit of code...

So I added this :

# Create an empty file in case user has chosen AOSP JKay
if file_getprop("/tmp/aroma/install.prop", "selected.1") == "3" then
writetmpfile(	"sammyaosptweaks.prop", "");
endif;

Which lead to the strange behaviour, and now with your hint, I've changed it to this and it works fine :

# Create an empty file in case user has chosen AOSP JKay
if file_getprop("/tmp/aroma/install.prop", "selected.1") == "3" then
writetmpfile(	"sammyaosptweaks.prop",
"item.0.1=0\n"
+	"item.0.2=0\n"
);
endif;

Thanx again guys !!

JP.
[Android Software/Hacking General [Developers Only]] Jhowlett:
Hi

I would like to make a menu for having the choice to perform a dalvik cache.

What are the lines of command in the updater-script and in the aroma-config to make that plz?In the aroma-config I think I know how to do (I have already a working aroma mod).

My I9000 and my P3110 are under CM 9.1.0

Thx so much ;)
[Android Software/Hacking General [Developers Only]] CosmicDan:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

This is not the thread for scripting help. Even if you ask in the right thread, I doubt you'll get help. Nobody will write it for you, look at the included examples and learn like everyone else did.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software/Hacking General [Developers Only]] Jhowlett:
Have U the adress of the thread for scripting plz?

And...I don't want the entire script (I have already one),only the command for wiping dalvik cache.I found a command but it makes crash my zip.
[Android Software/Hacking General [Developers Only]] mikep99:
Here you go guys - http://xdaforums.com/showthread.php?p=28706056.

This will take you to the correct Aroma script Q&A thread....
[Android Software/Hacking General [Developers Only]] Jhowlett:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

Thx ;)

I find the answer to my question with the friend Google.I have make a mistake in the command line to use the busybox file to mount /data in the part of the code for wiping dalvik cache.

Now it works :D

Tapatalked with my precious I9000
[Android Software/Hacking General [Developers Only]] Jhowlett:
Hi

If someone is interested in wiping dalvik cache by a script,here is the code :

run_program("/update_files/ect/busybox", "mount", "/data");
delete_recursive("/data/dalvik-cache");

In my aroma zip,the busybox files is in /update_files/ect but U can put it where U want,just update the code in the updater-script ;)

Tested,it works
[Android Software/Hacking General [Developers Only]] CosmicDan:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

We know this. Better to use /sbin/busybox.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software/Hacking General [Developers Only]] Jhowlett:
1) Not better for me because it doesn't work for me (tested on I9000 [Aroma 2.51] and P3110 [Aroma 2.56]...),when I use the command,the zip doesn't work for dalvik cache or anything else...

2) Thx to share the info...Ooops it was the friend google who answer me lol
[Android Software/Hacking General [Developers Only]] carl1961:
I think your Recovery kernel must have the /sbin/busybox support

I know TWRP Recovery does, that is the kernel that is running while in recovery
[Android Software/Hacking General [Developers Only]] CosmicDan:
Not kernel, ramdisk. Many devices don't have a recovery kernel (same kernel shared for ROM and recovery). But yes you are right, if the kernel ramdisk has no busybox then it can't use recovery properly and is probably a stock kernel.

It's just a waste of time and space to include busybox in the ZIP when the busybox in the kernel ramdisk can already do it. The only case you would want to include it in the ZIP is if the recovery's busybox is old and lacking some features. But for something extremely simple like wiping dalvik, it's totally overkill to include a 1MB+ busybox binary.

The only exception is as I said above - stock kernels with locked bootloaders don't have busybox in the ramdisk, as such you would use the one already in /system (because that's usually where Recovery is situated for locked bootloaders).
[Android Software/Hacking General [Developers Only]] mcbyte_it:
checkboxes with initial value from current system

In my ROM I have a checkbox section for extra apps to install, and now they have the default initial checked/unchecked based on what I decide.

Is there a way in Aroma syntax to check some items based on files in the system/data?

I know that aroma supports persistent state prop files (save/load from prop file on the sd card), but I want to have a check done on the fly on the current /system to check for certain conditions to do what I want.

thanks in advance
[Android Software/Hacking General [Developers Only]] CosmicDan:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

1) Before this menu, have Aroma run an sh script that does the check, then either a) echo's the result or b) writes the result to a file in /tmp/tmp.prop

2) In the menu instead of specifying 0 or 1 for state, use a) getvar("exec_buffer") or b) file_getprop() depending on your script method.

Variables can be used just about anywhere in Aroma script and as such the possibilities are immense. If you want to see some advanced examples, check my GitHub (see my sig) KRsH kernel repo - have a look at ramdisk_aroma folder for main script, and in ramdisk/sbin/turbo_helper.sh for all the helper functions.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software/Hacking General [Developers Only]] Jhowlett:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

1 mb...In a zip of 50 or 80 mb,it's nothing... ;) And I want doing dalvik dalvik cache with the aroma zip because it is more fast than make it with the recovery when I use my aroma zip

After searching I found busybox file... In /system/xbin not in /sbin nor at the root of /system ;)

EDIT: If I change

run_program("/update_files/ect/busybox", "mount", "/data");
delete_recursive("/data/dalvik-cache");

by

run_program("/system/xbin/busybox", "mount", "/data");
delete_recursive("/data/dalvik-cache");

the updater-script will check the busybox file in /zip/system/xbin and not in system/xbin (in the phone).Correct?How can I do for invoke the file in the phone plz?Thx ;)
[Android Software/Hacking General [Developers Only]] Kick4U:
Another error code 6

I updated my working script and broke the syntax somewhere;(

I am in the dark as far as where it might be, could anyone figure this out? I have checked all me semicolons and quotation mark and they seem to be correct.

http://d-h.st/aOT

Thanks for your time,

Kick4U

Maybe its the way I'm deleteing Dalvik Cache and I'm using odex rom???

delete("/data/dalvik-cache/system@app@Keyboard.apk@classes.dex");
[Android Software/Hacking General [Developers Only]] grzesdroid:
Odp: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

What happened? Everything worked until I added new features to the new version, and suddenly a strange error. Please help me because I do not know what to do

SCRIPT

http://db.tt/waG0L4Il

LOG

http://db.tt/bmSEsOEd

All the time there is an error in the last line of the script

Wysyłane z mojego GT-I9300 za pomocą Tapatalk 2
[Android Software/Hacking General [Developers Only]] Patrics83:
Questions like this should be posted here >> Aroma, Edify, updater script Question and Answer thread. <<

After a quick look in your 2911 liner updater-script :eek:

I found a missing endif;

line 1776: if file_getprop("/tmp/aroma/swap.prop","selected.1") == "2"

alt.

line 1717: if file_getprop("/tmp/aroma/kernel.prop","selected.0") == "4" then

depending on the function. Hard to know without the aroma-config

So my suggestion, get some rest and have a close look at it again ;)

And don't forget to post in Q&A thread next time.

Good luck!
[Android Software/Hacking General [Developers Only]] Zirias:
Anyone tried compiling this using linaro toolchain and the headers from the latest NDK? I want to experiment a little with the code and right now have only linaro installed, running into the following problem:

<edit>: outdated crap hidden

I get a dynamically linked executable that runs just fine except for touchscreen not working :( Built like this:

arm-linux-androideabi-gcc -g0 -O2 -Wl,-dynamic-linker,/sbin/linker -I/usr/include/arm-linux-androideabi -Werror src/*.c src/edify/*.c src/libs/*.c -o build/aroma -lm -lpthread

I didn't manage to do a static build, linaro seems to lack a libc.a or libm.a -- but I can't imagine this could be the reason for non-working touchscreen?

Do I really need the original toolchain from the NDK in order to build this successfully?

Nevermind for now -- seems I had an old source tree, didn't quite understand the repository layout -- I'll try again!

I managed to build aroma 2.55 with linaro toolchain and the headers from NDK using the attached patch. If someone wants to try it, just adjust the values for "CC", "STRIP" and "INCLUDES" to your local installation and run "make strip". The build is dynamically linked, resulting in a much smaller binary, but with the drawback of requiring a recovery with /sbin/linker and a compatible glibc shared object. My EXT4 touch works well ;)

</edit>

BTW, thanks for the gread work, this installer UI rocks!
[Android Software/Hacking General [Developers Only]] elzafir:
I just realized, AROMA was made by an INDONESIAN!

WOOT! WOOT!

Thumbs up for you, man! You really made your name in the international Android modding community!

Kudos.
[Android Software/Hacking General [Developers Only]] eatthatshrimp:
great
[Android Software/Hacking General [Developers Only]] Zarboz:
getting status0 without even editing anything on twrp 2.3.1.0+ on HTC One XL

no matter what update-binary i use
[Android Software/Hacking General [Developers Only]] CosmicDan:
Look at /tmp/recovery.log, status 0 could mean anything.
[Android Software/Hacking General [Developers Only]] _escape_:
Hi guys,

What a nice tool !!!

But i have two questions :

1/ How can i make a screenshot during my installation ? I saw the screenshot gallery in amarullz's website, but i can't find an answer :/

2/ I'm actually making a small tool, to flash my favorite apps after flashing a new rom. But i've one question.

Is it possible, after installing selected apps, and just before the end of the AROMA script, to install automatically APK from another folder ?

I mean, some people wants their own apps to be installed, and like they don't want to touch the code of my tool, i want to allow them to put some apps, in a subfolder, and after selected apps are installed, those apps from this subfolder will be automatically installed too ...

Am i clear enough ?

I hope so ! :cowboy:

Thanks for your answers, and thanks amarullz for AROMA !!

Much appreciated :D
[Android Software/Hacking General [Developers Only]] alkhafaf:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

Thank you Amarullz

The aroma installer has beem implemented in v3 of MesoROM GB jw9 for i9000

release is soon.
[Android Software/Hacking General [Developers Only]] CosmicDan:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

1) via ddms/monitor in android sdk

2) write a script that mounts data then copies contents of a folder to /data/app/ and execute it inside aroma

Sent from Xperia Play (R800a) with Tapatalk
[Android Software/Hacking General [Developers Only]] _escape_:
1/ Thx will try this !

2/ Ok, that's what i was going to do, but wanted to be sure i could make it this way.

Thx for this "super-fast" answer :)
[Android Software/Hacking General [Developers Only]] alkhafaf:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

Yes you can

U just need to modify the updater script to extract a specific folder( example: myapps) to data/apps or system/apps

If there are apks in that folder... It will be extracted ... If no, then no problem will happen.

Command:

package_extract_dir("myapps","/data/app/");

You can put it at the end of the updater_script before unmounting..

Note: Some apks got (lib) folder inside, so these library files should be extracted to system/lib ( you should choose the correct one according to your device)
[Android Software/Hacking General [Developers Only]] _escape_:
Ok thx so much :)

Just have to use a variable with a confirmation, but ... i'm not sure of what using ...

EDIT :

Trying this

in aroma-config before install process:
checkviewbox(
"Installation almost completed",
"<#selectbg_g><b>Last step ...</b></#>\n\n"+
"If you have some APK in my-apps folder,"+
"You are able to install them automatically now.",
"@welcome","Install your own APK ?","1","my_apps");

in update-script :
if getvar("my_apps")=="1") then ui_print("Installing your own apps");
package_extract_dir("My_Apps", "/data/app");
endif;

But i got an error ... unknown fonction getvar ...

So, am i obliged to use get_fileprop, just for one checkbox ?

Or maybe can i put the 3 last lines in aroma-config, instead of update-binary ?

Thx :)
[Android Software/Hacking General [Developers Only]] Dblfstr:
Question on scripting should be asked here: http://xdaforums.com/showthread.php?t=1770284&page=55

if
file_getprop("/tmp/aroma-data/something.prop","key.1") == "1"
then
ui_print("Installing your own apps");
package_extract_dir("from", "/to/somewhere");
endif;

Read your questions again. And I think I understand better.

I don't see why you are adding code to the aroma-config. You are giving the user the option of installing their own apps. But there is no need. If they want to install their own apps, they will put them in your subfolder, otherwise they will not.

I think you could just add package_extract_dir("from", "/to/somewhere/"); after the rest of the updater script runs. If apks are there, the will be installed. Otherwise nothing will happen. (script will extract an empty directory)
[Android Software/Hacking General [Developers Only]] _escape_:
Oups :angel: sorry !

Thx, i tried this to, but i don't know to what is referenced "key.1" ... may i don't have to use "checkviewbox" ... but just a selectbox with just one option ... will try :)

BTW thanks :)

---------- Post added at 09:22 PM ---------- Previous post was at 08:45 PM ----------

Effectively it's relevant !!

Because i want to had this option, so i tried to make it worked ... but not necessary at all that's true ... :)

But if i launch twice the installer, because i forget to select one app in the first menu, i will install my own app twice ...

But i think it's not really a problem i guess :)

Thx =)
[Android Software/Hacking General [Developers Only]] Dblfstr:
key.1 is the key for the checkviewbox. each item has a key. So you check that key in the .prop file. Your if statement is checking that some key == 1

Selectbox prop key naming:
selected.[groupid] = [selected_id]
If there no defined group, the groupid will be 0, the first group will be 1, next group 2, next group 3. and so on...

selected.0 = 2
It mean the selected item id in Group 0 is 2 (item number 2).

Menubox prop key naming:
Because menubox doesn't support any grouping, the prop key name was:
selected = selected_id

Checkbox prop key naming:
in checkbox, all items can be selected or not-selected, and it support group, so the prop key naming was:
item.[groupid].[itemid] = [state]

while state was numeric. 1 = checked, 0 = unchecked.

Yes, it would effectively install the app(s) twice. Now I see why you want that option. Not really a problem, but should be easy enough to implement.

aroma-config

menubox(
#-- Title
"Installation almost completed",
#-- Sub Title
"<#selectbg_g><b>Last step ...</b></#>\n\n"+
"If you have some APK in my-apps folder,"+
"You are able to install them automatically now.",
#-- Icon
"icons/apps",
#-- Will be saved in /tmp/aroma/my_apps.prop
"my_apps.prop"

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

"@welcome", "Install your own APK ?", "1", "my_apps");

updater-script

if prop("my_apps.prop","selected") == "1" then
ui_print("Installing your own apps");
package_extract_dir("from", "/to/somewhere"); #--Need to change directory
endif;

This should work. If I am wrong, someone correct me. :D
[Android Software/Hacking General [Developers Only]] CosmicDan:
I thought he wanted to extract APKS from a *directory*, i.e. from /sdcard/apks/ - not from a folder inside the ZIP.

EDIT: If this is what you want to do, as I said - you need to run an external script. Here:

Aroma script-

if file_getprop("/tmp/aroma/my_apps.prop", "selected")==1 then
pleasewait("Copying APK's...");
zipexec("/my_apps.sh");
endif

my_apps.sh (in root of update ZIP):

#!/sbin/sh
#

/sbin/busybox mount /data
/sbin/busybox cp -a /sdcard/apks/* /data/app/
/sbin/busybox umount /data

I don't know if the cp command is correct, linux cp command is a bit silly with copying folder contents.

If you can't figure it out, I suggest you take it to the scripting help thread since that's more on topic. You asked if it was possible, and yes it is as I've shown above.
[Android Software/Hacking General [Developers Only]] _escape_:
Hmm ... first i wanted to extract from a subfolder in the zip file ... but your idea ... is much better !!!

Really more simple for users who wanted to use my script without modifiying anything !!

Ok ... that's what i wanna do !! :D

Thx for this idea ... didn't know it was possible this way !!!

Will work on it =)

---------- Post added at 11:52 PM ---------- Previous post was at 11:50 PM ----------

Thx for the example, i will try to make this work before trying the other idea, which is much better for people wanted to use my script !!

BTW, much powerfull tool is AROMA !!

And thanlks for your help and answers :D
[Android Software/Hacking General [Developers Only]] carl1961:
I think zipexec("/my_apps.sh"); is zipexec("my_apps.sh");

OP example zipexec("META-INF/com/google/android/aroma/test.sh");

I was wrong resexec("my_apps.sh");

OP # It will extract and run "META-INF/com/google/android/aroma/test.sh"

resexec("test.sh");
[Android Software/Hacking General [Developers Only]] CosmicDan:
Oh OK, well maybe it will work with leading / but if not then yeah :)
[Android Software/Hacking General [Developers Only]] DaOldMan:
All this (especially the format of the Wizard UI variables !) has to be in the first post. Had to use examples to understand it by myself which is not really a good way to teach you the syntax :)

Thanks for a wonderful post,

Thomas
[Android Software/Hacking General [Developers Only]] CosmicDan:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

The included sample script explains everything pretty well.

Sent from Xperia Play (R800a) running Turbo UI Classic with Tapatalk
[Android Software/Hacking General [Developers Only]] DaOldMan:
I am sorry but a list of commands, parameters passed, variables is MUCH MUCH better then having to go through examples. Examples should show how all this is applied, also they don't always show you all the possibilities. There is a very nice explanation of the internal commands, why this was not done for the WIZARDS is weird.

Thomas
[Android Software/Hacking General [Developers Only]] CosmicDan:
Re: [MOD][2.56] AROMA Installer :: 121004-031 :: Open Source

I don't understand you. The OP lists syntax for all commands and the example script shows how to work with menu data.

Sent from Xperia Play (R800a) running Turbo UI Classic with Tapatalk
[Android Software/Hacking General [Developers Only]] DaOldMan:
I see. Well for instance. Where does it say that when I use a selectbox the parameter written inside the prop will be called "selected.x" where x is the groupid !?!?!?!

Simple answer. NOWHERE :( And the same for all the other wizards...

Thomas