Windows下ADB命令使用

时间:2022-05-04 14:03:18
  1. adb devices //查找连接的设备

  2. adb install

  3. adb unstall //卸载apk
  4. adb push //复制文件到手机
  5. adb pull //复制手机文件到电脑
  6. adb reboot //重启设备
  7. adb shell //登陆设备
  8. adb shell am start -n [应用包名/启动页的的路径] //启动应用的某一页面
  9. adb shell pm list package设备下所有应用的包名应用的包名
C:\Users\AA>adb devices
List of devices attached
66Y6R16226001

C:\Users\AA>adb install C:\Users\AA\Desktop\hodi_colud\hoditenant.apk
adb server version (31) doesn't match this client (36); killing...
10...
10. daemon started successfully *
[100%] /data/local/tmp/hoditenant.apk
pkg: /data/local/tmp/hoditenant.apk
Success
C:\Users\AA>adb uninstall com.msqsoft.hodicloud
adb server version (31) doesn't match this client (36); killing...
* daemon started successfully *
Success
C:\Users\AA>adb push C:\Users\AA\Desktop\test.py sdcard/data
[100%] sdcard/data/test.py
C:\Users\AA>adb pull sdcard/data/test.py C:\Users\AA\Desktop
[100%] sdcard/data/test.py

>adb pull /storage/emulated/0/Pictures/Screenshots/Screenshot_2017-05-16-14-53-43.png E:\study
adb shell am start -n com.msqsoft.hodicloud/com.msqsoft.hodicloud.activity.WelcomeActivity
C:\Users\AA>adb shell pm list packages
package:com.qualcomm.timeservice
package:com.android.defcontainer
package:com.example.android.notepad
package:com.android.providers.partnerbookmarks
package:com.android.contacts
package:com.huawei.hwid
package:com.android.phone
package:com.android.calculator2
package:com.huawei.phoneservice