JADB


Source link: https://github.com/vidstige/jadb

JADB

ADB client implemented in pure Java.

The Android Debug Bridge (ADB) is a client-server architecture used to communicate with Android devices (install APKs, debug apps, etc).

The Android SDK Tools are available for the major platforms (Mac, Windows & Linux) and include the adb command line tool which implements the ADB protocol.

This projects aims at providing an up to date implementation of the ADB protocol.

Example

Usage cannot be simpler. Just create a JadbConnection and off you go.

JadbConnection jadb = new JadbConnection();
 List<JadbDevice> devices = jadb.getDevices();

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

It's very easy to send and receive files from your android device, for example as below.

JadbDevice device = ... device.pull(new RemoteFile("/path/to/file.txt"), new File("file.txt"));

Some high level operations such as installing and uninstalling packages are also available.

JadbDevice device = ... new PackageManager(device).install(new File("/path/to/my.apk"));

Protocol Description

An overview of the protocol can be found here: Overview

A list of the available commands that a ADB Server may accept can be found here: Services

The description for the protocol for transfering files can be found here: SYNC.TXT.

Using JADB in your application

Since version v1.1 Jadb support maven as a build system. Although this project is not presented in official apache maven repositories this library can be used as dependencies in your maven/gradle project with the help of jitpack. Jitpack is a system which parses github public repositories and make artifacts from them. You only need to add jitpack as a repository to let maven/gradle to search for artifacts in it, like so

<repositories>
  <repository>

<id>jitpack.io</id>

<url>https://jitpack.io</url>
  </repository> </repositories> 

After that you will need to add actual dependency. Jitpack takes groupId, artifactId and version id from repository name, project name and tag ignoring actual values from pom.xml. So you need to write:

<dependency>
  <groupId>com.github.vidstige</groupId>
  <artifactId>jadb</artifactId>
  <version>v1.0.1</version> </dependency> 

Troubleshooting

If you cannot connect to your device check the following.

  • Your adb server is running by issuing adb start-server
  • You can see the device using adb adb devices

If you see the device in adb but not in jadb please file an issue on https://github.com/vidstige/jadb/.

Workaround for Unix Sockets Adb Server

Install socat and issue the following to forward port 5037 to the unix domain socket.

socat TCP-LISTEN:5037,reuseaddr,fork UNIX-CONNECT:/tmp/5037

Contributing

This project would not be where it is, if it where not for the helpful contributors supporting jadb with pull requests, issue reports, and great ideas. If you would like to contribute, please read through CONTRIBUTING.md.

Authors

Samuel Carlsson [email protected]

See contributors for a full list.

License

This project is released under the Apache License Version 2.0, see LICENSE.md for more information.

Resources

ViewPump installs a custom LayoutInflater via a ContextThemeWrapper and provides an API of pre/post-inflation interceptors.

Dynamic-animation is a new module introduced in revision 25.3.0 of the Android Support Library. It provides a small set of classes for making realistic physics-based view animations.

A FileBrowser / FileChooser for Android that you can integrate to your app to browse/select files from internal/external storage.

mastodon4j is mastodon client for Java and Kotlin.

An APK analysis tools.

Camera API in Android is hard. Having 2 different API for new and old Camera does not make things any easier. But this is your lucky day! After several years of working with Camera we came up with Fotoapparat.

What it provides:

  • Simple, yet powerful API for working with Camera.
  • Support of Camera1 as well as Camera2.
  • Last, but not least, non 0% test coverage.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes