[TUTORIAL] Comprehensive Guide for AROMA Installer For Beginners!! | 27/08/13 - Sony Cross-Device General

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!

Thank you so much man! This came into my mind just today about making/installing aroma to my sola.
And now..i have the whole tutorial!!
I havent tried this yet.. But definately will in 2-3 days..
Thanks!
Sent from my MT27i using xda premium

Thanks a ton. Just gave a jest n it looks interesting. Will respond soon.

Nice work bro, but I already help you upon move this thread to General section cause since this is tutorial but not development

Help!! Error
@Ayush Singh
I am getting error while flashing zip file. The error log is as follows:
Installing update...
-> Initializing...
->Please Wait...
file_getprop: failed to stat "/tmp/aroma-data/menu.prop": No such file or directory
E:Error in /sdcard/aroma-test.zip
(status 7)
Installation aborted

Kaushik.Vapiwala said:
I am getting error while flashing zip file. The error log is as follows:
Installing update...
-> Initializing...
->Please Wait...
file_getprop: failed to stat "/tmp/aroma-data/menu.prop": No such file or directory
E:Error in /sdcard/aroma-test.zip
(status 7)
Installation aborted
Click to expand...
Click to collapse
Make sure that in your aroma config this prop file is defined for menu--
Code:
"menu.prop",
and in updater script, you have defined options like this--
Code:
file_getprop("/tmp/aroma-data/menu.prop","selected") == "1"

Ohk I'll check it.
Edit - The problem is solved. Thank you.

Thanks for the very useful guide. I have a problem, just a strange case (for me), try to edit aroma-config from the zip.
It says lines syntax error on line xxx col xx . I look on that with notepad++ on the line but it just ");" which is needed to close "selectbox(" statement.
I try the demo installer first and it runs fine, then I try to re-replace any value (even with same value) but it has syntax error on line xxx
No changes on value, just open and save.
Thanks in advance.
edit: take your zip (not the original one) and it's fine then . Also mistakes in last line on initial values .. thanks anyway

Your guide is very well detailed. Thank you for doing this.
I will be following your guide to set Aroma up in my rom. I will have to edit the themes tho. What I didnt see was info on kernels. I would like to have my rom for Tmobile and AT&T.
Do you have a guide for that as well?

nice guide
thanks & pressed
i have a question.when i press the "install now" button,nothing display in the field and there is nothing install on my phone
here is my updater-script and aroma-config.would you mind take a look?thx
https://www.dropbox.com/s/wt4ful20tjt8cbd/aroma-config
https://www.dropbox.com/s/rwlxcc189cq4srm/updater-script
the two files are saved in ANSI,is it right code?
btw, i deleted the folder "checkbox1" and "window2" since i don't need them.is it fine?

slsamg7112 said:
nice guide
thanks & pressed
i have a question.when i press the "install now" button,nothing display in the field and there is nothing install on my phone
here is my updater-script and aroma-config.would you mind take a look?thx
https://www.dropbox.com/s/wt4ful20tjt8cbd/aroma-config
https://www.dropbox.com/s/rwlxcc189cq4srm/updater-script
the two files are saved in ANSI,is it right code?
btw, i deleted the folder "checkbox1" and "window2" since i don't need them.is it fine?
Click to expand...
Click to collapse
Your updater-script is correct n the aroma-config as well,
n theres no problem in deleting checkbox n windows if not reqd.
But if installation progress completes on its own with no data installed then this is how to troubleshoot--
-> Have you replaced update-binary-installer from any working mod/rom for your device??
-> Are the mount commands correct for your device?
I hope this will help
alloycowboy said:
Your guide is very well detailed. Thank you for doing this.
I will be following your guide to set Aroma up in my rom. I will have to edit the themes tho. What I didnt see was info on kernels. I would like to have my rom for Tmobile and AT&T.
Do you have a guide for that as well?
Click to expand...
Click to collapse
You mean guide for Flashing kernels??
Sorry I dont have that at this moment, coz I own 2011 Xperia device from which we cannot flash kernels via aroma

-> Have you replaced update-binary-installer from any working mod/rom for your device??
---i replaced the file with working aroma and now it works. thx
-> Are the mount commands correct for your device?
---no lines display when installing.after replacing it works well

I am currently using Aroma in my rom (still editing). Your guide was VERY helpful. I do have a question...
On the main menu (full rom installation, change log, etc) how can I go about "adding" a mods/themes selection that will only flash selected mods without flashing the rom? Is ithere a way to implement this? I know i can add it to the menu, but im not to sure on how to write the script so
It will flash just selected mods, etc.
Any help would be greatly appreciated.

I'll check it ! Nice work!

Excellent work. Good reference for all experienced Aromaholics and not.
Sent from my GT-I9500 using XDA Premium 4 mobile app

Congratulation! You guide is on XDA Portal.:highfive:
http://www.xda-developers.com/android/comprehensive-guide-to-aroma-installer/

I sent the tip to xda portal, Glad to see this in portal

Related

[TUTORIAL] How to create an CWM installable .zip (Mod)

Hey guys, made an tutorial on how to make an CWM installable .zip
Requirements
Notepad++
An CWM/Feamod installable .zip for your device
Instructions:
1. Get yourself an CWM installable .zip for your device.
2. Extract the .zip
3. Go into the META-INF folder, delete CERT.RSA, CERT.SF and MANIFEST.MF.
4. go to META-INF/com/google/android
5. Right-Click on updater-script and select Notepad++
6. You see an script. Edit it. If you want to extract the folder (zip)/system/media/audio/ui use this script:
Code:
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
ui_print("text"); means the text shown when you install the .zip in CWM.
run_program("text"); means that CWM runs a program
delete("/system"); means that you delete /system
package_extract_dir("framework", "/system/etc"); means that the files in /system/framework are extracted in /system/etc (on the device)
Make the script. My script for my iPhone Sounds is
ui_print("iPhone-Sounds by FlorisNL");
Code:
show_progress(1.000000, 0);
mount("ext4", "/dev/block/mmcblk0p15", "/system");
set_progress(0.400000);
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.800000);
unmount("/system");
set_progress(0.900000);
ui_print("Installed Iphone-Sounds. Enjoy.");
set_progress(1.000000);
When your done, create an .zip with 7z. and test it. If you still got problems, feel free to post it in this topic.
(Sorry for my poor english sometimes ;p)
Floris
No need to make CWM flashable mod for audio files.
Put ogg/m4a/mp3 files in
sdcard/Alarms
sdcard/Notifications
sdcard/Ringtones
Reboot and media scanner will make them available in Settings > Sounds.
sdcard/Ringtones/.nomedia <- (0 size file)
Reboot and media scanner skip the folder sdcard/Ringtones
But I want to know. And im not porting ringtones only but also lock sounds, camera shutter sound, etc.
Sent from my GT-I9001 using xda premium
Then you must promise not to include aiPhaun sounds... :*
I don't want to be held responsible for distributing that to Android platform :\
O-T said:
Then you must promise not to include aiPhaun sounds... :*
I don't want to be held responsible for distributing that to Android platform :\
Click to expand...
Click to collapse
Lol ok, it was just an idea. I just like the shutter sound and the lock sounds of the iphone but I prefer Android.
Just take a normal zip for your device, extract it, look at the file in META-INF\com\google\android --> updater-script (edit only with notepad++ under windows os, otherwise with normal notepad or other software the line endings might get converted from UNIX style to windows style which will not work!)
Files to be copied will most likely be in a folder structure like \system\YourFile.
Be sure to remove in \META-INF files CERT.RSA, CERT.SF and MANIFEST.MF.
Those are the files that gurantee the file is correct and integer ("signed zip") will become invalid after repacking.
Then pack everything with 7zip (with format .zip and lightest compression) and make sure that when you open up your zip META-INF is in the zip root.
More information on updater-scripts can be found on XDA or google with search for edify script.
What do you exactly mean with a zip for your device? Another mod?
Sent from my GT-I9001 using xda premium
Yes. For example, this is the start of crybert's AIO package script for 9001.
Code:
ui_print(" AIO - Package v1 by crybert ");
ui_print("**********************************");
ui_print(" root ");
ui_print(" busybox ");
ui_print(" init.d ");
ui_print(" custom bootanimation ");
ui_print(" FeaModRecovery 1.4 ");
ui_print("**********************************");
ui_print(" Credits: ");
ui_print(" manveru0 - FeaModRecovery ");
ui_print(" KeksKlip - Root ");
ui_print(" ");
ui_print("**********************************");
show_progress(1.000000, 0);
ui_print("Preparing device");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
package_extract_dir("system", "/system");
set_progress(0.200000);
ui_print("Activating SuperUser");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_progress(0.400000);
wintel_mac said:
Yes. For example, this is the start of crybert's AIO package script for 9001.
Code:
ui_print(" AIO - Package v1 by crybert ");
ui_print("**********************************");
ui_print(" root ");
ui_print(" busybox ");
ui_print(" init.d ");
ui_print(" custom bootanimation ");
ui_print(" FeaModRecovery 1.4 ");
ui_print("**********************************");
ui_print(" Credits: ");
ui_print(" manveru0 - FeaModRecovery ");
ui_print(" KeksKlip - Root ");
ui_print(" ");
ui_print("**********************************");
show_progress(1.000000, 0);
ui_print("Preparing device");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
package_extract_dir("system", "/system");
set_progress(0.200000);
ui_print("Activating SuperUser");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_progress(0.400000);
Click to expand...
Click to collapse
This is my script how it's now. It is installing but its not replacing the Lock.ogg - Unlock.ogg - TW_Unlock.ogg files... Can you help me?
Code:
ui_print("iPhone-Sounds by FlorisNL");
show_progress(1.000000, 0);
mount("MTD", "/system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.400000);
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.800000);
unmount("/system/media/audio/ui");
set_progress(0.900000);
ui_print("Installed Iphone-Sounds. Enjoy.");
set_progress(1.000000);
My Folder:
Code:
system/media/audio/ui/Lock.ogg TW_Unlock.ogg Unlock.ogg
Code:
META-INF/com/google/android/updater-binary and updater-script
Mount command seems wrong.
Sent from my GT-I9001 using XDA App
FlorisNL said:
This is my script how it's now. It is installing but its not replacing the Lock.ogg - Unlock.ogg - TW_Unlock.ogg files... Can you help me?
Code:
ui_print("iPhone-Sounds by FlorisNL");
show_progress(1.000000, 0);
mount("MTD", "/system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.400000);
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.800000);
unmount("/system/media/audio/ui");
set_progress(0.900000);
ui_print("Installed Iphone-Sounds. Enjoy.");
set_progress(1.000000);
My Folder:
Code:
system/media/audio/ui/Lock.ogg TW_Unlock.ogg Unlock.ogg
Code:
META-INF/com/google/android/updater-binary and updater-script
Click to expand...
Click to collapse
Folders are ok.
script:
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
package_extract_dir("system", "/system");
All the rest is unneeded ui stuff. Nice to look at, not necessary...
Thank you so much! I did it http://forum.xda-developers.com/showthread.php?t=1502660 here is the result so far
Sent from my GT-I9001
Hi Floris,
Thanks for changing this into a tut, good job!
Regards,
Nika.
And be sure if you extracted the zip to a directory, when you zip back, zip what's INSIDE the folder and not the folder... yeah, I did that...
The updater-script must also be in UNIX format (definitely, but that mistake I didn't make... )
With CWM 6.0.4.4 you can zip with the "Ultra" compression in 7-zip and CWM will manage to open it.
Hi, can anyone help me with this
trying to create own package which CWM still fails to install
gives error E: failed to open update.zip (bad)
Aborted
Q1: Am I require to use 7zip and lightest compression?
Q2: what actually does the mount("ext4", "...) command do and is it required to use?
Q3: if I want to put custom apk file into /system/app/ and set rw-r-r permissions for it, which command do I use?
bflmpsvz said:
Hi, can anyone help me with this
trying to create own package which CWM still fails to install
gives error E: failed to open update.zip (bad)
Aborted
Q1: Am I require to use 7zip and lightest compression?
Q2: what actually does the mount("ext4", "...) command do and is it required to use?
Q3: if I want to put custom apk file into /system/app/ and set rw-r-r permissions for it, which command do I use?
Click to expand...
Click to collapse
A1: I always just zipped it, never looked at the compression quality. Just make sure to make a ZIP and not RAR or 7Z
A2: It mounts your system so you can write to it. Make sure to use an example mount command from a working ZIP of someone else for your specific device. The mount command is different in every device. On some recoveries with rooted ROMs you can use:
Code:
run_program("/sbin/busybox", "mount", "/system");
A3: For instance something like this:
Code:
show_progress(1.000000, 0);
ui_print(" Mounting SYSTEM...");
run_program("/sbin/busybox", "mount", "/system");
set_progress(0.100000);
ui_print(" Extracting files to SYSTEM...");
package_extract_dir("system", "/system");
set_progress(0.400000);
ui_print(" Setting /system/app/NAME.apk permission to 644...");
set_perm(0, 0, 644, "/system/app/NAME.apk");
set_progress(0.600000);
ui_print(" Unmounting SYSTEM...");
unmount("/system");
set_progress(0.900000);
ui_print("Install complete...");
set_progress(1.000000);
Why not use ADB for something like this (from your PC)?
Code:
adb remount
adb push NAME.apk_here /system/app/
adb shell chmod 644 /system/app/NAME.apk
adb reboot
Regards,
Nika.
Nice. I've found the error source - some files names had international accents. Now install passes to the end.
But another problem I have is that my files aren't mirrored into system.
Is package_extract_dir("system", "/system") recursive or do I have process every nested folder in it for extraction?
system\fonts
system\media\audio\alarms
system\media\audio\notifications
system\media\audio\ringtones
system\etc
system\bin
system\app
My script
Code:
ui_print("Integrating own fonts, sounds and customizations into system");
show_progress(1.000000, 0);
set_progress(0.000000);
package_extract_dir("system", "/system");
set_progress(1.000000);
ui_print("Installed custom files. Enjoy.");
Finishes successfully but when I boot into OS, the files aren't in place, and I install this zip as last package.
Looks to me like you're not mounting system. It therefore cannot add the files. Yes, with package_extract_dir it recursively extracts all files...
Verstuurd vanaf mijn E380 met Tapatalk
---------- Post added at 07:56 PM ---------- Previous post was at 07:52 PM ----------
BTW, in most cwm you can also mount system from the menu. Try that first and then run your script. Again, mounting system is required when you want to copy file to it. Figure out what command to use for your specific rom... Possibly also checkout how they do it for gapps and other generic installable zips...
Verstuurd vanaf mijn E380 met Tapatalk

[DEV][AOSP] ICS sources and build instruction for A501

1. Preparing environment and building
1.1. Installing bootloader and recovery
This step can be done only in Windows (can be done on Linux too, but I didn't find right version of Linux nvflash):
Run MS Windows (tested even on Windows 7) on host PC
Download this package (Size=12592367 MD5=EA890A3B3E1CEDBBD820D1A798A365A2). Inside package:
Windows drivers for nVidia USB device
nvflash tool and required libraries
Unlocked bootloader, see details here
Batch for automatic update, see original batch here
Generate your SBK with your CPUID by this link
Connect tablet to PC through USB
Turn-off tablet
Press and hold reset button on tablet
Press power and wait until new USB device will be detected
Install USB drivers (can be find in package)
Run script run.bat and follow recommendations
1.2. Downloading sources and building Android
Create directory for AOSP sources
Code:
mkdir aosp && cd aosp
Initializing repo
Code:
repo init -u [url]https://android.googlesource.com/platform/manifest[/url] -b ics-mr1
Downloading sources
Code:
repo sync
Download sources of Acer Picasso device
Code:
git clone git://github.com/shchers/afs_device_acer_picasso.git device/acer/picasso
Download sources of MBM RIL library
Code:
git clone git://github.com/shchers/afs_vendor_mbm_mbm-ril.git vendor/mbm/mbm-ril
Download sources of MBM GPS library
Code:
git clone git://github.com/shchers/afs_vendor_mbm_libmbm-gps.git vendor/mbm/libmbm-gps
Download sources of MBM GPS service
Code:
git clone git://github.com/shchers/afs_vendor_mbm_mbmservice.git vendor/mbm/mbmservice
Setting-up build environment
Code:
source build/envsetup.sh
Configuring target (Acer A500/A501 == full-picasso)
Code:
lunch full_picasso-userdebug
Building with using all available CPU cores
Code:
m -j`grep -c processor /proc/cpuinfo`
2. Installing Android to device
2.1. Updating through CWM recovery
2.1.1. Creating update archive
Go to target output directory
Code:
cd ${ANDROID_PRODUCT_OUT}
Create folder for updater script. Run in console:
Code:
mkdir -p META-INF/com/google/android
Copy updater script there
Code:
show_progress(0.400000, 0);
ui_print("> Formating system partition");
format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0");
ui_print("> Mounting system partition");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
ui_print("> Extracting system directory");
package_extract_dir("system", "/system");
ui_print("> Creating symlinks");
show_progress(0.200000,0);
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("mksh", "/system/bin/sh");
symlink("toolbox",
"/system/bin/ls","/system/bin/mount","/system/bin/cat",
"/system/bin/ps","/system/bin/kill","/system/bin/ln",
"/system/bin/insmod","/system/bin/rmmod","/system/bin/lsmod",
"/system/bin/ifconfig","/system/bin/setconsole","/system/bin/rm",
"/system/bin/mkdir","/system/bin/rmdir","/system/bin/reboot",
"/system/bin/getevent","/system/bin/sendevent","/system/bin/date",
"/system/bin/wipe","/system/bin/sync","/system/bin/umount",
"/system/bin/start","/system/bin/stop","/system/bin/notify",
"/system/bin/cmp","/system/bin/dmesg","/system/bin/route",
"/system/bin/hd","/system/bin/dd","/system/bin/df",
"/system/bin/getprop","/system/bin/setprop","/system/bin/watchprops",
"/system/bin/log","/system/bin/sleep","/system/bin/renice",
"/system/bin/printenv","/system/bin/smd","/system/bin/chmod",
"/system/bin/chown","/system/bin/newfs_msdos","/system/bin/netstat",
"/system/bin/ioctl","/system/bin/mv","/system/bin/schedtop",
"/system/bin/top","/system/bin/iftop","/system/bin/id",
"/system/bin/uptime","/system/bin/vmstat","/system/bin/nandread",
"/system/bin/ionice","/system/bin/touch","/system/bin/lsof");
ui_print("> Applying permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
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, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 0, 0644, "/system/vendor/fake.txt");
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/mmcblk0p2");
NOTE: Don't rename file! It should be updater-script!
Download this archive (Size=149342 MD5=9497D5087FEF04C1EA4EE215A3DC83B8) and extract there
Create ZIP archive. Run in console:
Code:
zip -r9 full-pack.zip boot.img system META-INF
Generate keys. Run in console:
Code:
openssl genrsa -out key.pem 1024
openssl req -new -key key.pem -out request.pem
openssl x509 -req -days 3650 -in request.pem -signkey key.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt
Run signing archive. Run in console:
Code:
java -jar ${ANDROID_HOST_OUT}/framework/signapk.jar certificate.pem key.pk8 full-pack.zip full-pack-sign.zip
2.1.2. Using CWM recovery
Upload full-pack-sign.zip on FAT32 formated microSD card
Turn-off tabled
Insert microSD
Press Power button while hold Volume Down button
Release Power button when you'll see text in top left corner, some like "cleaning cache partition..."
From opened menu select "wipe data/factory reset"
Select "Yes -- delete all user data"
Press on "install zip from sdcard" menu
Select "choose zip from sdcard"
In this menu select "full-pack-sign.zip"
After installing press "Go back"
Press "reboot device"
2.2. Updating through Android debug
2.2.1. Updating system partition
Get a root access
Code:
adb root && adb wait-for-device
Remount system partition with R/W permitions
Code:
adb shell mount -o remount,rw -t ext4 /dev/block/mmcblk0p3 /system/
Sync binaries
Code:
adb shell stop && adb sync && adb reboot
2.2.2. Updating boot partition
Reboot to fastboot
Code:
adb reboot bootloader
Select one of possible methods to use new boot partition
Boot with custom kernel and ramdisk without flashing (boot partition will not be rewrote) - this mode useful for debugging kernel/root
Code:
fastboot boot ${ANDROID_PRODUCT_OUT}/kernel ${ANDROID_PRODUCT_OUT}/ramdisk.img
Boot with custom boot.img without flashing (boot partition will not be rewrote) - this mode also can be used for debugging kernel/root
Code:
fastboot boot ${ANDROID_PRODUCT_OUT}/boot.img
Flashing new boot.img to boot partition
Code:
fastboot flash:raw boot ${ANDROID_PRODUCT_OUT}/kernel ${ANDROID_PRODUCT_OUT}/ramdisk.img
2.3. Enabling Google services
To enable Google services on new system, should be copied several Google binaries to /system/app. To do it should b done several steps:
Get a root access
Code:
adb root && adb wait-for-device
Remount system partition with R/W permitions
Code:
adb shell mount -o remount,rw -t ext4 /dev/block/mmcblk0p3 /system/
Download this (i.e. GAPPS) archive (Size=16449776 MD5=C7E6FAAFE7223A17DE93DD1D7A968734)
Extract it somewhere
Code:
mkdir GooglePack && cd GooglePack
unzip googlepack.zip
Stop dalvik virtual machine
Code:
adb shell stop
Upload APK files
Code:
for f in `ls *.apk`; do echo "Uploading $f" && adb push $f /system/app/; done
Remove Provision.apk - it looks like setup wizard, but SetupWizard.apk much powerful
Reboot device to recovery and wipe data partition (use CWM "Wipe" menu for it)
Code:
adb reboot recovery
Reboot device after wiping
Use wizard on system start-up to configure your account
Use Android Market to install GMail and other apps
3. Debugging
3.1. RILD
To see rild log should be done:
Code:
adb logcat -b radio
4. FAQ
Q: WiFi scanner show few AP, but can't connect anywhere...
A: Try to make factory reset.
Click to expand...
Click to collapse
Q: Is it thor2002ro sources?
A: No, it is my own port.
Click to expand...
Click to collapse
Q: What is the version?
A: ICS MR1 (Current version: 4.0.4).
Click to expand...
Click to collapse
5. Supported features
2D/3D acceleration
Photo/Video Camera
2G/3G
GPS
AGPS
SMS (tested only in GSM networks)
WiFi
Bluetooth
Audio/Video playback
Image viewing
External SD Card
External USB storage
Compass
Gyroscope
6. To do
[rild] Add support for USSD
[rild] Add support/check for MMS
[libsensors] Implement libsensors and replace Acer binaries
[audio] Add support for USB audio devices
[audio] Add support for modem audio input
7. Screenshots
Version
{
"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"
}
EDGE connection
Speed test results on HSDPA+
8. Pre-builds
Build #1 (Size=114409141 MD5=11C9E0BE468B21BF061C7ECF6673C9B4)
Build #2 (Size=119899802 MD5=4CB798A28B38D02217752C6E09F0E226)
[reserved]
Reserved for further updates, if it will be necessary...
Well, thanks to my Ukraine neighbor
Should be an interesting project for the weekend!
Would be great if someone could post a .zip
Holy sweet meatballs!
I have a A501, and I'm pleased to hear that the 3G Iconia is getting some love. Makes me wonder if I should sell it with the ICS ROM loaded on it, or keep it now it has ICS love since I have a Galaxy Tab...
Decisions Decisions.
Eagerly waiting a ZIP so we can all be eating some delicious Ice Cream Sandwich.
That's great, also the steps are really clean, maybe you should give some tips to acer
@shchers: aren't you thinking about submitting your work to CyanogenMod so our tables could get official support from CM team? I think there is no Acer Iconia maintainer right now at all in the CM team so you could try and join them as Iconia maintainer. This would be really great.
Hm, forgive me for asking but where is the kernel to use with it?
macia10 said:
Hm, forgive me for asking but where is the kernel to use with it?
Click to expand...
Click to collapse
After I've written above reply, I've checked shchers' git repo and there is a kernel but in a binary form.
@shchers: did you build this kernel yourself? GPL licence requires that you need to publish its sources as well.
yaworski said:
After I've written above reply, I've checked shchers' git repo and there is a kernel but in a binary form.
@shchers: did you build this kernel yourself? GPL licence requires that you need to publish its sources as well.
Click to expand...
Click to collapse
ONLY if he modified it from Acer's released source. If he didn't, he doesn't have to add the sources to his git (though it'd be handy for conveniences sake). Best we wait and see what he says before jumping to ANY conclusions.
Either way, FANTASTIC work shchers! Thank you VERY much!
@shchers: did you build this kernel yourself? GPL licence requires that you need to publish its sources as well.
Click to expand...
Click to collapse
No, I used Acer kernel. But thanks for reminder
When my kernel will be ready I'll share it with community
About ZIP... I see that many people asking about update package, so I started building and it will be ready in a one hour.
shchers said:
No, I used Acer kernel. But thanks for reminder
When my kernel will be ready I'll share it with community
About ZIP... I see that many people asking about update package, so I started building and it will be ready in a one hour.
Click to expand...
Click to collapse
Awesome. Have you thought about the CyanogenMOD suggestion made earlier? If you added your source to that, we could get official support for it on our devices which would rock, and it'd also make life easier for those wanting to get MIUI ported over.
yaworski said:
@shchers: aren't you thinking about submitting your work to CyanogenMod so our tables could get official support from CM team? I think there is no Acer Iconia maintainer right now at all in the CM team so you could try and join them as Iconia maintainer. This would be really great.
Click to expand...
Click to collapse
Good point, but unfortunately I'd never seen CM source code. May be you can share link to CM Gerrit/Git with me?
shchers said:
Good point, but unfortunately I'd never seen CM source code. May be you can share link to CM Gerrit/Git with me?
Click to expand...
Click to collapse
You should find all you need through the following link...
http://www.cyanogenmod.com/community
There's also a link to their Git hub on there.
shchers said:
Good point, but unfortunately I'd never seen CM source code. May be you can share link to CM Gerrit/Git with me?
Click to expand...
Click to collapse
All you need is here:
http://wiki.cyanogenmod.com/wiki/Building_from_source
http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit
(just replace gingerbread branch with ics)
But you probably need working kernel source for the device to submit vendor specific code to CM.
Is this kernel just a binary from Acer's leak? I'm asking because I'm not aware of a working kernel source for a500.
shchers said:
About ZIP... I see that many people asking about update package, so I started building and it will be ready in a one hour.
Click to expand...
Click to collapse
thx man! i really want to give it a try!
and thx for showing some love to us a501 users nobody cares about us
To yaworski and FloatingFatMan:
Guys, thanks a lot for links! I'll try to build CM tonight
shchers said:
To yaworski and FloatingFatMan:
Guys, thanks a lot for links! I'll try to build CM tonight
Click to expand...
Click to collapse
What, that would be very nice, even though i own an A500! If you need an testing, I'll volunteer.
Taptalked u see
tosomax said:
thx man! i really want to give it a try!
and thx for showing some love to us a501 users nobody cares about us
Click to expand...
Click to collapse
See link in comment #1
Well, I guess I can forget about configuring ubuntu for now
cygwin never could get working.
Great job on compiling and getting the link up!
RapidShare.... not so rapid Probably getting flooded by all the 501 users
You 500 users go play with the 500 roms and stop sucking all the bandwidth!

script mistake HELP

what is the mistake. after install is mistake in aroma-config line 245
Code:
calibrate("1.1041","26","1.1616","16","yes");
ini_set("customkeycode_up", "115");
ini_set("customkeycode_down", "114");
ini_set("customkeycode_select", "231");
ini_set("customkeycode_menu", "139");
ini_set("customkeycode_back", "158");
setcolor("winbg", "#444");
setcolor("winbg_g", "#222");
setcolor("textbg", "#333");
setcolor("textfg", "#fff");
setcolor("textfg_gray", "#bbb");
setcolor("controlbg", "#444");
setcolor("controlbg_g", "#222");
setcolor("controlfg", "#fff");
setcolor("selectbg", "#653");
setcolor("selectbg_g", "#542");
setcolor("selectfg", "#ffd");
setcolor("titlebg", "#333");
setcolor("titlebg_g", "#000");
setcolor("titlefg", "#fff");
setcolor("navbg", "#333");
setcolor("navbg_g", "#222");
setcolor("border", "#666");
setcolor("border_g", "#444");
ini_set("rom_name", "Pixeldroid Navigation Install");
ini_set("rom_version", "copilot/iGO8");
ini_set("rom_author", "Pixelfreak");
ini_set("rom_device", "HTC HD2");
ini_set("rom_date", "July 2012");
splash(5000, "sample");
anisplash(5, "splash/a1", 30, "splash/a2", 30, "splash/a3", 30, "splash/a4", 30, "splash/a5", 30, "splash/a6", 30, "splash/a7", 30, "splash/a8", 30, "splash/a9", 30, "splash/a10", 30, "splash/a11", 30, "splash/a12", 30, "splash/a13", 30, "splash/a14", 30, "splash/a15", 30, "splash/a16", 30, "splash/a17", 30, "splash/a18", 30, "splash/a19", 30, "splash/a20", 30, "splash/a21", 30, "splash/a22", 30);
setvar("sdextsize", getdisksize("/sd-ext","m"));
fontresload( "0", "ttf/DroidSans.ttf;ttf/DroidSansArabic.ttf;ttf/DroidSansFallback.ttf;", "12" ); #-- Use sets of font (Font Family)
if prop("lang.prop","selected.0")=="1" then
loadlang("langs/en.lang");
fontresload( "0", "ttf/DroidSans.ttf", "12" ); #-- "0" = Small Font ( Look at Fonts & UNICODE Demo Below )
fontresload( "1", "ttf/DroidSans.ttf", "18" ); #-- "1" = Big Font
endif;
if prop("lang.prop","selected.0")=="2" then
loadlang("langs/de.lang");
fontresload( "0", "ttf/DroidSans.ttf", "12" );
fontresload( "1", "ttf/DroidSans.ttf", "18" );
endif;
selectbox(
#-- Title
"<~themes.title>",
#-- Sub Title
"<~themes.desc>",
#-- Icon: <AROMA Resource Dir>/icons/personalize.png or <ThemeDir>/icon.personalize.png
"@personalize",
#-- Will be saved in /tmp/aroma/theme.prop
"theme.prop",
"Generic", "<~uaromai>", 0, #-- selected.0 = 1
"MIUI Theme", "<~mtbmaz>", 0, #-- selected.0 = 2
"ICS Theme", "<~icsbdaz>", 1, #-- selected.0 = 3
"MIUI 4 Theme", "<~m4icstbazl>", 0, #-- selected.0 = 4
"Sense Theme", "<~htcstbaz>", 0 #-- selected.0 = 5
);
if prop("theme.prop","selected.0")=="2" then
theme("miui");
endif;
if prop("theme.prop","selected.0")=="3" then
theme("ics");
endif;
if prop("theme.prop","selected.0")=="4" then
theme("miui4");
endif;
if prop("theme.prop","selected.0")=="5" then
theme("sense");
endif;
#-- Show Textbox
textbox(
#-- Title
"<~ssi>",
#-- Subtitle
"<~csinfo>",
#-- Icon
"@info",
#-- Text
getvar("sysinfo")
);
selectbox(
"<~selectromsetup>",
"<~pleaseselectromsetupbelow>",
"icons/install",
"rom.prop",
"<~pleasepickyourrom>","",2,
"Tmous ROM Install",
"1024 MB",0,
"EU ROM Install",
"512 MB",1
);
checkbox(
"<~chooselastminuteaddons>",
"<~stoywi>",
"icons/apps",
"lastminute.prop",
"<~copilot>","<~copilotinfo>",0,
"<~igo>","<~igoinfo>",0
);
ini_set("text_next", "<~installnow>");
viewbox(
#-- Title
"<~rti>",
#-- Text
"<~twirtbi> \n\n"+
"<~press> <b><~installnow></b> <~romnameirti> \n\n"+
"<~iywtrocaoyisp><b><~back></b>. <~pmk> -> <~qitetw>",
#-- Icon
"@install"
);
ini_set("text_next", "<~nnext>");
restotmp("exec_demo/sleep","sleep");
setvar("retstatus",
install(
#-- Title
"<~installing>",
#-- Installation Process message
"<~pwwiwi><b>"+ini_get("rom_name")+
"</b>. <~tmtsm> <~pntc>",
#-- Installation Icon
"@install",
#-- Installation Finish Message
"<~tiwhsi><b>"+ini_get("rom_name")+
"</b>. <~pntc>"
)
);
ini_set("text_next", "<~finish>");
checkviewbox(
#-- Title
"<~installationcompleted>",
#-- Text
"<#selectbg_g><b><~congratulations></b></#>\n\n"+
"<b>"+ini_get("rom_name")+"</b><~hbioyd>\n\n"+
"<~installerstatus>"+getvar("retstatus")+"\n\n",
#-- Icon
"@welcome",
#-- Checkbox Text
"<~rydn>",
#-- Initial Checkbox value ( 0=unchecked, 1=checked ) - (Optional, default:0)
"1",
#-- Save checked value in variable "reboot_it" (Optional)
"reboot_it"
);
if
getvar("reboot_it")=="1"
then
reboot("disable");
endif;

[GUIDE][Noobs]How to Create your own stock based XPERIA ROM

Hey Guys,
My name is Braa, I’am just a new developer here in the XDA and today I’am going to show you a complete guide on how to make your own “XPERIA” Stock Based ROM.
First of all you have to get the Stock XPERIA Firmware of your device
Let’s get started to build our ROM:
First Step: (Getting the STOCK FTF File of your Device)
1) Get the latest stock FTF Firmware of your device
{
"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) Open it using 7-ZIP
3) Now we will be focusing on the most important file “system.sin” Just Extract it to your desktop
4)Now go to the XPERIA Flashtool  Tools  Sin Editor   Choose the system.sin file you have just extracted to your desktop Extract Data
5)Now you will have a file called “system.ext4”
6)Get a tool called “EXT4 Unpacker” then select that file  Extract all the files into a folder
Congrlatiouns you have got your stock device firmware but not in the form of “FTF” instead in the form of “ZIP”
But this was not everything we will now move into more advanced part but don’t panic everything will be explained easily with screenshots so, Let’s GO !
Understanding the System folder you have just extracted
System Folder Contains the Majority of ROM Files, now we have to explain the SYSTEM Folder structure
1. app : contain all the system's app and the odex file of system app
2. bin : contain the command and bin files for the rom
3. vendor: specified vendor system. you have your specific vendor's app, libs, and config files here also contains the Themes (XPERIA 2011-2012 Devices)
4. etc : additional setting and files for the ROM.
5. font : It’s Clear it contains the fonts
6. framework : system's framework files and the odex file for framework
7. lib : drivers, modules, kernel related files for the rom
8. media: media files-ringtones, notification, bootanimation.
10. usr : files needed for keyboard, bluetooth, etc.
11. xbin : additional command and bin files (busybox is usually installed here)
12. build.prop file : Contains your Device default properties
Q)DEODEX VS ODEX
A)Most of custom rom available is deodexed rom while our stock rom is half deodexed rom. I'll try to explain it in most simple way. First of all, we should understand that mostly every app in android consist of three part, *apk files, *dex/odex files, and lib files.
ODEXED rom means that *dex file needed to run the app is extracted from the apk file and placed in same folder with the apk files (/system/app). the positive side, it consume less internal memory and a execute faster. the negative side, it makes the app uncostumizable (cannot apply custom themes) and need more space in system partition.
DEODEXED rom means that *dex file needed to run the app is extracted from the apk file and placed in /data/dalvik-cache. the positive side, the app can be themed (full customizable) and consume less system partition. we could put more app in /system/app in deodexed rom. the negative side, it consume a lot of internal memory. please be cautious with the internal memory space if you use deodexed rom. (NOTE: if you start from stock rom, you may use Kitchen to convert odexed to deodexed rom).
Now if you want a really looking good Ui ROM u will stick into DeOdexing your ROM
Note: What was explained above in the part of ODEX VS DEODEX doesn’t mean that DeOdexing ROM will decrease it’s Performance
Q)How to DeOdex My ROM ?
A)Bro, This could be done using many tools like (Universal DeOdexer or DsiXda Kitchen)
Now I will explain the Dsixda kitchen method
Tools Needed:
Cygwin
JDK
Android Kitchen
Steps:
1)Extract Cygwin.zip  Run Setup.exe  Next  Install from local directory  Set the root directory as it  Set the local package directory as cygwin_packages  Select that reload icon and install all
2)Now Click on Cygwin icon on desktop you will see that commands appear automaticly
3)Now Extract the kitchen Android-Kitchen-0.224.zip then rename it to “kitchen” (without the quotations)
4)Then copy that folder into c:/Cygwin  home  your username folder
5)Open the cygwin and write these commnds
6)Cd kitchen  ./menu
7) Just compress the system folder we have just extracted from the ext4 unpacker into ZIP File
8)Now copy that file to C:\cygwin\home\Your username\kitchen\original_update
9)Open the cygwin  then write the kitchen commands I’ve mentioned above
10)Select “Set up working folder of your ROM”  Press Enter  Select the zip you compressed  It will ask you to add a null boot.img agree to this
11)Select the “Advanced Options”  Select De-Odex files in your ROM  Select “b” DeOdex both folders (Recommended) wait till the process finishes
Updater Script ! (Nightmare to a lot of noobs)
Sorry Guys I can’t help you with this part  even my updater-script in my ROM I forgot how I did it here is it you can base your updater-script on it
Just download it !
WE’VE Done this part !
Modifying your ROM
1)Adding Tweaks
1.1)Adding init.d Support
Adding init.d support means that you can run your favorite scripts and tweaks on your Stock Based ROM
Download the file “enable_init.d.zip” and put all its files inside system folder into your ROM System Folder
1.2)Modifying Build.Prop for more stability
Here’s a lot of Build.prop Tweaks
1. Force launcher into memory
ro.HOME_APP_ADJ=1
2. Raise JPG quality to 100%
ro.media.enc.jpeg.quality=100
3. VM Heapsize; higher RAM, higher hp can be
dalvik.vm.heapsize=48m
4. Render UI with GPU
debug.sf.hw=1
5. Decrease dialing out delay
ro.telephony.call_ring.delay=0
6. Helps scrolling responsiveness
windowsmgr.max_events_per_sec=150
7. Save battery
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
8. Disable debugging notify icon on statusbar
persist.adb.notify=0
9. Increase overall touch responsiveness
debug.performance.tuning=1
video.accelerate.hw=1
10. Raise photo and video recording quality
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
11. Signal (3G) tweaks
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
12. Net speed tweaks
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
13. Disable blackscreen issue after a call
ro.lge.proximity.delay=25
mot.proximity.delay=25
14. Fix some application issues
ro.kernel.android.checkjni=0
15. Phone will not wake up from hitting volume rocker
ro.config.hwfeature_wakeupkey=0
16. Force button lights on when screen is on
ro.mot.buttonlight.timeout=0
17. Disable boot animation for faster boot
debug.sf.nobootanimation=1
18. Miscellaneous flags
ro.config.hw_menu_unlockscreen=false
persist.sys.use_di ring=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
Q)How can I add these lines to my build.prop
A)I will tell you
Download a tool called “Notepad++”
Extract the build.prop file from your ROM then right click on it then edit with notepad++
Go to Last line:
Then add
# Tweak Name
Tweak Properties
#
Done
Here’s my build.prop I used in my ROM: its just a sample copy what you want from it
2)Bravia Engine 2 with X-Reality
Download the file of BE-2 then paste it in your ROM then add these lines to build.prop
# X-Reality Engine
ro.service.swiqi2.supported = true
persist.service.swiqi2.enable = 1
#
ro.service.swiqi3.supported = true
persist.service.swiqi3.enable = 1
#
3) Modifying the wallpapers of the ROM
Go to etc\customization\content\com\sonyericsson\wallpaperpicker\wallpapers
Then Add your Wallpapers
4) Modifying the Themes
system\vendor\overlay\framework
Themes are found here
In newer XPERIA Devices Themes are found in /app
5) Adding Supercharger intiries
Just add these lines to your build.prop
# V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox.
# DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!
# BEGIN OOM_MEM_Settings
ro.FOREGROUND_APP_MEM=1536
ro.VISIBLE_APP_MEM=3072
ro.PERCEPTIBLE_APP_MEM=4096
ro.HEAVY_WEIGHT_APP_MEM=20480
ro.SECONDARY_SERVER_MEM=8192
ro.BACKUP_APP_MEM=14080
ro.HOME_APP_MEM=1024
ro.HIDDEN_APP_MEM=10240
ro.EMPTY_APP_MEM=15360
# END OOM_MEM_Settings
# BEGIN OOM_ADJ_Settings
ro.FOREGROUND_APP_ADJ=0
ro.VISIBLE_APP_ADJ=3
ro.PERCEPTIBLE_APP_ADJ=3
ro.HEAVY_WEIGHT_APP_ADJ=5
ro.SECONDARY_SERVER_ADJ=7
ro.BACKUP_APP_ADJ=6
ro.HOME_APP_ADJ=1
ro.HIDDEN_APP_MIN_ADJ=12
ro.EMPTY_APP_ADJ=15
# END OOM_ADJ_Settings
# End of V6 SuperCharged Entries
6) Making your Apptray Transparent
Just Replace the apptray_pane_bg.9.png I provided to your Home.apk in store mode
7) Changing the bootanimation (HDPI)
XPERIA Z1
XPERIA Z2
8) Media not scanned or No pictures found here’s the solution
Download Rescan media root and put it in data folder of your ROM
If you are on 4.1.2 and HDPI Device (Maybe works on XHDPI or MDPI)
So my ROM “Doomsday” is open source for you, it contains full XPERIA Z2 Ui just take the download link from my signature then download it and take what you need from it but don’t forget to give me the proper credits and press thanks for me
Thread will be updated soon :laugh:
Downloads
My Personal ROM Updater-script
My Build.prop
[URL="http://d-h.st/j59"]Doomsday ROM[/URL]
EXT4 Unpacker
X-Reality and BE-2
apptray_pane_bg.9
XPERIA Z1 Bootanimation (HDPI)
XPERIA Z2 Bootanimation (HDPI)
Init.d Support
Why it says, Installation aborted.. I tried 3,4 times to make installation from custom rom. file... but unable to flash by using that rom the ROM.
Error shows this image in background.. (Can not make ScreenShot)
@Eliminator79 ho did you made a working custom rom from the above tutorial?
I have created 15-20 custom rom in different ways from different tutorials from xda, mostly it stops installation with an error. 4-5 times it started phone just for showing start animation ...
I quit....
Right now Installed stock rom back. after wasting 2 days..
Might be an updater-script
aatifaneeq said:
@Eliminator79 ho did you made a working custom rom from the above tutorial?
I have created 15-20 custom rom in different ways from different tutorials from xda, mostly it stops installation with an error. 4-5 times it started phone just for showing start animation ...
I quit....
Right now Installed stock rom back. after wasting 2 days..
Click to expand...
Click to collapse
Might be an updater-script problem
What's the error that comes during installation ?
Status 7 or Status 6 :good:
no status..
it just says
installation abort..
this time is says , aborted status (0)
View attachment 2893076
Here is the updater script code
Code:
show_progress(0.1, 0);
format("MTD", "system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/du");
set_perm_recursive(0, 0, 0755, 0644, "/system");
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_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_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
show_progress(0.1, 10);
show_progress(0.2, 0);
show_progress(0.2, 10);
unmount("/system");
Also replaced, updater script with yours 1, stil same error..
aatifaneeq said:
this time is says , aborted status (0)
View attachment 2893076
Here is the updater script code
Code:
show_progress(0.1, 0);
format("MTD", "system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/du");
set_perm_recursive(0, 0, 0755, 0644, "/system");
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_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_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
show_progress(0.1, 10);
show_progress(0.2, 0);
show_progress(0.2, 10);
unmount("/system");
Click to expand...
Click to collapse
you should set correct code partition in your update script
i mean this lines:
format("MTD", "system");
mount("MTD", "system", "/system");
you can find this lines in another custom roms which correct work on your phone.
just find this lines in that custom rom ( in meta inf folder in that custom rom ) then copy that lines and replace that in your update script
if your custom rom has a kernel , you should find the partition of kernel at the end of update script and replace in end of your update script
finally replace the update binary in that custom rom which correct work on your rom with your update binary.
do this work at the end of your work.means make your rom first then do this work with your rom.zip file
hope can help you
I have also used the working update script downloaded from Eliminator79's 2nd post... but still displaying same error..
Maybe works
aatifaneeq said:
I have also used the working update script downloaded from Eliminator79's 2nd post... but still displaying same error..
Click to expand...
Click to collapse
Replace the whole META-INF folder of your ROM with mine
Strongly will work :good:
Also did this too..also replaced with few other Xperia J roms, not worked. even replaced only apps folder. but in vain..
aatifaneeq said:
I have also used the working update script downloaded from Eliminator79's 2nd post... but still displaying same error..
Click to expand...
Click to collapse
NO bro
just used update binary from another rom which work correct on your phone
but about update script just edit 2 lines that i told you before
find it in update script for another custom rom for your phone and replace with your update script ( just 2 lines )
of course when you build your rom then do this
Thanks for the reply.
I already did this too. but it only shows boot animation , i have waited 10-12 minutes but nothing changed... same story all the time
aatifaneeq said:
Thanks for the reply.
I already did this too. but it only shows boot animation , i have waited 10-12 minutes but nothing changed... same story all the time
Click to expand...
Click to collapse
Give me the META-INF from your custom rom ( which you made it ) and META-INF from other custom roms which correct work on your phone
hamidreza2010 said:
Give me the META-INF from your custom rom ( which you made it ) and META-INF from other custom roms which correct work on your phone
Click to expand...
Click to collapse
Bro, thanks for the reply..
Here are both META-INF folders, both are not working when i replace (delete and paste all new files) system folder.
P.S. Installation only works when i modify app files from Doomsday ROM Jlo v5 ROM, But i also want to change all other system folders, not only app folder.
aatifaneeq said:
Bro, thanks for the reply..
Here are both META-INF folders, both are not working when i replace (delete and paste all new files) system folder.
P.S. Installation only works when i modify app files from Doomsday ROM Jlo v5 ROM, But i also want to change all other system folders, not only app folder.
Click to expand...
Click to collapse
ok just 2 thing:
1- Your roms has custom kernel ?
2- Give me META-INF folders from another normal custom rom not aroma
hamidreza2010 said:
ok just 2 thing:
1- Your roms has custom kernel ?
2- Give me META-INF folders from another normal custom rom not aroma
Click to expand...
Click to collapse
i do not have any other meta inf :|
Well, i found a rom, and using it as base, where i have replaced app, framework folder and installation worked and Phone is working fine.. But when i replace complete system directory, it stopped on boot screen..
about kernal, i am using stock kernal.sin
here is the meta inf that worked only with app/framework folder
thanks dude
Great TUT :highfive: :good: :victory:
Now I get my ROM installed ok
But BIGGEST PROBLEM I FACE! On Rebooting it stucks on splash screen and then it reboots! :'(
Check my updater script!
Help me someone please :'( Been working a lot but this sh*t doesn't resolves!
I use Xperia SP and this is my whole META-INF Folder
Thanks in advance. Anyone who can help me
Meta INF download below :
Tech N You said:
thanks dude
Great TUT :highfive: :good: :victory:
Now I get my ROM installed ok
But BIGGEST PROBLEM I FACE! On Rebooting it stucks on splash screen and then it reboots! :'(
Check my updater script!
Help me someone please :'( Been working a lot but this sh*t doesn't resolves!
I use Xperia SP and this is my whole META-INF Folder
Thanks in advance. Anyone who can help me
Meta INF download below :
Click to expand...
Click to collapse
Probably one of these
1)Framework issue (Both .jar & -res.apk)
2)Modified Wrongly Build.prop
3)Permissions are set wrongly
4)/lib problems
Just check and let me know

[One UI][A70] - Creator ROM ZIP

Creator ROM Galaxy A70:
This is a small project, ¡create a basic rom based on one ui for your A70 device!
this project is based on Dynamic Installer and SuperR custom zip, I am not responsible for damaged phones, install at your own risk.
FEATURES:
Spoiler: Features
Debloat
Custom CSC Features
Floating Features
Build.prop TWEAKS
Add apps or files to the system, vendor and product
Multidisabler
DFE
Fix bluetooth pairings loss
and more
Downloads:
Download: AndroidFileHost
ROM made with Creator ROM: Universal ROM A70q
ACTIONS:
use file: ROM ZIP/META-INF/com/google/android/updater-script:
ui print: This is what will be displayed on installation
Code:
ui_print(" ");
#Example
ui_print("Creator ROM ");
Files bin: Files to make the zip work (Creator ROM/ROM ZIP/install/bin/)
Code:
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
run_program("/tmp/install/bin/busybox", "sh", "/tmp/install/bin/configure.sh");
Mount:
Code:
#system
ifelse(is_mounted("/system"), "", mount("ext4", "EMMC", file_getprop("/tmp/config", "system"), "/system"));
#vendor
ifelse(is_mounted("/vendor"), "", mount("ext4", "EMMC", file_getprop("/tmp/config", "vendor"), "/vendor"));
#product
ifelse(is_mounted("/product"), "", mount("ext4", "EMMC", file_getprop("/tmp/config", "product"), "/product")
Unmount:
Code:
#system files
ifelse(is_mounted("/system"), unmount("/system"));
#vendor files
ifelse(is_mounted("/vendor"), unmount("/vendor"));
#product files
ifelse(is_mounted("/product"), unmount("/product"));
Extract files:
Code:
#system
package_extract_dir("system", "/system");
#vendor
package_extract_dir("vendor", "/vendor");
#product
package_extract_dir("product", "/product");
Permissions apps:
Code:
#app
set_metadata_recursive("/system/system/app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
#priv-app
set_metadata_recursive("/system/system/priv-app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
Change build number: DOO/META-INF/com/google/android/updater-script
Code:
#Find
update_file_string "ro.build.display.id=(ROM NAME) "
#Example
update_file_string "ro.build.display.id=A70 ROM v3 "
Debloat:
these files have effect on product (app and priv-app), system (app, priv-app and system_ext)
Find DOO/META-INF/addons/blacklist.txt:
There you write the name of the apk you want to delete or simply leave it empty, when it is empty all those that are not in whitelist.txt will be deleted like Chrome (Without .apk)
Find DOO/META-INF/addons/blacklist_packages.txt:
Here you write the name of the package of the app you want to delete example: com.android.chrome
Find DOO/META-INF/addons/whitelist.txt:
Here you write the name of all the apk that you do not want to delete like SystemUI (Without .apk)
Find DOO/META-INF/addons/whitelist_packages.txt:
In this file you write the name of all the application packages that you do not want to delete
Floating Features:
Find DOO/META-INF/addons/floating.txt
Add the new lines you want to add for the floating features
Prop TWEAKS:
system/build.prop
Find DOO/META-INF/addons/newprop.txt
I will write the new tweaks that you want to add to your build.prop
vendor/build.prop
Find DOO/META-INF/addons/newvprop.txt
I will write the new tweaks that you want to add to your build.prop
CSC Features:
Find DOO/omc/cscfeature.xml
I do not recommend editing this file but you can add your features here
Extract files:
In the following folders you can add the files that you want the zip to move when it is installed
ROM ZIP/product/
ROM ZIP/system/
ROM ZIP/vendor/
ZIP: Zip all DOO folders into one DOO.zip file (META-INF and omc) And move the DOO.zip file to ROM ZIP/DOO/
Notes:
All lines added to newprop.txt, floating.txt, etc, will be added to their respective files, if the line already exists it will be replaced
lines can be added as ro.config.tima=0 and it will be replaced by ro.config.tima=1
BTC: bc1qqtg3pgxkhm7egmh35qnsq8xmnjjte6zeyz8s30
Paypal: Paypal.me...
if you want to support the project
XDA: DevDB Information
Creator, ROM MOD ZIP for the Samsung Galaxy A70
Based On: ONE UI
Version Information
Status: Stable
Current Stable Version: 1
Stable Release Date: 2021-07-18
Nice!

Categories

Resources