How to configure AVD Android Studio? - android

I am setting up the AVD for my emulator on Android Studio and trying to get it to mimic the phone I have; it is a Samsung Galaxy s4.
Under the "Select Hardware" section are only a few names, none of which match my phone. Am I supposed to choose this part based off the screen size and resolution alone?
The next section has me select the "System Image." My device is version 4.3, but there are two download options for that: x86 and ameabi-v7a. Which do I get and what exactly do these terms mean?

The Samsung Galaxy S4 is not a part of the standard AVD, you will have to create it. What you should be doing:-
Name your device as your "Galaxy S4".
Select your screen resolution and memory after looking it up on the internet.
I suggest you download an x86 image with the HAX accelerator driver from the SDK manager. This will make your virtual device run faster. If you get the ameabi-v7a, your virtual device will be slow due to the virtualisation overhead for your CPU.
Run your AVD, make sure you have enough RAM for your host OS. I would recommend about 8GB as optimal.
To be clear x86 and ameabi-v7 refer to the cpu architectures of the regular 32 bit PCs and the ARM processors respectively.

firstly, not all physical Android phone model is built in AVD.
secondly, you can use the command bellow to get your Android device ABI, which indicates CPU types(e.g. x86) in use:
adb shell getprop ro.product.cpu.abi

Related

GPU Driver issue with Android Emulator

I an new to Android Development and Android Studio, and I am trying to run the emulator, but unfortunately, everytime I run it I get the following error.
GPU #1
Make: 8086
Model: Intel(R) HD Graphics Family
Device ID: 0a16
Some Users have experienced emulator stability issues with this driver version.
As a result, we're selecting a compatibility renderer. Please check with your manufacturer to see if there is an
updated driver available.
Does anyone know how to fix it,
My computer's details:
Processor: Intel Core i3-4005 CPU # 1.70 GHz
Graphics: Intel HD Graphics Family
Model: Dell Inspiron 3542
RAM: 4GB
Hard Disk 1TB
I encounter this warning on my hackintosh (Lenovo X230, Intel HD 4000).
I tried to force hardware use with no success.
Did you try this one emulator from Microsoft?
https://www.visualstudio.com/vs/msft-android-emulator/
In my case, on my Windows machine (same X230), the emulator keeps stalling on the profiles screen...
I have an old macbook pro with HD3000 on which the emulator runs fine, though the graphic chip is part of from Intel's HD family.

Android Studio - Virtual device launch fails

You might have seen a hundred questions already by the same title so let me just tell you why mine is different:
Here's the error:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!
I've already installed HAXM installer from the sdk manager
When I actually go to install HAXM, it says that my computer doesn't support virtualization
True that. I have Intel Pentium E2180
My hyper -v is already disabled
My BIOS doesn't have an "enable virtualization" option (which is obvious because my processor doesn't support it)
Since all the solutions on stack overflow revolve around the above mentioned points I decided to post this quesiton as all the mentioned solutions didn't work, which I think is precisely because of me not having a supported processor, which brings me to my question:
Can I still somehow run a virtual device to test my apps? I have a Nexus 7 tab, but I still think testing on a virtual device is more convenient and also I can test more devices if they're virtual..
P.S. I'm running Windows 10 (technical preview) Build 9926.
In this case you can download and use ARM images that do not need hardware virtualization instead of using x86 system images. Need to tell you that ARM images will be very slow compared to x86 images.
You can download ARM image of respective APIs by selecting this option.
In order to run the emulator you have to use ARM image, because your PC doesn't support HAXM
Create a new AVD(Android Virtual Device) and on creation select image that uses ARM(such as armeabi-v7) so it will be emulated on your PC.
Here's picture of image selection
If you don't have any arm images installed, you can download one from SDK manager
Or else you can use Genymotion emulator which is very fast and lightweight
Genymotion
It might still work if you launch the emulator from the command line with the -no-accel switch:
Go to your SDK install directory
Go to the tools folder
Open a command/terminal window
Type emulator -avd Nexus_5X_API_23 -no-accel (replace Nexus_5X_API_23 with the name of the AVD you've set up in Android Studio / Android Developer Tools)

HAXM not working properly

I am using DELL inspiron n4010 with i3 generation 1 processor. Its showing me VT- enabled but I am not able to run the HAXM driver in my android simulator. The drivers have been installed successfullly. Please help me out.
Actually I am not able to see this while running the avd with intel processor.
It should not supposed to run on android simulator(Emulator) actually YOu have to create an emulator with intel Atom(x86), and the driver will make this emulator run faster than the other emulator.
Check this link
you should check how much disk space you have allocated while installing HAXM and how much disk space your virtual devices (in AVD) use. Perhaps you allocate more disk space to the emulated devices than you have specified when installing HAXM.

Android x86 + VirtualBox

I try to install android x86 4.2 (I tried also 4.0 asus laptop and eeepc) to my VirtualBox. My pc configuration:
Windows 7 x64
Lenovo Y570, Intel Core i7
NTFS file system
What I create in VirtualBox:
Name: Android x86
Type: Other (I tried Linux 2.4 x86 or Linux 2.6 x86 too)
Version: Other/Unknow
RAM: 512 Mb
Create a virtual hard drive => VDI (or HDD) => Fixed size (or dynamically) => 3 Gb (or 6)
Than I start my device and see boot menu. If I try to run it without installation, I see
Detecting Android-x86... found at /dev/sr0
Warning: Not an ASUS product
A N D R O I D
and nothing more happens. But now it must run like in different tutorials.
If I install, I try to format my Primary/Logical Bootable/Unbootable disk (FS type is Linux) from Choose Partition => Create/Modify partition.
I see very quickly disappearing line "could not find valid v7 on sda", than I see "can not mount /dev/sda1 Do you want to format it?" And I again go to Choose Partition menu.
Why emulator does not run?
Edited.
Answer: It's just a destiny. I installed VBox on my big pc with Win7 x32 and all is fine. On my Lenovo with the same config but with Win7 x64 it does not work. If u really wanna good android emulator, u can try YouWave.
I have HP430 Laptop with win 7. I had the same problem. But I figured out the solution.
While booting the computer with win7 I entered BIOS menu. There was a option to optimize pc for virtualization.I selected it. After that every thing ran smooth.
Later I noticed in virtual box that, in system settings the acceleration type was VT-x AMD, Nested Paging,PAE/NX. This was different before optimization.
Hope this gives some idea.

How well does the Android Phone Emulator reflect the performance?

I've been playing around with OpenGL ES development on Android. OpenGL ES applications seem to run slowly in the Emulator on my development machine. Does this reflect likely performance of actual hardware? I'm concerned about spending too much time developing an application if the graphics performance is going to be sluggish.
The emulator is super slow on my Mobile Intel Pentium M 725, 1600 MHz.
I'm assuming the emulator isn't representative of real world performance.
Emulator is soo slow ,that in some cases an openGL application wouldn't even start when using it.
While the actual hardware of android can even be so strong,that you can even play GTA on it.
Configuring VM Acceleration on Windows
Virtual machine acceleration for Windows requires the installation of the Intel Hardware Accelerated Execution Manager (Intel HAXM). The software requires an Intel CPU with Virtualization Technology (VT) support and one of the following operating systems:
Windows 7 (32/64-bit)
Windows Vista (32/64-bit)
Windows XP (32-bit only)
To install the virtualization driver:
Start the Android SDK Manager, select Extras and then select Intel Hardware Accelerated Execution Manager.
After the download completes, execute <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe
Follow the on-screen instructions to complete installation.
After installation completes, confirm that the virtualization driver is operating correctly by opening a command prompt window and running the following command:
sc query intelhaxm
You should see a status message including the following information:
SERVICE_NAME: intelhaxm
...
STATE : 4 RUNNING
...
To run an x86-based emulator with VM acceleration:
If you are running the emulator from the command line, just specify an x86-based AVD:
emulator -avd <avd_name>
After the new update the emulators have become much more reliable but still can't be taken as the way to check the performance of your application. Till now testing the application of real devices are more reliable then emulators.
With the new emulator of Android Studio 2.0, if you have good computer it runs quite smoothly, at leat for my application!
Check the features!

Categories

Resources