Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 077bf087 authored by Simon Chan's avatar Simon Chan
Browse files

fix(adb): support none protocol raw mode subprocess in Android 6

ref #405
parent eace5669
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -19,9 +19,9 @@ export class AdbSubprocessNoneProtocol implements AdbSubprocessProtocol {
    }

    public static async raw(adb: Adb, command: string) {
        // Native ADB client doesn't allow none protocol + raw mode,
        // But ADB daemon supports it.
        return new AdbSubprocessNoneProtocol(await adb.createSocket(`shell,raw:${command}`));
        // `shell,raw:${command}` also triggers raw mode,
        // But is not supported before Android 7.
        return new AdbSubprocessNoneProtocol(await adb.createSocket(`exec:${command}`));
    }

    private readonly socket: AdbSocket;