One of the Android Developer’s best friends is the emulator (aka AVD). It allows us to simulate some behaviors, like calling, sending SMS messages, simulate a specific location and much more.
Creating an emulator
Creating an Android Virtual Device is very simple, just make sure you have the system image of the Android version you need to simulate installed.
android create avd -n <name> -t <targetID> [-<option> <value>] ...
You can see a list of available options on the Android website: https://developer.android.com/tools/devices/managing-avds-cmdline.html
Emulator keyboard mapping
In general I use keyboard mappings for everything. I think it makes me more productive. AVD has some nice keyboard mappings to simulate the real experience closer to a real device.
|F4||Hangup/end call button|
|F8||Toggle cell networking on/off|
|Ctrl + F5||Audio volume up button|
|Ctrl + F6||Audio volume down button|
|Ctrl + F11||Change layout orientation|
See the complete list on Android website: http://developer.android.com/tools/help/emulator.html
One of the most important tools for the Android developer is logcat. Logcat is a simple way to see the system logs and debugging output from device/emulator. You can use logcat from an ADB shell to view the log messages.
Tips and tricks
The following commands need to be run using telnet
telnet localhost [emulator port]
Receiving a call
gsm call <telephone-number>
Receiving a SMS
sms send <telephone-number> <message>
power capacity <battery %>
network speed <download> <upload>
To see the list of available options type
help inside telnet’s prompt.