Emulator in AMD Processor is not working - android-emulator

I using AMD processor. I have installed everything related to eclipse perfectly. But I'm unable to start the emulator. program is hang and keep waiting for adb forever. The same issue in android studio also. Please give a solution.

I'm using a Android Studio on an HP x360, which is a nice little laptop but has a puny processor:). I spent ages getting the Intel Hax virtual machine thingy installed on my machine, as well as configuring bios (which I found AVAST blocked changes to, so had to uninstall it).
After probably hours this week (I'm new to Android) waiting for the emulator to do it's thing, start up, load program, and eat memory, I decided to plug in my phone (Moto-e).
This has made a massive improvement! Only takes a minute to compile and run now! You also have piece of mind that your app will run in the real world.
So as a newb to Android, I'd say don't bother with the emulator.... plug a real device in.
See here for setting up HAXM, if you have trouble installing, it may be antivirus etc blocking it....
Intel HAXM
All the best.
try these threads Virtualization threads

Related

Android Studio: The emulator keeps crashing after sometime

Every time I run the emulator it runs normally at the beginning but after a couple of minutes it crashes and it's giving me this error:
emulator process finished with exit code 1073740791 (0xC0000409)
I am using windows 10 home edition. virtualization is enabled in bios. I don't have any other virtualization software installed (like virtual box).
any idea why this is happening?
It seems a buggy graphic card driver can cause a similar problem. I am not sure if this is generated your problem here or not, but it is worth to say; If you have an NVIDIA graphic card with the driver version of 378.49 (there may be other versions too!), you may experience this error due to some incompatibility with java.
Please update your graphic card driver or rollback it to version an older stable version and try again!. And read here for more information.
I might have an Idea what your problem is:
Restart the adb Server, you can do so by using the command Prompt in the following way:
First go to C/users/(YOUR USERNAME)/AppData/Local/Android/Sdk/platform-tools with the cd command.
Then just type adb kill-server, and adb start-server, so like this;
cd C/users/(YOUR USERNAME)/AppData/Local/Android/Sdk/platform-tools
adb kill-server
adb start-server
If that doesent work try to wipe and cold boot described in this question.
Try this :
Go to Tools ==> SDK Menager ==>Android SDK
(Appearance&Behavior=>System settings=>Android SDK)==>SDK Tools==>Intel x86 Emulator Accelerator(install this).
It will solve your problem.I hope it helps.
Here are a few things you can try:
Go to AVD manager and open settings for your virtual device. In the Emulated Performance section for graphics, change it from automatic to software.
Have a look at here. There could be an incompatability with other software incompatibility with other software such as Docker, Oracle Virtual Box and other products that use VCPU.
You could try a complete reinstall of Android Studio and make sure all updates are completed. There could be a bug in an older version of the emulator you are using that's fixed in a more recent release.
Edit
A couple more things you could try:
Open Android Virtual Device Manager, then click on options for virtual device, then wipe data, then cold boot.
Go to C:/users/(username)/AppData/Local/Android/Sdk/platform-tools in a terminal, then type adb kill-server, then adb start-server.
Edit
You could also try checking for memory leaks https://developer.android.com/studio/profile/memory-profiler and you could try increase the amount of RAM available for the emulator.
Go to Tools->Android->AVD Manager, then edit your AVD, then in the pop-up window click Show Advanced Settings, then finally increase the amount of RAM.
Edit
IT could be an issue with libGL or libstdc++. See here
It sounds like the emulator may have not installed correctly. Check these steps:
Ensure that you have installed Hyper-V . Documentation for running emulator on AMD
Then try this step to force a cold boot:
Android Studio Emulator and "Process finished with exit code -1073741511 (0xC0000139)"
If Its crashes again, then create a new emulator. You might also try and download a new image just to make sure that the one you installed is not corrupt.
You said you're using Windows 10? Error code 0xC0000409 is caused by a stack buffer overflow. It seems to have popped up a couple places all related by windows systems (might be totally irrespective of the android emulator). If this is the case I found a couple threads that might help solve your problem.
http://www.cplusplus.com/forum/windows/39061/
https://answers.microsoft.com/en-us/windows/forum/all/werfaultexe-the-exception-unknown-software/627da5c0-004a-e011-8dfc-68b599b31bf5?auth=1
http://windowsbulletin.com/solved-exception-code-0xc0000409-error/
https://www.tenforums.com/tutorials/16397-repair-install-windows-10-place-upgrade.html

installing android x86 in a virtual machine

I am following the instructions given HERE
I can install it to the vmware hard disk fine and get it running, but then it says to open a terminal and execute su
The terminal says that it cannot make me a root and nothing else
I am not able to go any further after this and so the internet isn't working in the virtual machine
Moreover, the internet works if I was just using the live CD version, without me having to do anything else
How do I get root permissions in android x86 on VMware?
--- EDIT---
After playing around some more with this I have noticed another problem: when I try to start the virtual machine, most of the times it reaches the Chrome coloured android startup logo, the logo animates continuously but the screen is sort of stuck at that phase. And if I loose focus to the vmware window and come back, I see that the window is blank and I am not sure if the virtual machine is even further loading or not. How do I properly get Android x86 to work on vmware (with full install on it's virtual hard disk and not just the live CD version? Should I try other virtual machines? I have not been able to get others such as qemu and bochs to work in the past and see that vmware is the easiest and most stable option, so I would like to run this in vmware if possible.
check here www.bitdirect.nl/?p=128
I followed this with a few little tweaks here and there and it worked perfectly.
only downside is transferring data outside of the android os is a pain.

How to make an AVD with > 768MB RAM To emulate Galaxy devices

I am trying to emulate the Galaxy Note 2 which contains 2GiB RAM and some custom hardware like the s-pen and TouchWiz. I created an emulator with 2GB to start with. The emulator won't launch, in fact it is crashing eclipse. I would also like to emulate multi-screen TouchWiz support. I don't see any info anywhere on emulating custom platforms like TouchWiz. Any ideas? I need a decent testing platform for the Galaxy series, but I can't even get basic android working.
edit: The Samsung dev page shows this setup: http://developer.samsung.com/forum/thread/emulator-size-for-galaxy-note-2-/77/178557
Is this a lack of available ram?
using the suggestion of manually adding "mb" behind the memory size in your configuration file (as suggested in this thread: Android: failed to allocate memory ) (located at: %USERPROFILE%/.android/avd/name-of-your-avd/config.ini) has solved the 768mb problem here!
example that now works on my win7 x64 ultimate os -with- dedicated gpu;
avd.ini.encoding=ISO-8859-1
hw.sdCard=no
hw.device.manufacturer=Google
hw.mainKeys=no
hw.lcd.density=320
hw.accelerometer=yes
hw.dPad=no
hw.cpu.arch=x86
skin.name=720x1280
abi.type=x86
hw.device.hash=1197498893
hw.trackBall=no
hw.device.name=Galaxy Nexus
hw.camera.back=none
hw.sensors.proximity=yes
hw.battery=yes
disk.dataPartition.size=512M
hw.gpu.enabled=yes
image.sysdir.1=system-images\android-18\x86\
hw.audioInput=yes
hw.sensors.orientation=yes
hw.camera.front=none
hw.gps=yes
skin.dynamic=yes
skin.path=720x1280
hw.keyboard=yes
vm.heapSize=128
hw.ramSize=2048mb
I have tested this on two machines, my desktop and laptop both running Windows 7 X64 Ultimate
The Laptop has an Intel I7-4702MQ with 12GB ram and GeForce GTX765M
The Desktop has an Intel I7-3820 with 32GB ram and has Ati 6950 in Crossfire and an Nvidia GTX560Ti (normally for physx).
The desktop only has issues in reliably starting the gpu acceleration while using crossfire, other then that i've had no issues with the emulator at all and even managed to assign 4096mb RAM with a 256VM Heap (however increasing the VM-heap above 128 seems to slowdown emulator initiation tremendously here)
On the desktop i also tested the 4096MB setup while even using a RAMDISK but this didn't increase performance too much.
Best settings overall (in my experience) in startup and responsiveness after just a few tests;
2048 with 128mb VM Heap size, gpu acceleration enabled.
Hope this helps out others!
I actually had a similar problem when running on Windows 7. When I relaunched Android studio with administrator privileges it worked. Otherwise I couldn't even open the AVD manager.
This question may be a duplicate of:
Android: failed to allocate memory
I don't presume you would NOT do this, but I'm just going to say it anyway...
Check the details of the correct answer, but especially check the comments for the correct answer.
Seriously, I hope this helps. Android and Eclipse issues have been a problem for me in the past until I learned to crush them with a Zen-like attitude and much exhaustive research and trial-and-error.

Simulate a start up: Android Emulator

I coded an app which starts at the system start up and starts a service which is written in the code. The code is working fine and the service is getting started when the app is installed on a real android device but not on an emulator. I do not have a real device always handy. Any idea how to simulate a start up in an emulator?
I just found a way to simulate a start-up without having to stop-and-start the emulator. Go to the DDMS perspective (if you are using Eclipse) and "stop" the android.core process. This process respawns (you would know this if you have ever owned a HTC where that essential process seemed to stop wayyy to often) and that process of respawning will effectively reboot the emulator- i.e the BOOT event is fired.
Starting emulator simulates a boot up. Didn't know it earlier as I was missing the Toast which I had put up on the boot up for some reasons I don't know. When tried on a faster machine, the same code worked like charm. :)

Is MOTODEV faster than the Android Emulator?

I am running the Android SDK inside a Windows XP VM in VMWare. As such, the Android Emulator takes forever to boot...
I have recently heard of another emulator -- the MotoDev. For those of you who tried both, could you tell if the MotoDev has any speed advantage over the standard Android Emulator?
I'm the Product Manager for MOTODEV Studio. There is not a separate emulator inside Studio, but rather another view of the existing emulator process that is displayed inside an Eclipse View. It's no faster than what you already have and depending on which transfer mechanism you use (native window vs. VNC), it could be up to 20% slower (native window is faster for Windows and Linux).
Now, as for why your emulator is taking forever...
The first time you start an emulator image (i.e. "AVD"), it has to recreate the entire target filesystem on your local disk. Subsequent launches will take less time.
If I understand correctly, you're letting the Android emulator pretend it's running its' file system through QEMU (Arm Emulator) inside a Windows XP pseudo-file system (VMWare Disk Image) that's running on whatever host operating system you have (your OS). That's a lot of file system manipulation going on. If you can reduce the file system mapping, you're going to see speed improvements. Can you map the Windows Android SDK into a real folder on your native file system? Removing that layer of abstraction is going to speed things up.
Good luck!
Eric