How to build emulator x86 image for 8.0?

380 views
Skip to first unread message

Chih-Wei Huang

unread,
Sep 18, 2017, 10:27:41 PM9/18/17
to Android emulator development
Hi,
What is the correct target to build an x86 emulator image for 8.0?
I tried to build aosp_x86 target, but my built files are
apparently different than the download emulator image of SDK.
In particular, I don't have /vendor/manifest.xml,
which is an essential file of 8.0 I believe.
Where is it?

Here are some lists.

SDK emulator:
generic_x86:/ # ls -l /vendor/lib/hw
total 1404
-rw-r--r-- 1 root root 347812 2017-07-22 08:49
android.hardwa...@2.0-impl.so
-rw-r--r-- 1 root root 244364 2017-07-22 08:49
android.har...@2.0-impl.so
-rw-r--r-- 1 root root 43088 2017-07-22 08:49
android.hardwar...@1.0-impl.so
-rw-r--r-- 1 root root 195168 2017-07-22 08:49
android.hardware...@2.4-impl.so
-rw-r--r-- 1 root root 137700 2017-07-22 08:49 android.ha...@1.0-impl.so
-rw-r--r-- 1 root root 30784 2017-07-22 08:49
android.hardware....@2.0-impl.so
-rw-r--r-- 1 root root 129540 2017-07-22 08:49
android.hardware....@2.1-impl.so
-rw-r--r-- 1 root root 39208 2017-07-22 08:49
android.hardware...@2.0-impl.so
-rw-r--r-- 1 root root 39056 2017-07-22 08:49
android.hardw...@3.0-impl.so
-rw-r--r-- 1 root root 18496 2017-07-22 08:49
android.har...@1.0-impl.so
-rw-r--r-- 1 root root 68276 2017-07-22 08:49
android.hard...@1.0-impl.so
-rw-r--r-- 1 root root 34876 2017-07-22 08:49
android.hardwa...@2.0-impl.so
-rw-r--r-- 1 root root 26768 2017-07-22 08:49
android.hardware....@1.0-impl.so
-rw-r--r-- 1 root root 36156 2017-07-22 08:49 audio.r_submix.default.so
-rw-r--r-- 1 root root 15084 2017-07-22 08:49 gralloc.default.so
-rw-r--r-- 1 root root 6280 2017-07-22 08:49 local_time.default.so

generic_x86:/ # ls -l /vendor/lib/egl
total 17044
-rw-r--r-- 1 root root 1717784 2017-07-22 08:50 libEGL_swiftshader.so
-rw-r--r-- 1 root root 7550008 2017-07-22 08:50 libGLESv1_CM_swiftshader.so
-rw-r--r-- 1 root root 8177696 2017-07-22 08:50 libGLESv2_swiftshader.so

generic_x86:/ # ls -l /vendor/lib
total 836
-rw-r--r-- 1 root root 138260 2017-07-22 08:49 camera...@1.0-impl.so
-rw-r--r-- 1 root root 186996 2017-07-22 08:49 camera...@3.2-impl.so
drwxr-xr-x 2 root shell 4096 2017-07-22 08:50 egl
drwxr-xr-x 2 root shell 4096 2017-07-22 08:49 hw
-rw-r--r-- 1 root root 18644 2017-07-22 08:49 libeffects.so
-rw-r--r-- 1 root root 170652 2017-07-22 08:49 libhwc2on1adapter.so
-rw-r--r-- 1 root root 298840 2017-07-22 08:49 libril.so
-rw-r--r-- 1 root root 20152 2017-07-22 08:49 libwifi-hal.so
drwxr-xr-x 2 root shell 4096 2017-07-22 08:49 mediadrm
drwxr-xr-x 2 root shell 4096 2017-07-22 08:49 soundfx

generic_x86:/ # ls -l /vendor/
total 16
drwxr-xr-x 3 root shell 4096 2017-07-22 08:49 bin
drwxr-xr-x 4 root shell 4096 2017-07-22 08:18 etc
drwxr-xr-x 6 root shell 4096 2017-07-22 08:50 lib
-rw-r--r-- 1 root root 1961 2017-07-22 08:18 manifest.xml

generic_x86:/ # ls -l /vendor/bin
total 224
drwxr-xr-x 2 root shell 4096 2017-07-22 08:50 hw
-rwxr-xr-x 1 root shell 1135 2017-07-22 08:18 init.ranchu-core.sh
-rwxr-xr-x 1 root shell 714 2017-07-22 08:18 init.ranchu-net.sh
-rwxr-xr-x 1 root shell 43448 2017-07-22 08:49 vndservice
-rwxr-xr-x 1 root shell 168808 2017-07-22 08:49 vndservicemanager

generic_x86:/ # ls -l /vendor/bin/hw
total 136
-rwxr-xr-x 1 root shell 10396 2017-07-22 08:49
android.har...@2.0-service
-rwxr-xr-x 1 root shell 27328 2017-07-22 08:49
android.hardware.bi...@2.1-service
-rwxr-xr-x 1 root shell 14996 2017-07-22 08:49
android.hardwa...@1.0-service
-rwxr-xr-x 1 root shell 6296 2017-07-22 08:49 android.ha...@1.0-service
-rwxr-xr-x 1 root shell 6292 2017-07-22 08:49
android.hardware....@2.0-service
-rwxr-xr-x 1 root shell 10396 2017-07-22 08:49
android.hardware....@2.1-service
-rwxr-xr-x 1 root shell 6296 2017-07-22 08:49
android.hardw...@3.0-service
-rwxr-xr-x 1 root shell 14592 2017-07-22 08:50
android.hardw...@1.0-service
-rwxr-xr-x 1 root shell 6296 2017-07-22 08:49
android.har...@1.0-service
-rwxr-xr-x 1 root shell 6292 2017-07-22 08:49
android.hard...@1.0-service
-rwxr-xr-x 1 root shell 10476 2017-07-22 08:49 rild

My built files:
$ ls -l $OUT/system/vendor/lib/hw
total 1136
-rwxrwxr-x 1 lh lh 244364 9月 18 18:03 android.har...@2.0-impl.so
-rwxrwxr-x 1 lh lh 347812 9月 18 18:04 android.hardwa...@2.0-impl.so
-rwxrwxr-x 1 lh lh 43088 9月 18 18:03
android.hardwar...@1.0-impl.so
-rwxrwxr-x 1 lh lh 137700 9月 18 18:03 android.ha...@1.0-impl.so
-rwxrwxr-x 1 lh lh 129540 9月 18 18:03
android.hardware....@2.1-impl.so
-rwxrwxr-x 1 lh lh 39056 9月 18 18:03 android.hardw...@3.0-impl.so
-rwxrwxr-x 1 lh lh 18496 9月 18 18:03 android.har...@1.0-impl.so
-rwxrwxr-x 1 lh lh 68276 9月 18 18:03 android.hard...@1.0-impl.so
-rwxrwxr-x 1 lh lh 34876 9月 18 18:03 android.hardwa...@2.0-impl.so
-rwxrwxr-x 1 lh lh 26768 9月 18 18:02
android.hardware....@1.0-impl.so
-rwxrwxr-x 1 lh lh 10844 9月 18 18:02 audio.primary.default.so
-rwxrwxr-x 1 lh lh 15084 9月 18 18:03 gralloc.default.so
-rwxrwxr-x 1 lh lh 6280 9月 18 18:02 local_time.default.so
-rwxrwxr-x 1 lh lh 6352 9月 18 18:02 power.default.so
-rwxrwxr-x 1 lh lh 10456 9月 18 18:02 vibrator.default.so

$ ls -l $OUT/system/vendor/lib/egl
ls: cannot access
'/mnt/OTO7.1/cwhuang/aosp/out/target/product/generic_x86/system/vendor/lib/egl':
No such file or directory

$ ls -l $OUT/system/vendor/lib/
total 492
drwxrwxr-x 2 lh lh 4096 9月 18 18:04 hw
-rwxrwxr-x 1 lh lh 18644 9月 18 18:02 libeffects.so
-rwxrwxr-x 1 lh lh 170652 9月 18 18:02 libhwc2on1adapter.so
-rwxrwxr-x 1 lh lh 298840 9月 18 18:04 libril.so
drwxrwxr-x 2 lh lh 4096 9月 18 18:04 mediadrm
drwxrwxr-x 2 lh lh 4096 9月 18 18:03 soundfx

$ ls -l $OUT/system/vendor
total 12
drwxrwxr-x 3 lh lh 4096 9月 18 18:03 bin
drwxrwxr-x 4 lh lh 4096 9月 18 17:47 etc
drwxrwxr-x 5 lh lh 4096 9月 18 18:04 lib

$ ls -l $OUT/system/vendor/bin
total 216
drwxrwxr-x 2 lh lh 4096 9月 18 18:05 hw
-rwxrwxr-x 1 lh lh 43448 9月 18 18:03 vndservice
-rwxrwxr-x 1 lh lh 168808 9月 18 18:02 vndservicemanager

$ ls -l $OUT/system/vendor/bin/hw
total 116
-rwxrwxr-x 1 lh lh 10396 9月 18 18:03 android.har...@2.0-service
-rwxrwxr-x 1 lh lh 27328 9月 18 18:03
android.hardware.bi...@2.1-service
-rwxrwxr-x 1 lh lh 14996 9月 18 18:03 android.hardwa...@1.0-service
-rwxrwxr-x 1 lh lh 6296 9月 18 18:03 android.ha...@1.0-service
-rwxrwxr-x 1 lh lh 6296 9月 18 18:03 android.hardw...@3.0-service
-rwxrwxr-x 1 lh lh 14592 9月 18 18:05 android.hardw...@1.0-service
-rwxrwxr-x 1 lh lh 6296 9月 18 18:03 android.har...@1.0-service
-rwxrwxr-x 1 lh lh 6292 9月 18 18:03 android.hard...@1.0-service
-rwxrwxr-x 1 lh lh 10476 9月 18 18:04 rild



--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Chih-Wei Huang

unread,
Sep 19, 2017, 4:49:31 AM9/19/17
to Android emulator development
2017-09-19 10:27 GMT+08:00 Chih-Wei Huang <cwh...@android-x86.org>:
> Hi,
> What is the correct target to build an x86 emulator image for 8.0?
> I tried to build aosp_x86 target, but my built files are
> apparently different than the download emulator image of SDK.
> In particular, I don't have /vendor/manifest.xml,
> which is an essential file of 8.0 I believe.
> Where is it?

I copied the /vendor/manifest.xml from SDK emulator
to my image, and add these to
build/make/target/product/emulator.mk

PRODUCT_PACKAGES +=
android.hardware....@2.0-service \
android.hardware....@2.0-impl \
android.hardware...@2.0-impl \

and with other hacking I probably forgot,
I finally made my built image boot to home:

http://i.imgur.com/YkTLfLP.png

However, a lot of functions still don't work.
For example, Settings and Webview Browser Tester
just crash. The logcat also shows some services
like gatekeeperd repeatedly crash.

09-19 08:36:50.093 1893 1893 F DEBUG : *** *** *** *** *** *** ***
*** *** *** *** *** *** *** *** ***
09-19 08:36:50.093 1893 1893 F DEBUG : Build fingerprint:
'Android/aosp_x86/generic_x86:8.0.0/OPR6.170623.017/lh09191511:eng/test-keys'
09-19 08:36:50.093 1893 1893 F DEBUG : Revision: '0'
09-19 08:36:50.093 1893 1893 F DEBUG : ABI: 'x86'
09-19 08:36:50.093 1893 1893 F DEBUG : pid: 1888, tid: 1888, name:
android.hardwar >>>
/vendor/bin/hw/android.hardw...@1.0-service <<<
09-19 08:36:50.093 1893 1893 F DEBUG : signal 6 (SIGABRT), code -6
(SI_TKILL), fault addr --------
09-19 08:36:50.093 1893 1893 F DEBUG : Abort message: 'Unable to
open GateKeeper HAL'
09-19 08:36:50.093 1893 1893 F DEBUG : eax 00000000 ebx
00000760 ecx 00000760 edx 00000006
09-19 08:36:50.093 1893 1893 F DEBUG : esi 00000760 edi bfd8a5e8
09-19 08:36:50.093 1893 1893 F DEBUG : xcs 00000073 xds
0000007b xes 0000007b xfs 00000000 xss 0000007b
09-19 08:36:50.093 1893 1893 F DEBUG : eip af6e5ac4 ebp
bfd8a608 esp bfd8a59c flags 00000296
09-19 08:36:50.096 1894 1894 I crash_dump32: obtaining output fd
from tombstoned
09-19 08:36:50.096 1894 1894 E libc : failed to connect to
tombstoned: No such file or directory
09-19 08:36:50.096 1893 1893 F DEBUG :
09-19 08:36:50.096 1893 1893 F DEBUG : backtrace:
09-19 08:36:50.096 1893 1893 F DEBUG : #00 pc 00000ac4
[vdso:af6e5000] (__kernel_vsyscall+16)
09-19 08:36:50.096 1893 1893 F DEBUG : #01 pc 00075b3c
/system/lib/libc.so (tgkill+28)
09-19 08:36:50.096 1893 1893 F DEBUG : #02 pc 0001f04e
/system/lib/libc.so (abort+110)
09-19 08:36:50.096 1893 1893 F DEBUG : #03 pc 00006a06
/system/lib/liblog.so (__android_log_assert+294)
09-19 08:36:50.096 1893 1893 F DEBUG : #04 pc 00002a9e
/system/vendor/lib/hw/android.hardw...@1.0-impl.so
(HIDL_FETCH_IGatekeeper+174)
09-19 08:36:50.096 1893 1893 F DEBUG : #05 pc 0002a5e0
/system/lib/libhidltransport.so
(_ZN7android8hardware25PassthroughServiceManager3getERKNS0_11hidl_stringES4_+2336)
09-19 08:36:50.096 1893 1893 F DEBUG : #06 pc 0001e5c5
/system/lib/android.hardw...@1.0.so
(_ZN7android8hardware10gatekeeper4V1_011IGatekeeper10getServiceERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEb+1877)
09-19 08:36:50.096 1893 1893 F DEBUG : #07 pc 000008f4
/system/vendor/bin/hw/android.hardw...@1.0-service
09-19 08:36:50.096 1893 1893 F DEBUG : #08 pc 0000087a
/system/vendor/bin/hw/android.hardw...@1.0-service
(main+106)
09-19 08:36:50.096 1893 1893 F DEBUG : #09 pc 00015f34
/system/lib/libc.so (__libc_init+100)
09-19 08:36:50.096 1893 1893 F DEBUG : #10 pc 00000761
/system/vendor/bin/hw/android.hardw...@1.0-service
(_start+97)
09-19 08:36:50.096 1894 1894 I crash_dump32: performing dump of
process 1887 (target tid = 1887)
09-19 08:36:50.096 1894 1894 F DEBUG : *** *** *** *** *** *** ***
*** *** *** *** *** *** *** *** ***
09-19 08:36:50.096 1894 1894 F DEBUG : Build fingerprint:
'Android/aosp_x86/generic_x86:8.0.0/OPR6.170623.017/lh09191511:eng/test-keys'
09-19 08:36:50.096 1894 1894 F DEBUG : Revision: '0'
09-19 08:36:50.096 1894 1894 F DEBUG : ABI: 'x86'
09-19 08:36:50.096 1894 1894 F DEBUG : pid: 1887, tid: 1887, name:
android.hardwar >>> /vendor/bin/hw/android.ha...@1.0-service
<<<
09-19 08:36:50.096 1894 1894 F DEBUG : signal 6 (SIGABRT), code -6
(SI_TKILL), fault addr --------
09-19 08:36:50.096 1894 1894 F DEBUG : Abort message: 'Binder
driver could not be opened. Terminating.'
09-19 08:36:50.096 1894 1894 F DEBUG : eax 00000000 ebx
0000075f ecx 0000075f edx 00000006
09-19 08:36:50.096 1894 1894 F DEBUG : esi 0000075f edi bff19938
09-19 08:36:50.096 1894 1894 F DEBUG : xcs 00000073 xds
0000007b xes 0000007b xfs 00000000 xss 0000007b
09-19 08:36:50.096 1894 1894 F DEBUG : eip b0baeac4 ebp
bff19958 esp bff198ec flags 00000296
09-19 08:36:50.098 1894 1894 F DEBUG :
09-19 08:36:50.098 1894 1894 F DEBUG : backtrace:
09-19 08:36:50.098 1894 1894 F DEBUG : #00 pc 00000ac4
[vdso:b0bae000] (__kernel_vsyscall+16)
09-19 08:36:50.098 1894 1894 F DEBUG : #01 pc 00075b3c
/system/lib/libc.so (tgkill+28)
09-19 08:36:50.098 1894 1894 F DEBUG : #02 pc 0001f04e
/system/lib/libc.so (abort+110)
09-19 08:36:50.098 1894 1894 F DEBUG : #03 pc 00006a06
/system/lib/liblog.so (__android_log_assert+294)
09-19 08:36:50.098 1894 1894 F DEBUG : #04 pc 0007d2bb
/system/lib/libbinder.so (_ZN7android12ProcessStateC1EPKc+427)
09-19 08:36:50.098 1894 1894 F DEBUG : #05 pc 0007d395
/system/lib/libbinder.so
(_ZN7android12ProcessState14initWithDriverEPKc+197)
09-19 08:36:50.098 1894 1894 F DEBUG : #06 pc 00000aad
/system/vendor/bin/hw/android.ha...@1.0-service (main+77)
09-19 08:36:50.098 1894 1894 F DEBUG : #07 pc 00015f34
/system/lib/libc.so (__libc_init+100)
09-19 08:36:50.098 1894 1894 F DEBUG : #08 pc 000009b1
/system/vendor/bin/hw/android.ha...@1.0-service (_start+97)

These don't happen in SDK emulator image, of course.

I feel frustrated and disappointed.
Android as an open source project,
this is totally unacceptable if
we can't build a workable emulator image
from the released source.
Please fix it ASAP.
Or if this is my bad, please tell me
how to build a correct emulator image
from the 8.0 codebase.
Thank you!

Ye Roger

unread,
Sep 19, 2017, 4:55:49 AM9/19/17
to Android emulator development
I haven't tested 8.0 emulator this yet. The open source community should create emulator project based on either QEMU or VirtualBox to compete with the one from Google.

Bo Hu

unread,
Sep 20, 2017, 2:32:40 AM9/20/17
to Ye Roger, Android emulator development
hello,
   please use aosp or apply the patches in the following bugs




On Tue, Sep 19, 2017 at 1:55 AM, 'Ye Roger' via Android emulator development <android-em...@googlegroups.com> wrote:
I haven't tested 8.0 emulator this yet. The open source community should create emulator project based on either QEMU or VirtualBox to compete with the one from Google.

--
You received this message because you are subscribed to the Google Groups "Android emulator development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-emulator-dev+unsub...@googlegroups.com.
To post to this group, send email to android-emulator-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/android-emulator-dev.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages