Doc: About Edify
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 a firmware however. It can be used to do lots of different things, such as simply replace specific files or format entire partitions, depending on what instructions the script contains.
Note: Useless Trivia
The edify language is Google's replacement for the previous scripting language, which was called "Amend". True story.
Typically, the edify script is run in recovery mode when the user chooses to "flash a zip".
There are typically two parts to an edify script. These two files are usually found within the
.zip file in the
/META-INF/com/google/android directory. Note that both the script and the code that interprets the script are together within the
The files 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 script itself, 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. By looking at the scripts themselves, you may be able to figure out how they work. Then, by modifying the code right on the
.zip and flashing it to your device, you can test your custom scripts.
Read the edify source code
Because the source code to edify is open and available, anyone can view how the interpreter works, including proper syntax and available commands.
An overview of edify's syntax can be found in the README within the source.
There are a few online resources that discuss the edify language.
Even if you don't understand how to program, you can probably glean a lot of good info just by scanning the source code and even reading the comments.
Take a look at the following links. These may be out of date, however. So the source code 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 wiki page
- edify scripts in CWM recovery - an XDA thread discussing edify syntax
- Intro to edify-updater - another XDA thread about edify
- edify scripting creation - an XDA tutorial with syntax notes. Be sure to read about how to sign
.zips, if you're not familiar with it already (and if it's necessary)