enough to complete a build

Whether or not it works is a different matter.
Some patches to frameworks/base and libhardware_legacy were necessary for now, still investigating.

Change-Id: I62cad929ffefa020016098d03581d94d64bfe314