[scripts] Use new way of getting ANDROID_ROOT

Using a new method to get the android project root dir.
It's originally extracted from AOSP.