客户给了一个内置他们自己apk的需求,定制到Rom里,我们需要在编译系统源码的时候配置好相关的文件即可将apk一起打包到ROM里面,下面我们就来一起打包apk到系统
首先需要在 device/mediatek/common/device.mk 配置如下语句
#apps PRODUCT_PACKAGES += \ BDDataPlan\ Facebook\ MultiLingBengaliPlugin\ Multilingkeyboard\ SHAREit\ Skype\ Viber\ WPSOffice\ WST_WAL_C
LOCAL_PATH := $(call my-dir) # include $(CLEAR_VARS) LOCAL_MODULE := BDDataPlan LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/thirdparty_apps LOCAL_SRC_FILES := $(LOCAL_MODULE).apk LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED include $(BUILD_PREBUILT) # include $(CLEAR_VARS) LOCAL_MODULE := Facebook LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/thirdparty_apps LOCAL_SRC_FILES := $(LOCAL_MODULE).apk LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED include $(BUILD_PREBUILT) # include $(CLEAR_VARS) LOCAL_MODULE := MultiLingBengaliPlugin LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/thirdparty_apps LOCAL_SRC_FILES := $(LOCAL_MODULE).apk LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED include $(BUILD_PREBUILT) # include $(CLEAR_VARS) LOCAL_MODULE := Multilingkeyboard LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := APPS #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/thirdparty_apps LOCAL_SRC_FILES := $(LOCAL_MODULE).apk LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED include $(BUILD_PREBUILT) # include $(CLEAR_VARS) LOCAL_MODULE := SHAREit LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/thirdparty_apps LOCAL_SRC_FILES := $(LOCAL_MODULE).apk LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED include $(BUILD_PREBUILT) # include $(CLEAR_VARS) LOCAL_MODULE := Skype LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/thirdparty_apps LOCAL_SRC_FILES := $(LOCAL_MODULE).apk LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED include $(BUILD_PREBUILT) # include $(CLEAR_VARS) LOCAL_MODULE := Viber LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/thirdparty_apps LOCAL_SRC_FILES := $(LOCAL_MODULE).apk LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED include $(BUILD_PREBUILT) # include $(CLEAR_VARS) LOCAL_MODULE := WPSOffice LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/thirdparty_apps LOCAL_SRC_FILES := $(LOCAL_MODULE).apk LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED include $(BUILD_PREBUILT) # include $(CLEAR_VARS) LOCAL_MODULE := WST_WAL_C LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app #LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/thirdparty_apps LOCAL_SRC_FILES := $(LOCAL_MODULE).apk LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := PRESIGNED include $(BUILD_PREBUILT)
No rule to make target `vendor/rmt/ThirdpartyApps/WST_WAL_C.apk', needed by `out/target/product/rmt8382_tb_l/obj/APPS/WST_WAL_C_intermediates/package.apk'. Stop