Don't reuse CID while Android is up

As virtualizationservice has become a lazy AIDL service, it started to
reuse CID, because a new virtualizationservice process always starts
from the default CID 10.

This has caused some flakness to tests because the adb connection to the
VM for a test sometimes goes to another VM that was started for a prior
test - because they both have the same CID 10.

Fixing this issue by introducing a system property
`virtualizationservice.state.last.cid` to keep the last CID value across
the runs of virtualizationservice. Note that the system property is not
persistent; a reboot of the host Android starts from CID 10.

Bug: 196015427
Test: watch TH
Change-Id: I16309aa95e30c95f20381302d2bc1d3d9eae1563
3 files changed
tree: 95c621c2eea02e3a6aa17a38db104a388b354c54
  1. apex/
  2. apkdmverity/
  3. apkverify/
  4. authfs/
  5. compos/
  6. demo/
  7. docs/
  8. idsig/
  9. javalib/
  10. launcher/
  11. libs/
  12. microdroid/
  13. microdroid_manager/
  14. tests/
  15. virtualizationservice/
  16. vm/
  17. vmconfig/
  18. zipfuse/
  19. .clang-format
  20. Android.bp
  21. OWNERS
  22. PREUPLOAD.cfg
  23. README.md
  24. TEST_MAPPING
README.md

Virtualization

This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.