[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Tools\n\nIn virtualized systems, the device can have multiple VMs with each running its own ADB daemon.\nIn this case, the host VM can export an RNDIS Ethernet gadget, which can be used for the\nTCP/IP-based communications over the USB physical link. The development machine can then use\nADB over TCP/IP to access multiple VMs on the device. The ADB daemon on the host side can\nannounce the ADB presence on the guest VMs over mDNS by publishing ADB services.\nIn addition, the development machine can browse these services with ADB tool, which\nsupports mDNS device discovery (ADB version\n[31.0.2 or\nlater](https://developer.android.com/studio/releases/platform-tools#3102_april_2021)) to get the IP address and the port number on which adb daemon is listening and then\nconnect to the guest VMs.\n\nThe following commands can be used on the development machine to browse and connect to\nthe ADB services.\n\n 1. To enable mDNS discovery, run: Because ADB 31.0.2 disables mDNS discovery, you must enable mDNS discovery and then restart the ADB server. \n\n ```gdscript\n export ADB_MDNS_OPENSCREEN=1\n adb kill-server\n adb start-server\n ```\n2. To discover ADB services, run: \n\n ```scdoc\n adb mdns services\n\n List of discovered mdns services\n driver_vm\t_adb._tcp\t192.168.1.49:4444\n device_vm\t_adb._tcp\t192.168.1.49:3333\n ```\n3. To connect to the device, run: \n\n ```scdoc\n adb connect driver_vm._adb._tcp\n ```\n4. To list the connected devices, run: \n\n ```scdoc\n adb devices\n\n List of devices attached\n driver_vm._adb._tcp device\n ```"]]