In this blog, i will describe steps to setup Android SDK and Emulators.
Step 1) Download the SDK from http://developer.android.com/sdk/index.html
Step 2) Unzip the folder, and update your path variables ( for windows) or bash_profile (for mac). Here are the steps:
export ANDROID_HOME=/Users/sgarg/Documents/Softwares/android export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/platform-tools
Step 3) Now we will launch Android SDK Manager to download desired android version. Type below command on terminal:
Step 4) Android SDK window will open, select the android version like 5.0.0 or 6.0.0 and click “Install Packages”
Step 5) Once you have installed a particular version, now create a virtual device to work on. Type this command in terminal to open Android AVD Manager.
Step 6) Click on Create to create a new virtual device.
Step 7 ) Enter specifications as required to create the AVD.
Step 8) Select the newly created AVD and Click on Strat. Follow through prompts and wait for AVD to strat. Google’s native emulators take sometime to boot, so be patient.
Step 9) Once the device is live and running.
Step 10) Type this command in terminal to check the list of devices(emulators+real devices) running:
and the output will be something like this: ’emulator-5554′ is the device we started in previous step.
Step 11) Now lets install desired app on the device.
on terminal, cd till folder where .apk file is kept. adb install <<name of the apk file>>
PS: Since Google Native Emulators are too slow, we will not use them as such for automation but will use Genymotion Emulators which are very fast and reliable too. We will learn about those in next blog.