Skip to content

Instantly share code, notes, and snippets.

@hmelder
Last active August 27, 2025 10:26
Show Gist options
  • Select an option

  • Save hmelder/06e0c859aa673102fc8253c502c1ef39 to your computer and use it in GitHub Desktop.

Select an option

Save hmelder/06e0c859aa673102fc8253c502c1ef39 to your computer and use it in GitHub Desktop.
Compiling the Android Emulator

If you follow the official instructions from here, you will end up downloading over 100 GB of system images. This is due to this line in the repo manifest:

<!-- Test infrastructure uses these -->
  <project path="prebuilts/android-emulator-build/system-images" name="platform/prebuilts/android-emulator-build/system-images" revision="main" clone-depth="1" />

Instead of emu-master-dev, select the emu-master-qemu branch to only pull dependencies for building the emulator.

If you are targeting aarch64-linux, cross-compile from an x86_64 machine, as there are no prebuild toolchains that run natively on this target. I recommend just using the latest Ubuntu LTS or Debian, as this is what the python script expects.

mkdir emu
cd emu
repo init -u https://android.googlesource.com/platform/manifest -b emu-master-qemu --depth=1
repo sync -cj `nproc`
cd external/qemu
pip install absl-py
pip install urlfetch
sudo apt-get install crossbuild-essential-arm64
python android/build/python/cmake.py --noqtwebengine --noshowprefixforinfo --target linux_aarch64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment