adb的使用

1、adb连接模拟器

MuMu模拟器的配置文件是:MuMu\emulator\nemu\vms\myandrovm_vbox86\myandrovm_vbox86.nemu,

里面有adb连接时的IP和端口:<Forwarding name="ADB_PORT" proto="1" hostip="127.0.0.1" hostport="7555" guestport="5555"/>。

D:\Software\platform-tools>adb connect 127.0.0.1:7555

connected to 127.0.0.1:7555

D:\Software\platform-tools>adb devices

List of devices attached

127.0.0.1:7555  device

2、使用adb安装apk

D:\Software\platform-tools>adb install D:\apk\com.kingsoft_10.6_229.apk

Performing Push Install

D:\apk\com.kingsoft_10.6_229.apk: 1 fi.... 2.9 MB/s (42088567 bytes in 13.899s)

        pkg: /data/local/tmp/com.kingsoft_10.6_229.apk

Success

D:\Software\platform-tools>

3、使用adb关闭连接的模拟器

D:\Software\platform-tools>adb kill-server

D:\Software\platform-tools>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached


D:\Software\platform-tools>