Android Emulators for Appium

If you want to automate apps on Android platform, you will need to start android emulators. Easiest way to create android emulators is to install Android Studio and then use AVD manager from the studio GUI. As shown in above image, under tools menu, there are 2 important sub-menus - AVD manager and SDK manager. Once you click on AVD manager, you will see below window. You can see that I have already created 5 virtual devices (emulators). To create new device, just click on “create virtual device button”. Below image shows the system image step when creating new virtual device. I will recommend you use x86 images and select target version with Google APIs. Please do not select target version having Google Play. If all goes well, you will have your virtual device up and running as shown below. adb is called as Android debug bridge. This is the heart of Android platform. You can do all tasks using adb commands. You can find comprehensive info on adb at Here is the list of some of the important adb commands you must know. To see the list of all android devices attached, you can use below command

adb devices

To kill the adb server, you can use below command
adb kill-server

To install the app on emulator, you can use below command
adb install xyz.apk

You can also install the apk file in emulator by just dragging and dropping the file on the emulator. To uninstall third party app from the emulator, you can use below command
adb uninstall abc.apk

To see the list of all app packages on the attached device, you can use below command
adb shell pm list packages -f

To get file from device to your system, use below command
adb pull /system/app/Calculator/Calculator.apk

To see list of all activities of the app, use below command
aapt dump badging Calculator.apk

To get package name and main activity of the app, use below command
adb shell
dumpsys window windows | grep -E 'mCurrentFocus'

Alternatively you can also use logcat in Android Studio to get the main activity by filtering the logs with .*android.intent.action.MAIN.* - search for this in logcat and you will get the main activity

Youtube | Facebook | Twitter | Website Home | Online Grocery Shopping Brisbane