Optimizations from

https://github.com/trailblazerz/android_build

all credits beling to trailblazerz

Change-Id: Ib173ee83c52b192f24df226f137e82b50daaec90