Take the apk of firefly official SDKas an example to simply introduce how to add third-party applications. To find thisdirectory(vendor/firefly/firefly_assistant) in SDK, it should be the Fireflyofficial to add apk by their own, then use it as an example. Steps: 1、Create a directory under the vendor, such as: vendor/firefly/firefly_assistant 2、Put the apk and related library files into the directory, suchas: DLNARemoteService.apk libtchip-vinit.so 3、Create an Android.mk file: vendor/firefly/firefly_assistant/Android.mk The code: - LOCAL_PATH := $(my-dir)
- include $(CLEAR_VARS)
- LOCAL_MODULE := DLNARemoteService
- LOCAL_MODULE_CLASS := APPS
- LOCAL_MODULE_PATH := $(TARGET_OUT_APPS)
- LOCAL_SRC_FILES := $(LOCAL_MODULE)$(COMMON_ANDROID_PACKAGE_SUFFIX)
- LOCAL_CERTIFICATE := PRESIGNED
- LOCAL_MODULE_TAGS := optional
- LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
- include $(BUILD_PREBUILT)
Copy the codeExplanation: LOCAL_MODULE :=DLNARemoteService (The name of APK) LOCAL_MODULE_PATH :=$(TARGET_OUT_APPS) ( after compilation, apk in the directory (/ system / app /) )
4、Create a mk file, such as:vendor/firefly/firefly_assistant.mk - CUR_PATH := vendor/firefly/
- # add remote for remoteservice
- PRODUCT_PACKAGES += \
- DLNARemoteService
- PRODUCT_COPY_FILES +=$(CUR_PATH)/firefly_assistant/libtchip-vinit.so:system/lib/libtchip-vinit.s
Copy the codeExplanation: PRODUCT_PACKAGES followed by apk names PRODUCT_COPY_FILES followed by the path tothe library file 5. device/rockchip/rksdk/device.mk to add: includevendor/firefly/firefly_assistant.mk
The position aftercompilation: out/target/product/rk3288/system/app/DLNARemoteService.apk
|