常用Adb 命令

复制代码
# 连接设备
adb connect 192.168.10.125

# 断开连接
adb disconnect 192.168.10.125

# 查看已连接的设备
adb devices

# 安装webview
adb install -r "D:\webview\com.google.android.webview_103.0.5060.129-506012903_minAPI23(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk"

# 切换webview
adb shell cmd webviewupdate set-webview-implementation com.google.android.webview
adb shell cmd webviewupdate set-webview-implementation com.android.webview

# 验证当前webview
adb shell settings get global webview_provider

# 重启
adb reboot


# 清除应用数据
adb shell pm clear <应用包名>

#启动设备上的shell会话:
adb shell

# 查看设备日志:
adb logcat
adb logcat -s <标签>   # 筛选日志信息


# 列出已安装的应用包
adb shell pm list packages
adb shell pm list packages -s  # 系统应用
adb shell pm list packages -3  # 用户安装的应用


adb shell am start {包名}/{启动activity}

adb logcat -c

adb logcat ActivityManager:I *:S

# 获取设备属性
adb shell getprop

# 启动特定活动
adb shell am start -n <包名>/<活动名>

# 停止应用
adb shell am force-stop com.jinggon.bi.tv

# 获取应用的进程ID (PID)
adb shell pidof com.jinggon.bi.tv

# 使用kill命令停止应用进程
adb shell kill 12345

# 模拟点击
input tap 1695 155
input tap 1695 155


等待加载网页内容
点击时间器使网页全屏


# 将分辨率设置为1920x1080
adb shell wm size 1920x1080

# 将DPI设置为480
# https://developer.android.google.cn/training/multiscreen/screendensities?hl=zh-cn
adb shell wm density 240

# 验证分辨率和DPI是否已更改:
adb shell wm size
adb shell wm density


# 打开设备的主设置界面
adb shell am start -a android.settings.SETTINGS

adb 环境变量配置

SDK 平台工具版本说明 | Android Studio | Android Developers

远程控制工具

GitHub - Genymobile/scrcpy: Display and control your Android device

相关推荐
暮云星影4 小时前
十二、buildroot系统 adb登录权限设置
linux·arm开发·adb
ou.cs5 小时前
c# 企业级ADB通信示例
开发语言·adb·c#
xunyan623411 小时前
adb devices报错 ADB server didn‘t ACK
adb
安得权17 小时前
Ubunut18.04 离线安装MySQL 5.7.35
数据库·mysql·adb
遇见火星3 天前
日常真实工作环境,Mysql常用操作命令,笔记!
android·mysql·adb·常用命令·mysql日志
Android 小码峰啊4 天前
Android Dagger 2 框架的注解模块深入剖析 (一)
android·adb·android studio·android-studio·androidx·android runtime
暗碳6 天前
adb检测不到原来的设备List of devices attached解决办法
adb
星尘库6 天前
数据库部署在服务器表不存在解决方案
adb
遥不可及zzz6 天前
Android 应用程序包的 adb 命令
android·adb