4.添加设备权限,在
/home/topeet/rk3399_7.1_industry/device/rockchip/rk3399/init.rk3399.rc 文件中添加如下内容,一定要在 on boot 下添加。
# bluetooth
# change back to bluetooth from system
chown bluetooth net_bt_stack /data/misc/bluetooth
mkdir /data/misc/bluedroid 0770 bluetooth net_bt_stack
# bluetooth LPM
chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
#UART device
chmod 0660 /dev/ttyS0
chown bluetooth net_bt_stack /dev/ttyS0
# rfkill
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
write /sys/class/rfkill/rfkill0/state 0
# bluetooth MAC address programming
chown bluetooth net_bt_stack ro.bt.bdaddr_path
chown bluetooth net_bt_stack /system/etc/bluetooth
chown bluetooth net_bt_stack /data/misc/bluetooth
# setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"
service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
disabled
oneshot
service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
disabled
oneshot
service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
disabled
oneshot
service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
disabled
oneshot
service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
disabled
oneshot
service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_bt-pan /system/bin/dhcpcd -n
class main
disabled
oneshot
#eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
service rtw_fwloader /system/bin/rtw_fwloader
class main
disabled
oneshot
service p2p_supplicant /system/bin/wpa_supplicant
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf
-e/data/misc/wifi/entropy.bin -N
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
-O/data/misc/wifi/sockets
-g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
-O/data/misc/wifi/sockets
-e/data/misc/wifi/entropy.bin
-g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot