mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 19:15:05 +00:00
e183844df5
Summary: This form of THIS_DIR resolves symlinks, which is better. Reviewed By: davidaurelio Differential Revision: D8661886 fbshipit-source-id: 90bf329e765d9623d103b03c5dd3b71fae9d9854
26 lines
767 B
Bash
Executable File
26 lines
767 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Runs an Android emulator locally.
|
|
# If there already is a running emulator, this just uses that.
|
|
# The only reason to use this config is that it represents a known-good
|
|
# virtual device configuration.
|
|
# This is useful for running integration tests on a local machine.
|
|
|
|
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
|
|
|
|
STATE=`adb get-state`
|
|
|
|
if [ -n "$STATE" ]; then
|
|
echo "An emulator is already running."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Installing packages"
|
|
source "${THIS_DIR}/android-setup.sh" && getAndroidPackages
|
|
|
|
echo "Creating Android virtual device..."
|
|
source "${THIS_DIR}/android-setup.sh" && createAVD
|
|
|
|
echo "Launching Android virtual device..."
|
|
source "${THIS_DIR}/android-setup.sh" && launchAVD
|