Breaking News
Loading...

[DEV TOOLS] AROMA Installer

09.21

Android has an advance system for installing OS and updates, unlike other mobile OS that distributed the contents of OS in static ROM image(s), Android distributing the OS and updates in a plain zip file that contains all packages files and the updater for processing the installation.

The updater split in 2 type, the binary (update-binary) and script (updater-script), while the binary was executable files, and the script was configuration script that controlling the binary executable what to install.

But this advance technology never expanded into it highest potential ability, the update-binary was simply the linux executable wrote in C that runs in root mode, and can do anything into your system, including accessing Display FrameBuffer, accessing key and touch screen, set vibrate, runs programs, parsing files, loading png(s) and zip, and also reading and writing filesystem.

Old update-binary only support few functions that can controlled only by updater-script for installing the files, and not even one function that allowed the installer to show interactive user interface for users to input something that can manipulating the installing process. There is some program called "yesno" that show Yes or No interface, but it wasn't even enough to create more customizable updater.
Now with AROMA Installer update-binary, all this limitation was gone, and this advance technology already expanded into the highest level of its pontential.

What is AROMA Installer
"AROMA" was taken from Bahasa Indonesia (Indonesian Language) and it's mean "Smells", but also abbreviation of "Amarullz ROM Manifest". It was advance update-binary for Android that contains many features like Wizard Installation, Touch User Interface (AROMA UI), Customizable Packages, System Inspecting, Themeable, and User Interactive. All release version will had "Smell Things" codename, example in 1st version it has codename "Anggrek" which mean "Orchid".

How AROMA Installer WorksHow can it works in recovery mode, and how can it so smooth in scrolling?It works because I hire Chuck Norris to force the recovery to runs the installer, and the phone is too afraid to show the lags scroll while it see him force the recovery to do what he ask.

No, Seriously, When user select the zip file to install it, the recovery will extract the update-binary and runs it with few arguments, all process and stuff was simply handled by update-binary, the recovery only show the information passed by update-binary via custom pipe. The great things is that update-binary can do anything if we can code it in C/C++, but not all people can easily playing with C/C++, and Its not effective and not fun at all to compiled it every time we need to change the process. That's why the custom script also used in AROMA Installer, it was simply edify script that used in normal updater-script but with expanded functions available.

It wasn't a simple thing to archive something like this, because the update-binary is simply the "linux executable" that doesn't even supported with dynamic links of libraries, not even supported basic drawing functions like drawrect, drawline, and don't expect it can included OpenGL in it's binary. It's runs on it's own. Even User Interface was wrote from scratch to manipulating directly into display framebuffer, user input was readed directly from raw of kernel input device, png and zip was readed with static link library, and the configuration was parsed in it's own program. It was result of one full month of developing, but you can use it in an instant learning without even need to know how to manage memory usage and pointers.

The AROMA Installer will read, parsing, and run the script commands to show it's UI's, Calculate partitions sizes, create-read and write temporary prop files, set & get variables, do simple integer comparisons and math sequences, do the if else or inline if conditions, configuring UI color scheme, configuring rom information, and many more.

Because it wasn't that simple and need a lot of time to developing it, did I worth to get some donations from my works?.

What UI's AROMA Installer Supported
AROMA Installer had 4 main type of Customizable User Interfaces, the Wizard UI, Dialog UI, Splash UI and Installer UI. And un-customizable Menu UI for selecting About, Help, Tools and Quit Installer.


Wizard UI
The Wizard UI was the main User Interface in AROMA Installer, it's contain Back and Next button in navigation bar just like Computer common Installer programs (Windows Installer, NSIS Install System, InstallShield). Users can navigate trough the screens, or back to previous screens if something not right in configurations. Users can select Typical or Customize installations, and Users can customize what packages to install.

AROMA Installer support many Wizard UI, and here the completed list of it's UI:
 
  1. checkbox – UI to show checkboxes in groupable list, the selected items will be saved in prop format, and can be accessed with file_getprop.
  2. selectbox – It's like checkbox, but it's only able to check 1 items per group.
  3. textbox – It will show the textbox, you can read text file to show it into the textbox
  4. viewbox – It's like Textbox, but not scrollable, and only supported limited text length
  5. agreebox – It's like Textbox, but with agree checkbox, user can't step to next page if the checkbox not already checked. Useful to show License or Terms of Use Interface.
  6. menubox – This UI will show list of menu to select, there is no Next button, because when User select the item, it will automatically step into next page. And The selected menu will be saved in temporary prop file.
Dialog UI
While Wizard UI will shown it's interface in Fullscreen, the Dialog UI will shown it's interface in Popup Window, It was useful for some needs, like show confirmation for "Are You Sure want to format the partitions?", or show Alert Dialog for "AROMA Installer was created by amarullz, please support him with some donation…". Here the complete list of Dialog UI in AROMA Installer:

  1. alert – Show popup dialog, with limited text length and Only the OK button.
  2. confirm – Show popup dialog, with limited text length and contains 2 customizable Button "Yes" and "No", with return value true for "Yes" and false for "No".
  3. textdialog – Show scrollable text popup dialog, with long text length support and Only OK Button.
Splash UI
This UI Simply show the Splash Screen from png files with custom delay before it show next page. The image will automatically position in center of screen depended from it's image size. The background will be blended in blur and darkest color.

Installer UI
When configuration invoke the install UI, it will start an installation, and show the installer UI with description text on top window, textbox for installer information in middle, and progress text and bar in bottom of screen. The installation will not cancelable, and there is no buttons or menu to select before installation finished, The Next and Save Logs button will be shown after installation finished. And next Wizard UI can't do Back command beyond this installer UI, so the Installer UI will only shown once time only in flash process.

What Functions AROMA Installer Supported
There is so many functions that you can used for your needs, The available functions was the common functions that may be usable for installations, but not supported very complex things. AROMA Installer support simple comparison, math, system partition information, and simple set and get variables.
Here the list of functions that you can used:
  1. setcolor – Set UI Color Scheme
  2. ini_set – Set Aroma Configuration settings
  3. calibrate – Calibrating Touch Screen
  4. getvar – Get Variable
  5. setvar – Set Variable
  6. appendvar – Append string into variable
  7. prependvar – Prepend string into variable
  8. file_getprop – Get prop value of some key from prop file.
  9. readfile – Read text file from zip content
  10. readfile_aroma – Read text file from zip content relatively from aroma META-INF folder.
  11. getdisksize – Get partition total size
  12. getdiskfree – Get partition free size
  13. getdiskusedpercent – Get partition used size in percentage
  14. cmp – Simple integer comparison ( >, <, ==, >=, <=, != )
  15. cal – Simple math calculator ( +, -, /, * )
  16. iif – Inline if
  17. if else – If and Else Statement
  18. pleasewait – Show please wait/loading progress when calculating/doing hard process that took a lot of time.
  19. writetmpfile – Write/create temporary file with text contents
  20. exit – terminate installation.
source : .amarullz.com

More info & Download visit

0 komentar:

Posting Komentar

 
Toggle Footer