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 ...

Get Android System Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.