I see the car emulator is built as a regular target, so the same rules should apply.
If you need to remove a system app from a target, you need to remove its package name from .mk
files, which are sort of make files for AOSP. For example https://android.googlesource.com/device/generic/car/+/refs/tags/android-8.1.0_r65 which adds combos aosp_car_emu_x86-userdebug
etc (see vendorsetup.sh
there)
aosp_car_x86.mk
includes other files:
$(call inherit-product, device/generic/car/common/car.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_x86.mk)
common/car.mk
is the main file adding/enabling car-specific things. Most likely the apps are specified in PRODUCT_PACKAGES
, not in car.mk
but in some other .mk files included via product/aosp_x86.mk
- many levels of inclusions there, prepare to be patient.
As far as I know, there is no special feature in AOSP to exclude packages (only to include. there's a feature (I do not remember exactly) to specify in a module that it overrides some other modules (that you want to remove), but generally it may cause some other conflicts).
So you need to find package name to which the app belongs too, and remove it from .mk files (or use some bare/minimalistic target with inclusion of your own apps). Use mgrep
command to find where a package is included.
To find package name of an app, you need to find its .mk file, and it is not easy too. resgrep
or mangrep
may help. See https://elinux.org/Android_Build_System