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

Unverified Commit 68ef8d62 authored by Simon Chan's avatar Simon Chan
Browse files

fix(adb): trim null character from reverse tunnel address

fix #642, fix #628
parent 5620716a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -286,7 +286,11 @@ export class AdbPacketDispatcher implements Closeable {

        const remoteId = packet.arg0;
        let availableWriteBytes = packet.arg1;
        const service = decodeUtf8(packet.payload);
        let service = decodeUtf8(packet.payload);
        // ADB Daemon still adds a null character to the service string
        if (service.endsWith("\0")) {
            service = service.substring(0, service.length - 1);
        }

        // Check remote delayed ack enablement is consistent with local
        if (this.options.initialDelayedAckBytes === 0) {