Stole genymotion code from ti-build