Skip to content

adb command could be issued via socket #1

@newsham

Description

@newsham

The adb.rb file executes the external "adb" utility to communicate with ADB. This can be avoided if you talk directly to the ADB server running on the localhost (assuming you require it already be running). Connect to localhost:5037 via tcp. To send a command, send 4-hex bytes of message length followed by the message. It should be acknowledged with 4-byes "OKAY". To redirect commands to the ADB server on a target device, send the "host:transport:TARGET" command where target is the device you wish to bridge to. All further comms on the socket will be directed to the adb server on the target. To execute shell commands on the target, send the "shell:cmd line here" command. All further comms on the socket will be IO to the shell. To communicate with JDWP, issue the "JDWP:PID" command where PID is the PID you wish to communicate with. All further comms on the socket will be IO to JDWP.
I can provide example code in python if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions