11

Emulator started, but not booting further "android" flashing text.

Started by

Android/Sdk/emulator/emulator @Nexus_5X_API_25 -verbose

In logs only repeating records

emulator: MemoryReport: Epoch: 140737476643856, Res/ResMax/Virt/VirtMax: 737525760 737525760 5164826624 5302894592

How to fix/debug it?..

Was working fine with KVM end virtualization, but suddenly stopped after updating to emulator to 26.1.2-4077558.

Update

Thanks to albodelu for information about update to 26.1.3. After Update I having:

KVM is required to run this AVD.
Unknown Error

Please file a bug against Android Studio.

KVM enabled. This was initial error which I fixed by adding executable permissions to emulator binaries. So done this again. Forced emulators to work by:

chmod a+x ~/Android/Sdk/emulator/emulator*
chmod a+x ~/Android/Sdk/emulator/lib64/lib*
chmod a+x ~/Android/Sdk/emulator/qemu/linux-x86_64/*
chmod a+x ~/Android/Sdk/emulator/qemu-img
chmod a+x ~/Android/Sdk/tools/emulator*
chmod a+x ~/Android/Sdk/tools/android
chmod a+x ~/Android/Sdk/tools/bin/*

And now miracle :) both emulator devices are working.

Alexandr
  • 1,704
  • 1
  • 14
  • 20
  • i have same problem. did you find a solution ? – Meysam Jul 16 '17 at 10:17
  • Not really solution. I currently just created new emulator device and it works. But I do not know the reason and how to debug the mentioned issue... – Alexandr Jul 17 '17 at 11:36
  • Have you tried create a new one? – azizbekian Jul 20 '17 at 07:08
  • Yes. As I wrote above, I created new one and it works.But I do not like why it is happening with embedded qemu. Maybe some permissions related (I fixed: added executable flag to binaries). – Alexandr Jul 20 '17 at 11:18
  • We have the same issue [here](https://github.com/albodelu/andstatus/commits/travis) for [Travis-ci and api-25 emulator](https://travis-ci.org/albodelu/andstatus/builds) looking for a working configuration [here](https://stackoverflow.com/q/45100298/1009132) – albodelu Jul 20 '17 at 12:21

6 Answers6

5

My answer is not exact solution to your problem but use Genymotion for simulation. It offers many devices from different brands and more robust AVDs. I only use AVD in Android Studio when i'm to test sensors virtually. That emulator is still cumbersome and very problematic.

Thracian
  • 43,021
  • 16
  • 133
  • 222
  • Thank you Fatih, that's true but I think that I can not use Genymotion in CI build servers and I'm looking for a particular solution for official emulators. The original question is not about Travis-ci but Alexandr already solved his issue. – albodelu Jul 24 '17 at 19:58
4

I've got this problem when I use hardware accelerated image. The solution that works for me, and may work for you is to create a new Virtual Device, and select "Software" under "Emulated Performance": enter image description here

Amir Uval
  • 14,425
  • 4
  • 50
  • 74
  • Thank you Auval, Ci build servers only support ARM emulators, and AVDs that use ARM- or MIPS-based system images [can't be accelerated](https://developer.android.com/studio/run/emulator-acceleration.html#dependencies), so I'm already using Software. – albodelu Jul 24 '17 at 20:36
4

I've had this a number of times when the emulator gets updated.

The only solution I've found, if you can it a solution, is to delete the emulator and re-create it again and it should work OK after that.

Boardy
  • 35,417
  • 104
  • 256
  • 447
4
emulator: MemoryReport: Epoch: 140737476643856, Res/ResMax/Virt/VirtMax: 737525760 737525760 5164826624 5302894592

Explanation:

Epoch: 140737476643856 /* this millisecond values gives when you created this emulator*/

Res/ResMax/Virt/VirtMax

Res - Resource memory used by a process (booting process). Since your booting process is using your total RAM (emulator's RAM), it is being kind of hang.

ResMax - Resource memory denotes the total actual RAM memory of your emulator.

Virt - Virtual Memory used by a process. It is swap memory.

VirtMax - The maximum Virtual Memory available in the emulator.

/*Note: Since the booting process has not used your total virtual memory, so your emulator is still running. But since all the RAM is full, the processing is happening, but it can't go further. So, it keeps showing "Android" in the screen.

I have these solutions based on order (the best is the top most).

1) Please increase your RAM memory of your emulator. Note: you should have more RAM on your laptop. You have to check your host machine's RAM use as well.

2) If your host machine (laptop) doesn't have more RAM, then you might want to find alternative emulator like GenyMotion, BlueStacks which takes less memory than Android Emulator.

GenyMotion: https://www.genymotion.com/

BlueStack: http://www.bluestacks.com/

Here is the picture how you can increase your RAM size in your emulator.

Open ADV > Edit > Show Advanced Settings > Below Screen appears > Increase RAM enter image description here

Note: VM Heap size has nothing to do with your problem. Each apps is a separate Dalvik Virtual Machine instance. VM heap gives how much RAM you can, at max, assign for each app.

Note: This problem is not related to your Graphics. It is the boot-time hang problem. So, Emulated performance based on Software or Hardware shouldn't be the answer.

Uddhav P. Gautam
  • 7,362
  • 3
  • 47
  • 64
  • 1
    Thank you for header correction and detailed explanation. But RAM increase (from 500Mb up to 7Gb) do not solves the issue. It still printing messages Res/ResMax/Virt/VirtMax: 767508480 767508480 6752296960 6819405824. Also I believe it is just information about allocated memory and not about memory limits. The numbers persistently increasing a bit. Nothing erroneous in this lines... – Alexandr Jul 27 '17 at 06:08
2

Note: emulator version 26.1.3 is here including interesting fixes. I'm busy to revise it now:

enter image description here

Related issue using emulator 26.1.2 here. Relaunch last build like me to use 26.1.3 or install locally

albodelu
  • 7,931
  • 7
  • 41
  • 84
0

I had the same problem while using the Android-SDK emulators. This solution works, assuming you have an Android build environment; in my case, AOSP. In this instance, the emulator which caused the same problem that OP and others have was emulator64-arm, from the SDK. When I tried the AOSP/prebuilts emulator64-arm, it worked just fine. The regular AOSP emulator worked as well, and you can use them with AVDs as well. Hope this helps, good luck.