on boot insmod /system/vendor/modules/rtl_btlpm.ko # change back to bluetooth from system chown bluetooth net_bt_admin /data/misc/bluetooth mkdir /data/misc/bluedroid 0770 bluetooth net_bt_admin # bluetooth LPM chown bluetooth net_bt_admin /proc/bluetooth/sleep/lpm chown bluetooth net_bt_admin /proc/bluetooth/sleep/btwrite chmod 0660 /proc/bluetooth/sleep/lpm # rfkill chmod 0660 /sys/class/rfkill/rfkill0/state chmod 0660 /sys/class/rfkill/rfkill0/type chown bluetooth net_bt_admin /sys/class/rfkill/rfkill0/state chown bluetooth net_bt_admin /sys/class/rfkill/rfkill0/type write /sys/class/rfkill/rfkill0/state 0 # bluetooth MAC address programming chown bluetooth net_bt_admin ro.bt.bdaddr_path chown bluetooth net_bt_admin /system/etc/bluetooth chown bluetooth net_bt_admin /data/misc/bluetooth setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr" # to observe dnsmasq.leases file for dhcp information of soft ap. chown dhcp system /data/misc/dhcp # 1. realtek & eagle wifi service service wpa_supplicant /system/vendor/bin/hw/wpa_supplicant \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -I/vendor/etc/wifi/p2p_supplicant_overlay.conf \ -e/data/misc/wifi/entropy.bin -N \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -I/vendor/etc/wifi/wpa_supplicant_overlay.conf \ -O/data/misc/wifi/sockets \ -g@android:wpa_wlan0 socket wpa_wlan0 dgram 660 wifi wifi class main disabled oneshot on property:sys.boot_completed=1 setprop persist.bluetooth.rtkcoex true on property:sys.boot_completed=0 setprop persist.bluetooth.rtkcoex false