After downloading GrapheneOS source, run:
yarn install --cwd vendor/adevtool
source build/envsetup.shTo (re)generate vendor module in vendor/$VENDOR/$DEVICE, run
adevtool generate-all -d $DEVICERequired stock OS device image will be downloaded automatically if it's missing.
-d flag accepts references to one or more Device or DeviceList configs, e.g. -d pixel-gen{7,8} tokay.
Its default value is the config/device/all.yml DeviceList.
Generated vendor module will be verified against the specification of the reference module (basically a list of file hashes)
in vendor-specs/$VENDOR/$DEVICE.yml.
It's recommended to always run adevtool generate-all after making changes to adevtool to make sure that generated
vendor modules remain exactly the same for all devices.
- After stock OS images are published, update index of known builds and their corresponding images by running
adevtool update-build-indexThis will update the config/build-index/build-index-main.yml file and show its git diff.
- Pick build ID for each of supported devices and update
build_idvalues in device configs and/or device config fragments inconfig/device/YAML files. Build ID can be applied to multiple devices viaconfig/device/commondevice config fragments, e.g.pixel.ymlapplies to all Pixel devices,gen6pixel.ymlapplies to all 6th gen Pixel devices and overrides values frompixel.ymletc. Values fromconfig/device/$DEVICE.ymldevice configs override values from device config fragments.
To verify that build IDs are set correctly, check the output of adevtool show-status command.
- Download stock OS factory images:
adevtool download [-d DEVICE(s)]This step can be skipped, images will be downloaded on-demand automatically by most commands that need them.
- Once AOSP tags are pushed, run
adevtool update-aosp-tag-indexto update config/build-index/build-id-to-tag.yml file which maps build IDs to their AOSP tags and show its
git diff.
build-id-to-tag index is currently used only by the adevtool show-status command.
- Make a state collection OS build and use it to update
vendor/state/$DEVICE.json. This step can usually be skipped for security-patch-only (non-QPR) stock OS updates.
adevtool collect-state -d $DEVICE
cd vendor/state
# commit changes to $DEVICE.json and publish them- Generate a new reference vendor module
adevtool generate-all -d $DEVICE --updateSpec--updateSpec flag tells adevtool to update list of vendor module file hashes in vendor-specs/$VENDOR/$DEVICE.yml
and copy generated text files from the vendor module to vendor-skels/$VENDOR/$DEVICE.yml.
Contents of vendor-skels/ do not affect vendor module generation, they are used for recording vendor module changes to
git history.
Review the changes to vendor-skels/ and vendor-specs/ with git diff. If there are new files/overlays/etc that need
to be removed, update filters in device configs and/or device config fragments and run generate-all with --updateSpec
flag again.