Commit graph

513 commits

Author SHA1 Message Date
Dmitry Muhomor
3bf5977e81 add command for making "BUILD_ID to AOSP tag" map 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
dcc8339fd7 update generate-all command
- pass device config with the standard -d flag instead of through argument
- default to using factory and OTA images for current build ID when --stockSrc is not specified
- add extract_android_ota_payload.py as the final step, with an option to skip it
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
12e586385f update generate-prep command
- pass device config with the standard -d flag instead of through argument. This allows to specify
multiple devices without using DeviceList config file
- default to using factory image for current build ID when --stockSrc is not specified
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
97b724790b improve handling of device factory images
- support unpacking factory images without root by using debugfs rdump (ext4) and
fsck.erofs --extract (erofs)
- support reusing unpacked factory images between adevtool runs to reduce latency
- unpack factory images for multiple devices in parallel. Extraction of files from partition images
is parallelized too
- extract partition images from factory image inner zip directly, without extracting it, since this
inner zip is uncompressed
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
9750841f3d collect-state: support specifying device names with DeviceList(s)
For example, `collect-state -d pixel-gen{6,7} barbet`
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
40354ec422 collect-state: set default output path to vendor/state 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
2a3fba5d2e generate-all: set default of customSrc flag to vendor/state 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
22b2d700db add helper functions for async spawning of processes 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
9be2a36aa5 add hasha dependency
This is a simple wrapper for built-in node.js hashing APIs.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
40abb08329 add yauzl-promise dependency
This is a zip unpacking library.

unzipit library that is already present doesn't support extracting from inner factory image zips
without unpacking them and extracts files to memory first, which consumes huge amount of memory
when unpacking factory images, especially in parallel.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
8d8604dbe7 check PLATFORM_SECURITY_PATCH value in product Makefile
On devices that no longer receive vendor updates (e.g. Pixel 4 / 4 XL), PLATFORM_SECURITY_PATCH
should be overriden to correctly indicate that.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
70129836eb check in product Makefile that BUILD_ID is set correctly 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
0b0b76ef70 do not use bright green color for action spinner text
It has bad readability when using dark-on-light terminal color schemes.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
d7594443cd make file system type of OS partitions part of device config 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
694afd844b improve device image downloading
- define a default download directory
- obtain image URL and checksum from the Git-tracked local build index instead of fetching it from
remote server
- default to downloading images for the current build ID
- download image to a temporary file first, mark it as complete only after checksum verification
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
e29dbb7aea add update-build-index command
See its description.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
a4d615c057 add index of Pixel Android 14 Beta 5.2 builds 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
061f631abc add index of Pixel Android 14 Beta 5.1 builds 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
6f2c9525e0 add index of Pixel Android 14 Beta 5 builds 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
1be5571e1e add index of Pixel Android 14 Beta 4.1 builds 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
47db1ba94c add index of stock OS builds for supported Pixel devices 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
1d3c8c59c8 add support for loading build index from YAML
Default path is config/build-index/build-index.yml, 'includes' directive is supported.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
e1d69888dd add fetch-build-index command 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
83ac2dba38 update node-fetch version to 2.6.13
2.6.6 is vulnerable to CVE-2022-0235
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
822c196d02 add parser of Pixel factory, OTA and vendor image pages
Extracts the following image properties:
- device name
- build ID
- build desctiption
- image download link
- image file SHA-256

Images are grouped by '$DEVICE $BUILD_ID' key.

Beta factory/OTA image pages are supported too.

JSDOM dependency is added for simple and correct parsing of these pages.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
31d493f58c make current and previous build ID part of device config
Previous build ID is useful when doing comparisons.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
81adbb0c42 improve device config loading
- support specifying device{,-list} config with config file name instead of config path
- support loading mutliple device{,-list} configs at once. Previously, loading multiple device
configs was supported only by passing a device-list config
- parallelize config loading with promises
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
4503081dbf require device config name to match device name
This is already the case for all device configs.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
65e3e84583 add path constants for OS checkout, adevtool, (device) config dirs 2023-08-31 16:03:43 -04:00
Dmitry Muhomor
409c89cbdc require adevtool to always be started from the root of OS tree
Several commands (e.g. generate-all) break when this is not the case. Several other commands have
non-obvious dependency on this invariant.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
4728496e47 group Pixel device-list configs by generation
This allows to invoke commands that accept a device-list for all devices in a given gen.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
1007b219cb move device configs from config/ to config/device/
This is preparation for adding new kinds of configs.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
c4e850b86b factor out loadAndMergeConfig()
It's useful for non-device kind of configs too.
2023-08-31 16:03:43 -04:00
Dmitry Muhomor
7eceea9041 extract_android_ota_payload.py: don't keep temporary payload.bin file
It takes up a couple of gigabytes of space per-device.
2023-08-31 16:03:43 -04:00
Daniel Micay
55c15c81e6 add GrapheneOS copyright notice 2023-07-13 21:58:04 -04:00
flawedworld
07beb10ede More tweaks 2023-06-27 19:38:15 -04:00
Dmitry Muhomor
2ee7b3b102 update overlay-removal for felix 2023-06-27 19:36:33 -04:00
Dmitry Muhomor
8d458f3f43 add felix (Pixel Fold) config file 2023-06-27 19:36:33 -04:00
Daniel Micay
86a44792dd fix setting radio version 2023-06-23 13:50:43 -04:00
Daniel Micay
cbac084fe8 fix overlay sort order 2023-06-23 13:20:19 -04:00
Dmitry Muhomor
43e3e547e7 remove empty Hub Mode menu from Settings app 2023-06-22 13:41:22 -04:00
flawedworld
90778b7bd5 Skip android:integer/config_multiuserMaximumUsers overlay 2023-06-21 19:30:27 -04:00
flawedworld
d39899a51c Exclude more items for Pixel Tablet 2023-06-21 19:30:27 -04:00
Dmitry Muhomor
84aa406348 support devices that don't have a baseband 2023-06-21 03:54:54 -04:00
Dmitry Muhomor
06114545f4 make addition of "require partition-exists=vendor_kernel_boot" generic
Instead of hardcoding the list of devices (which is now missing lynx), check whether
vendor_kernel_boot is present in the list of stock A/B partitions.
2023-06-21 03:54:54 -04:00
Dmitry Muhomor
2b26cec4e3 factor out reading of ro.product.ab_ota_partitions prop into a function 2023-06-21 03:54:54 -04:00
Dmitry Muhomor
7963a6428f update file-removal for tangorpro, part 2 2023-06-21 02:29:01 -04:00
Dmitry Muhomor
6c7454d4f1 update overlay-removal for tangorpro 2023-06-21 02:19:31 -04:00
Dmitry Muhomor
6743fe4639 disable broken support for file reference overlays 2023-06-21 02:19:31 -04:00
Daniel Micay
27b41962f4 work around parsing issue 2023-06-20 21:55:09 -04:00