12

In order to get familiar with AOSP, I'm aiming at building an image and running it on an emulator, following the official documentation.

After setting up an Ubuntu 16.04 VM, I use the following commands:

repo init -u https://android.googlesource.com/platform/manifest
repo sync
source build/envsetup.sh
lunch full-eng
make -j8
emulator

Compilation works fine, the emulator starts but its screen remains blank. No particular error trace in the console.

I tried it without any proprietary binaries, and also with Nexus 5 binaries, but it didn't change anything.

I also tried with lunch aosp_arm-eng but same result.

What am I missing?

I can successfully shell into the emulator. In dmesg output I noticed the following error traces:

[   23.952504] init: Failed to bind socket 'pdx/system/vr/display/client': No such file or directory
[   23.954517] init: Failed to bind socket 'pdx/system/vr/display/manager': No such file or directory
[   23.956460] init: Failed to bind socket 'pdx/system/vr/display/vsync': No such file or directory

And the output of service list command is:

generic:/ # service list
Found 10 services:
0   media.resource_manager: []
1   media.player: []
2   media.camera: []
3   media.sound_trigger_hw: []
4   media.radio: []
5   media.aaudio: []
6   media.audio_policy: []
7   netd: []
8   media.audio_flinger: []
9   batteryproperties: [android.os.IBatteryPropertiesRegistrar]
sdabet
  • 18,360
  • 11
  • 89
  • 158
  • Have you tried building a particular device ? Please refer to [this](https://source.android.com/source/running#selecting-device-build) list of available device names. – David Lev Sep 02 '17 at 21:24
  • @DuduLev I've also tried to build for "angler" (Nexus 6P) but I have the same issue when running the emulator – sdabet Sep 03 '17 at 09:31
  • @Onik Same result with `sdk-eng` – sdabet Sep 03 '17 at 09:32
  • Hmmm... Can you `shell` into the emulator? If yes, look at `logcat` and `dmesg` outputs. How many services the `service list` command gives? – Onik Sep 03 '17 at 09:45
  • @Onik Yes I can `shell` it. The `service list` command gives 10 services. – sdabet Sep 04 '17 at 10:56
  • @Onik See my edit for the output of `service list` and `dmesg` – sdabet Sep 04 '17 at 14:08
  • 10 services aren't clearly enough even, I guess, for _Android_ 1.0. [Seems like `zygote` hasn't been started of failed](https://stackoverflow.com/a/40314150/3290339). Have you modified the source code? As 1st attempt try `adb shell start zygote`. If it helps, let me know, - it might be environment variables set in a wrong way. If it won't help, investigate `logcat` thoroughly. – Onik Sep 04 '17 at 15:03
  • @Onik I haven't modified the code. And starting zygote didn't change anything. Logcat is actually quite verbose... any idea what I should be looking for ? – sdabet Sep 04 '17 at 17:03
  • Looking again at the services running with empty `[]` makes me think that something went wrong at `init.*` stage. Investigate `dmesg` also. Additionally, what makes you think that _"Compilation works fine"_? – Onik Sep 04 '17 at 17:17
  • 1
    @Onik I assumed that compilation succeeded because of the green message saying `build completed successfully` at the end of the `make` command. – sdabet Sep 04 '17 at 17:27
  • @Onik Did you see the error traces "Failed to bind socket" in my edit ? It actually seems related to the init stage. Do they mean anything to you ? – sdabet Sep 04 '17 at 17:30
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/153635/discussion-between-onik-and-fiddler). – Onik Sep 04 '17 at 17:31

2 Answers2

0

I know this is probably dead now, but figured I'd post for others to find.

I also had a similar issue and I fixed it by running:

cd aospDir
source build/envsetup.sh
lunch sdk_phone_x86_64
m -j16       # builds using 16 cores

Then once that finished:

adb start-service
emulator

For me it was an issue with adb not starting.

Grant
  • 48
  • 9
-2

Build for aosp_x86_64 or arm. Should work then! Other images are no longer supported to run on emulator. They are for their respective devices. arm and x86/x86_64 should work on emulator as they are generic in nature.

EDIT: Just saw that you tried running for aosp_arm_eng, in that case would you mind posting results after you run emulator with following command?

$ emulator -verbose

SamT01
  • 125
  • 1
  • 14