From f529626e9b7c5e3153ab9f80111ef0525c2262f9 Mon Sep 17 00:00:00 2001 From: Jon Reeve Date: Thu, 21 Mar 2019 17:55:14 +0000 Subject: [PATCH] Allow installApk to install a testOnly APK Just makes it a little more resilient, in the sense that if you built the APK from the IDE and haven't set testOnly="false" in the manifest, this will still successfully install it, which one would probably expect for an adb-commanding tool. Just ran into this with composer and found the install command here. --- android/src/main/kotlin/com/gojuno/commander/android/Adb.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/kotlin/com/gojuno/commander/android/Adb.kt b/android/src/main/kotlin/com/gojuno/commander/android/Adb.kt index 56eaa9c..180c448 100644 --- a/android/src/main/kotlin/com/gojuno/commander/android/Adb.kt +++ b/android/src/main/kotlin/com/gojuno/commander/android/Adb.kt @@ -83,7 +83,7 @@ fun AdbDevice.log(message: String) = com.gojuno.commander.os.log("[$id] $message fun AdbDevice.installApk(pathToApk: String, timeout: Pair = 2 to MINUTES): Observable { val adbDevice = this val installApk = process( - commandAndArgs = listOf(adb, "-s", adbDevice.id, "install", "-r", pathToApk), + commandAndArgs = listOf(adb, "-s", adbDevice.id, "install", "-t", "-r", pathToApk), unbufferedOutput = true, timeout = timeout )