We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4edc325 commit 6485e47Copy full SHA for 6485e47
src/main/kotlin/app/revanced/utils/adb/Adb.kt
@@ -17,7 +17,7 @@ internal class Adb(
17
private val device: JadbDevice
18
19
init {
20
- device = JadbConnection().devices.find { it.serial == deviceName }
+ device = JadbConnection().devices.let { device -> device.find { it.serial == deviceName } ?: device.first() }
21
?: throw IllegalArgumentException("No such device with name $deviceName")
22
23
if (!modeInstall && device.run("su -h", false) != 0)
0 commit comments