打开蓝牙设置界面 adb shell am start -a android.settings.BLUETOOTH_SETTINGS 获取手机休眠时间 adb shell settings get system screen_off_timeout 更改手机休眠时间 adb shell settings put system screen_off_timeout 600000(10分钟) 获取系统默认输入法 adb shell settings get secure default_input_method 获取手机是否为自动亮度 adb shell settings get system screen_brightness_mode (0代表非自动,1代表为自动) 设置手机为自动调整亮度 adb shell settings put system screen_brightness_mode 1 获取手机当前亮度 adb shell settings get system screen_brightness 设置手机亮度(0-255) adb shell settings put system screen_brightness 350
定位操作
打开定位设置界面
得先打开设置APP,然后再执行下面的命令:
1
adb shell am start -a android.settings.LOCATION_SOURCE_SETTINGS
开启定位
1
adb shell settings put secure location_providers_allowed +gps
关闭定位
1
adb shell settings put secure location_providers_allowed -gps
查看定位方式 adb shell settings get secure location_providers_allowed (前提是位置信息开启) 拨打电话 adb shell am start -a android.intent.action.CALL tel:8888888888888
发送短信 adb shell am start -a android.intent.action.SENDTO -d sms:10086(发送目的号码) –es sms_body “hello”(短信内容) –ez exit_on_sent true
获取应用包名 adb shell dumpsys window windows | findstr mFocusedApp
清除应用数据与缓存: adb shell pm clear cn.com.test.mobile 启动应用: adb shell am start -n cn.com.test.mobile/.ui.SplashActivity 停止应用 adb shell am force-stop cn.com.test.mobile 飞行模式 adb shell settings set global airplane_mode_on (0==关闭,1==开启) 开启飞行模式 adb shell settings put global airplane_mode_on 1