1
votes

I tried to build up the AOSP on Ubuntu 18.04.4 base on the official guide. All work look good until start emulator.

Step1:repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r29 --depth=1 --platform=auto

Step2:repo sync -qc -j4

Step3:source build/envsetup.sh

Step4:lunch aosp_arm64-eng

Step5:make -j4

Step6:emulator

root@simon-MS-7850:~/workspace/ANDROID_S# emulator

emulator: WARNING: Couldn't find crash service executable /root/workspace/ANDROID_S/prebuilts/android-emulator/linux-x86_64/emulator64-crash-service

emulator: WARNING: system partition size adjusted to match image file (3083 MB > 800 MB)

statvfs('/root/workspace/ANDROID_S/out/target/product/generic_arm64/snapshots/default_boot/ram.img') failed: No such file or directory

emulator: WARNING: encryption is off

pulseaudio: pa_context_connect() failed

pulseaudio: Reason: Connection refused

pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver

The emulator started but stay at the blank screen and get the above error '...ot/ram.img') failed: No such file or directory'. I found a file ram.img.dirty in directory '.../default_boot/' instead of ram.img.

root@simon-MS-7850:~/workspace/ANDROID_S/out/target/product/generic_arm64/snapshots/default_boot# ls

ram.img.dirty snapshot.pb

No idea the key reason and how to fix it.

1

1 Answers

0
votes

First, do lunch using the following command, as I am not sure if you really need to aosp_arm64-eng, depends on your underlying processor actually.

lunch aosp_x86_64-eng

Second, most of the time the issues are related to KVM installation which gives you virtualisation support and even if it is installed sometimes it is missing proper user groups. Please try the following commands:

sudo apt install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils wget unzip

sudo usermod -aG kvm raj

sudo usermod -aG libvirt raj

For more information follow the guide on this link: https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/how-to-install-android-studio-on-ubuntu-18-04-lts-bionic-beaver.html

Note: ram.img.dirty has nothing to do with, this will be automatically fixed if you do the above steps.