Skip to content

Java Client for Android Debug Bridge (ADB)

Notifications You must be signed in to change notification settings

junwuwei/jadb-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#JADB# ADB client implemented in Java. Idea of using TCP Sockets by Samuel Carlsson.

Now it's an interface (ADBService) which allow to get active devices, push/pull files, take screenshot in png/raw format, rotate screen, get device configuration and get files in remote directory.

Examples

ADBService adbService = new ADBServiceImpl();

List<String> udids = adbService.getConnectedDevicesUdid();
byte[] rawScreenshot = adbService.getScreenshot("deviceUdid", ADBScreenshotType.RAW);
Map configuration = adbService.getPropertiesForDevice("deviceUdid");
byte[] file = adbService.pullFile(deviceUdid, new ADBRemoteFile("/sdcard/testFile.txt"));
adbService.pushFile(deviceUdid, new File("pom.xml"), new ADBRemoteFile("/sdcard/pom.xml"));
adbService.sendKeys(deviceUdid, "testSendKeys via ADB");
List<ADBProcess> list = adbService.getProcessList(deviceUdid);

Make sure the adb server is running. You can start it by running adb start-server once from the command line.

About

Java Client for Android Debug Bridge (ADB)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages