Add the default path in the script file
[platform/core/connectivity/bluetooth-tools.git] / scripts / mobile / bt-reset-env.sh
1 #!/bin/sh
2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
3
4 # BT Stack and device stop
5 /usr/etc/bluetooth/bt-stack-down.sh
6
7 killall -9 hciattach
8
9 # Remove BT files and setting
10 rm -rf /opt/data/bluetooth/.bt_paired
11 rm -rf /var/lib/bluetooth/*
12
13 # Initialize BT vconf values
14 vconftool set -f -t  int db/bluetooth/lestatus "0" -g 6520
15 vconftool set -f -t int db/bluetooth/status "0" -g 6520
16 vconftool set -f -t int file/private/bt-service/flight_mode_deactivated "0" -g 6520
17 vconftool set -f -t string memory/bluetooth/sco_headset_name "" -g 6520
18 vconftool set -f -t int memory/bluetooth/device "0" -g 6520
19 vconftool set -f -t int file/private/libug-setting-bluetooth-efl/visibility_time "0" -g 6520
20 vconftool set -f -t bool memory/private/bluetooth-share/quickpanel_clear_btn_status FALSE -g 6520
21 vconftool set -f -t bool memory/private/bluetooth-share/opp_server_init FALSE -g 6520
22
23 # Remove BT shared memory
24 list=`ipcs -m | awk '$1==0x0001000 {print $2}'`
25 for i in $list
26 do
27         ipcrm -m $i
28 done
29 ipcs -m | grep "0x00001000" | awk '{ print $2 }'