系统预装APK的方法
1. 在 android 系统中新建目录:
mkdir packages/apps/serialporttest
将需要预装的 apk(无需签名)拷贝到目录中以 serialporttest.apk 为例:
cp serialporttest.apk packages/apps/serialporttest
2. 在 packages/apps/serialporttest 新建 Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := serialporttest
LOCAL_SRC_FILES := serialporttest.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := .apk
LOCAL_BUILT_MODULE_STEM := package.apk
LOCAL_CERTIFICATE := platform
LOCAL_DEX_PREOPT := false
LOCAL_PRIVILEGED_MODULE := true
include $(BUILD_PREBUILT)
3.同时修改 device/rockchip/rk3399/device.mk 添加
PRODUCT_PACKAGES += \
serialporttest
4.重新编译镜像
文档更新时间: 2021-04-29 18:10 作者:Aeeditor