当多个手机同时连接电脑,adb 命令中如何进入指定设备
C:\Users\Administrator>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
fc2f9754 device
d51ad9ff device
//多台设备,是无法直接获取序列号的
C:\Users\Administrator>adb get-serialno
unknown
//多台设备,无法进入
C:\Users\Administrator>adb shell
error: more than one device and emulator
C:\Users\Administrator>adb devices
List of devices attached
fc2f9754 device
d51ad9ff device
//此时我们就可以指定序列号,进入
C:\Users\Administrator>adb -s d51ad9ff shell
shell@cancro:/ $
adb [-d|-e|-s ] 命令
当有一个模拟器和一个真实的手机连接的时候:
//进入模拟器 C:\Users\Administrator>adb -e shell
//进入手机 C:\Users\Administrator>adb -d shell