From 809721009380038a9ce02bc568d97403bbe498a2 Mon Sep 17 00:00:00 2001 From: Andre Eisenbach Date: Tue, 22 Nov 2016 14:18:55 -0800 Subject: [PATCH] Allow Bluetooth HAL to access /sys/class/rfkill Test: compiles; HAL can write rfkill state Change-Id: I5815a1f50ef8d09bf83541a6d2389b61bd007306 --- libcutils/fs_config.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcutils/fs_config.c b/libcutils/fs_config.c index 6155d1693..6fb52cc64 100644 --- a/libcutils/fs_config.c +++ b/libcutils/fs_config.c @@ -163,6 +163,10 @@ static const struct fs_path_config android_files[] = { CAP_MASK_LONG(CAP_NET_RAW), "system/bin/hw/android.hardware.wifi@1.0-service" }, + /* Support Bluetooth legacy hal accessing /sys/class/rfkill */ + { 00700, AID_BLUETOOTH, AID_BLUETOOTH, CAP_MASK_LONG(CAP_NET_ADMIN), + "system/bin/hw/android.hardware.bluetooth@1.0-service" }, + /* A non-privileged zygote that spawns isolated processes for web rendering. */ { 0750, AID_ROOT, AID_ROOT, CAP_MASK_LONG(CAP_SETUID) | CAP_MASK_LONG(CAP_SETGID) |