This question has many parts.
Some info about my system:
64-bit Ubuntu Linux
I am wondering what the stock emulator is that comes with Android Studio (A.Studio) (if indeed it has a name).
A helpful answer would include comparing this emulator with other emulators. A list of pros and cons of using each different emulator would also be helpful.
Perhaps there is a more fundamental ~thing~ about using different emulators; information on that is welcome if anything comes to mind.
Finally, i have never used an emulator besides the one that has come with Eclipse or A.Studio. What do I need to know in order to plug any emulator into any IDE? I have had issues with IDEs being "fragile" and breaking frequently, FYI.
You can use genymotion, for fast speed the quality, both for the eclipse and Android studio, get it here.
Also you can set up the Google play service for using Google Maps and downloading apps from Google play store.
Get the package and how it use it , please refer to here.
The emulator used by Android Studio is the exact same one used with Eclipse. It is in fact included with the Android SDK (which is in turn included in Android Studio) and used by various development environments.
The way it works depends on what kind of system image you use it with. For most recent Android versions, there are 2-4 different system images - arm, arm 64-bit, x86, and x86 64-bit (the 64-bit ones are Lollipop only, and fairly experimental at this stage of the game [early 2015]).
There are also Google API versions of these images (they include various Google apps such as Google Play Services) which can be used if these components are needed by your app.
For development purposes, the x86 system images are your best bet as performance is vastly improved by the emulator not having to emulate the ARM architecture - you need to use HAXM (by intel, also available in the Android SDK) to get any real speed benefits with x86 images though. The emulator also provides GPU acceleration (it must be manually enabled for each emulator device) which allows it to use your physical GPU for rendering instead of emulating these operations in software.
The way the development environment (Android Studio) connects to the emulator is via ADB (Android Debug Bridge). This means that it can work with virtually any emulator (such as Genymotion, which runs via VirtualBox). However, there is native support for using the Android Emulator from within Android Studio (this is configured by selecting emulator in the Run/Debug configuration)...when using another emulator (such as Genymotion) you should select USB device (in Run/Debug configuration) and make sure that the ADB instance is connected to your emulator via TCP (Genymotion does this for you automatically at startup).
This should give you enough information and I will not re-post all the various instructions on how to do any of the above as they have been posted as answers to various questions here on SO.
Related
I need to do a lot of android testing where the device I use has to be ARM based. While it is possible to create these devices in the default android emulator they are of course very slow on my x86 development machine.
A lot of this testing runs headless and automatically so I thought about setting up an ARM server and emulate the devices there in the hope that the performance would be better. While looking around I realized that there is nearly no information about this. Is it possible to run an android emulator (ether the one provided with the SDK or any other) on a ARM machine to get higher performance for the virtual devices?
This is actually a very good question.
Some cloud services like Amazon are providing the arm based machines. With those machines, we can run android emulators in cheap price.
Google doesn't provide the android emulator binary for arm.
But you can build those emulator binaries from AOSP. You have to do some work such as editing of cross-compile build files, adding target directories and building related third party libraries in arm architecture.
If you need any further information, I would attach detailed technical tips or step-by-step manuals.
There're several emulator binary variations residing in the Android SDK's /tools folder but I don't find any documentation on their differences (e.g. when to which one).
Android SDK version is 24.4.1, on CentOS.
Normally, you don't need to care about this, a default emulator will be chosen for you (first binary). Each binary represents one of the supported architectures. The last five are the 32-bit emulators.
Android emulator is based on QEMU
When the Android SDK was first made available to the world, Google
used QEMU as the basis for their Android emulator. They copied the
source code to a custom repository in the Android Open Source Project
(AOSP) and made a number of invasive modifications to QEMU.
Specifically, they added emulation of a specific board called goldfish
for the purposes of emulating an Android phone.
Every build of Android targets a specific hardware platform, and the
emulated goldfish platform is no different. A number of specific
emulator features are enabled in both the Android kernel and Android
userspace environment when run in an emulated environment. These
features allow a smooth and complete user experience resembling using
a real Android device, on laptop and desktop workstations.
The Android emulator provides Android application developers with a
convenient development environment and allows developers to develop
and test applications on devices which they do not have physical
access to. With the introduction of the ARMv8-A architecture and
Android support for 64-bit ARM platforms, this need is more important
than ever because it allows developers to begin adapting their
applications to an ARM 64-bit based mobile ecosystem prior to hardware
being available.
You can use the default emulator like here (or add QEMU options, but I never needed it, read this).
You also can force a 32-bit emulator:
I recently built an android application that i need to run 24/24 7/7.
I thought about using web servers, so I bought KVM VPS WITH 2GB RAM AND 2 CPU CORES (Ubuntu). I tried to install Genymotion on it but it doesn't work, so I tried to use the androidx86 version on virtualbox and it works but it is very slow.
Now i am asking if there is a way to run an android application 24/24 on a server ?
In order to run an Android application on your computer and have it be fast, you'll need to use the x86_64 or x86 images. Using an ARM or MIPS based image requires overhead since native instructions can't be run on an x86 computer. Genymotion is good, but I find the new Android Emulator is really fast, and it's free.
I would check out the new Android Emulator and use an x86/x86_64 based image. You can customize your image to provide extra disk space and RAM allocation to the system image for better performance. I've had great luck getting it to run quickly and smoothly in recent builds.
Here is blog post and video from Google announcing the new and improved emulator at Android Dev Summit in December of 2015: http://android-developers.blogspot.com/2015/12/android-studio-20-preview-android.html
Note: Please make sure you have the most up to date Android SDK for best performance and to make sure you have the version they talk about in the link.
I am developing an android app and want to test on the latest version of android, also I need to check some apps from google store, so Is there a way to run full android OS from my PC, I searched and found some telling to use virtualbox, but I tried the installation steps and it didn't work, are there any other suggestions?
You can use GenyMotion for that. It provides Android VM that are really better than the one of SDK (chosse images of Android machines that are provided with google apps for retrieving apps from Play Store).
Assuming the normal android sdk is already installed, using the Android SDK manager:
Install the Intel x86 Atom System Image of the latest api level.
Install Intel x86 Emulator Accelerator HAXM which can be found in the folder called "tools" inside the list provided by the Android SDK Manager (for those of you on Linux, you'll have to hunt around and install kvm instead).
Create an AVD using the AVD Manager
Make sure you select the x86 version when creating the AVD, the select box defaults to ARM.
And tick the checkbox Snapshot, to make sure your image keeps anything you install on it between restarts.
Fill out the rest of the parameters, create your AVD, and start it (the first time it runs will take the longest, the second time will be faster). That being said, it's still a good idea not to shutdown the emulator between tests because of the reboot time.
AVDs based on parameters alone and not actual device names will also be faster than the ones that have specific model names, but bear in mind that those with parameters will include less stuff. So it sounds like you'll want to make sure you select one with a specific phone model name.
Genymotion should work just fine as well. Just note that for the non-AOSP phones, you may have to install some of the system apks separately (because of licensing reasons, but those system apks should be very easy to find if you just google around for them)
I know I could use my Desire Z as a test phone, but what if I want to develop for 3.0 Honeycomb? What's an alternative for the emulator since it's so slow?
http://www.bluestacks.com/
This site has been getting some press recently. It seems that they are going to launch a windows runnable version of android later this year. This will be another alternative to using devices or emulators for testing I would imagine.
A general solution to the slowness of processor-emulation based emulators is to run a build of the embedded environment compiled for the same processor and general architecture as the hosting machine, in virtual machine software which can run most of the code native, and only has to trap and emulate privileged/hardware-related actions.
In other words, you run the x86 build of android in VirtualBox, vmware, or whatever, and dispense with the overhead of emulating an arm processor.
In quick web searching I'm not getting a confident answer if there's a working build of Honeycomb for x86 yet, but presumably there will be a build of that or a later android version at some point.
The only alternative is to have a physical device with Android 3.0 imaged on it.
Try this one for a change it actually provides an eclipse plugin and it uses cloud i guess it is faster than the emulator comes with android by default http://www.genymotion.com/features/