adb forward --remove-all
adb tcpip 5555
提示
restarting in TCP mode port: 5555
==========xxxxxx
adb connect 192.168.3.221 后
提示
connected to 192.168.3.221:5555
==========xxxxxx
连上了
adb shell ps |grep “golden”
adb shell dumpsys meminfo 9593
adb shell dumpsys cpuinfo
若出现more than one device and emulator
输入adb devices,显示
List of devices attached
DG4064b7ac4408 device
emulator-5556 device
1.若想选择第一台设备操作,执行命令adb -s DG4064b7ac4408 shell,进入该设备操作
- 如不想进入设备shell模式,则执行 adb -s DG4064b7ac4408 指令(如 adb -s DG4064b7ac4408 shell input keyevent 3)
3.如果只有一个模拟器和一个手机连着电脑; 可以用adb -e 来指明是操作模拟器(Emulator); 可以用adb -d 来指明是操作设备(Device)
实战:
rex@iMac ~ % adb forward --remove-all
adb: error: more than one device/emulator
rex@iMac ~ % adb devices
List of devices attached
RZ8M530LDXK device
192.168.3.221:5555 device
rex@iMac ~ % adb devices
List of devices attached
RZ8M530LDXK device
192.168.3.221:5555 device
rex@iMac ~ % adb -s RZ8M530LDXK shell
a10:/ $
直接输入:dumpsys meminfo
简洁命令:
打印内存:
adb devices
adb -s RZ8M530LDXK shell
dumpsys meminfo
dumpsys meminfo com.slotslimited.fatcatcasino.android -d
具体文档:
https://developer.android.com/studio/command-line/dumpsys?hl=zh-cn#meminfo