Initialize Tizen 2.3
[framework/system/deviced.git] / scripts / set_usb_debug.sh
1 #!/bin/sh
2
3 case "$1" in
4
5 "--debug")
6         /usr/bin/vconftool set -t int db/usb/sel_mode "2" -f
7         /usr/bin/vconftool set -t bool db/setting/debug_mode "1" -f
8         /usr/bin/vconftool set -t int db/setting/lcd_backlight_normal "600" -f
9         echo "The backlight time of the display is set to 10 minutes"
10         /usr/bin/vconftool set -t bool db/setting/brightness_automatic "1" -f
11         echo "Brightness is set automatic"
12         ;;
13
14 "--mtp" | "--sshoff" | "--unset")
15         /usr/bin/vconftool set -t int db/usb/sel_mode "1" -f
16         /usr/bin/vconftool set -t bool db/setting/debug_mode "0" -f
17         ;;
18
19 "--mtp-sdb" | "--set")
20         /usr/bin/vconftool set -t int db/usb/sel_mode "2" -f
21         /usr/bin/vconftool set -t bool db/setting/debug_mode "1" -f
22         ;;
23
24 "--mtp-sdb-diag")
25         /usr/bin/vconftool set -t int db/usb/sel_mode "3" -f
26         /usr/bin/vconftool set -t bool db/setting/debug_mode "1" -f
27         ;;
28
29 "--rndis-tethering")
30         /usr/bin/vconftool set -t int db/usb/sel_mode "4" -f
31         ;;
32
33 "--rndis" | "--sshon")
34         /usr/bin/vconftool set -t int db/usb/sel_mode "5" -f
35         /usr/bin/vconftool set -t bool db/setting/debug_mode "0" -f
36         ;;
37
38 "--rndis-sdb")
39         /usr/bin/vconftool set -t int db/usb/sel_mode "6" -f
40         /usr/bin/vconftool set -t bool db/setting/debug_mode "1" -f
41         ;;
42
43 "--rndis-diag")
44         /usr/bin/vconftool set -t int db/usb/sel_mode "8" -f
45         /usr/bin/vconftool set -t bool db/setting/debug_mode "0" -f
46         ;;
47
48 "--help")
49         echo "set_usb_debug.sh: usage:"
50         echo "    --help           This message "
51         echo "    --set            Load Debug mode"
52         echo "    --unset          Unload Debug mode"
53         echo "    --debug          Load debug mode with 10 minutes backlight time"
54         echo "                     and automatic brightness"
55         echo "    --sshon          Load SSH mode"
56         echo "    --sshoff         Unload SSH mode"
57         echo "    --mtp            Load mtp only"
58         echo "    --mtp-sdb        Load mtp and sdb"
59         echo "    --mtp-sdb-diag   Load mtp, sdb, and diag"
60         echo "                     If diag is not supported, mtp is loaded"
61         echo "    --rndis          Load rndis only"
62         echo "    --rndis-diag     Load rndis and diag"
63         echo "                     If diag is not supported, mtp is loaded"
64         ;;
65
66 *)
67         echo "Wrong parameters. Please use option --help to check options "
68         ;;
69
70 esac