在MTK Android O1平台预置apk为可卸载时。预置到旧的路径system/vendor/operator/app会编译报错,"You cannot install files to out/target/product/xxx/system/vendor while building a separate vendor.img!"改为预置到vendor/operator/app就可以编译通过,预置可卸载成功,恢复出厂设置可恢复。
旧的
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# Module name should match apk name to be installed
LOCAL_MODULE := Test
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
#LOCAL_PREBUILT_JNI_LIBS := \
#LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_PATH := $(TARGET_OUT)/vendor/operator/app
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)
修改LOCAL_MODULE_PATH为
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/operator/app
以上。