mirror of
https://github.com/revanced/jadb.git
synced 2025-02-05 15:07:33 +01:00
Allow multi-byte characters in payload
This commit is contained in:
parent
075f29dd82
commit
1519b31162
@ -19,8 +19,9 @@ public class SyncTransport {
|
||||
public void send(String syncCommand, String name) throws IOException {
|
||||
if (syncCommand.length() != 4) throw new IllegalArgumentException("sync commands must have length 4");
|
||||
output.writeBytes(syncCommand);
|
||||
output.writeInt(Integer.reverseBytes(name.length()));
|
||||
output.writeBytes(name);
|
||||
byte[] data = name.getBytes();
|
||||
output.writeInt(Integer.reverseBytes(data.length));
|
||||
output.write(data);
|
||||
}
|
||||
|
||||
public void sendStatus(String statusCode, int length) throws IOException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user