Skip to content

Commit 36a10af

Browse files
committed
Filter out no-permission ADB devices
1 parent 177e833 commit 36a10af

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/interceptors/android/adb-commands.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ export const getConnectedDevices = batchCalls(async (adbClient: adb.AdbClient) =
5454
try {
5555
const devices = await adbClient.listDevices();
5656
return devices
57-
.filter(d => d.type !== 'offline' && d.type !== 'unauthorized')
58-
.map(d => d.id);
57+
.filter(d =>
58+
d.type !== 'offline' &&
59+
d.type !== 'unauthorized' &&
60+
!d.type.startsWith("no permissions")
61+
).map(d => d.id);
5962
} catch (e) {
6063
if (
6164
e.code === 'ENOENT' || // No ADB available

0 commit comments

Comments
 (0)