Issue
I know there are a lot of issues with the Android emulator and that StackOverflow nearly overflows with questions about it. I know, I've been through most of them looking for an answer to my problem :)
I had the usual HAXM problems when I started but I fixed the VT settings in my BIOS and I reinstalled HAXM.
Now when I start my emulator, either through Android Studio or command line, it won't start and it gets stuck in a loop. The loop looks like this:
Run output
Note: The environment variable $ANDROID_SDK_HOME is set, and the emulator uses that variable to locate AVDs.
This may result in the emulator failing to start if it cannot find the AVDs in the folder pointed to by the
given environment variable.
ANDROID_SDK_HOME=C:\Users\maffe
emulator: device fd:1160
HAXM is working and emulator runs in fast virt mode
emulator: warning: opening audio input failed
creating window 102 107 646 1147
emulator: UpdateCheck: current version '24.4.1', last version '24.4.1'
Logcat output
01-22 05:48:36.770 6543-6543/? I/Netd: Netd 1.0 starting
01-22 05:48:36.771 6543-6543/? E/Netd: Failed to open /proc/sys/net/ipv6/conf/default/optimistic_dad: No such file or directory
01-22 05:48:36.771 6543-6543/? E/Netd: Failed to open /proc/sys/net/ipv6/conf/eth0/optimistic_dad: No such file or directory
01-22 05:48:36.771 6543-6543/? E/Netd: Failed to open /proc/sys/net/ipv6/conf/lo/optimistic_dad: No such file or directory
01-22 05:48:36.771 6543-6543/? E/Netd: Failed to open /proc/sys/net/ipv6/conf/sit0/optimistic_dad: No such file or directory
01-22 05:48:36.771 6543-6543/? E/Netd: Failed to open /proc/sys/net/ipv6/conf/default/use_optimistic: No such file or directory
01-22 05:48:36.771 6543-6543/? E/Netd: Failed to open /proc/sys/net/ipv6/conf/eth0/use_optimistic: No such file or directory
01-22 05:48:36.771 6543-6543/? E/Netd: Failed to open /proc/sys/net/ipv6/conf/lo/use_optimistic: No such file or directory
01-22 05:48:36.772 6543-6543/? E/Netd: Failed to open /proc/sys/net/ipv6/conf/sit0/use_optimistic: No such file or directory
01-22 05:48:36.875 6544-6544/? I/mediaserver: ServiceManager: 0xb5835620
01-22 05:48:36.875 6544-6544/? I/AudioFlinger: Using default 3000 mSec as standby time.
01-22 05:48:36.876 6544-6544/? I/ServiceManager: Waiting for service batterystats...
01-22 05:48:36.903 6545-6545/? D/AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<
01-22 05:48:36.904 6545-6545/? D/AndroidRuntime: CheckJNI is ON
01-22 05:48:36.904 6545-6545/? I/art: option[0]=-Xzygote
01-22 05:48:36.904 6545-6545/? I/art: option[1]=-Xcheck:jni
01-22 05:48:36.904 6545-6545/? I/art: option[2]=-Xjnigreflimit:2000
01-22 05:48:36.904 6545-6545/? I/art: option[3]=-Xstacktracefile:/data/anr/traces.txt
01-22 05:48:36.904 6545-6545/? I/art: option[4]=exit
01-22 05:48:36.904 6545-6545/? I/art: option[5]=vfprintf
01-22 05:48:36.904 6545-6545/? I/art: option[6]=sensitiveThread
01-22 05:48:36.904 6545-6545/? I/art: option[7]=-verbose:gc
01-22 05:48:36.904 6545-6545/? I/art: option[8]=-Xms4m
01-22 05:48:36.904 6545-6545/? I/art: option[9]=-Xmx2048m
01-22 05:48:36.904 6545-6545/? I/art: option[10]=-XX:mainThreadStackSize=24K
01-22 05:48:36.905 6545-6545/? I/art: option[11]=-agentlib:jdwp=transport=dt_android_adb,suspend=n,server=y
01-22 05:48:36.905 6545-6545/? I/art: option[12]=-Xlockprofthreshold:500
01-22 05:48:36.905 6545-6545/? I/art: option[13]=-Ximage-compiler-option
01-22 05:48:36.905 6545-6545/? I/art: option[14]=--runtime-arg
01-22 05:48:36.905 6545-6545/? I/art: option[15]=-Ximage-compiler-option
01-22 05:48:36.905 6545-6545/? I/art: option[16]=-Xms64m
01-22 05:48:36.905 6545-6545/? I/art: option[17]=-Ximage-compiler-option
01-22 05:48:36.905 6545-6545/? I/art: option[18]=--runtime-arg
01-22 05:48:36.905 6545-6545/? I/art: option[19]=-Ximage-compiler-option
01-22 05:48:36.905 6545-6545/? I/art: option[20]=-Xmx64m
01-22 05:48:36.905 6545-6545/? I/art: option[21]=-Ximage-compiler-option
01-22 05:48:36.905 6545-6545/? I/art: option[22]=--image-classes=/system/etc/preloaded-classes
01-22 05:48:36.905 6545-6545/? I/art: option[23]=-Xcompiler-option
01-22 05:48:36.905 6545-6545/? I/art: option[24]=--runtime-arg
01-22 05:48:36.905 6545-6545/? I/art: option[25]=-Xcompiler-option
01-22 05:48:36.905 6545-6545/? I/art: option[26]=-Xms64m
01-22 05:48:36.905 6545-6545/? I/art: option[27]=-Xcompiler-option
01-22 05:48:36.905 6545-6545/? I/art: option[28]=--runtime-arg
01-22 05:48:36.905 6545-6545/? I/art: option[29]=-Xcompiler-option
01-22 05:48:36.905 6545-6545/? I/art: option[30]=-Xmx512m
01-22 05:48:36.905 6545-6545/? I/art: option[31]=-Duser.language=en
01-22 05:48:36.905 6545-6545/? I/art: option[32]=-Duser.region=US
01-22 05:48:36.917 6545-6545/? W/art: Incomplete boot detected. Pruning dalvik cache
01-22 05:48:36.924 6545-6545/? I/art: Pruning dalvik-cache since we are relocating an image and will need to recompile
01-22 05:48:36.924 6545-6545/? I/art: RelocateImage: /system/bin/patchoat --input-image-location=/system/framework/boot.art --output-image-file=/data/dalvik-cache/x86/system@[email protected] --input-oat-location=/system/framework/boot.oat --output-oat-file=/data/dalvik-cache/x86/system@[email protected] --instruction-set=x86 --base-offset-delta=-2789376
01-22 05:48:37.886 6544-6544/? I/ServiceManager: Waiting for service batterystats...
01-22 05:48:38.558 6543-6543/? V/NatController: runCmd(/system/bin/iptables -F natctrl_FORWARD) res=0
01-22 05:48:38.576 6543-6543/? V/NatController: runCmd(/system/bin/iptables -A natctrl_FORWARD -j DROP) res=0
01-22 05:48:38.578 6543-6543/? V/NatController: runCmd(/system/bin/iptables -t nat -F natctrl_nat_POSTROUTING) res=0
01-22 05:48:38.606 6543-6543/? V/NatController: runCmd(/system/bin/iptables -F natctrl_tether_counters) res=0
01-22 05:48:38.608 6543-6543/? V/NatController: runCmd(/system/bin/iptables -X natctrl_tether_counters) res=0
01-22 05:48:38.636 6543-6543/? V/NatController: runCmd(/system/bin/iptables -N natctrl_tether_counters) res=0
01-22 05:48:38.633 6698-6698/? W/iptables: type=1400 audit(0.0:151): avc: denied { module_request } for kmod="ipt_TCPMSS" scontext=u:r:netd:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
01-22 05:48:38.639 6543-6543/? V/NatController: runCmd(/system/bin/iptables -t mangle -A natctrl_mangle_FORWARD -p tcp --tcp-flags SYN SYN -j TCPMSS --clamp-mss-to-pmtu) res=1
01-22 05:48:38.896 6544-6544/? I/ServiceManager: Waiting for service batterystats...
01-22 05:48:39.183 6745-6745/? W/iptables: type=1400 audit(0.0:152): avc: denied { module_request } for kmod="ipt_owner" scontext=u:r:netd:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
01-22 05:48:39.183 6745-6745/? W/iptables: type=1400 audit(0.0:153): avc: denied { module_request } for kmod="ipt_owner" scontext=u:r:netd:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
01-22 05:48:39.183 6745-6745/? W/iptables: type=1400 audit(0.0:154): avc: denied { module_request } for kmod="ipt_owner" scontext=u:r:netd:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
01-22 05:48:39.188 6543-6543/? I/iptables: iptables: No chain/target/match by that name.
01-22 05:48:39.196 6543-6543/? I/iptables: iptables terminated by exit(1)
01-22 05:48:39.197 6543-6543/? E/BandwidthController: runIptablesCmd(): res=1 status=256 failed /system/bin/iptables -A bw_INPUT -m owner --socket-exists
01-22 05:48:39.193 6746-6746/? W/ip6tables: type=1400 audit(0.0:155): avc: denied { module_request } for kmod="ip6t_owner" scontext=u:r:netd:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
01-22 05:48:39.193 6746-6746/? W/ip6tables: type=1400 audit(0.0:156): avc: denied { module_request } for kmod="ip6t_owner" scontext=u:r:netd:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
01-22 05:48:39.193 6746-6746/? W/ip6tables: type=1400 audit(0.0:157): avc: denied { module_request } for kmod="ip6t_owner" scontext=u:r:netd:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
01-22 05:48:39.202 6543-6543/? I/ip6tables: ip6tables: No chain/target/match by that name.
01-22 05:48:39.202 6543-6543/? I/ip6tables: ip6tables terminated by exit(1)
01-22 05:48:39.203 6543-6543/? E/BandwidthController: runIptablesCmd(): res=1 status=256 failed /system/bin/ip6tables -A bw_INPUT -m owner --socket-exists
01-22 05:48:39.216 6747-6747/? E/logwrapper: executing /system/bin/ip failed: No such file or directory
01-22 05:48:39.228 6543-6543/? E/Netd: failed to flush rules
01-22 05:48:39.228 6543-6543/? E/CommandListener: failed to initialize RouteController (Remote I/O error)
01-22 05:48:39.229 6543-6543/? D/MDnsDS: MDnsSdListener::Hander starting up
01-22 05:48:39.229 6543-6752/? D/MDnsDS: MDnsSdListener starting to monitor
01-22 05:48:39.230 6543-6752/? D/MDnsDS: Going to poll with pollCount 1
01-22 05:48:39.907 6544-6544/? I/ServiceManager: Waiting for service batterystats...
01-22 05:48:40.357 6545-6545/? A/art: art/runtime/gc/heap.cc:293] Check failed: main_mem_map_1.get() != nullptr Failed anonymous mmap(0x0, -2147483648, 0x3, 0x2, 4, 0): Out of memory
01-22 05:48:40.357 6545-6545/? A/art: art/runtime/gc/heap.cc:293] 6fd57000-706cd000 rw-p 00000000 1f:01 7051
/data/dalvik-cache/x86/system@[email protected]01-22 05:48:40.357 6545-6545/? A/art: art/runtime/gc/heap.cc:293] 706cd000-7215f000 r--p 00000000 1f:01 7052
/data/dalvik-cache/x86/system@[email protected]01-22 05:48:40.357 6545-6545/? A/art: art/runtime/gc/heap.cc:293] 7215f000-73b89000 r-xp 01a92000 1f:01 7052
/data/dalvik-cache/x86/system@[email protected]01-22 05:48:40.357 6545-6545/? A/art: art/runtime/gc/heap.cc:293] 73b89000-73b8a000 rw-p 034bc000 1f:01 7052
/data/dalvik-cache/x86/system@[email protected]01-22 05:48:40.357 6545-6545/? A/art: art/runtime/gc/heap.cc:293] 73b8a000-77b8a000 rw-p 00000000 00:04 16488
/dev/ashmem/dalvik-zygote space (deleted)01-22 05:48:40.357 6545-6545/? A/art: art/runtime/gc/heap.cc:293] b3ab5000-b3adb000 r--p 00976000 1f:01 7051
/data/dalvik-cache/x86/system@[email protected]01-22 05:48:40.357 6545-6545/? A/art: art/runtime/gc/heap.cc:293] b3adb000-b3adc000 r-xp 00000000 1f:00 898
/system/lib/libsigchain.so... (for brevity)
01-22 05:48:40.415 6545-6545/? A/art: art/runtime/gc/heap.cc:293] b7780000-b7781000 r-xp 00000000 00:00 0 [vdso]
01-22 05:48:40.415 6545-6545/? A/art: art/runtime/gc/heap.cc:293] b7781000-b7782000 r--p 00016000 1f:00 258 /system/bin/linker
01-22 05:48:40.415 6545-6545/? A/art: art/runtime/gc/heap.cc:293] b7782000-b7783000 rw-p 00017000 1f:00 258 /system/bin/linker
01-22 05:48:40.415 6545-6545/? A/art: art/runtime/gc/heap.cc:293] b7783000-b7784000 rw-p 00000000 00:00 0
01-22 05:48:40.415 6545-6545/? A/art: art/runtime/gc/heap.cc:293] b7784000-b7788000 r-xp 00000000 1f:00 194
/system/bin/app_process3201-22 05:48:40.415 6545-6545/? A/art: art/runtime/gc/heap.cc:293] b7788000-b7789000 r--p 00003000 1f:00 194
/system/bin/app_process3201-22 05:48:40.415 6545-6545/? A/art: art/runtime/gc/heap.cc:293] b7789000-b778a000 rw-p 00000000 00:00 0
01-22 05:48:40.417 6545-6545/? A/art: art/runtime/gc/heap.cc:293] bff3f000-bff60000 rw-p 00000000 00:00 0 [stack]
01-22 05:48:40.417 6545-6545/? A/art: art/runtime/gc/heap.cc:293]
01-22 05:48:40.421 6545-6545/? A/art: art/runtime/runtime.cc:289] Runtime aborting...
01-22 05:48:40.422 6545-6545/? A/art: art/runtime/runtime.cc:289] (Aborting thread was not attached to runtime!)
01-22 05:48:40.422 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #00 pc 00005d03 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+83)01-22 05:48:40.422 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #01 pc 00003051 /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+33)01-22 05:48:40.422 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #02 pc 003c9e67 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream >&, int, char const*, art::mirror::ArtMethod*)+135)01-22 05:48:40.422 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #03 pc 003777cb /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream >&)+267)01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #04 pc 00377ead /system/lib/libart.so (art::Runtime::Abort()+125)01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #05 pc 000ec704 /system/lib/libart.so (art::LogMessage::~LogMessage()+1876)01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #06 pc 001ec6cc /system/lib/libart.so (art::gc::Heap::Heap(unsigned int, unsigned int, unsigned int, unsigned int, double, double, unsigned int, unsigned int, std::__1::basic_string, std::__1::allocator > const&, art::InstructionSet, art::gc::CollectorType, art::gc::CollectorType, unsigned int, unsigned int, bool, unsigned int, unsigned int, bool, bool, bool, bool, bool, bool, bool, bool, bool, unsigned long long)+10476)01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #07 pc 0037a32b /system/lib/libart.so (art::Runtime::Init(std::__1::vector, std::__1::allocator >, void const*>, std::__1::allocator, std::__1::allocator >, void const*>const&, bool)+1387)
01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #08 pc 0037d6a8 /system/lib/libart.so (art::Runtime::Create(std::__1::vector, std::__1::allocator >, void const*>, std::__1::allocator, std::__1::allocator >, void const*>const&, bool)+104)
01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #09 pc 002ff0fd /system/lib/libart.so (JNI_CreateJavaVM+1117)01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #10 pc 00072bfa /system/lib/libandroid_runtime.so (android::AndroidRuntime::startVm(_JavaVM**, _JNIEnv**, bool)+2346)01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #11 pc 00073a80 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector const&, bool)+368)01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #12 pc 000018b1 /system/bin/app_process32 (???)01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #13 pc 00012f94 /system/lib/libc.so (__libc_init+100)01-22 05:48:40.424 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #14 pc 00001b66 /system/bin/app_process32 (???)01-22 05:48:40.426 6545-6545/? A/art: art/runtime/runtime.cc:289]
native: #15 pc 00000004 ???01-22 05:48:40.426 6545-6545/? A/art: art/runtime/runtime.cc:289] Dumping all threads without appropriate locks held: thread list lock mutator lock
01-22 05:48:40.426 6545-6545/? A/art: art/runtime/runtime.cc:289] All threads:
01-22 05:48:40.426 6545-6545/? A/art: art/runtime/runtime.cc:289] DALVIK THREADS (0):
01-22 05:48:40.426 6545-6545/? A/art: art/runtime/runtime.cc:289]
01-22 05:48:40.426 6545-6545/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 6545 (zygote)
01-22 05:48:40.547 939-939/? I/DEBUG: * *
01-22 05:48:40.547 939-939/? I/DEBUG: Build fingerprint: 'Android/sdk_google_phone_x86/generic_x86:5.1.1/LMY48X/2524186:userdebug/test-keys'
01-22 05:48:40.547 939-939/? I/DEBUG: Revision: '0'
01-22 05:48:40.547 939-939/? I/DEBUG: ABI: 'x86'
01-22 05:48:40.547 939-939/? I/DEBUG: pid: 6545, tid: 6545, name: zygote >>> zygote <<<
01-22 05:48:40.547 939-939/? I/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
01-22 05:48:40.551 939-939/? I/DEBUG: Abort message: 'art/runtime/gc/heap.cc:293] Check failed: main_mem_map_1.get() != nullptr Failed anonymous mmap(0x0, -2147483648, 0x3, 0x2, 4, 0): Out of memory'
01-22 05:48:40.551 939-939/? I/DEBUG: eax 00000000 ebx 00001991 ecx 00001991 edx 00000006
01-22 05:48:40.552 939-939/? I/DEBUG: esi b7782c48 edi 0000000c
01-22 05:48:40.552 939-939/? I/DEBUG: xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b
01-22 05:48:40.552 939-939/? I/DEBUG: eip b750fd86 ebp 00001991 esp bff5d8b0 flags 00000286
01-22 05:48:40.552 939-939/? I/DEBUG: #00 pc 00073d86 /system/lib/libc.so (tgkill+22)
01-22 05:48:40.552 939-939/? I/DEBUG: #01 pc 0002217b /system/lib/libc.so (pthread_kill+155)
01-22 05:48:40.552 939-939/? I/DEBUG: #02 pc 000239f4 /system/lib/libc.so (raise+36)
01-22 05:48:40.552 939-939/? I/DEBUG: #03 pc 0001bdf4 /system/lib/libc.so (abort+84)
01-22 05:48:40.552 939-939/? I/DEBUG: #04 pc 00377f56 /system/lib/libart.so (art::Runtime::Abort()+294)
01-22 05:48:40.553 939-939/? I/DEBUG: #05 pc 000ec704 /system/lib/libart.so (art::LogMessage::~LogMessage()+1876)
01-22 05:48:40.553 939-939/? I/DEBUG: #06 pc 001ec6cc /system/lib/libart.so (art::gc::Heap::Heap(unsigned int, unsigned int, unsigned int, unsigned int, double, double, unsigned int, unsigned int, std::__1::basic_string, std::__1::allocator > const&, art::InstructionSet, art::gc::CollectorType, art::gc::CollectorType, unsigned int, unsigned int, bool, unsigned int, unsigned int, bool, bool, bool, bool, bool, bool, bool, bool, bool, unsigned long long)+10476)
01-22 05:48:40.553 939-939/? I/DEBUG: #07 pc 0037a32b /system/lib/libart.so (art::Runtime::Init(std::__1::vector, std::__1::allocator >, void const*>, std::__1::allocator, std::__1::allocator >, void const*>
const&, bool)+1387)
01-22 05:48:40.553 939-939/? I/DEBUG: #08 pc 0037d6a8 /system/lib/libart.so (art::Runtime::Create(std::__1::vector, std::__1::allocator >, void const*>, std::__1::allocator, std::__1::allocator >, void const*>
const&, bool)+104)
01-22 05:48:40.553 939-939/? I/DEBUG: #09 pc 002ff0fd /system/lib/libart.so (JNI_CreateJavaVM+1117)
01-22 05:48:40.553 939-939/? I/DEBUG: #10 pc 00072bfa /system/lib/libandroid_runtime.so (android::AndroidRuntime::startVm(_JavaVM**, _JNIEnv**, bool)+2346)
01-22 05:48:40.553 939-939/? I/DEBUG: #11 pc 00073a80 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector const&, bool)+368)
01-22 05:48:40.553 939-939/? I/DEBUG: #12 pc 000018b1 /system/bin/app_process32
01-22 05:48:40.553 939-939/? I/DEBUG: #13 pc 00012f94 /system/lib/libc.so (__libc_init+100)
01-22 05:48:40.553 939-939/? I/DEBUG: #14 pc 00001b66 /system/bin/app_process32
01-22 05:48:40.554 939-939/? I/DEBUG: #15 pc 00000004
01-22 05:48:40.627 929-929/? I/ServiceManager: service 'media.audio_flinger' died
My .avd folder is located at C:\Users\maffe and as you can see HAXM is working.
My emulator device is:
- Nexus 6
- Lollipop
- API 22
- Target is Google APIs
- CPU x86
- Uses Host GPU
- No camera
- 1536MB of RAM
- 2GB of VM heap
- 200MB of internal storage
- Enable Device Frame is checked
I am myself running the following computer:
- Intel Core i5-3470 CPU @ 3.2GHz
- 12GB RAM
- 64 bit Windows 10
- About a 2 week old setup (from a fresh Windows installation)
Any idea why it would get stuck on the loop shown in the Logcat output? All I see is the black screen with the 'Android' sign on it (which of course is better then the black-only-screen I get if I uncheck Use Host GPU).
Solution
I found the problem. I had accidentally set the VM heap to 2GB. I should've left it at 64MB :)
Answered By - Maffelu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.