Cloned from https://code-review.phablet.ubuntu.com/aosp/platform/hardware/libhardware