3 if [[ $EMULATOR == "" ]]; then
5 echo "Using default emulator $EMULATOR"
8 if [[ $ARCH == "" ]]; then
10 echo "Using default arch $ARCH"
12 echo EMULATOR = "Requested API: ${EMULATOR} (${ARCH}) emulator."
14 echo "Last line of file specified as non-opt/last argument:"
22 # Detect ip and forward ADB ports outside to outside interface
23 ip=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
24 socat tcp-listen:5037,bind=$ip,fork tcp:127.0.0.1:5037 &
25 socat tcp-listen:5554,bind=$ip,fork tcp:127.0.0.1:5554 &
26 socat tcp-listen:5555,bind=$ip,fork tcp:127.0.0.1:5555 &
28 # Set up and run emulator
29 if [[ $ARCH == *"x86"* ]]
36 #FASTDROID_VNC_URL="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/fastdroid-vnc/fastdroid-vnc"
37 #wget -c "${FASTDROID_VNC_URL}"
39 export PATH="${PATH}:/usr/local/android-sdk/tools/:/usr/local/android-sdk/platform-tools/"
41 echo "no" | android create avd -f -n test -t ${EMULATOR} --abi default/${ARCH}
42 echo "no" | emulator64-${EMU} -avd test -noaudio -no-window -gpu off -verbose -qemu -usbdevice tablet -vnc :0