aboutsummaryrefslogtreecommitdiff
path: root/rootdir
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/bin/init.bt.sh8
-rw-r--r--rootdir/bin/init.wlan.sh4
-rw-r--r--rootdir/etc/init.qcom.rc8
3 files changed, 7 insertions, 13 deletions
diff --git a/rootdir/bin/init.bt.sh b/rootdir/bin/init.bt.sh
index 63ea643..ad4b03e 100644
--- a/rootdir/bin/init.bt.sh
+++ b/rootdir/bin/init.bt.sh
@@ -17,9 +17,11 @@
#
# Set the proper hardware based BT mac address
+bt_mac=$(xxd -p /proc/mac_bt | tr '[:lower:]' '[:upper:]' | sed 's/.\{2\}/&:/g' | sed 's/.$//');
bt_mac_path="/data/vendor/bluetooth/bdaddr"
-bt_mac=$(getprop sys.bt.address);
-if [[ ! -f $bt_mac_path ]] || [[ $(echo $bt_mac) != $(cat /data/vendor/bluetooth/bdaddr) ]]; then
+if [[ ! -f $bt_mac_path ]] || [[ $(echo $bt_mac) != $(cat $bt_mac_path) ]]; then
echo $bt_mac > $bt_mac_path
+ chmod 0644 $bt_mac_path
+ chown bluetooth $bt_mac_path
+ chgrp bluetooth $bt_mac_path
fi;
-setprop ro.vendor.bt.bdaddr_path $bt_mac_path
diff --git a/rootdir/bin/init.wlan.sh b/rootdir/bin/init.wlan.sh
index 36c0430..6036a75 100644
--- a/rootdir/bin/init.wlan.sh
+++ b/rootdir/bin/init.wlan.sh
@@ -17,8 +17,8 @@
#
# Set the proper hardware based wlan mac
-if [[ ! -f /persist/wlan_mac.bin ]] || [[ $(cat /persist/wlan_mac.bin | grep Intf0MacAddress | sed 's/Intf0MacAddress=//') != $(getprop sys.wifimac | sed 's/://g') ]]; then
- wifi_mac=$(getprop sys.wifimac | sed 's/://g');
+wifi_mac=$(xxd -p /proc/mac_wifi | tr '[:lower:]' '[:upper:]');
+if [[ ! -f /persist/wlan_mac.bin ]] || [[ $(cat /persist/wlan_mac.bin | grep Intf0MacAddress | sed 's/Intf0MacAddress=//') != $(echo $wifi_mac) ]]; then
echo "Intf0MacAddress=$wifi_mac
END" > /persist/wlan_mac.bin
fi;
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index b197f87..b21bb77 100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -573,13 +573,6 @@ service vendor.ppd /vendor/bin/mm-pp-dpps
disabled
writepid /dev/cpuset/system-background/tasks
-service wcg_mac_tool /vendor/bin/wcg_mac_tool
- class late_start
- group root
- user root
- disabled
- oneshot
-
service wlan-sh /vendor/bin/init.wlan.sh
class late_start
user root
@@ -595,7 +588,6 @@ service bt-sh /vendor/bin/init.bt.sh
oneshot
on property:sys.boot_completed=1
- start wcg_mac_tool
start wlan-sh
start bt-sh