adb命名大全

  1. 获取内部版本号: adb shell getprop ro.build.display.innerver

  2. 获取按键值: adb shell getevent

  3. 获取apk信息: adb shell dumpsys package 包名 ->info.txt

  4. 获取应用包名:adb shell dumpsys window windows | grep mFocusedApp 或者 adb shell dumpsys window windows | findstr mFocusedApp

  5. 打开WiFi设置界面:adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings

  6. 打开热点设置界面:adb shell am start -n com.android.settings/.TetherSettings

  7. 查询蓝牙是否开启:

adb shell settings get global bluetooth_on 返回结果0代表关闭,1代表开启

adb shell dumpsys bluetooth_manager | findstr enabled 返回结果是true或者false,说明开启或关闭

  1. 查询WiFi是否开启:adb shell settings get global wifi_on 返回结果0代表关闭,1代表开启

  2. 查询蓝牙地址:adb shell settings get secure bluetooth_address

  3. 查询WiFi地址:adb shell cat /sys/class/net/wlan0/address

  4. 开启WiFi:adb shell svc wifi enable

  5. 关闭WiFi:adb shell svc wifi disable

  6. 打开蓝牙设置界面:adb shell am start -a android.settings.BLUETOOTH_SETTINGS

  7. 获取手机休眠时间:adb shell settings get system screen_off_timeout

  8. 更改手机休眠时间:adb shell settings put system screen_off_timeout 600000(10分钟)

  9. 获取系统默认输入法:adb shell settings get secure default_input_method

  10. 获取手机是否为自动亮度:adb shell settings get system screen_brightness_mode (0代表非自动,1代表为自动)

  11. 设置手机为自动调整亮度:adb shell settings put system screen_brightness_mode 1

  12. 获取手机当前亮度:adb shell settings get system screen_brightness

  13. 设置手机亮度(0-255):adb shell settings put system screen_brightness 350

  14. 打开定位设置界面:adb shell am start -a android.settings.LOCATION_SOURCE_SETTINGS

  15. 开启定位:adb shell settings put secure location_providers_allowed +gps

  16. 关闭定位:adb shell settings put secure location_providers_allowed -gps

  17. 查看定位方式:adb shell settings get secure location_providers_allowed (前提是位置信息开启)

  18. 拨打电话:adb shell am start -a android.intent.action.CALL tel:8888888888888

  19. 发送短信:adb shell am start -a android.intent.action.SENDTO -d sms:10086(发送目的号码) --es sms_body "hello"(短信内容) --ez exit_on_sent true

  20. 获取应用包名:adb shell dumpsys window windows | findstr mFocusedApp

  21. 清除应用数据与缓存: adb shell pm clear cn.com.test.mobile

  22. 启动应用: adb shell am start -n cn.com.test.mobile/.ui.SplashActivity

  23. 停止应用:adb shell am force-stop cn.com.test.mobile

  24. 飞行模式:adb shell settings set global airplane_mode_on (0==关闭,1==开启)

  25. 开启飞行模式:adb shell settings put global airplane_mode_on 1

  26. 手机震动测试(前提手机root):①adb shell ②echo '3000'>/sys/devices/virtual/timed_output/vibrator/enable

  27. 向上滑:adb shell input touchscreen swipe 930 880 930 380

  28. 向下滑:adb shell input touchscreen swipe 930 380 930 880

  29. 向右滑:adb shell input touchscreen swipe 330 880 930 880

  30. 向左滑:adb shell input touchscreen swipe 930 880 330 880

  31. 模拟鼠标点击操作:adb shell input mouse tap 100 500

  32. 长按:adb shell input swipe startX startY startX startY 500

  33. 滑动解锁:adb shell input swipe 300 1000 300 500

  34. 冷启动app:adb shell am start -W -n package/activity

  35. 热启动:①停止app: adb shell input keyevent 3 ②adb shell am start -W -n package/activity

  36. 查看内存占用情况:adb -s 设备号 shell top -m 进程数量 -n 数据的刷新次数 -s 按哪列进行排序 -d 刷新时间间隔(默认5秒)

  37. 切换手机电池为非充电状态: adb shell dumpsys battery set status 1

  38. 改变手机电量: adb shell dumpsys battery set level 58

  39. 获取当前电量:adb shell cat /sys/class/power_supply/battery/capacity

  40. 手机截屏:adb shell /system/bin/screencap -p /sdcard/screenshot.png

  41. 录制屏幕:adb shell screenrecord --time-limit 10 /sdcard/demo.mp4

  42. 获取手机型号:adb shell getprop ro.product.model

  43. 获取电池信息:adb shell dumpsys battery

  44. 获取屏幕分辨率:adb shell wm size

  45. 获取屏幕密度:adb shell wm density

  46. 显示屏参数:adb shell dumpsys window displays

  47. 获取手机IP地址:adb shell ifconfig | findstr Mask

  48. 查看WiFi局域网地址:adb shell ifconfig wlan0

  49. 显示区域位置:adb shell wm overscan 0,0,0,200 (四个数字分别表示距离左、上、右、下边缘的留白像素,以上命令表示将屏幕底部 200px 留白)

  50. 恢复原显示区域命令:adb shell wm overscan reset

  51. 获取USB调试模式:adb shell settings get global adb_enabled

  52. 关闭USB调试模式:adb shell settings put global adb_enabled 0

  53. 状态栏和导航栏的显示隐藏:

adb shell settings put global policy_control <key-values>

<key-values> 可由如下几种键及其对应的值组成,格式为 <key1>=<value1>:<key2>=<value2>。

immersive.full----------同时隐藏

immersive.status----------隐藏状态栏

immersive.navigation----------隐藏导航栏

immersive.preconfirms----------?

这些键对应的值可则如下值用逗号组合:

apps----------所有应用

*----------所有界面

packagename----------指定应用

-packagename----------排除指定应用

例如:

adb shell settings put global policy_control immersive.full=*

表示设置在所有界面下都同时隐藏状态栏和导航栏。

adb shell settings put global policy_control immersive.status=com.package1,com.package2:immersive.navigation=apps,-com.package3

表示设置在包名为 com.package1 和 com.package2 的应用里隐藏状态栏,在除了包名为 com.package3 的所有应用里隐藏导航栏。

  1. 打开网页: adb shell am start -a android.intent.action.VIEW -d http://www.baidu.com

  2. 查看通信日志 :adb logcat -b radio (常用于查看详细的通话状态)

  3. 获取界面控件:adb uiautomator dump

  4. 列出输入法:adb shell ime list -s

  5. 永不休眠:adb shell settings put system screen_off_timeout 2147483647

  6. 关闭\打开自动旋转:adb shell settings put system accelerometer_rotation 0\1

相关推荐
深念Y4 小时前
中兴微随身WiFi 板号UZ901_v1.6 影腾Y1新版本 增加SIM卡槽 开启ADB 去云控 改串号教程 下
数据库·adb
yantaohk4 小时前
【2025亲测】中兴B860AV3.2M完美刷机包ATV版本安卓9-解决1G运存BUG,开ADB已ROOT
android·嵌入式硬件·adb·云计算
远方之巅4 小时前
ADB调试工具与GLM-4.6V-Flash-WEB移动端集成实战
adb· glm-4.6v-flash-web· 多模态模型
爱技术的小伙子9 小时前
【 Docker 快速部署 MySQL 8.0(2026最新实践)—— 一键启动 + 数据持久化 + 常见优化】
mysql·adb·docker
橘子1310 小时前
MySQL表的内外连接(九)
数据库·mysql·adb
betazhou1 天前
mysql备份脚本
android·mysql·adb·数据库备份
卿着飞翔1 天前
ubuntu上的mysql远程连不上root
mysql·ubuntu·adb
小句2 天前
MySQL慢查询日志详细使用指南
数据库·mysql·adb
L1624762 天前
KeepAlived 搭建 MySQL 双主模式高可用集群(详细安装配置教程)
数据库·mysql·adb
L1624762 天前
基于 Xenon 实现 MySQL 高可用集群(完整配置教程,含监控告警 + 定时备份)
android·mysql·adb