tizen 2.4 release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20151029.042204 submit/tizen_2.4/20151028.062356 tizen_2.4_mobile_release
authorjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 06:29:12 +0000 (15:29 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 06:29:12 +0000 (15:29 +0900)
packaging/bluetooth-tools.spec
scripts/CMakeLists.txt
scripts/bt-edutm-on.sh
scripts/bt-hci-logdump.sh
scripts/bt-run-hcidump.sh [new file with mode: 0755]
scripts/mobile/bt-reset-env.sh
scripts/mobile/bt-stack-down.sh
scripts/wearable/bt-reset-env.sh
scripts/wearable/bt-stack-down.sh

index 7a4bfe8..11b2303 100644 (file)
@@ -24,9 +24,11 @@ export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
 %cmake \
 %if "%{?tizen_profile_name}" == "wearable"
         -DTIZEN_WEARABLE=YES \
-%elseif "%{?tizen_profile_name}" == "mobile"
+%else
+%if "%{?tizen_profile_name}" == "mobile" || "%{?tizen_profile_name}" == "tv"
         -DTIZEN_WEARABLE=NO \
 %endif
+%endif
 
 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
 make %{?jobs:-j%jobs}
@@ -51,4 +53,5 @@ install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-tools
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-mode-on.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-hci-logdump.sh
+%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-run-hcidump.sh
 %{_datadir}/license/bluetooth-tools
index 1e81a47..dfa072d 100755 (executable)
@@ -16,3 +16,4 @@ INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-edutm-dev-up.sh DESTINATION etc/
 INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-edutm-mode-on.sh DESTINATION etc/bluetooth)
 INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-edutm-off.sh DESTINATION etc/bluetooth)
 INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-hci-logdump.sh DESTINATION etc/bluetooth)
+INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bt-run-hcidump.sh DESTINATION etc/bluetooth)
index 2d88453..799d4d0 100755 (executable)
@@ -5,7 +5,7 @@
 #
 
 HCIDUMP_ENABLE="true"  # Available values : true | false (default : false)
-HCIDUMP_DIR="/opt/usr/media/.bluetooth"
+HCIDUMP_DIR="/opt/usr/media/.bt_dump"
 HCIDUMP_FILENAME="bt_hcidump.log"
 HCIDUMP_PATH="${HCIDUMP_DIR}/${HCIDUMP_FILENAME}"
 LOGDUMP_DIR="/opt/etc/dump.d/module.d"
index 88e3deb..0b703b5 100755 (executable)
@@ -6,14 +6,14 @@
 
 BLUETOOTH_DEBUG=${1}/bluetooth
 PREV_PWD=${PWD}
-BT_DUMP_DIR=/opt/usr/media/.bluetooth
+BT_DUMP_DIR=/opt/usr/media/Others/.bt_dump
 
 if [ ! -e ${BT_DUMP_DIR} ]
 then
        exit 0
 fi
 
-mkdir -p ${BLUETOOTH_DEBUG}
+/bin/mkdir -p ${BLUETOOTH_DEBUG}
 
 cd ${BT_DUMP_DIR}
 /bin/tar -cvzf ${BLUETOOTH_DEBUG}/bt_dump.tar.gz *
diff --git a/scripts/bt-run-hcidump.sh b/scripts/bt-run-hcidump.sh
new file mode 100755 (executable)
index 0000000..276483c
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+HCIDUMP_BASEDIR="/opt/usr/media/Others"
+HCIDUMP_DIR="${HCIDUMP_BASEDIR}/.bt_dump"
+HCIDUMP_FILENAME="bt_hcidump.log"
+HCIDUMP_PATH="${HCIDUMP_DIR}/${HCIDUMP_FILENAME}"
+
+LOGDUMP_DIR="/opt/etc/dump.d/module.d"
+LOGDUMP_PATH="${LOGDUMP_DIR}/bt-hci-logdump.sh"
+
+debug_mode=`/bin/cat /sys/module/sec_debug/parameters/enable`
+debug_mode_user=`/bin/cat /sys/module/sec_debug/parameters/enable_user`
+
+if [ ${debug_mode} = '1' -o ${debug_mode_user} = '1' ]
+then
+       if [ -e /usr/sbin/hcidump ]
+       then
+               # When *#9900# is typed, this is executed to archive logs.
+               /bin/mkdir -p ${LOGDUMP_DIR}
+               /bin/cp -f /usr/etc/bluetooth/bt-hci-logdump.sh ${LOGDUMP_PATH}
+
+               # Create base directory as proper owner and smack rule
+               # if it doesn't exist
+               if [ ! -e ${HCIDUMP_BASEDIR} ]
+               then
+                       /bin/mkdir - p ${HCIDUMP_BASEDIR}
+                       /bin/chown 5000:5000 ${HCIDUMP_BASEDIR}
+                       /usr/bin/chsmack -t -a 'system::media' ${HCIDUMP_BASEDIR}
+               fi
+               /bin/mkdir -p ${HCIDUMP_DIR}/old_hcidump
+               /bin/rm -f ${HCIDUMP_DIR}/old_hcidump/*
+               /bin/mv ${HCIDUMP_PATH}* ${HCIDUMP_DIR}/old_hcidump/
+               /usr/sbin/hcidump -w ${HCIDUMP_PATH} &
+       fi
+elif [ -e ${HCIDUMP_DIR} ]
+then
+       /bin/rm -rf ${HCIDUMP_DIR}
+fi
index 535aa35..8ac9481 100755 (executable)
@@ -11,13 +11,13 @@ rm -rf /var/lib/bluetooth/*
 
 # Initialize BT vconf values
 vconftool set -tf int db/bluetooth/status "0" -g 6520
+vconftool set -tf int db/bluetooth/lestatus "0" -g 6520
 vconftool set -tf int file/private/bt-core/flight_mode_deactivated "0" -g 6520 -i
 vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 6520 -i
 vconftool set -tf int memory/bluetooth/device "0" -g 6520 -i
-vconftool set -tf int memory/bluetooth/btsco "0" -g 6520 -i
 vconftool set -tf int file/private/libug-setting-bluetooth-efl/visibility_time "0" -g 6520
-vconftool set -tf bool memory/private/bluetooth-share/quickpanel_clear_btn_status FALSE -g 6520 -i
-vconftool set -tf bool memory/private/bluetooth-share/opp_server_init FALSE -g 6520 -i
+#vconftool set -tf bool memory/private/bluetooth-share/quickpanel_clear_btn_status FALSE -g 6520 -i
+#vconftool set -tf bool memory/private/bluetooth-share/opp_server_init FALSE -g 6520 -i
 
 # Remove BT shared memory
 list=`ipcs -m | awk '$1==0x0001000 {print $2}'`
index 322241a..1e9c0d3 100755 (executable)
@@ -4,17 +4,24 @@
 # Script for stopping Bluetooth stack
 #
 
+PGREP="/usr/bin/pgrep"
+
 # Remove BT device
 /usr/etc/bluetooth/bt-dev-end.sh
 
 # Kill BlueZ bluetooth stack
-killall obexd obex-client
-killall bt-syspopup
-killall bluetooth-share
-killall bluetooth-pb-agent
-killall bluetooth-map-agent
-killall bluetooth-hfp-agent
-killall bluetoothd
+pid=`${PGREP} obexd`
+kill $pid
+pid=`${PGREP} bt-syspopup`
+kill $pid
+pid=`${PGREP} bluetooth-pb`
+kill $pid
+pid=`${PGREP} bluetooth-map`
+kill $pid
+pid=`${PGREP} bluetooth-ag`
+kill $pid
+pid=`${PGREP} bluetoothd`
+kill $pid
 
 # result
 exit 0
index 535aa35..859e4dc 100755 (executable)
@@ -14,7 +14,6 @@ vconftool set -tf int db/bluetooth/status "0" -g 6520
 vconftool set -tf int file/private/bt-core/flight_mode_deactivated "0" -g 6520 -i
 vconftool set -tf string memory/bluetooth/sco_headset_name "" -g 6520 -i
 vconftool set -tf int memory/bluetooth/device "0" -g 6520 -i
-vconftool set -tf int memory/bluetooth/btsco "0" -g 6520 -i
 vconftool set -tf int file/private/libug-setting-bluetooth-efl/visibility_time "0" -g 6520
 vconftool set -tf bool memory/private/bluetooth-share/quickpanel_clear_btn_status FALSE -g 6520 -i
 vconftool set -tf bool memory/private/bluetooth-share/opp_server_init FALSE -g 6520 -i
index a1ca153..9423662 100755 (executable)
@@ -4,18 +4,20 @@
 # Script for stopping Bluetooth stack
 #
 
+PGREP="/usr/bin/pgrep"
+
 # Remove BT device
 /usr/etc/bluetooth/bt-dev-end.sh
 
 # Kill BlueZ bluetooth stack
-killall bluetooth
-killall obexd obex-client
-killall bluetooth-share
-killall bluetooth-pb-agent
-killall bluetooth-map-agent
-killall bluetooth-hfp-agent
-killall bluetooth-hf-agent
-killall bluetoothd
+pid=`${PGREP} bt-syspopup`
+kill $pid
+pid=`${PGREP} bluetooth-hf`
+kill $pid
+pid=`${PGREP} bluetooth-ag`
+kill $pid
+pid=`${PGREP} bluetoothd`
+kill $pid
 
 # result
 exit 0