Understanding Android Emulator – Once and Forever

Definition,

An emulator is hardware or software that enables one computer system (know as the host) to behave like another computer system (know as the guest)

What is an Emulator in Android?

An Android emulator is an Android Virtual Device (AVD) that represents a specific Android device. You can use an Android emulator as a target platform to run and test your Android applications on your PC


It uses an open source processor emulator technology called QEMU.



Run your app on the emulator
To use the Android Emulator, you must create an Android Virtual Device (AVD) using Android Studio.
First, we need to create an AVD with the same device configurations as real device, then launch this AVD from AVD manager.
1.      In Command Line, navigate to android_sdk/tools/  and  start the Emulator  by specifying your AVD
            emulator -avd avd_name
     2. Now you can install your app using either the Gradle install tasks mentioned above or      the adb tool:
          adb install path/to/your_app.apk

Change orientation

By default when you launch the emulator, its orientation is vertical, but you can change it orientation by pressing Ctrl+F11 key from keyboard.

Change orientation
By default when you launch the emulator, its orientation is vertical, but you can change it orientation by pressing Ctrl+F11 key from keyboard.

Emulator - Sending SMS
1.Android emulator  sending SMS messages using either the Dalvik Debug Monitor Service (DDMS) tool available in Eclipse  or the Telnet client.
2.In telnet,you need to know the port number of emulator.It Basically starts with 5554, with each subsequent emulator having a port number incremented by two, such as 5556,5558 and so on.
you can telnet to it using the following command
C:\telnet localhost 5554
Syntax of the sms send command 
sms send <phone_number> <message>
3.To send the sms, type in: “sms send 0789456 Hello World″.
As a result, a notification will notify you that a new sms has arrived.

4.Use “exit” to exit the Android Console, and “quit” to quit the Telnet client.




Emulator - transferring files 

The easiest way is to use the DDMS perspective. From the DDMS(Dalvik Debug Monitor Service) perspective, Either you select the emulator or device if you have a real Android device connected to your computer and click the File Explorer tab to examine its file systems


The two buttons highlighted in Figure enable you to either pull a file from the emulator or push a file into the emulator.
Alternatively, you can also use the adb.exe utility shipped with the Android SDK to push or pull files to and from the emulator. This utility is located in the <Android_SDK_Folder>\platform-tools\ folder.

To copy a file from the connected emulator/device onto the computer, use the following command:


adb.exe pull /data/app/<filename> c:\


References

Comments

  1. I simply want to say I’m very new to blogs and actually loved you’re blog site. Almost certainly I’m going to bookmark your blog post . You absolutely come with great well written articleAndroid Training placement | Android Training in chennai |Android Training in Velachery | android development course fees in chennai

    ReplyDelete
  2. Hi admin

    I need to mention i'm new in reading blogs and love your blog web page and i'm into reading.
    Thanks & regards
    komal

    ReplyDelete

Post a Comment

Popular posts from this blog

Google Declared Best Android Apps Of 2017: No Place For Facebook Or Whatsapp That Make Everyone Love It

Steps for Android Studio - Environment Setup

Core Building Blocks of Android