GoogleThe Android ABFS TeamAnnouncement
Accelerating development for massive Git repositories
Summary
Android’s source code is massive, with the Android 17 release containing 1,084 Git repositories and 1.62 million files, making traditional checkouts and builds slow. Google built Another Build File Service (ABFS) to address these bottlenecks using a content-addressable filesystem and two-phase build caching. ABFS reduced checkout times from roughly 36 minutes to under 8 seconds and full build times from about 80 minutes to just over 2 minutes for the Cuttlefish emulator target, which executes 192,249 Ninja actions. The system lazy-loads source code and build files on demand, and its shared cache can reuse up to 100% of build actions across CI and developer workspaces, even when typical changes touch only 1-10 Git projects. ABFS is open source and designed to scale to other massive Git-based projects beyond Android.
Context
Android’s source code is massive: the Android 17 open source release has 1,084 Git repositories, 1.62 million files, and a 300 GB built workspace. Traditional checkout took over 30 minutes and full builds over an hour, even on capable workstations. Modern coding tools and LLMs are used for Android development but are hampered by these long sync and build times.
Approach / What changed
ABFS is a full suite of software including a Linux kernel filesystem module (CASFS), user-space daemons (Cacheman, Mount Daemon, Tap), and server-side infrastructure (Git-pushers, gRPC CAS Server). It uses content-addressability to lazy-load source code and build files on demand, and replaces timestamp-based Ninja builds with a two-phase content-addressable caching system (Ninja-go) that verifies read patches before reusing cached outputs.
Takeaways
ABFS reduced Android source checkout from ~36 minutes to under 8 seconds and full build from ~80 minutes to just over 2 minutes on a 64-core VM for the Cuttlefish emulator target.
ABFS uses a two-phase content-addressable caching system (Ninja-go) that verifies read patches against the current filesystem state, preserving correctness even with hidden build dependencies.
ABFS enables parallel agentic workflows by allowing multiple concurrent Android workspaces on a single machine with shared local build cache, each mountable in under 10 seconds.
FAQ
How does ABFS handle hidden dependencies in build rules?
ABFS uses a two-phase caching system. Phase 1 hashes a step's command, environment, and declared input hashes to look up candidate results from prior builds. Phase 2 verifies the candidate's recorded read patch against the current filesystem state; if a hidden dependency has a different hash, ABFS rejects the stale candidate and reruns the step with tapping enabled.
How does ABFS reduce checkout time from 36 minutes to under 8 seconds?
ABFS uses a virtual, content-addressable filesystem (CASFS) that streams files on demand only when a build actually touches them. Initial checkouts download only lightweight directory metadata prepopulated with Git hashes; file bytes are lazy-loaded on first read.
Source and freshness
- Source
- developers.googleblog.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.