XNews

Google Open-Sources ABFS, Cutting Android Source Checkout from 36 Minutes to Under 8 Seconds

Google Open-Sources ABFS, Cutting Android Source Checkout from 36 Minutes to Under 8 Seconds

Google's Android ABFS team open-sourced Another Build File Service on GitHub, a content-addressed system that lazy-loads and caches source code, workspaces, intermediate files and build results. On a 64-core cloud VM, AOSP checkout dropped from 36 minutes 19 seconds to 7.4 seconds with a cold local cache and 3.6 seconds with a warm cache, while full builds fell from 1 hour 20 minutes 35 seconds to 2 minutes 11 seconds with a complete remote cache.

Event version 1.

Key insights

Scale of Android 17 source

The Android 17 open source release contains 1,084 Git repositories, 1,620,371 regular files, 161 GB of code and 155 GB of build output, with a built workspace around 300 GB. Typical trees with vendor code and first-party apps grow two to three times larger, exceeding 3,000 Git repositories.

Content-addressed lazy loading

ABFS combines a Linux kernel content-addressed filesystem module (CASFS), user-space cache and management daemons, and server-side storage. Developer machines first download only directory metadata with Git hashes and fetch file contents on first read through the local cache, while standard git and repo commands continue to work.

Two-stage build validation

Ninja-go looks up candidate results by hashes of command, environment and declared inputs, then verifies consistency against the files actually read during that build. If undeclared dependencies changed, the cache is rejected and the step re-executed, preserving near-clean-build correctness.

Measured performance gains

On a 64-core VM in the same cloud network, partial clone checkout took 36 minutes 19 seconds versus 7.4 seconds for ABFS with an empty local cache and 3.6 seconds with a warm cache. Full builds took 1 hour 20 minutes 35 seconds versus 2 minutes 11 seconds with a complete remote cache and 1 minute 19 seconds with a full local cache.

Parallel agent workflows

Five release branches can be mounted side by side on one machine in under 8 seconds each. Agents can check out a complete source tree within 10 seconds and complete a full build within 10 minutes, then port the same fix to multiple versions in parallel for validation.

Source posts