What is “edify”?
edify is a simple scripting language that is used to install CyanogenMod and other software from a
.zip file. The edify script does not necessarily need to be used to flash firmware. It can be used to replace/add/delete specific files, or even format partitions. Typically, an edify script is run in recovery mode when the user chooses to “flash a zip”.
The edify language is Google’s replacement of another scripting language, called “Amend”. True story.
There are two primary files for edify. These files are found within the
.zip file in the
META-INF/com/google/android directory. They are:
update-binary— the binary interpreter that is executed when the user selects the
.zipto be flashed, typically from recovery mode. This binary loads the updater-script into memory and follows the instructions contained within.
updater-script— the installation script, which is a text file.
Learning edify syntax
Play with existing scripts
One way to learn about edify is by examining and modifying existing edify scripts. Unpack a flashable
.zip file and pay attention to the directory structure. Examine the script in
META-INF/com/google/android; you should be able to figure out it works. Then, try your hand at creating a very minimal installation package, for instance something that installs a small text file to
/data/local/tmp/ and test it on your device.
Read the edify source code
Because the source code to edify is open and available, anyone can view how the interpreter works. This gives you a clear understanding of the proper syntax and available commands.
An overview of edify’s syntax can be found in the README within the source.
Even if you don’t understand how to program, you can probably glean a lot of good information by scanning the source code and reading the comments in the code.
There are a few online resources that discuss the edify language. These may be out of date, however. So the source code (discussed above) should be the final authority about which commands are available to you, and how to use them.
- Intro to edify – Free Your Android’s introduction to the edify scripting language
- XDA’s edify wiki
- edify scripts in CWM recovery – an XDA thread discussing edify syntax
- Intro to edify-updater – another XDA thread about edify
- edify script creation – an XDA tutorial with syntax notes. Be sure to read about how to sign
Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.