Stay organized with collections
Save and categorize content based on your preferences.
In virtualized systems, the device can have multiple VMs with each running its own ADB daemon.
In this case, the host VM can export an RNDIS Ethernet gadget, which can be used for the
TCP/IP-based communications over the USB physical link. The development machine can then use
ADB over TCP/IP to access multiple VMs on the device. The ADB daemon on the host side can
announce the ADB presence on the guest VMs over mDNS by publishing ADB services.
In addition, the development machine can browse these services with ADB tool, which
supports mDNS device discovery (ADB version
31.0.2 or
later) to get the IP address and the port number on which adb daemon is listening and then
connect to the guest VMs.
The following commands can be used on the development machine to browse and connect to
the ADB services.
adb mdns services
List of discovered mdns services
driver_vm _adb._tcp 192.168.1.49:4444
device_vm _adb._tcp 192.168.1.49:3333
To connect to the device, run:
adb connect driver_vm._adb._tcp
To list the connected devices, run:
adb devices
List of devices attached
driver_vm._adb._tcp device
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-08-28 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-08-28 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-28 UTC."]]