Maui Blazor 中文社区 QQ群:645660665

转发wsa和安卓模拟器网络

adb连接上设备后, 执行 执行端口转发 adb forward tcp:6789 tcp:888'就可以了, 把设备的8888端口转发到本机6789, 本机postman之类直接访问 127.0.0.1:6789即可

其他笔记:

  1. 连接wsa: adb connect 127.0.0.1:58526 连接安卓模拟器: adb connect emulator-5554
  2. 安装app adb -s 127.0.0.1:58526 install "C:\Users\alex\Documents\Tencent Files\239548611\FileRecv\result.apk" 其中 -s xxxx 写不写都行,连接多个设备才需要这个参数
  3. 进入shell wsa adb -s 127.0.0.1:58526 shell 安卓模拟器 adb -s emulator-5554 shell
  4. 执行端口转发 adb forward tcp:6789 tcp:888
  5. 列出设备 adb devices
  6. shell后查看安卓设备监听端口 netstat -a | grep -E 'LISTEN|udp*'
  7. shell后查看安卓设备ip ip addr show
  8. root安卓模拟器 adb root
  9. telnet模拟器 telnet emulator-5554 5554,
    会自动生成token 'C:\Users\用户名\.emulator_console_auth_token'
    授权连接 auth yos/aMKKtDaDRfz7
    转发端口 adb forward tcp:6789 tcp:8888
posted @ 2024-08-07 20:06  AlexChow  阅读(39)  评论(0编辑  收藏  举报