Skip to content

Commit f90be14

Browse files
committed
Make Android isProbablyRooted work with adb root
1 parent aec631f commit f90be14

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/interceptors/android/adb-commands.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,7 @@ export async function pushFile(
246246
}
247247

248248
export async function isProbablyRooted(deviceClient: Adb.DeviceClient) {
249-
return run(deviceClient, ['command', '-v', 'su'], {
250-
timeout: 500,
251-
skipLogging: true
252-
})
253-
.then((result) => result.includes('/su'))
254-
.catch(() => false);
249+
return await getRootCommand(deviceClient) !== undefined;
255250
}
256251

257252
const runAsRootCommands = [

0 commit comments

Comments
 (0)