We create an instance of the device by calling the Make_device () function in recovery_ui.cpp , as follows:
Class Tardisdevice:public Device { //... all the above methods ...};D evice* Make_device () { return new TARDISDE Vice ();}
CompileRecovery_ui.cpp
we will introduce how to create a static library for Recovery_ui.cpp by the introduction of the previous article on 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)
We then specify the value of target_recovery_ui_lib in the Static library in the boardconfig.mk file , as follows:
Device/yoyodyne/tardis/boardconfig.mk [...] # device-specific extensions to the recovery uitarget_recovery_ui_lib: = Librecovery_ui_tardis
Android 5..x OTA Update Official document (vii, build device)