Make statsd cts tests work without root
Previously, the cts tests for statsd only worked if the device was
running as root. This cl allows non-rooted devices to also pass the
tests (essential!).
This involves modifying commands that previously required root and
allowing the host uid to vary (either be SHELL or ROOT, as the case may
be).
Also fixes some other issues:
- a bug introduced when AppHook was renamed to AppBreadcrumb
- move incidentd testing to the end so that the error messages (if there
is a failure) are more instructive
Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.AnomalyDetectionTests
Bug: 73510697
Change-Id: I82f1a4ee52b1a8b8fcb11260c4511f60150644f1
3 files changed