by clumsysmurf · 6y ago · 0 comments
hw.audioInput=no hw.audioOutput=no
to every AVD I create. Otherwise, the Android Emulator uses 100% CPU all the time, even when it's been idle for minutes.
I'm far from the only one having the problem, see https://stackoverflow.com/questions/37063267/high-cpu-usage-...
I'm on a Macbook Air 2014, Intel i5, 8GB of RAM, 500GB SSD. Hardware acceleration, etc. all enabled.
https://drive.google.com/open?id=1sXEQcoiNpe3Lj8yeaKLasTjqlGQwy4Oi
If you still don't get symbols from that it should be possible to build the emulator itself on macos:install repo from depot_tools https://www.chromium.org/developers/how-tos/install-depot-to...
pip install absl-py
pip install urlfetch
mkdir emu
cd emu
repo init -u https://android.googlesource.com/platform/manifest -b emu-master-dev --depth=1
repo sync -qcj 4
cd external/qemu
python android/build/python/cmake.py
# run
objs/emulator -avd avdName -no-snapshot
Debugging: # when it spins:
# method 1: go to activity monitor -> sample process, send over the result
# method 2: lldb
lldb
process attach --pid <pid-of-qemu-system-<arch>>
bt all #send it over
# method 3: guest process taking CPU
adb shell top