android 集成 第三方应用,包。
在device,vendor,package下新建一个目录把.apk,.so文件放到这个目录中。然后编写Android.mk文件
LOCAL_PATH:= $(call my-dir)
APK_LOCAL_PATH := $(LOCAL_PATH)
APK_INSTALL_PATH := system/app
LIB_LOCAL_PATH := $(LOCAL_PATH)/libs
LIB_INSTALL_PATH := system/lib
#COPY APK
include $(CLEAR_VARS)
LOCAL_MODULE := FaceLock
LOCAL_MODULE_PATH := $(TARGET_OUT)/app/
LOCAL_SRC_FILES := FaceLock.apk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE:= PRESIGNED
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := libfacelock_jni.so
LOCAL_SRC_FILES := libfacelock_jni.so
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(BUILD_PREBUILT)
然后在你的项目的.mk文件中添加。
PRODUCT_PACKAGES := \
FaceLock \
libfacelock_jni.so
PRODUCT_COPY_FILES += vendor/xx/xx/facelock//addon.d/71-gapps-faceunlock.sh:
system/addon.d/71-gapps-faceunlock.sh