欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

关于Android 8.1预置apk为可卸载的实例教程

程序员文章站 2023-03-28 07:53:12
在mtk android o1平台预置apk为可卸载时。预置到旧的路径system/vendor/operator/app会编译报错,"you cannot install files t...

在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

以上。