Handle instance files in odsign.
Each CompOS VM (pending or current) will need an instance file.
Add checking/use of these to odsign.
I now believe it never makes sense for odsign to attempt to generate a
new CompOS keypair; CompOS can do that itself when appropriate. So
remove a bunch of code related to that (it's been re-implemented in
CompOS in Rust anyway).
FakeCompOs now takes an instance file parameter, although only the
real CompOS will do anything with it.
Move all the instance & key files to
/data/misc/apexdata/com.android.compos, since CompOS should own them.
More refactoring & general tinkering.
This is all still behind "if (false)", but we're getting closer to
removing that.
Fix: 194654666
Test: Manual: Pending but no current instance; pending and current;
Test: current only with and without cert; no instances but valid cert;
Test: no compos files at all; invalid pending keys;
Test: invalid current keys.
Change-Id: Ie92ba414415b237512621c76c647640508f4b1e6
5 files changed