onnxruntime/tools/ci_build/github/android/start_android_emulator.sh
daquexian ec3c553501 NNAPI EP Update (#1483)
* Update DNNLibrary

* Allow fp16 by default

* Add nnapi build in ci

* Fix nnapi ep after #1268

* Remove unused variables

* Support nnapi in onnx_test_runner

* Update DNNLibrary to fix tests

* Update build.py for android build support, solve conflict of
tools/ci_build/build.py

* Support non-ARM Android build, solve conflict of tools/ci_build/build.py

* Enable android test by x86_64 android emulator

* Add dnnlibrary/NNAPI support in build.py

* suppress the verbose adb output

* Remove debug logs

* Install cmake by pip

* Fix undefined host_protoc_path

* cmake==3.13.2 in pypi is actually 3.12.2, so install 3.13.2.post1 instead

* Fix Android ARM64 build

* Use android ndk r20 instead of r19c, fix conflicts in install_deps_android.sh
2019-07-24 13:20:05 -07:00

25 lines
844 B
Bash
Executable file

#! /usr/bin/env bash
# Created by daquexian
set -e
export TERM=xterm
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-28;google_apis;x86_64'
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n android_emulator -k 'system-images;android-28;google_apis;x86_64' --force
echo "Starting emulator"
# Start emulator in background
nohup $ANDROID_HOME/emulator/emulator -avd android_emulator -no-snapshot -no-audio &
# start server in advance, so that the result of watch will only change when device gets online
$ANDROID_HOME/platform-tools/adb start-server
echo "Waiting for device to come online"
# Sometimes wait-for-device hangs, so add a timeout here
timeout 60 adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
echo "Emulator is online"