No description
Find a file
2022-04-04 15:47:01 -04:00
.github
bin
config config: Add example configs with docs 2022-04-04 15:47:01 -04:00
docs readme: Add speed comparison with LineageOS extract-utils 2022-04-04 15:47:01 -04:00
scripts
src config: device: Add type definition for structuredClone 2022-04-04 15:47:01 -04:00
.editorconfig
.eslintignore
.eslintrc eslint: Remove AirBnB config 2022-04-04 15:47:01 -04:00
.gitignore gitignore: Ignore IDEA project 2021-12-25 01:27:16 -08:00
.prettierrc prettier: Add initial config 2021-12-25 01:47:05 -08:00
LICENSE license: Update copyright year 2022-04-04 15:47:01 -04:00
package.json package: Bump version to 1.0.0 2022-04-04 15:47:01 -04:00
README.md readme: Add speed comparison with LineageOS extract-utils 2022-04-04 15:47:01 -04:00
tsconfig.json
yarn.lock yarn: Sync lock 2021-12-25 02:05:26 -08:00

adevtool

Android ROM device support and bringup tool, designed for maximum automation and speed.

Demo video on asciinema

Features

This tool automates the following tasks for devices that mostly run AOSP out-of-the-box (e.g. Google Pixel):

  • Downloading factory images and full OTA packages
  • Generating a list of proprietary files
  • Resolving overridden build rules and building modules from source (when possible)
  • Extracting, converting, and mounting factory images
  • Extracting proprietary files
  • Extracting bootloader and radio firmware
  • Finding and adding missing system properties
  • Overriding build fingerprint to help pass SafetyNet
  • Adding missing SELinux policies
  • Adding missing HALs to vendor interface manifests
  • Generating resource overlays for device configs
  • Fixing privileged app signing certificates referenced in SELinux policies

This typically results in better device support with fewer bugs and issues, and makes it possible to quickly add support for new devices.

Non-AOSP devices

Pixel devices will benefit from the most automation, but several features can still be used to ease manual bringup on other devices:

  • Extract files from proprietary-files.txt up to 2000% faster than LineageOS extract-utils (speed comparison)
    • LineageOS extract-utils: 1 min 27 sec
    • adevtool: 4 sec
    • Tested with Pixel 5 (redfin), cache cleared before testing
  • Compare a built system against stock images to find missing files, properties, and vendor interface declarations
  • List system files relevant to bringup (in all partitions)
  • Resolve overridden build rules from build warnings
  • Check SELinux policies to identify apps that should be presigned

Installation

Pre-requisites:

  • Node.js
  • Optional:
    • For converting sparse factory images: simg2img
    • For extracting OTA packages: payload-dumper-go
    • For extracting OTAs or factory images: unzip
    • For generating overlays: AAPT2 (included in AOSP and Android SDK)

To run adevtool without installation:

npx adevtool

To install adevtool globally using npm:

npm install -g adevtool

Using Yarn:

yarn global add adevtool

Usage

License

This tool is licensed under the MIT license, ensuring that anyone is free to use it for any purpose in compliance with the license. Contributions are welcome!