Add tools to build AOSP and to run the emulator
This makes it easier to work with an AOSP checkout inside a R8 checkout
without having to do all the AOSP setup and build magic manually.
Based on the code already in tools/test_android_cts.py.
Change-Id: I65f43e178afe1ca2db4d407a777107b785229c80
diff --git a/scripts/aosp_helper.sh b/scripts/aosp_helper.sh
index cfebfca..0dc6f78 100755
--- a/scripts/aosp_helper.sh
+++ b/scripts/aosp_helper.sh
@@ -23,6 +23,8 @@
emulator_pid=$!
trap "kill $emulator_pid; exit 1" 2 15
while true; do sleep 5; done
+elif [[ "$TASK" == "emulator_fg" ]]; then
+ emulator "$@"
elif [[ "$TASK" == "run-cts" ]]; then
adb wait-for-device
adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'