自学内容网 自学内容网

Android 在Android.bp或Android.mk文件移除原生内置应用

Android 在Android.bp或Android.mk文件移除原生内置应用
1.在SystemUI或者Launcher的Android.bp文件中配置overrides

android_app {
    name: "SystemUI",
    defaults: ["platform_app_defaults"],
    static_libs: [
        "SystemUI-core",
    ],
    resource_dirs: [],

    platform_apis: true,
    system_ext_specific: true,
    certificate: "platform",
    privileged: true,

    optimize: {
        proguard_flags_files: ["proguard.flags"],
    },

    libs: [
        "android.car",
        "android.car.userlib",
        "ims-common",
        "extphonelib",
    ],
    enforce_uses_libs: false,

    kotlincflags: ["-Xjvm-default=enable"],

    dxflags: ["--multi-dex"],
    required: [
        "privapp_whitelist_com.android.systemui",
    ],
overrides:[
"Calendar",
"Contacts",
"Dialer",
],
}

2.在SystemUI或者Launcher的Android.mk文件中配置LOCAL_OVERRIDES_PACKAGES属性
\frameworks\base\packages\SystemUI/Android.mk

LOCAL_OVERRIDES_PACKAGES := Calendar Contacts Dialer

原文地址:https://blog.csdn.net/qq_31939617/article/details/143976047

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!