[TEST][DO NOT SUBMIT] squashed changes from jb42 to jb421 branch, required for libhardware changes

Change-Id: Ie88603031b5e272d2c502c5e5f1f6b547bf65bd6