Skip to content

Commit 817cdd2

Browse files
committed
Use first user account on attached Android devices
Fixes wix#4396 This hardcodes the user ID of 0 when fetching the package list on Android, otherwise it will fail on devices that have multiple users (devices with the work profile or Samsung Secure Folder (Knox) enabled).
1 parent 8d057a4 commit 817cdd2

File tree

1 file changed

+1
-1
lines changed
  • detox/src/devices/common/drivers/android/exec

1 file changed

+1
-1
lines changed

detox/src/devices/common/drivers/android/exec/ADB.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class ADB {
100100
}
101101

102102
async isPackageInstalled(deviceId, packageId) {
103-
const output = await this.shell(deviceId, `pm list packages ${packageId}`);
103+
const output = await this.shell(deviceId, `pm list packages --user 0 ${packageId}`);
104104
const packageRegexp = new RegExp(`^package:${escape.inQuotedRegexp(packageId)}$`, 'm');
105105
const isInstalled = packageRegexp.test(output);
106106

0 commit comments

Comments
 (0)