欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

Android 里的adb命令

程序员文章站 2022-06-22 09:14:06
ADB的全称为Android Debug Bridge,就是起到调试桥的作用。 adb调试手机需要把usb调试打开 Android studio模拟器有的也要把模拟器usb调试打开,工具要灵活运用, 常见命令: adb start-server :开启ADB服务 adb devices :列出所有设 ......

adb的全称为android debug bridge,就是起到调试桥的作用。

adb调试手机需要把usb调试打开

android studio模拟器有的也要把模拟器usb调试打开,工具要灵活运用,

常见命令:

  • adb start-server :开启adb服务
  • adb devices :列出所有设备
  • adb logcat :查看日志
  • adb kill-server :关闭adb服务
  • adb shell :挂载到linux的空间
  • adb install<应用程序(扩展名)> :安装应用程序
  • adb-s <模拟器名称>install<应用程序(扩展名> :安装程序到指定模拟器
  • adb uninstall<程序包名> :卸载指定应用程序
  • adb cemulator-avd<模拟器名称>:启动模拟器

android studio的adb位于sdk的platform-tools目录中,配置环境变量可在cmd里运行

//代码命令自己体验

c:\users\admin>adb start-server

c:\users\admin>adb devices
list of devices attached
emulator-5554 device


c:\users\admin>adb shell
generic_x86_64:/ $ exit

c:\users\admin>