adb 常用命令

  • 进入安卓shell

    adb shell
    
  • 查看系统位数

    adb shell cat /proc/cpuinfo
    
  • 重启

    adb reboot
    
  • 打开5555端口

    adb tcpip 5555
    
  • 电脑连接Android设备

    adb connect ip
    
  • 安装软件到安卓

    adb install packagename
    
  • 拉取安卓文件到本地

    adb pull android-path local-path
    
  • 推送本地文件到设备

    adb push local-path android-path 
    
  • 删除包

    adb shell pm clear package_name
    
  • 打印A印AndroidManifest.xml

    adb shell dumpsys activity top
    adb shell dumpsys package packagename
    adb install XXX.apk
    adb uninstall packagename
    
  • adb devices 不显示设备则重启adb,关闭/打开

    adb start-server
    adb kill-server
    
  • 安卓日志

    adb logcat
    adb logcat-s keyword
    
  • 进入模拟器

    adb -e shell
    
  • 进入真实环境

    adb -d shell
    
  • 查看连接的设备

    adb devices
    
  • 连接指定设备(8XV522228003052)为设备ID

    adb -s 8XV522228003052 shell
    
  • 给指定设备安装apk

    adb -s 8XV522228003052 install xxx.apk
    
原文地址:https://www.cnblogs.com/exlo/p/14677073.html