File tree 1 file changed +3
-3
lines changed
src/main/kotlin/app/revanced/utils/adb
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ internal class Adb(
10
10
private val file : File ,
11
11
private val packageName : String ,
12
12
deviceName : String ,
13
- private val install : Boolean = false ,
13
+ private val modeInstall : Boolean = false ,
14
14
private val logging : Boolean = true
15
15
) {
16
16
private val device: JadbDevice
@@ -19,7 +19,7 @@ internal class Adb(
19
19
device = JadbConnection ().devices.find { it.serial == deviceName }
20
20
? : throw IllegalArgumentException (" No such device with name $deviceName " )
21
21
22
- if (device.run (" su -h" , false ) != 0 )
22
+ if (! modeInstall && device.run (" su -h" , false ) != 0 )
23
23
throw IllegalArgumentException (" Root required on $deviceName . Deploying failed." )
24
24
}
25
25
@@ -28,7 +28,7 @@ internal class Adb(
28
28
}
29
29
30
30
internal fun deploy () {
31
- if (install ) {
31
+ if (modeInstall ) {
32
32
PackageManager (device).install(file)
33
33
} else {
34
34
// push patched file
You can’t perform that action at this time.
0 commit comments