Extending recovery
The original AOSP recovery is written in C++ language. The implementation of key functionalities is encapsulated in two classes. In the documentation of AOSP, it is recommended to extend recovery to create your own classes by inheriting these two classes.
The first class that we will extend is class Device defined in $AOSP/ bootable/recovery/device.h and the second one is the ScreenRecoveryUI class defined in $AOSP/bootable/recovery/screen_ui.h. The ScreenRecoveryUI class is inherited from another class, RecoveryUI, which is used by recovery to perform user interaction functions. The AOSP recovery uses the polymorphism of C++ so that we can extend both the Device and RecoveryUI classes to let recovery use our version of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access