fork'd libhardware & sys/core