标签:
我们通过调用recovery_ui.cpp中make_device()函数来创建一个Device的实例,如下:
class TardisDevice : public Device { // ... all the above methods ... }; Device* make_device() { return new TardisDevice(); }
再通过前一篇对recovery_ui.cpp的介绍我们来介绍一下如何为recovery_ui.cpp创建一个静态库。
Device/yoyodyne/tardis/recovery/Android.mk
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := eng LOCAL_C_INCLUDES += bootable/recovery LOCAL_SRC_FILES := recovery_ui.cpp # should match TARGET_RECOVERY_UI_LIB set in BoardConfig.mk LOCAL_MODULE := librecovery_ui_tardis include $(BUILD_STATIC_LIBRARY)
然后我们在BoardConfig.mk文件中指定静态库中TARGET_RECOVERY_UI_LIB的值,如下:
device/yoyodyne/tardis/BoardConfig.mk [...] # device-specific extensions to the recovery UI TARGET_RECOVERY_UI_LIB := librecovery_ui_tardis
Android 5..x OTA Update官方文档(七、构建设备)
标签:
原文地址:http://blog.csdn.net/huangyabin001/article/details/44886431