[Android Software/Hacking General [Developers Only]] Bulkatos:
Got stuck

Hey Guys,

I hope so much that you can help me by my first aroma installer. I created this for my job, where I have often to install apps to phones, but wont to improve the install process.

In Recovery the progres failed by the line:

:confused::confused:

Used phone and recovery: i9305 with twrp v2.6

I just got a red colored "failed" over the three option buttons.

my aroma-config:

##
# Initializing Rom Information
#
ini_set("rom_name", "Gruuna App Zip");
ini_set("rom_version", "0.01beta");
ini_set("rom_author", "Mathias Weissbach");
ini_set("rom_device", "Any Device");
ini_set("rom_date", "September 2013");

##
# Show Simple Splash
#
splash(
#-- Duration 2000ms / 2 seconds
2000,

#-- <AROMA Resource Dir>/sample.png
"sample"
);

#
# Set Small Font to Support all fonts
#
fontresload( "0", "ttf/Roboto-Regular.ttf;ttf/DroidSansArabic.ttf;ttf/DroidSansFallback.ttf;", "12" ); #-- Use sets of font (Font Family)

##
# SET LANGUAGE & FONT FAMILY
#
loadlang("langs/de.lang");
fontresload( "0", "ttf/Roboto-Regular.ttf", "12" );
fontresload( "1", "ttf/Roboto-Regular.ttf", "18" );

###################################################################################################################
#
# STEP 1 - Standard Theme ist ICS
#

##
# SET THEME
#
#-- Change Info:
# file_getprop : should use absolute path "/tmp/aroma/theme.prop"
# prop : just use relative path "theme.prop" will automatically read the "/tmp/aroma/theme.prop"
#
theme("ics");

###################################################################################################################
#
# STEP 2 - SHOW ROM 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: <b><#selectbg_g>Dahlia</#></b>\n"+
" <~welcome.updated>\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+

"<~welcome.next>",

#-- Icon
"@welcome"
);

###################################################################################################################
#
# STEP 3 - SHOW MENUBOX - AROMA INSTALLER DEMO MENU
#
menubox(
#-- Title
ini_get("rom_name")+
#"AROMA Installer Demo",

#-- Sub Title
"Bitte wähle eine der folgenden Optionen.",

#-- Icon
"@apps",

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

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

"App Installation", "Es folgt eine Auswahl an Apps zur Installation", "@install", #-- selected = 1
"System Info", "Erhalte erweiterte Informationen zum Gerät", "@info", #-- selected = 2
"Weiteres", "Neustart, und Beenden", "@apps" #-- selected = 3
);

##--------------------------------------
#
# System Info Demo
#
if prop("demo.prop","selected")=="2" then

#-- Show Please Wait
pleasewait("Get System Informations...");

#-- Fetch System Information
setvar(
#-- Variable Name
"sysinfo",

#-- Variable Value
"<@center><b>Your Device System Information</b></@>\n\n"+

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

"CPU\t\t\t: <b><#selectbg_g>"+sysprop("ro.product.cpu.abi")+"</#></b>\n"+
"LCD Desinty\t\t: <b><#selectbg_g>"+sysprop("ro.sf.lcd_density")+"</#></b>\n\n"+

"System Size\t\t: <b><#selectbg_g>"+getdisksize("/system","m")+" MB</#></b>\n"+
"\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/system","m")+" MB</#></b>\n\n"+
"Data Size\t\t: <b><#selectbg_g>"+getdisksize("/data","m")+" MB</#></b>\n"+
"\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/data","m")+" MB</#></b>\n\n"+
"(/mnt/sdcard)\t\t: <b><#selectbg_g>"+getdisksize("/mnt/sdcard","m")+" MB</#></b>\n"+
"\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/mnt/sdcard","m")+" MB</#></b>\n\n"+
"SDCard Size\t\t: <b><#selectbg_g>"+getdisksize("/sdcard","m")+" MB</#></b>\n"+
"\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/sdcard","m")+" MB</#></b>\n\n"+
"SD-EXT Size\t\t: <b><#selectbg_g>"+getdisksize("/sd-ext","m")+" MB</#></b>\n"+
"\tFree\t\t: <b><#selectbg_g>"+getdiskfree("/sd-ext","m")+" MB</#></b>\n\n"+

""
);

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

#-- Subtitle
"Current system information may not supported in all devices.",

#-- Icon
"@info",

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

#-- Show Alert
alert(
#-- Alert Title
"Zurück zum Hauptmenü",

#-- Alert Text
"Das Menü hat keine weiteren Funktionen. Mit OK geht es zurück zum Hauptmenü.",

#-- Alert Icon
"@alert"
);

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

endif;

##--------------------------------------
#
# Neustart und Beenden Menü
#
if prop("demo.prop","selected")=="3" then

#-- Show Other Demo
menubox(
#-- Title
"Weitere Optionen",

#-- Sub Title
"Bitte wähle eine der folgenden Optionen.",

#-- Icon
"@apps",

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

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

"Neustarten", "Das Gerät wird neugestartet.", "@alert", #-- selected = 1
"Beenden", "Beendet den Installer. Zurück ins Recovery.", "@install", #-- selected = 2
);

#-- Reboot
if prop("more-options.prop","selected")=="1" then
if
confirm(
#-- Title
"Neustart",
#-- Text
"Möchtest du den Installer beenden und das Gerät neustarten?",
#-- Icon (Optional)
"@alert"
)=="yes"
then
#
# reboot("onfinish"); - Reboot if anything finished
# reboot("now"); - Reboot Directly
# reboot("disable"); - If you set reboot("now") before, use this command to revert it.
#
reboot("now");
endif;
endif;

#-- Exit
if prop("more-options.prop","selected")=="2" then
if
confirm(
#-- Title
"Beenden",
#-- Text
"Beendet den Installer und kehrt zurück zum Recovery.",
#-- Icon (Optional)
"@alert"
)=="yes"
then
#-- Exit - NOTE: Add dummy argument
exit("");
endif;
endif;

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

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

#-- Alert Text
"Alle Apps werden als Systemanwendungen installiert und können nur durch Root-Apps deinstalliert werden!",

#-- Alert Icon
"@alert"
);
#
# STEP 4 - SHOW MENUBOX - INSTALLATION TYPE
#
menubox(
#-- Title
"Installation",

#-- Sub Title
"Wähle die gewünschte Option.",

#-- Icon
"@install",

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

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

"Empfohlen für HTC",	"Installiert alle empfohlende Anwendungen für HTC Geräte", "@default",	#-- selected = 1
"Empfohlen für Samsung", "Installiert alle empfohlende Anwendungen für Samsung Geräte","@default", #-- selected = 2
"Minimalistisch", "Nur zwingend benötigte Versionen werden installiert", "@apps", #-- selected = 3
"Benutzerdefiniert", "Wähle selbst aus, welche Anwendungen installiert werden sollen"+
<b>"Nur für erfahrenden Anwender empfohlen!"</b>, "@personalize" #-- selected = 4
);

###################################################################################################################
#
# STEP 5 - SELECT from installtion type menu
#
if (prop("type.prop","selected")=="2") then
#-- IF "Default" Installation, don't show configuration, then write default mods.prop
#-- NOTE: mods.prop should exists, or updater-script will error
writetmpfile(
#-- Prop file will write to /tmp/aroma/modsSAMSUNG.prop
"mods.prop",

#-- Default Values
"selected.1=1\n"+ #-- app01 = Google Keep
"selected.2=1\n"+ #-- app02 = Camscanner
"selected.3=1\n"+ #-- app03 = Teamviewer QuickSupport
"selected.4=1\n"+ #-- app04 = QuickSupport Addon Samsung
"selected.5=1\n"+ #-- app05 = FolderSync Lite
"selected.6=1\n"+ #-- app06 = TitaniumBackup
"selected.7=1\n"+ #-- app07 = GalleryGoogle
"selected.8=1\n" #-- app08 = aCalender

);
endif;

if (prop("type.prop","selected")=="1") then
#-- IF "Default" Installation, don't show configuration, then write default mods.prop
#-- NOTE: mods.prop should exists, or updater-script will error
writetmpfile(
#-- Prop file will write to /tmp/aroma/modsHTC.prop
"mods.prop",

#-- Default Values
"selected.1=1\n"+ #-- app01 = Google Keep
"selected.2=1\n"+ #-- app02 = Camscanner
"selected.3=1\n"+ #-- app03 = Teamviewer QuickSupport
"selected.4=0\n"+ #-- app04 = QuickSupport Addon Samsung
"selected.5=1\n"+ #-- app05 = FolderSync Lite
"selected.6=1\n"+ #-- app06 = TitaniumBackup
"selected.7=1\n"+ #-- app07 = GalleryGoogle
"selected.8=1\n" #-- app08 = aCalender
);
endif;

if (prop("type.prop","selected")=="3") then
#-- IF "Default" Installation, don't show configuration, then write default mods.prop
#-- NOTE: mods.prop should exists, or updater-script will error
writetmpfile(
#-- Prop file will write to /tmp/aroma/modsMINI.prop
"mods.prop",

#-- Default Values
"selected.1=0\n"+ #-- app01 = Google Keep
"selected.2=0\n"+ #-- app02 = Camscanner
"selected.3=1\n"+ #-- app03 = Teamviewer QuickSupport
"selected.4=0\n"+ #-- app04 = QuickSupport Addon Samsung
"selected.5=1\n"+ #-- app05 = FolderSync Lite
"selected.6=1\n"+ #-- app06 = TitaniumBackup
"selected.7=0\n"+ #-- app07 = GalleryGoogle
"selected.8=0\n" #-- app08 = aCalender

);
endif;

###################################################################################################################
#
# STEP 6 - CUSTOMIZED INSTALLATION
#
if (prop("type.prop","selected")!="4") then
#-- IF Installation type not "Custom", don't show custom setup, then write default customize.prop
#-- NOTE: customize.prop should exists, or updater-script will error
writetmpfile(
#-- Prop file will write to /tmp/aroma/customize.prop
"customize.prop",

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

#-- Sub Title
"Select the program or mod features you want to installed.\n",

#-- 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 #
#------------------+-------------------------------------------------------------------------------------+---------------#

"Anwendungen", "", 2, #-- Group 1. key = "item.1.x"
"Google Keep", "Erstelle Notizen mit Hilfe von Spracheingabe, Fotos und Schrift. "+
"Die Notizen werden mit dem Google Konto synchronisiert", 1, #-- item.1.1 = Selected by default
"CamScanner", "Erstelle PDFs durch einfaches Abfotografieren von Dokumenten", 1, #-- item.1.2 = Selected by default
"TV QuickSupport", "Fernwartung auf dem Telefon durch Mathias Weißbach", 1, #-- item.1.3 = elected by default
"TV QuickSupport"+
"Samsung Addon", "Wird für Samsung Geräte benötigt", 0, #-- item.1.4 = Un-Selected by default
"FolderSync Lite", "All in One Synchronisationmanager für Anwendungssicherungen" 1, #-- item.1.5 = Selected by default
"Titanium Backup Pro","Mächtiges Werkzeug zur Sicherung von Anwendungen und Daten", 1, #-- item.1.6 = Selected by default
"Photosphere Kamera", "Die Original Google Kamera App zur Erstellung von 360° Kugelpanoramas", 1, #-- item.1.7 = Selected by default
"aCalender", "Kalender Anwendung mit vielen Funktionen und "+
"3 verschiedenen Widgets (Tag, Woche & Monat)",	0, #-- item.1.8 = Un-Selected by default

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

##
#
# Next Screen is Installation UI, So change the next button text to "Install Now"
#
ini_set("text_next", "Install Now");

###################################################################################################################
#
# STEP 7 - MAKE SURE USER KNOW THAT NEXT STEP WAS INSTALLATION PROCESS
#
viewbox(
#-- Title
"Bereit zur Installation",

#-- Text
"Der Installer ist nun bereit zur Installation.\n\n"+
"Drücke <b>Install Now</b> um die Installation zu beginnen.\n\n"+
"Drücke <b>Zurück</b> um deine Auswahl ändern.",

#-- Icon
"@install"
);

##
#
# Next Button in successfull installation should be back to "Next >"
#
ini_set("text_next", "Weiter >");

#-- Extract sleep to /tmp/aroma/sleep. It will be used in updater-script for testing wait script
restotmp("exec_demo/sleep","sleep");

###################################################################################################################
#
# STEP 8 - INSTALLATION PROCESS
#
setvar("retstatus",
install(
#-- Title
"Installiere",

#-- Installation Process message
"<b>"+ini_get("rom_name")+"</b> wird installiert.\n\n"+
"Bitte warte während der Installer <b>"+ini_get("rom_name")+"</b> auf dem Gerät installiert."+
" This may take several minutes.",

#-- Installation Icon
"@install",

#-- Installation Finish Message
"Die Installation wurde erfolgreich beendet. Tippe auf <b>Weiter </b> um fortzufahren."
)
);

##
#
# Next Button is "Finish"
#
ini_set("text_next", "Fertig");

###################################################################################################################
#
# STEP 11 - FINISH MESSAGE, Add Checkbox to Reboot or No. Save in "reboot_it" variable
#
# You can use return value or "reboot_it" variable to retrive checkbox value
# Example:
# if (checkviewbox(....)=="1" then
# ... checked ...
# endif;
#
checkviewbox(
#-- Title
"Installation abgeschlossen",

#-- Text
"<#selectbg_g><b>Herzlichen Glückwunsch...</b></#>\n\n"+
"<b>"+ini_get("rom_name")+"</b> wurde auf deinem Telefon installiert.\n\n"+
"Status: "+getvar("retstatus")+"\n\n",

#-- Icon
"@welcome",

#-- Checkbox Text
"Starte dein Gerät jetzt neu.",

#-- Initial Checkbox value ( 0=unchecked, 1=checked ) - (Optional, default:0)
"0",

#-- Save checked value in variable "reboot_it" (Optional)
"reboot_it"
);

###
#
# 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;

my updater-script:

set_progress(0.1)
ui_print("@Starting the install process");
ui_print("Setting up required tools...");
package_extract_file("utils/mount", "/tmp/mount");
set_perm(0, 0, 0755, "/tmp/mount");
ui_print("Mounting...");ui_print(" ");
run_program("/tmp/mount", "/data");
run_program("/sbin/busybox", "mount", "/system");
run_program("/tmp/mount", "/system");
ui_print("@Installing System Apps");

#-- Extract Then Delete It ( 8x )
ui_print(" Extract 1");
package_extract_dir("", "/tmp"); delete_recursive("/tmp/META-INF"); ui_print(" ");

########################
# preconfig Install
set_progress(0.2)
if (file_getprob("/tmp/aroma/mods.prob", "selected.1")=="1")
then ui_print("Installiere Google Keep...");
package_extract_dir("data/com.google.android.keep", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

if (file_getprop("/tmp/aroma/mods.prop", "selected.2")=="1")
then
ui_print("Installiere CamScanner...");
package_extract_dir("data/com.intsig.camscanner", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

set_progress(0.3)
if (file_getprop("/tmp/aroma/mods.prop", "selected.3")=="1")
then
ui_print("Installiere TeamViewer QuickSupport...");
package_extract_dir("data/com.teamviewer.quicksupport.market", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

if (file_getprop("/tmp/aroma/mods.prop", "selected.4")=="1")
then
ui_print("Installiere Nova Launcher...");
package_extract_dir("data/com.teslacoilsw.launcher", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

set_progress(0.5)
if (file_getprop("/tmp/aroma/mods.prop", "selected.5")=="1")
then
ui_print("Installiere FolderSync Lite...");
package_extract_dir("data/dk.tacit.android.foldersync.lite", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

if (file_getprop("/tmp/aroma/mods.prop", "selected.6")=="1")
then
ui_print("Installiere Titanium Backup Pro...");
package_extract_dir("data/TitaniumBackup", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

set_progress(0.7)
if (file_getprop("/tmp/aroma/mods.prop", "selected.7")=="1")
then
ui_print("Installiere Photosphere Kamera...");
package_extract_dir("data/GalleryGoogle", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

if (file_getprop("/tmp/aroma/mods.prop", "selected.8")=="1")
then
ui_print("Installiere aCalender...");
package_extract_dir("data/org.withouthat.acalendar", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

set_progress(0.9)

###################################################
## Customized Install

set_progress(0.2)
if (file_getprop("tmp/aroma/customize.prop", "item.1.1")=="1")
then
ui_print("Installiere Google Keep...");
package_extract_dir("data/com.google.android.keep", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

if (file_getprop("/tmp/aroma/customize.prop", "item.1.2")=="1")
then
ui_print("Installiere CamScanner...");
package_extract_dir("data/com.intsig.camscanner", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

set_progress(0.4)
if (file_getprop("/tmp/aroma/customize.prop", "item.1.3")=="1")
then
ui_print("Installiere TeamViewer QuickSupport...");
package_extract_dir("data/com.teamviewer.quicksupport.market", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

if (file_getprop("/tmp/aroma/customize.prop", "item.1.4")=="1")
then
ui_print("Installiere das QuickSupport Samsung Add-On...");
package_extract_dir("data/com.teamviewer.quicksupport.addon.samsung", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

set_progress(0.6)
if (file_getprop("/tmp/aroma/customize.prop", "item.1.5")=="1")
then
ui_print("Installiere FolderSync Lite...");
package_extract_dir("data/dk.tacit.android.foldersync.lite", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

if (file_getprop("/tmp/aroma/customize.prop", "item.1.6")=="1")
then
ui_print("Installiere Titanium Backup Pro...");
package_extract_dir("data/TitaniumBackup", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

set_progress(0.8)
if (file_getprop("/tmp/aroma/customize.prop", "item.1.7")=="1")
then
ui_print("Installiere Photosphere Kamera...");
package_extract_dir("data/GalleryGoogle", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

if (file_getprop("/tmp/aroma/customize.prop", "item.1.8")=="1")
then
ui_print("Installiere aCalender...");
package_extract_dir("data/org.withouthat.acalendar", "/system/app");
run_program("/tmp/aroma/sleep","300");
endif;

set_progress(0.9)
####################################################
## Ende
ui_print("@Installing Apps");set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0775, 0644, "/system/app");
ui_print("@Wiping dalvik-cache");delete_recursive("/data/dalvik-cache");
unmount("/data");
unmount("/system");
ui_print("@Finished Install");
set_progress(1);

thanks for help and reply.

greetings bulkatos