Skip to content

Latest commit

 

History

History
91 lines (77 loc) · 2.28 KB

README.md

File metadata and controls

91 lines (77 loc) · 2.28 KB

Android Setup

This document contains the steps required to setup the Android platform.

Step1

Download the Android SDK tools into this directory.

Step2

Accept the Terms of Services.

Step3

Download the Platform Tools from this site into this directory.

Step4

Accept the Terms of Services.

Step5

Set the following env variables:
export ANDROID_SDK_ROOT="$(pwd)/android/tools"
export ANDROID_HOME="${ANDROID_SDK_ROOT}"
export ANDROID_AVD_HOME="$(pwd)/android/platform-tools"
export ANDROID_AAPT_HOME="$(pwd)/android/build-tools/29.0.0"
Install the following libraries.
${ANDROID_SDK_ROOT}/bin/sdkmanager "system-images;android-25;google_apis;x86"
${ANDROID_SDK_ROOT}/bin/sdkmanager "platforms;android-25"
${ANDROID_SDK_ROOT}/bin/sdkmanager "build-tools;29.0.0"
Accept all the licenses.
${ANDROID_SDK_ROOT}/bin/sdkmanager --licenses
Install the emulator.
${ANDROID_SDK_ROOT}/bin/sdkmanager --channel=3 emulator
Create a Virtual Device.
echo no | "${ANDROID_SDK_ROOT}/bin/avdmanager" \
            create avd \
            --force \
            --name "AppTimTest" \
            --abi "x86" \
            --package 'system-images;android-25;google_apis;x86'
Validate the AVD has been created
"${ANDROID_SDK_ROOT}/bin/avdmanager" list avd
Available Android Virtual Devices:
    Name: AppTimTest
    Path: /root/.android/avd/AppTimTest.avd
  Target: Google APIs (Google Inc.)
          Based on: Android 7.1.1 (Nougat) Tag/ABI: google_apis/x86
List all the emulator.
"${ANDROID_SDK_ROOT}/emulator" -list-avds
AppTimTest
Start the emulator.
"${ANDROID_SDK_ROOT}/emulator" -avd AppTimTest
Verify the list of attached devices.

Make sure you enable the USB debugging and on any of the attached devices.

"${ANDROID_AVD_HOME}/adb" devices
List of devices attached
2960f439050ea6eb	device
emulator-5554	    device

The first device is a physical device and the second one is an emulator.