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

Commit 8a0d0773 authored by Josh Gao's avatar Josh Gao
Browse files

adb: fix public key authorization.

This was broken by commit e8b663fe, which removed the null-terminator
from the message sent. For some reason, adbd requires the key to be
null terminated, despite an explicit length being part of the message.

Bug: http://b/30971808
Change-Id: I9761298a57ed76ca2bc02b05490f98cdffbaa0c3
Test: manually tested, adb authorization dialog box shows up
parent 2e671202
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -64,7 +64,9 @@ static void send_auth_publickey(atransport* t) {

    p->msg.command = A_AUTH;
    p->msg.arg0 = ADB_AUTH_RSAPUBLICKEY;
    p->msg.data_length = key.size();

    // adbd expects a null-terminated string.
    p->msg.data_length = key.size() + 1;
    send_packet(p, t);
}