0

I'm trying to uninstall default android car emulator app like Music,Radio,clock and calendar.i'm able to build and lunch the ANDROID CAR EMULATOR.(reference-http://www.embien.com/blog/building-android-car-emulator/)

my question is how to uninstall above mention default app form the android car emulator.

Vikash
  • 13
  • 4
  • Try 'make uninstall' inside the directory you run make. – wuseman Jul 12 '19 at 11:09
  • Hi Wuseman thanks your replay.Can you told me more details regarding this. should i run "make uninstall" cmd in AOSP after environment setup or particular module.i have also refereed these below links. https://stackoverflow.com/questions/19540017/removing-aosp-apps-from-build and https://stackoverflow.com/questions/29736503/how-to-build-aosp-app?rq=1. – Vikash Jul 15 '19 at 04:54

1 Answers1

0

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

Mixaz
  • 4,068
  • 1
  • 29
  • 55