- Get adb server version
- Kill adb server
- Remount partition
- Enable/disable dm-verity checking on userdebug builds
- Fetch host features
- Check if mDNS discovery is available
- List all mDNS discovered services
Get adb server version
This request returns the adb server version specified in adb/adb.h
(e.g. here). It is useful for debugging incompatible versions of adb and also making sure your requests are supported by the adb server.
val version: Int = adb.execute(request = GetAdbServerVersionRequest())
Kill adb server
This request is equivalent to executing adb kill-server
:
adb.execute(request = KillAdbRequest())
Remount partition
Remount partitions read-write. If a reboot is required, autoReboot = true
will automatically reboot the device.
val output: String = adb.execute(request = RemountPartitionsRequest(autoReboot = false), "emulator-5554")
Enable/disable dm-verity checking on userdebug builds
val output: String = adb.execute(request = SetDmVerityCheckingRequest(false), "emulator-5554")
Fetch host features
val features: List<Feature> = adb.execute(request = FetchHostFeaturesRequest())
Check if mDNS discovery is available
mDNS is used for automatic discovery and connection of remote devices (for example with Android 11 ADB over WiFi)
val status: MdnsStatus = adb.execute(MdnsCheckRequest())
List all mDNS discovered services
val services: List<MdnsService> = adb.execute(ListMdnsServicesRequest())
data class MdnsService(
val name: String,
val serviceType: String,
val url: String
)