dadb icon indicating copy to clipboard operation
dadb copied to clipboard

Dadb.list throws IOException on unauthorized device (OFFLINE)?

Open mrenouf opened this issue 1 year ago • 1 comments

Exception in thread "main" java.io.IOException: Command failed (host:transport:131xxxxxxx19J): device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
	at dadb.adbserver.AdbServer.send$dadb(AdbServer.kt:99)
	at dadb.adbserver.AdbServerDadb.open(AdbServer.kt:137)
	at dadb.adbserver.AdbServerDadb.<init>(AdbServer.kt:128)
	at dadb.adbserver.AdbServer.createDadb(AdbServer.kt:52)
	at dadb.adbserver.AdbServer.listDadbs(AdbServer.kt:81)
	at dadb.adbserver.AdbServer.listDadbs$default(AdbServer.kt:60)
	at dadb.Dadb$Companion.list(Dadb.kt:244)
	at dadb.Dadb$Companion.list$default(Dadb.kt:243)
	at LogcatKt.list(Logcat.kt:36)

mrenouf avatar Apr 05 '23 16:04 mrenouf

When you first connect your target device, you must authorize your phone. Usually, a dialog will show on your target device, you need to click "Allow", then you will have permission to control your target device by ADB.

flyfishxu avatar Apr 24 '23 07:04 flyfishxu