//命令行测试蓝牙 1. 命令行控制蓝牙开关 adb shell cd /data/data/com.android.providers.settings/databases sqlite3 settings.db select * from secure where name="bluetooth_on"; (查看是否打开) update secure set value=1 where name="bluetooth_on"; (这里的value=1是打开,0是关闭) select * from secure where name="bluetooth_on"; (确认是否更改成功) reboot <重启手机生效>
the follow commands to bring up bt through adb shell:
#echo 1 > /sys/class/rfkill/rfkill0/state
#hci_qcomm_init -vvv -e
#hciattach /dev/ttyHS0 qualcomm-ibs 3000000
#hciconfig hci0 up
#hcitool scan
The follow commands are used to enter test mode.
#bttest disable
#bttest enable
#bttest enable_dut_mode
//测试G-sensor root@android:/sys/devices/virtual/input/input3 # ls bandwidth calibrate capabilities enable event3 id modalias mode name phys poll_delay power properties range subsystem uevent uniq value root@android:/sys/devices/virtual/input/input3 # #echo 1 > enable #cat value
//测试M-sensor root@android:/sys/class/compass/akm8975 # ls accel asa bdata delay_acc delay_mag delay_ori dev enable_acc enable_mag enable_ori i2c mode power subsystem uevent root@android:/sys/class/compass/akm8975 # #echo 1 > enable_mag #cat bdate
# svc svc Available commands: help Show information about the subcommands power Control the power manager data Control mobile data connectivity wifi Control the Wi-Fi manager # svc power svc power Control the power manager usage: svc power stayon [true|false|usb|ac] Set the 'keep awake while plugged in'setting. //设置屏幕的常亮,true保持常亮,false不保持,usb当插入usb时常亮,ac当插入电源时常亮 # svc data svc data Control mobile data connectivity usage: svc data [enable|disable] Turn mobile data on or off. //设置移动网络的数据是否启用 svc data prefer Set mobile as the preferred data network //设置移动网络的数据优先于WIFI # svc wifi svc wifi Control the Wi-Fi manager usage: svc wifi [enable|disable] Turn Wi-Fi on or off.//设置WIFI是否启用 svc wifi prefer Set Wi-Fi as the preferred data network//设置WIFI优先于移动网络的数据,一般应设置成这样,除非你刻意使用移动网络数据传输</span>
svc power stayon [true|false|usb|ac] 这个是控制usb插入的时候屏幕是否常亮,这个有地方设置,就不多说了
svc data disable 这个命令可以关闭数据连接,就是上网流量,大家都知道控制上网的开关很多,但是大都是通过在apn上的接入点加后缀来实现的,但是这个命令不会更改apn的任何设置,直接在底层关闭数据连接。 应该是最彻底的,而且又不影响apn的设置。这个跟apndroid有什么区别,apndroid是在关闭上网数据的时候,已经在下载的连接可能不会被强制关闭(这个在apndroid自己的说明中也有提到)。比如你在下载一个10M的电影,下载了1M,不响下载了。用apndroid关闭连接,可能这个下载还会继续,不会马上停掉。但是用这个命令,绝对毫不留情的咔嚓掉。
svc data enable 这个是打开上网数据连接,跟上一个命令是相反的。
svc data prefer 这个命令是控制3g数据连接比wifi优先。我们都知道,正常情况下,有wifi的时候,不会用到3g连接。但是这个命令是相反,有3g的话先用3g流量,没有3g的时候采用wifi.我想大家不会这么傻吧,所以这个命令没什么用。