Instead of reading/writing to a single QMDL file, we now can manage
a directory of several files, and have the ability to start/stop writing
to them on the fly.
This commit also adds graceful exiting to the server, so we can perform
cleanup steps when the server's exiting.
Add tools for launching a root shell on the device, and for sending
serial commands to the device. Extend the make.sh script to push those
and configure a root shell. Commands can now be executed as root via:
adb shell rootshell -c \"touch /tmp/test\"
allowing automatic configuration of the tooling.
This commit does a couple things:
1. breaks out the pcap streaming logic into its own module
2. bundles wavehunter/static files into the binary for easy distribution
3. serves those static files
4. serves dynamic json representing system and diag stats
I also threw together the world's ugliest website to display all this.
For the QMDL code, this mostly rewrites the structs to accept generic
types that implement Read and Write, which allows for better unit
testing. Also adds a bunch of unit tests.
1. Main binary now parses a config toml and uses its paths for the
output pcap and qmdl files
2. Previously we were relying on DiagDeviceError for several things
that aren't a diag device. This modularizes that error in a way
that both improves the error descriptions, and also allows for
better separation of concerns.
This might be a bit premature, but since we don't seem to be
experiencing any more parsing errors when reading MessagesContainers,
let's switch to outputting a standard QMDL (Qualcomm Mobile
Diagnostic Log) file. This file format is more widely used by tools
like scat, and the only data we lose out on is the container metadata
and non-UserData messages (which we weren't using anyway).