In an effort to make reviewing easier, this implements most of
the infra but only a mostly trivial test.
Bug: 184037351
Test: this
Merged-In: Ibb9139798ce44d748e87bae79a1e23311ec8d9b6
Change-Id: Ibb9139798ce44d748e87bae79a1e23311ec8d9b6
(cherry-picked from ag/14452537)