Android10 替换launcher
在Android.mk中预编译launcher,主要添加LOCAL_OVERRIDES_PACKAGES
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := test_launcher
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE := platform
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep
include $(BUILD_PREBUILT)
然后在对应的board.mk中添加
PRODUCT_PACKAGES += test_launcher
同样地,只是内置APP时不用添加LOCAL_OVERRIDES_PACKAGES
即可