modified: from slimroms libhardware