Skip to content

Instantly share code, notes, and snippets.

@auxor
Last active May 6, 2022 15:10
Show Gist options
  • Save auxor/6e363e56eb1af430bfee8fe01916e4df to your computer and use it in GitHub Desktop.
Save auxor/6e363e56eb1af430bfee8fe01916e4df to your computer and use it in GitHub Desktop.
phony package to override packages
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
MY_OVERRIDE_PACKAGES := \
watchhome
LOCAL_MODULE := override_packages
LOCAL_MODULE_TAGS := optional
PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(MY_OVERRIDE_PACKAGES))
include $(BUILD_PHONY_PACKAGE)
@KonstantinRitt
Copy link

Hi.
Why MY_OVERRIDE_PACKAGES? Is there any difference between

MY_OVERRIDE_PACKAGES :=
watchhome
LOCAL_OVERRIDES_PACKAGES := $(strip $(MY_OVERRIDE_PACKAGES))

and

LOCAL_OVERRIDES_PACKAGES :=
watchhome

?

@auxor
Copy link
Author

auxor commented Jan 6, 2022

@KonstantinRitt, No difference. MY_OVERRIDE_PACKAGES is defined for more readable.

@KonstantinRitt
Copy link

Thanks for reply.
Anyways, this didn't work for me on kk.
After some investigations, I found a non-intrusive solution by adding

PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))

just before

include $(BUILD_PHONY_PACKAGE)

@auxor
Copy link
Author

auxor commented Feb 23, 2022

@KonstantinRitt I made a mistake. LOCAL_OVERRIDES_PACKAGES is not used by BUILD_PHONY_PACKAGE. I firstly post this in stackoverflow.

@markdegrootnl
Copy link

markdegrootnl commented May 6, 2022

Where would I place the Android.mk file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment