BootControlAndroid: Implement using libhardware.
This simply calls into the a boot_control HAL implementation loaded with
libhardware. I've tested it with the implementation located in
system/extras/boot_control_copy.
The only non-trivial routine here is GetPartitionDevice() which I've
hand-tested on a device using the following snippet of code:
string names[] = {"boot", "system", "nope_enoent"};
for (string name : names) {
for (int slot = 0; slot <= 2; slot++) {
string device;
if (!GetPartitionDevice(name, slot, &device))
device = "NOTHERE";
LOG(INFO) << "slot:" << slot << " part:" << name << " -> " << device;
}
}
Change-Id: I1280325bd7cd4cf1cc9a33ef13c2f46f215da6e6
4 files changed