I want to disable the feature:android.hardware.bluetooth for android automotive emulator 11.
Version that I synced with repo: android-11.0.0_r3 Version that I lunch: aosp_car_x86_64-userdebug
Changed files to comment out the permissions:
car.mk
# frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
# frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
Commented the permission in:
car_core_hardware.xml
<!-- <feature name="android.hardware.bluetooth" /> -->
If I run the emulator and ask the packagemanager, it is still convinced Bluetooth feature is enabled:
pm list features
feature:android.hardware.bluetooth
feature:android.hardware.bluetooth_le
android.hardware.bluetooth.xml
may have slipped through some other.mk
file in your device build config (it may be copied to /etc/permissions multiple times). Try removing it from running device:For me, it removed
android.hardware.bluetooth_le
but notandroid.hardware.bluetooth
feature. The latter disappeared after editing the<target type>_core_hardware.xml
file you mentioned.After you verify if removing the xml files helps, you need to review all mk files your device might be using to track where it was copied (with
PRODUCT_COPY_FILES
). After each try, review the contents of your$OUT
directory (you may need to manually remove the xml file from output before the build, buildsystem doesn't always do it cleanly).