After many attempts, and trying many solutions that I could find on stackoverflow or elsewhere on the internet, I was still not able to run the emulator on my computer. This is happening with this computer on both Windows and Linux boots. I am able to start the emulator but then it remains with a full black screen. Here are some information regarding the software: Linux Ubuntu 20.04LTS and Android-studio version I am working with: 4.1.2. About my hardware:
$sudo lshw -short
H/W path Device Class Description
======================================================
system GA-A75M-S2V
/0 bus GA-A75M-S2V
/0/0 memory 128KiB BIOS
/0/4 processor AMD A8-3870 APU with Radeon(tm) HD Graphics
/0/4/a memory 128KiB L1 cache
/0/4/c memory 1MiB L3 cache
/0/b memory 128KiB L1 cache
/0/26 memory 8GiB System Memory
/0/26/0 memory 4GiB DIMM 1333 MHz (0.8 ns)
/0/26/1 memory 4GiB DIMM 1333 MHz (0.8 ns)
/0/26/2 memory DIMM 1333 MHz (0.8 ns) [empty]
/0/26/3 memory DIMM 1333 MHz (0.8 ns) [empty]
/0/100 bridge Family 12h Processor Root Complex
/0/100/2 bridge Family 12h Processor Root Port
/0/100/2/0 display GK104 [GeForce GTX 670]
/0/100/2/0.1 multimedia GK104 HDMI Audio Controller
/0/100/4 bridge Family 12h Processor Root Port
/0/100/4/0 enp2s0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
First I checked that the virtualization was working and it Seems to be pretty OK.
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 40 bits physical, 48 bits virtual
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: AuthenticAMD
CPU family: 18
Model: 1
Model name: AMD A8-3870 APU with Radeon(tm) HD Graphics
Stepping: 0
CPU MHz: 1395.339
CPU max MHz: 3000.0000
CPU min MHz: 800.0000
BogoMIPS: 5999.33
Virtualization: AMD-V
L1d cache: 256 KiB
L1i cache: 256 KiB
L2 cache: 4 MiB
NUMA node0 CPU(s): 0-3
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Full AMD retpoline, STIBP disabled, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_
good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_ps
tate vmmcall arat npt lbrv svm_lock nrip_save pausefilter
Then I tried a second verification!
$ virt-host-validate
QEMU: Checking for hardware virtualization : PASS
With flutter doctor
, it is written that the Device is offline and I have a full black screen.
Here I tried many things, graphics with hardware or software rendering, changing the RAM, changing the number of cores, changing x86 or x86_64 CPU arch, ... $flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.5, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[!] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.52.1)
[!] Connected device
! Device emulator-5554 is offline.
! Doctor found issues in 2 categories.
And when doing the adb devices command:
$adb devices
List of devices attached
adb server version (41) doesn't match this client (39); killing...
* daemon started successfully
I always get this error at the end: Timed out after 300 seconds waiting for emulator to come online.
I tried to do adb server-killer
etc, doing cold boot, etc, ... nothing worked. I still got the exact same issue.
Previously I was using another computer on which everything was working fine. And I am totally struggling here.
$adb kill-server
$adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
And when running logcat I got a restart loop.
$./emulator -avd Pixel_2_API_30 -debug-init -logcat '*:v'
emulator: Android emulator version 30.3.5.0 (build_id 7033400) (CL:N/A)
emulator: Found AVD name 'Pixel_2_API_30'
emulator: Found AVD target architecture: x86
...
[ 1.453200] Run /init as init process
[ 1.454227] traps: init[1] trap invalid opcode ip:59434e sp:ffa11a60 error:0 in init[462000+139000]
[ 1.455590] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[ 1.456724] CPU: 0 PID: 1 Comm: init Not tainted 5.4.61-android11-0-00791-gbad091cc4bf3-ab6833933 #1
[ 1.458050] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.1-0-g0551a4be2c-prebuilt.qemu-project.org 04/01/2014
[ 1.459787] Call Trace:
[ 1.460170] dump_stack+0x95/0xe5
[ 1.460702] panic+0x112/0x39a
[ 1.461069] do_exit+0xa99/0xb00
[ 1.461455] do_group_exit+0x89/0xa0
[ 1.461887] get_signal+0x999/0xae0
[ 1.462306] ? _raw_spin_unlock_irqrestore+0x1a/0x40
[ 1.462890] ? force_sig_info_to_task+0x111/0x120
[ 1.463641] do_signal+0x80/0x250
[ 1.464039] prepare_exit_to_usermode+0x8d/0x100
[ 1.464589] ? invalid_op+0xa/0x30
[ 1.464993] retint_user+0x8/0x8
[ 1.465378] RIP: 0023:0x59434e
[ 1.465743] Code: f7 83 e1 03 c1 e6 0c c1 e1 0a 09 d6 0f b6 d3 8b 5c 24 0c 09 d1 8b 55 08 09 f1 81 c9 00 01 00 00 66 0f 6e c1 8b 92 40 95 00 00 <f2> 0f 38 f1 d3 f2 0f 38 f1 d1 f2 0f 38 f1 d0 0f b7 c0 89 d6 c1 ee
[ 1.468434] RSP: 002b:00000000ffa11a60 EFLAGS: 00010202
[ 1.469069] RAX: 0000000000000000 RBX: 00000000f7f80a60 RCX: 0000000000018102
[ 1.469901] RDX: 0000000051746398 RSI: 0000000000018000 RDI: 0000000000000018
[ 1.470732] RBP: 00000000ffa11a98 R08: 0000000000000000 R09: 0000000000000000
[ 1.471564] R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000
[ 1.472394] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 1.473344] Kernel Offset: 0x29000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 1.475542] Rebooting in 5 seconds..
emulator: No acpi ini file provided, using default
...
Do you have any idea about what I could be missing exactly ? I was not able to post images. I hope that you will be able to help me. Many Thanks,
I finally found the solution. Because I am using an old AMV processor, I needed to use an ARM based image for the emulator and not a x86 image. I was then able to run it. Unfortunately my processor was not powerful enough and was lagging as hell when launching the android emulator. Had to buy a new computer.
User contributions licensed under CC BY-SA 3.0