[1/2] system: Add mediatek compatibility

Change-Id: Ia3808a25b951fc259baed40a43f22d6f8d062ec1
squash several commits from different sources probably caf to have a stable code
revert this got removed in the squash
Merge branch 'android-4.4' of https://github.com/MerkMod/android_system_core into armv6-4.4