Skip to content

Radon8472/adbcontrol

Repository files navigation

ADB Control

This is a "fork" of a project by Marian Schedenig

Link to original source: http://marian.schedenig.name/2014/07/03/remote-control-your-android-phone-through-adb/

The tool does the following:

  • Repeatedly grab a screenshot from the phone and display it in a Window
  • Capture keyboard events and forward them to the phone
  • Capture mouse clicks and drags and forward them to the phone

Before you first start it, make sure you have adb installed and modify the config file.

Configuration options:

Config-Key Description
adbCommand the full path to the adb tool as a shell command. Linux users note that Java doesn’t like the ~ character in file paths to access the home directory.
screenshotDelay the delay (in milliseconds) between displaying a screenshot and grabbing the next one. Note that the actual grabbing process will probably take considerably longer than this delay, so the update rate will be slower.
localImageFilePath the location on local drive where screenshot file is stored
phoneImageFilePath the location on the phone where the screenshot file is stored before downloading it.

Once the configuration is done, simply run the tool like this:

java -jar adbcontrol.jar

In the window, you can single click to send a tap event or click-drag to send a swipe event to the phone. Pressing a number or letter key (or anything else that produces an ASCII character between 33 and 127) will send that key press to the phone. Additionally, the following keys are forwarded:

  • Enter
  • Escape – as the Back key on Android
  • Home
  • Backspace
  • Cursor keys