mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-09-05 05:55:12 +02:00
feat: connect to first device if given device was not found
This commit is contained in:
parent
4edc325978
commit
6485e477a1
@ -17,7 +17,7 @@ internal class Adb(
|
||||
private val device: JadbDevice
|
||||
|
||||
init {
|
||||
device = JadbConnection().devices.find { it.serial == deviceName }
|
||||
device = JadbConnection().devices.let { device -> device.find { it.serial == deviceName } ?: device.first() }
|
||||
?: throw IllegalArgumentException("No such device with name $deviceName")
|
||||
|
||||
if (!modeInstall && device.run("su -h", false) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user