Given a device codename, vendor name, stock system source, and LineageOS proprietary-files.txt list, extract proprietary files and generate build files.
[![Speed comparison with LineageOS extract-utils](https://asciinema.org/a/eUMNIrKtBrln1CwE1zCUnJO8w.svg)](https://asciinema.org/a/eUMNIrKtBrln1CwE1zCUnJO8w)
<details>
<summary>Command-line help</summary>
```
extract proprietary files
USAGE
$ adevtool extract LISTPATH
ARGUMENTS
LISTPATH path to LineageOS-compatible proprietary-files.txt list
OPTIONS
-b, --buildId=buildId build ID of the stock images (optional, only used for locating factory images)
-d, --device=device (required) device codename
-h, --help show CLI help
-k, --skipCopy skip file copying and only generate build files
-s, --stockSrc=stockSrc (required) path to (extracted) factory images, (mounted) images, (extracted) OTA package,
OTA payload, or directory containing any such files (optionally under device and/or build ID
directory)
-t, --useTemp use a temporary directory for all extraction (prevents reusing extracted files across runs)
-v, --vendor=vendor (required) device vendor/OEM name
Given a list of SELinux policy directories and a stock system source, identify APKs that should be presigned.
This is not a comprehensive list, as signature permissions and Google Play updates can also require apps to be presigned, but it will identify all apps necessary to boot and utilize basic hardware features.
Optionally, if input and output list paths are provided, filter the proprietary-files.txt and save a version with presigned tags added.
<details>
<summary>Command-line help</summary>
```
check for APKs that should be presigned
USAGE
$ adevtool check-presigned [LISTPATH]
ARGUMENTS
LISTPATH path to LineageOS-compatible proprietary-files.txt list
OPTIONS
-a, --aapt2=aapt2 [default: out/host/linux-x86/bin/aapt2] path to aapt2 executable
-b, --buildId=buildId build ID of the stock images (optional, only used for locating factory images)
-d, --device=device (required) device codename
-h, --help show CLI help
-o, --outList=outList output path for new proprietary-files.txt with PRESIGNED tags
-p, --sepolicy=sepolicy (required) paths to device and vendor sepolicy dirs
-s, --stockSrc=stockSrc (required) path to (extracted) factory images, (mounted) images, (extracted) OTA package,
OTA payload, or directory containing any such files (optionally under device and/or build ID
directory)
-t, --useTemp use a temporary directory for all extraction (prevents reusing extracted files across runs)
```
</details>
## Collect state
Given a reference build of AOSP, collect the state necessary for future vendor module generation.
Supports running for multiple devices simultaneously, optionally in parallel.
<details>
<summary>Command-line help</summary>
```
collect built system state for use with other commands
USAGE
$ adevtool collect-state OUTPUT_PATH
ARGUMENTS
OUTPUT_PATH output path for system state JSON file(s)
OPTIONS
-a, --aapt2=aapt2 [default: out/host/linux-x86/bin/aapt2] path to aapt2 executable
-d, --device=device (required) name of target device
-h, --help show CLI help
-p, --parallel generate devices in parallel (causes buggy progress spinners)