mirror of
https://github.com/revanced/jadb.git
synced 2025-02-11 01:26:47 +01:00
Using java syntax highliter for code snippets.
This commit is contained in:
parent
86ccd4ab42
commit
c5197eab01
18
README.md
18
README.md
@ -12,20 +12,26 @@ 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();
|
||||
```java
|
||||
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"));
|
||||
```java
|
||||
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"));
|
||||
```java
|
||||
JadbDevice device = ...
|
||||
new PackageManager(device).install(new File("/path/to/my.apk"));
|
||||
```
|
||||
|
||||
## Protocol Description ##
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user