mirror of
https://github.com/revanced/jadb.git
synced 2024-08-08 06:52:02 +02: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 ##
|
## Example ##
|
||||||
Usage cannot be simpler. Just create a `JadbConnection` and off you go.
|
Usage cannot be simpler. Just create a `JadbConnection` and off you go.
|
||||||
|
|
||||||
JadbConnection jadb = new JadbConnection();
|
```java
|
||||||
List<JadbDevice> devices = jadb.getDevices();
|
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.
|
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.
|
It's very easy to send and receive files from your android device, for example as below.
|
||||||
|
|
||||||
JadbDevice device = ...
|
```java
|
||||||
device.pull(new RemoteFile("/path/to/file.txt"), new File("file.txt"));
|
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.
|
Some high level operations such as installing and uninstalling packages are also available.
|
||||||
|
|
||||||
JadbDevice device = ...
|
```java
|
||||||
new PackageManager(device).install(new File("/path/to/my.apk"));
|
JadbDevice device = ...
|
||||||
|
new PackageManager(device).install(new File("/path/to/my.apk"));
|
||||||
|
```
|
||||||
|
|
||||||
## Protocol Description ##
|
## Protocol Description ##
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user