Recovery V2 started from donut. Compared with recovery V1, it has made many changes. while enhancing the original functions, we try to isolate the parts that may be changed so that
Each vendor can add its own features, which are reflected in the UI and device functions. The changes from V1 to v2 are as follows:
1. The UI part is released to default_recovery_ui.c.
The modification on the interface can be changed here.
2. Switch the script parser from Amend to edify
Edify supports Simple logic syntax, script syntax is not compatible, do not be infatuated with recovery/etc/META-INF/COM/Google/Android/update-script, this script has
Not suitable for recovery V2.
3. script call Method
Previously, the script was called directly, and now it is called through the META-INF/COM/Google/Android/update-binary in an upgrade package
META-INF/COM/Google/Android/Updater-script, note that V1 script is Update-script, V2 is Updater-script. Update-binary is the recovery/Updater
, Updater can expand its own features. Different script names allow compatibility between V1 and V2.
4. Package signature method
V2 adds a signature for the entire package. The public key is integrated behind the upgrade package file and is compatible with the V1 signature method.
Tested the compatibility, including the V1 and V2 upgrade scripts, and the V2 Update-binary. The V2 upgrade package can still be correctly upgraded in V1.
This article introduces how to add a signature for the entire package in V2 and run the signapk. jar with the-W parameter.