From 3a18052032c0b99e919ebbacad963d21d4e76542 Mon Sep 17 00:00:00 2001 From: Davide Garberi Date: Fri, 17 May 2019 19:16:39 +0200 Subject: msm8996-common: Update mac addresses paths * Switch to /persist for bt_mac to make so that it's kept even after a factory reset * Also update the path of wlan_mac.bin in wlan.sh to write to the real mount point instead of the bind one Change-Id: I250358484a8c8a8ef7f01941eea798c11d6ac4e7 --- rootdir/bin/init.bt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rootdir/bin/init.bt.sh') diff --git a/rootdir/bin/init.bt.sh b/rootdir/bin/init.bt.sh index 52d7f8f..b3281fa 100644 --- a/rootdir/bin/init.bt.sh +++ b/rootdir/bin/init.bt.sh @@ -18,7 +18,7 @@ # Set the proper hardware based BT mac address proc_bt="/proc/mac_bt" -bt_mac_path="/data/vendor/bluetooth/bdaddr" +bt_mac_path="/mnt/vendor/persist/bluetooth/bt_mac" if [[ $(xxd -p $proc_bt) == "000000000000" ]] || [[ $(xxd -p $proc_bt) == "666666666666" ]] || [[ ! -f $proc_bt ]]; then ran1=$(xxd -l 1 -p /dev/urandom) ran2=$(xxd -l 1 -p /dev/urandom) @@ -32,6 +32,6 @@ else bt_mac=$(xxd -p $proc_bt | tr '[:lower:]' '[:upper:]' | sed 's/.\{2\}/&:/g' | sed 's/.$//'); fi; -if [[ ! -f $bt_mac_path ]] || [[ $(cat $bt_mac_path) == "" ]] || [[ $(cat $bt_mac_path) == "000000000000" ]] || [ $(cat $bt_mac_path) == "666666666666" ]]; then +if [[ ! -f $bt_mac_path ]] || [[ $(cat $bt_mac_path) == "" ]] || [[ $(cat $bt_mac_path) == "000000000000" ]] || [[ $(cat $bt_mac_path) == "666666666666" ]]; then echo $bt_mac > $bt_mac_path fi; -- cgit v1.2.3