Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Add a third-party app on Android

10

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
10

Add a third-party app on Android

Posted at 12/10/2016 11:16:17      View:2796 | Replies:0        Print      Only Author   [Copy Link] 1#
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:
  1. LOCAL_PATH := $(my-dir)

  2. include $(CLEAR_VARS)
  3. LOCAL_MODULE := DLNARemoteService
  4. LOCAL_MODULE_CLASS := APPS
  5. LOCAL_MODULE_PATH := $(TARGET_OUT_APPS)
  6. LOCAL_SRC_FILES := $(LOCAL_MODULE)$(COMMON_ANDROID_PACKAGE_SUFFIX)
  7. LOCAL_CERTIFICATE := PRESIGNED
  8. LOCAL_MODULE_TAGS := optional
  9. LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
  10. include $(BUILD_PREBUILT)
Copy the code
Explanation:
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
  1. CUR_PATH := vendor/firefly/                                                                                                                                             

  2. # add remote for remoteservice
  3. PRODUCT_PACKAGES += \
  4.           DLNARemoteService

  5. PRODUCT_COPY_FILES +=$(CUR_PATH)/firefly_assistant/libtchip-vinit.so:system/lib/libtchip-vinit.s
Copy the code
Explanation:
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
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list