• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

adevice_proto/15-Dec-2024-139

integration_tests/15-Dec-2024-10249

src/15-Dec-2024-4,2213,204

tests/15-Dec-2024-452345

Android.bpD15-Dec-20243.4 KiB151140

Cargo.tomlD15-Dec-20241.8 KiB

OWNERSD15-Dec-202426 21

README.mdD15-Dec-20242.2 KiB4527

TEST_MAPPINGD15-Dec-2024310 2221

adevice_integration_test.shD15-Dec-20242.6 KiB8945

rustfmt.tomlD14-Jan-202493

README.md

1# Description
2
3Adevice is a command-line tool that enables Android Platform developers to update their device with their locally built artifacts. The tool provides two major functions:
4
5* __Synchronizing files from the build output to the device.__ This includes pushing files to the device, cleaning stale on-device files, and providing guidance about conditions that could lead to a non-functional device.
6* __Running post-sync actions to put the device in a consistent working state.__ These actions are based on the files that have changed and range from doing nothing to rebooting the device.
7
8Conceptually `adevice` tries to align the filesystem structure of the updated device to be similar to what a flash would have produced.
9
10`Adevice` is similar to `adb sync` in that it updates the device with files from the build staging directory but has several other differences:
11
12* `Adevice` has the notion of an _Update Set_ that limits what is pushed. This concept also enables a host of other features such as determining stale files and cleaning them.
13* `Adevice` tracks content rather than timestamps to determine changed files. This limits the number of files that get pushed to the device.
14
15Note that `adevice` does not:
16
17* Install APKs or APEX's to the device. This ensures that the device looks as close to what flashing would have produced.  It uses `adb push`, not `adb install`.
18
19## Prerequisites
20`Adevice` is intended for incremental updates and when there aren't many differences between the local build and the device. It is recommended to build and flash after syncing source before the first run.
21
22## Usage
23``` adevice help ``` for more options.
24
25### Updating the device
26``` adevice update ```
27
28# Displaying the build and device status
29``` adevice status ```
30
31# Adding a module to the update set
32To push modules to the device that are not normally part of the image, you can add them to the update set with:
33
34``` adevice track SomeModule ```
35
36# Removing a module from the update set
37To remove modules that you added to the update set:
38
39``` adevice untrack SomeModule ```
40
41# Cleaning stale files from the device
42``` adevice clean ```
43
44You can specify which connected device to use with the environment variable ANDROID_SERIAL or with the `-s` flag.
45