Android AVD installs custom hardware

I am trying to reduce the ridiculous CPU usage of my Android emulator.

Thanks to this answer, I found out that CPU usage can be significantly reduced by turning off the sound.

Decision

I found out that there are three ways to start the emulator without sound.

  • Like a command line flag:

    $ emulator -avd <name> -noaudio 
  • ~/.android/<name>.avd/config.ini and replacing this line:

     hw.audioInput=yes 

    with these two:

     hw.audioInput=no hw.audioOutput=no 
  • Instead of using the AVD graphical manager, use the following command to create an emulator:

     $ android create avd -n <name> -t <target> 

Vs

All of these methods have disadvantages.

  • It is required to pass the -noaudio flag each time. This means that it cannot be started from the AVD manager.
  • config.ini reset every time editing is done using the AVD manager.
  • It is required to explicitly set each property of the device instead of just using a pre-configured configuration.

Trying (unsuccessful) solution

I decided that it would help just clone an existing device and mute the sound there.

However, this just created ~/.android/devices.xml , and I could not describe exactly how to turn off the default sound or any ini files containing hardware definitions.

Question

Is it possible to create a predefined hardware configuration that is disabled by default? If so, how?

+5
source share

All Articles