question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Force Android emulator to use GPU hardware acceleration

See original GitHub issue

On my machine emulator seems to be running without GPU acceleration when launched from Visual Studio Code or AVD event when I configure hardware acceleration as follows:

image

But I when I launch it from command line with -gpu host argument rendering performance increases dramatically.

Android documentation at https://developer.android.com/studio/run/emulator-acceleration says:

By default, the emulator decides whether to use hardware or software graphics acceleration based on your computer setup. If your GPU hardware and drivers are compatible, the emulator uses the GPU. Otherwise, the emulator uses software acceleration (using your computer’s CPU) to simulate GPU processing.

If you start the emulator from the command line, you can also override the graphics acceleration setting in the AVD for that virtual device instance.

I am not sure if this is some issue with Android emulators / AVD on my machine or it is something that could help other users too and might be implemented in Dart Code?..

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
roman-petrovcommented, Apr 14, 2020

Actually, I tried setting Graphics dropdown to both Automatic and Hardware - GLES 2.0 and launching emulator from AVD Manager

Still my observations are that rendering is better/smoother if I launch emulator using command line using console command

C:\Users\<my username>\AppData\Local\Android\Sdk\emulator\emulator.exe -avd MyAvd -gpu host

Anyways, this issue (if it exists) is 100% not connected to Dart-Code, it might be related to Android tooling or even my machine configuration.

That’s why I decided to close the issue:) @DanTup, thank you very much for all your help!

0reactions
pedrohmscommented, Oct 27, 2022

I dont know if you already fix this issue, but the work oround I used is: 1.I changed the name from emulator to emulator-bin 2. And created a bash script with $EMULATOR_PATH/emulator $*

this fixed my problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Ways to Supercharge the Android Emulator - Codementor
3.GPU Emulation. GPU emulation (sometimes referred to as GPU acceleration) is where the emulator utilises the host machine's GPU to accelerate drawing options....
Read more >
Enable hardware acceleration for the Android emulator (Hyper ...
This article explains how to use your computer's hardware acceleration features to maximize Android emulator performance.
Read more >
How can I run Android emulator for Intel x86 Atom without ...
Go to AVD manager, create virtual device, select hardware, click next. · Choose the System Image that does not require HAXM (hardware acceleration)...
Read more >
How to enable AMD Hardware Acceleration for Android Studio ...
Android Studio finally supports Hardware Acceleration for their x86 Android Emulator ! Hope it helps!
Read more >
GitHub Action - Android Emulator Runner - Google Dev Library
Note: GPU and VM Acceleration are two different and non-mutually exclusive forms of Hardware Acceleration. This presents a challenge when running emulators on ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found