Android 5.x OTA Update official documentation (VII. Building devices), androidota
Call the make_device () function in recovery_ui.cpp to create a Device instance, as shown below:
class TardisDevice : public Device { // ... all the above methods ...};Device* make_device() { return new TardisDevice();}
Compile recovery_ui.cpp
Next, we will introduce how to create a static database for recovery_ui.cpp through the previous introduction to recovery_ui.cpp.
Device/yoyodyne/tardis/recovery/Android. mk
LOCAL_PATH := $(call my-dir)include $(CLEAR_VARS)LOCAL_MODULE_TAGS := engLOCAL_C_INCLUDES += bootable/recoveryLOCAL_SRC_FILES := recovery_ui.cpp# should match TARGET_RECOVERY_UI_LIB set in BoardConfig.mkLOCAL_MODULE := librecovery_ui_tardisinclude $(BUILD_STATIC_LIBRARY)
Then, specify the TARGET_RECOVERY_UI_LIB value in the static library in the BoardConfig. mk file, as shown below:
device/yoyodyne/tardis/BoardConfig.mk [...]# device-specific extensions to the recovery UITARGET_RECOVERY_UI_LIB := librecovery_ui_tardis