- Online Android Phone Emulator
- Android Emulator Android Emulator Mac Stack Overflow Download
- Free Android Emulator For Pc Download
Bluestacks is the most popular Android Emulator of all time. The initial version. The first time you open it, you’ll need to right click the Android Emulator icon and then skip past the developer identity verification step If you’ve installed Android Studio and Android SDK and adb is available, the emulator should be visible from Studio and work (deploy built apps, debug apps, etc). However, the Remix OS Player is an android emulator and it is one of the unique android emulators available because of the unique features which this emulator has to offer. It has been highly optimized for gaming and this is why it is really popular amongst the gamers.
The emulator provides versatile networking capabilities that you can use toset up complex modeling and testing environments for your app. The followingsections introduce the emulator network architecture and capabilities.
Network address space
Each instance of the emulator runs behind a virtual router/firewall servicethat isolates it from your development machine network interfaces and settingsand from the internet. An emulated device can't see your development machineor other emulator instances on the network. Instead, it sees only that it isconnected through Ethernet to a router/firewall.
The virtual router for each instance manages the 10.0.2/24 network addressspace — all addresses managed by the router are in the form of 10.0.2.xx, where xx is a number. Addresses within this space arepre-allocated by the emulator/router as follows:
Setting up Flutter, Visual Studio Code, and running your first app in both an Android Emulator and a web browser.
Network Address | Description |
---|---|
10.0.2.1 | Router/gateway address |
10.0.2.2 | Special alias to your host loopback interface (i.e., 127.0.0.1 on yourdevelopment machine) |
10.0.2.3 | First DNS server |
10.0.2.4 / 10.0.2.5 / 10.0.2.6 | Optional second, third and fourth DNS server (if any) |
10.0.2.15 | The emulated device network/ethernet interface |
127.0.0.1 | The emulated device loopback interface |
Note that the same address assignments are used by all running emulatorinstances. That means that if you have two instances running concurrently onyour machine, each will have its own router and, behind that, each will have anIP address of 10.0.2.15. The instances are isolated by a router and cannot see each other on the same network. For information about how tolet emulator instances communicate over TCP/UDP, see Interconnecting Emulator Instances.
Also note that the address 127.0.0.1 on your development machine correspondsto the emulator's own loopback interface. If you want to access services runningon your development machine loopback interface (a.k.a. 127.0.0.1 on yourmachine), you should use the special address 10.0.2.2 instead.
Finally, note that the pre-allocated addresses of an emulated device arespecific to the Android Emulator and will probably be very different on realdevices (which are also very likely to be NAT-ed, specifically, behind arouter/firewall).
Local networking limitations
Android apps running in an emulator can connect to the network available on yourworkstation. However, apps connect through the emulator, not directly to hardware, and the emulatoracts like a normal app on your workstation. This can cause some limitations:
- Communication with the emulated device may be blocked by a firewallprogram running on your machine.
- Communication with the emulated device may be blocked by another(physical) firewall/router to which your machine is connected.
The emulator virtual router should be able to handle all outbound TCP andUDP connections/messages on behalf of the emulated device, provided yourdevelopment machine network environment allows it to do so. There are nobuilt-in limitations on port numbers or ranges except the one imposed by yourhost operating system and network.
Depending on the environment, the emulator might not be able to support otherprotocols (such as ICMP, used for 'ping'). Currently, theemulator does not support IGMP or multicast.
Using network redirection
To communicate with an emulator instance behind its virtual router, you needto set up network redirection on the virtual router. Clients can then connectto a specified guest port on the router, while the router directs trafficto/from that port to the emulated device host port.
To set up the network redirection, you create a mapping of host and guestports/addresses on the emulator instance. There are two ways to set upnetwork redirection: using emulator console commands and using the adb tool, asdescribed below.
Setting up redirection through the Emulator Console
Each emulator instance provides a control console that you can connect to, toissue commands that are specific to that instance. You can use theredir
console command to set up redirection as needed for anemulator instance.
First, determine the console port number for the target emulator instance.For example, the console port number for the first emulator instance launched is5554. Next, connect to the console of the target emulator instance, specifyingits console port number, as follows:
Once connected, use the redir
command to work with redirection.To add a redirection, use:
where <protocol>
is either tcp
or udp
,and <host-port>
and <guest-port>
set themapping between your own machine and the emulated system, respectively.
For example, the following command sets up a redirection that handles allincoming TCP connections to your host (development) machine on 127.0.0.1:5000and will pass them through to the emulated system on 10.0.2.15:6000:
To delete a redirection, you can use the redir del
command. Tolist all redirection for a specific instance, you can use redirlist
. For more information about these and other console commands, seeUsing the Emulator Console.
Note that port numbers are restricted by your local environment. This typicallymeans that you cannot use host port numbers under 1024 without specialadministrator privileges. Also, you won't be able to set up a redirection for ahost port that is already in use by another process on your machine. In thatcase, redir
generates an error message to that effect.
Setting up redirection through adb
The Android Debug Bridge (adb) tool provides port forwarding, an alternateway for you to set up network redirection. For more information, see Forwarding Ports in the adbdocumentation.
Note that adb does not currently offer any way to remove a redirection,except by killing the adb server.
Configuring the emulator DNS settings
At startup, the emulator reads the list of DNS servers that your system iscurrently using. It then stores the IP addresses of up to four servers on thislist and sets up aliases to them on the emulated addresses 10.0.2.3, 10.0.2.4,10.0.2.5 and 10.0.2.6 as needed.
On Linux and OS X, the emulator obtains the DNS server addresses by parsingthe file /etc/resolv.conf
. On Windows, the emulator obtains theaddresses by calling the GetNetworkParams()
API. Note that thisusually means that the emulator ignores the content of your 'hosts' file(/etc/hosts
on Linux/OS X, %WINDOWS%/system32/HOSTS
on Windows).
When starting the emulator at the command line, you can also use the-dns-server <serverList>
option to manually specify theaddresses of DNS servers to use, where <serverList>
is a comma-separatedlist of server names or IP addresses. You might find this option useful if youencounter DNS resolution problems in the emulated network (for example, an'Unknown Host error' message that appears when using the web browser).
Using the emulator with a proxy
On many corporate networks, direct connections to the internet don't work (they're refused bythe network administrators), except if they happen through a specific proxy. Web browsers andother corporate apps are preconfigured to use the proxy, so you can browse the web. Forregular apps, like the emulator, they need to know that there's a proxy and that they need toconnect to it.
Due to the nature of HTTP, a direct web server connection and a connection througha proxy result in different GET requests. The emulator transparently rewrites theGET requests from the virtual device before talking to the proxy so it works.
If your emulator must access the internet through a proxy server, you can configure acustom HTTP proxy from the emulator's Extended controls screen. With the emulatoropen, click More , and then click Settings andProxy. From here, you can define your own HTTP proxy settings.
Alternatively, you can configure a proxy from the command line with the-http-proxy <proxy>
option when starting the emulator.In this case, you specify proxy informationin <proxy>
in one of these formats:
or
The -http-proxy
option forces the emulator to use the specifiedHTTP/HTTPS proxy for all outgoing TCP connections. Redirection for UDP is notcurrently supported.
Alternatively, you can define the environment variablehttp_proxy
to the value you want to use for<proxy>
. In this case, you do not need to specify a value for<proxy>
in the -http-proxy
command — theemulator checks the value of the http_proxy
environment variable atstartup and uses its value automatically, if defined.
You can use the -debug-proxy
option to diagnose proxyconnection problems.
Interconnecting emulator instances
To allow one emulator instance to communicate with another, you must set upthe necessary network redirection as illustrated below.
Assume that your environment is
- A is your development machine
- B is your first emulator instance, running on A
- C is your second emulator instance, also running on A
and you want to run a server on B, to which C will connect, here is how youcould set it up:
- Set up the server on B, listening to
10.0.2.15:<serverPort>
- On the B console, set up a redirection from
A:localhost:<localPort>
toB:10.0.2.15:<serverPort>
- On C, have the client connect to
10.0.2.2:<localPort>
Online Android Phone Emulator
For example, if you wanted to run an HTTP server, you can select<serverPort>
as 80 and <localPort>
as8080:
- B listens on 10.0.2.15:80
- On the B console, issue
redir add tcp:8080:80
- C connects to 10.0.2.2:8080
Sending a voice call or SMS to another emulator instance
The emulator automatically forwards simulated voice calls and SMS messages from one instance toanother. To send a voice call or SMS, use the dialer app or SMS app, respectively,from one of the emulators.
To initiate a simulated voice call to another emulator instance:
- Launch the dialer app on the originating emulator instance.
- As the number to dial, enter the console port number of the instance you'd like to call. You can determine the console port number of the target instance by checking its window title, where the console port number is reported as 'Android Emulator (<port>).
- Press 'Dial'. A new inbound call appears in the target emulator instance.
To send an SMS message to another emulator instance, launch the SMS app (if available). Specify the console port number of the target emulator instance as as the SMS address, enter the message text, and send the message. The message is delivered to the target emulator instance.
You can also connect to an emulator console to simulate an incoming voice call or SMS.For more information, seeTelephony Emulation and SMS Emulation.
This page is deprecated. Redirecting to https://developer.android.com/studio/run/emulator.html
The Android Studio 2.0 (or higher) preview includes the new Android Emulator 2.0 with improved performance and a new user interface to control device features. This page describes some of the changes compared to the emulator available with the stable version of Android Studio 1.5 and how to setup your development environment to use the Android Emulator.
For best performance with Android Emulator 2.0, your system should meet the following specifications:
Windows: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality. AMD and Intel Atom processors do not support VT-x virtual machine acceleration.
Linux: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality or AMD processors with support for AMD Virtualization™ (AMD-V™)
64-bit Operating Systems.
New Features
The most valuable updates to the Android Emulator are the speed improvements. When running with Android Studio 2.0 or higher on an x86 machine, response time is faster than the previous Android Emulator and you can transfer files from your machine faster than a physical Android device.
The latest Android Emulator supports new multi-finger touch inputs, including pinch zoom and two finger rotate gestures. Holding down Alt or Option reveals two finger points. Moving the mouse moves one finger and the second finger is mirrored across an anchor point. Clicking the left mouse button enables pinch-zoom gestures and clicking the right mouse button enables two-finger rotate gestures (such as to tilt the perspective when viewing a map).
The panel on the right side of the emulator lets you perform common tasks, such as rotate the screen, capture screenshots, and zoom in on the display.
To install apps, you can drag and drop an APK right on the emulator. You can also drag and drop other file types and they'll be saved to the /sdcard/Download/ directory.
At the bottom of the toolbar on the right is an ellipsis button that opens the Extended Controls window. In here you'll find various controls that invoke device events and mock device sensors.
Keyboard shortcuts are available for most actions and are listed in the Help panel, listed on the left.
Get Android Emulator 2.0
The new Android Emulator is available with Android Studio 2.0 or higher, which is available in both the Stable, Beta and Canary channels.
Once you make sure you have the appropriate emulator system image and other tools:
Open the SDK Manager from Android Studio.
Click the SDK Platforms tab, and select the check box for a recent version such as the Android 6.0 (Marshmallow). By default, this includes the x86 system image that you need for the emulator. You can see and modify the files to download by clicking Show Package Details at the bottom-right.
Click the SDK Tools tab, then select the check boxes for the following:
Android SDK Tools (25.0.0 or higher to get the new emulator)
Android SDK Platform-Tools (23.1.0 or higher to get the fast ADB)
Intel x86 Emulator Accelerator (HAXM installer) (rev 6.0.1 or higher to get CPU acceleration)
Click OK to check for updates.
Create new Android Virtual Device (AVD)
To take advantage of the new Android Emulator and adb speeds, you need to create new AVDs. In this example below, we are creating a Nexus 5x AVD.
Open the AVD Manager from Android Studio.
Click Create Virtual Device.
Select the defaults for Nexus 5x.
Select a system image, such as Marshmallow - API 23 - x86.
Select Show Advanced Settings.
Select the Multi-Core CPU check box. The number of cores available depends on the number of cores available on your development machine.
Run your new Android Virtual Device by click on the green Play button.
You should see the Android Emulator now start up.
Troubleshooting
Check Intel x86 Emulator Accelerator Installation
If you selected the defaults during the Android Studio installation you should be ready to go. If you created a custom Android Studio installation or run into issues, read the troubleshooting guide below. If your Intel x86 Emulator Accelerator is out of date, Android Studio will automatically inform you and suggest a quick fix to update, as shown in the following screenshot in the AVD Manager.
Installing CPU Accelerator (HAXM)
If you skipped the initial setup of Android Studio, you should make sure the CPU acceleration is installed.
You can manually install Intel x86 Emulator Accelerator by opening intelhaxm-android.exe (on Windows) or intelHAXM_6.0.1.dmg (on Mac) from /sdk/extras/intel/Hardware_Accelerated_Execution_Mangager, as shown below:
Installing HAXM in Windows
Installing HAXM in OS X
For Linux, the Android emulator usesKernel-based Virtual Machine (KVM). If you are using Ubuntu, you can run check your KVM system compatibility by running the following on the command line:
$egrep –c '(vmx|svm)' /proc/cpuinfo
on the command line to check for for a return value of greater than 1
To check if you have KVM installed by running the following on the command line:
$kvm-ok
If KVM is missing or to ensure you have the latest KVM installed, run the following on the command line:
$sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils ia32-libs-multiarch
The linux commands look like the following on Ubuntu:
Known Issues
Emulating inbound phone call freezes emulator.
Screenshot feature crashes emulator in certain conditions.
If an AVD has been opened in a previous version of the emulator, it may not boot in the new emulator, therefore create a new AVD.
OSX - screen doesn't go black when you sleep the device.
Linux - segfault on exit in some conditions.
'-gpu mesa' option not supported.
'-net*' option not supported.
'-no-window' option not supported.
Remote desktop not supported.
Emulated hardware 'recents' key doesn't work in older system images.
Multiple DNS servers not supported.
If you find other issues in the Android Emulator, pleasefile a bug report.
Android Emulator Android Emulator Mac Stack Overflow Download
We have more features in the pipeline, but if you may also submit feature requests.