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

A pretty and simple storage/directory chooser library for 4.4+ devices. This library was created to be included in OpenGApps App. There are too many storage chooser out there but this one is too materially :stuckouttongue: . Easy to implement and does not take a lot of your valueable time in setting-up all the other necessary things that every developer seeks, like

  • saving path to sharedPreference
  • event when path is selected and act upon that path
  • and much more.

A simple library to add indicators for your Carousel or ViewPagers.

Android AutocompleteTextView that receives and displays address suggestions from Smarty Streets.

A simple layout working as a switch on-off button.

The Universal Event Bus is an event dispatcher architecture which help you to use most common event bus implementation as Otto in a structured mode.

An events is a bus designed to separate different parts of the application, while still allowing them to communicate efficiently. The operation of the EventDispatcher is based on the publish-subscribe pattern: the bus asked a series of events that will be collected by those who joined them.

The publisher is, in this case, called Bus or RxBus and deals with post events using the Observable of RxJava. The event dispatcher contains two RxBuses: one dedicated to the UI thread, and the other for all the other events that have nothing to do with the UI (network calls, CRUD operations with the database etc.).

Change/add font of Entire Android Application at time with out wasting your time - TextViews, EditText, Buttons, Views, etc.

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