Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPI4 / Compiled from source doesn't start, no specific error #1214

Open
skmp opened this issue Aug 20, 2019 · 17 comments

Comments

@skmp
Copy link

@skmp skmp commented Aug 20, 2019

  1. Make sure you are running the latest version of Anbox before reporting an issue. Update snap to latest: snap refresh --devmode --edge anbox
    Using source-compiled, c732719

  2. Make sure you have debug logs enabled:
    Using ANBOX_LOG_LEVEL=debug

  3. ** Please paste the result of anbox system-info below:**

anbox system-info output
pi@raspberrypi:~ $ anbox system-info
version: local-c732719
cpu:
  arch:  
  brand: 
  features: 
os:
  name: Raspbian GNU/Linux
  version: 10 (buster)
  snap-based: false
kernel:
  version: Linux version 4.19.60-v7l+ (pi@raspberrypi) (gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1)) #1 SMP Mon Aug 19 17:21:29 BST 2019
  binder: true
  ashmem: true
graphics:
  egl:
    vendor: Mesa Project
    version: 1.4
    extensions:
      - EGL_CHROMIUM_sync_control
      - EGL_EXT_buffer_age
      - EGL_EXT_image_dma_buf_import
      - EGL_EXT_image_dma_buf_import_modifiers
      - EGL_KHR_cl_event2
      - EGL_KHR_config_attribs
      - EGL_KHR_create_context
      - EGL_KHR_create_context_no_error
      - EGL_KHR_fence_sync
      - EGL_KHR_get_all_proc_addresses
      - EGL_KHR_gl_colorspace
      - EGL_KHR_gl_renderbuffer_image
      - EGL_KHR_gl_texture_2D_image
      - EGL_KHR_gl_texture_3D_image
      - EGL_KHR_gl_texture_cubemap_image
      - EGL_KHR_image
      - EGL_KHR_image_base
      - EGL_KHR_image_pixmap
      - EGL_KHR_no_config_context
      - EGL_KHR_reusable_sync
      - EGL_KHR_surfaceless_context
      - EGL_EXT_pixel_format_float
      - EGL_KHR_wait_sync
      - EGL_MESA_configless_context
      - EGL_MESA_drm_image
      - EGL_MESA_image_dma_buf_export
      - EGL_MESA_query_driver
      - EGL_NOK_texture_from_pixmap
  gles2:
    vendor: Broadcom
    vendor: OpenGL ES 3.0 Mesa 19.1.0-devel
    extensions:
      - GL_EXT_blend_minmax
      - GL_EXT_multi_draw_arrays
      - GL_EXT_texture_format_BGRA8888
      - GL_OES_compressed_ETC1_RGB8_texture
      - GL_OES_depth24
      - GL_OES_element_index_uint
      - GL_OES_fbo_render_mipmap
      - GL_OES_mapbuffer
      - GL_OES_rgb8_rgba8
      - GL_OES_standard_derivatives
      - GL_OES_stencil8
      - GL_OES_texture_3D
      - GL_OES_texture_float
      - GL_OES_texture_half_float
      - GL_OES_texture_half_float_linear
      - GL_OES_texture_npot
      - GL_OES_vertex_half_float
      - GL_EXT_texture_sRGB_decode
      - GL_OES_EGL_image
      - GL_OES_depth_texture
      - GL_OES_packed_depth_stencil
      - GL_EXT_texture_type_2_10_10_10_REV
      - GL_OES_get_program_binary
      - GL_APPLE_texture_max_level
      - GL_EXT_discard_framebuffer
      - GL_EXT_read_format_bgra
      - GL_EXT_frag_depth
      - GL_NV_fbo_color_attachments
      - GL_OES_EGL_image_external
      - GL_OES_EGL_sync
      - GL_OES_vertex_array_object
      - GL_EXT_occlusion_query_boolean
      - GL_EXT_texture_rg
      - GL_EXT_unpack_subimage
      - GL_NV_draw_buffers
      - GL_NV_read_buffer
      - GL_NV_read_depth
      - GL_NV_read_depth_stencil
      - GL_NV_read_stencil
      - GL_EXT_draw_buffers
      - GL_EXT_map_buffer_range
      - GL_KHR_debug
      - GL_KHR_texture_compression_astc_ldr
      - GL_OES_depth_texture_cube_map
      - GL_OES_required_internalformat
      - GL_OES_surfaceless_context
      - GL_EXT_color_buffer_float
      - GL_EXT_sRGB_write_control
      - GL_EXT_separate_shader_objects
      - GL_EXT_shader_integer_mix
      - GL_EXT_base_instance
      - GL_EXT_compressed_ETC1_RGB8_sub_texture
      - GL_EXT_draw_elements_base_vertex
      - GL_EXT_texture_border_clamp
      - GL_KHR_context_flush_control
      - GL_OES_draw_elements_base_vertex
      - GL_OES_texture_border_clamp
      - GL_OES_texture_stencil8
      - GL_EXT_float_blend
      - GL_KHR_no_error
      - GL_KHR_texture_compression_astc_sliced_3d
      - GL_OES_EGL_image_external_essl3
      - GL_MESA_shader_integer_functions
      - GL_KHR_parallel_shader_compile
      - GL_EXT_texture_query_lod

Please describe your problem:
I'm trying to run anbox on RPI4, commit c732719

Using armhf android.img from https://build.anbox.io/android-images/2017/06/12/android_1_armhf.img

First I start container-manager

sudo ANBOX_LOG_LEVEL=debug  anbox container-manager --daemon --privileged --data-path=/var/lib/anbox

[ 2019-08-20 16:00:28] [mount_entry.cpp:36@create] Mounting "/dev/loop3" on "/var/lib/anbox/rootfs" ...
[ 2019-08-20 16:00:28] [mount_entry.cpp:36@create] Mounting "/var/lib/anbox/cache" on "/var/lib/anbox/rootfs/cache" ...
[ 2019-08-20 16:00:28] [mount_entry.cpp:36@create] Mounting "/var/lib/anbox/data" on "/var/lib/anbox/rootfs/data" ...
[ 2019-08-20 16:00:28] [service.cpp:57@create] Everything setup. Waiting for incoming connections.

[ 2019-08-20 16:00:32] [service.cpp:84@new_client] Got connection from pid 3524
[ 2019-08-20 16:00:33] [management_api_skeleton.cpp:44@start_container] 
[ 2019-08-20 16:00:33] [lxc_container.cpp:297@start] Containers are stored in /var/lib/anbox/containers
[ 2019-08-20 16:00:33] [lxc_container.cpp:342@start] Using rootfs path /var/lib/anbox/rootfs
[ 2019-08-20 16:00:33] [lxc_container.cpp:141@setup_network] Anbox bridge interface 'anbox0' doesn't exist. Network functionality will not be available
[ 2019-08-20 16:00:33] [lxc_container.cpp:446@start] Container successfully started

(Keeps running)

Then the session manager

pi@raspberrypi:~ $ ANBOX_LOG_LEVEL=debug anbox session-manager
[ 2019-08-20 16:00:33] [Renderer.cpp:168@initialize] Using a surfaceless EGL context
[ 2019-08-20 16:00:33] [Renderer.cpp:251@initialize] Successfully initialized EGL
[ 2019-08-20 16:00:33] [service.cpp:41@Service] Successfully acquired DBus service name

(keeps running)

Then finally I try to launch anbox

ANBOX_LOG_LEVEL=debug  anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

[ 2019-08-20 16:01:29] [launch.cpp:214@operator()] Session manager failed to become ready

(exits)

What were you expecting?:

To have anbox working or throw a more specific error

Additional info:

I had to disable Werror by modifying CMakeLists.txt to not define it.

I also tried to use the snap and it also doesn't work oin the PI, anbox launch opens a black window and gets stuck there.

Running my locally compiled version, anbox launch without starting the container-manager and the service-manager Shows a loading UI, and then quits

On my laptop the snap version works as expected. I'll try building from source and report back how it goes on x86.

@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Aug 20, 2019

Following the same steps on my laptop it works.

session-manager output:

ANBOX_LOG_LEVEL=debug anbox session-manager
[ 2019-08-20 17:40:14] [Renderer.cpp:168@initialize] Using a surfaceless EGL context
[ 2019-08-20 17:40:14] [Renderer.cpp:251@initialize] Successfully initialized EGL
[ 2019-08-20 17:40:14] [service.cpp:41@Service] Successfully acquired DBus service name


libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
[ 2019-08-20 17:40:29] [session_manager.cpp:239@operator()] Android successfully booted
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
[ 2019-08-20 17:40:32] [application_manager.cpp:180@launch] Launching [ package=org.anbox.appmgr component=org.anbox.appmgr.AppViewActivity ]
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Aug 20, 2019

Digging a bit further on the RPI4, looks like rootfs:/anbox-init.sh fails to initialise properly.

from: /var/lib/anbox/logs/console.log

Waiting for filesystem being prepared ...
/anbox-init.sh: [: /dev/input/event1: unexpected operator/operand
ln: cannot create symbolic link from '/dev/sockets/qemu_pipe' to '/dev/qemu_pipe': Device or resource busy
ln: cannot create symbolic link from '/dev/sockets/anbox_bridge' to '/dev/anbox_bridge': Device or resource busy
Starting real init now ...

Looks like the bundled sh can't handle test as []? Also no idea why the symlinks would be failing

@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Aug 21, 2019

Build a new armhf image from scratch, it gets much further now. Looks like it can't find /dev/binder in the guest container.

It shows up in the host just fine

crw-rw-rw- 1 root root  10, 57 Aug 20 00:21 /dev/ashmem
crw-rw-rw- 1 root root 511,  0 Aug 20 00:21 /dev/binder

Any ideas?

Console.log

START LOG 
>>>>> <<<<<
+ echo 'Waiting for filesystem being prepared ...'
Waiting for filesystem being prepared ...
+ wait 2
+ prepare_filesystem
+ '[' ! -e /dev/qemu_pipe ']'
+ chown system:system /dev/qemu_pipe
+ chmod 0666 /dev/qemu_pipe
+ '[' ! -e /dev/qemu_trace ']'
+ continue
+ '[' ! -e /dev/goldfish_pipe ']'
+ continue
+ '[' ! -e '/dev/input/*' ']'
+ continue
+ '[' -e /dev/tun ']'
+ chown system:vpn /dev/tun
+ chmod 0660 /dev/tun
+ echo 'Starting real init now ...'
Starting real init now ...
+ /init
/system/bin/sh: No controlling tty: open /dev/tty: No such device or address
/system/bin/sh: warning: won't have full job control
--------- beginning of system
08-21 00:03:18.924    11    11 I vold    : Vold 3.0 (the awakening) firing up
08-21 00:03:18.924    11    11 V vold    : Detected support for: ext4 f2fs vfat
08-21 00:03:18.938    11    11 E vold    : Failed to open default fstab /fstab.goldfish: No such file or directory
08-21 00:03:18.938    11    11 E vold    : Error reading configuration... continuing anyways: No such file or directory
08-21 00:03:18.955    11    20 D vold    : e4crypt_init_user0
08-21 00:03:18.956    11    20 D vold    : e4crypt_prepare_user_storage for volume null, user 0, serial 0, flags 1
08-21 00:03:18.956    11    20 D vold    : Preparing: /data/system/users/0
08-21 00:03:18.956    11    20 D vold    : Preparing: /data/misc/profiles/cur/0
08-21 00:03:18.956    11    20 D vold    : Preparing: /data/misc/profiles/cur/0/foreign-dex
08-21 00:03:18.956    11    20 D vold    : Preparing: /data/system_de/0
08-21 00:03:18.956    11    20 D vold    : Preparing: /data/misc_de/0
08-21 00:03:18.956    11    20 D vold    : Preparing: /data/user_de/0
08-21 00:03:18.956    11    20 D vold    : e4crypt_unlock_user_key 0 serial=0 token_present=0
08-21 00:03:18.956    11    20 E vold    : Failed to chmod /data/system_ce/0: No such file or directory
08-21 00:03:18.956    11    20 E vold    : Failed to chmod /data/misc_ce/0: No such file or directory
08-21 00:03:18.956    11    20 E vold    : Failed to chmod /data/media/0: No such file or directory
--------- beginning of main
08-21 00:03:18.956     1     1 I vdc     : 200 12 Command succeeded
08-21 00:03:18.974    21    21 I /system/bin/tzdatacheck: tzdata file /data/misc/zoneinfo/current/tzdata does not exist. No action required.
08-21 00:03:19.015    24    24 I qemu-props: connected to 'boot-properties' qemud service.
08-21 00:03:19.015    24    24 I qemu-props: receiving..
08-21 00:03:19.016    24    24 I qemu-props: received: ro.sf.lcd_density=160
08-21 00:03:19.042    28    28 E ServiceManager: failed to open binder driver
08-21 00:03:19.042    24    24 I qemu-props: receiving..
08-21 00:03:19.042    24    24 I qemu-props: exiting (1 properties set).
08-21 00:03:19.114    34    34 I         : installd firing up
08-21 00:03:19.131    43    43 I perfprofd: starting Android Wide Profiling daemon
08-21 00:03:19.131    43    43 E perfprofd: unable to open configuration file /data/data/com.google.android.gms/files/perfprofd.conf
08-21 00:03:19.131    43    43 I perfprofd: random seed set to 552561174
08-21 00:03:19.204    41    41 I fingerprintd: Starting fingerprintd
08-21 00:03:19.204    41    41 E ProcessState: Binder driver protocol does not match user space protocol!
08-21 00:03:19.204    41    41 E ProcessState: Binder ioctl to set max threads failed: Bad file descriptor
08-21 00:03:19.204    41    41 F ProcessState: Binder driver could not be opened.  Terminating.
--------- beginning of crash
08-21 00:03:19.204    41    41 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 41 (fingerprintd)
08-21 00:03:19.205    10    10 W         : debuggerd: handling request: pid=41 uid=1000 gid=0 tid=41
08-21 00:03:19.225    35    35 I keystore: Found keymaster0 module Keymaster OpenSSL HAL, version 2
08-21 00:03:19.225    35    35 I SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 131: Creating device
08-21 00:03:19.225    35    35 D SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 132: Device address: 0xb68b5000
08-21 00:03:19.225    35    35 I keystore: Keymaster0 module is software-only.  Using SoftKeymasterDevice instead.
08-21 00:03:19.225    35    35 I SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 131: Creating device
08-21 00:03:19.225    35    35 D SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 132: Device address: 0xb68b5200
08-21 00:03:19.226    35    35 I keystore: SELinux: Keystore SELinux is disabled.
08-21 00:03:19.226    35    35 E ProcessState: Binder driver protocol does not match user space protocol!
08-21 00:03:19.226    35    35 E ProcessState: Binder ioctl to set max threads failed: Bad file descriptor
08-21 00:03:19.226    35    35 F ProcessState: Binder driver could not be opened.  Terminating.
08-21 00:03:19.226    35    35 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 35 (keystore)
08-21 00:03:19.227    51    51 E         : debuggerd: Unable to connect to activity manager (connect failed: No such file or directory)
08-21 00:03:19.238    25    25 E ProcessState: Binder driver protocol does not match user space protocol!
08-21 00:03:19.238    25    25 E ProcessState: Binder ioctl to set max threads failed: Bad file descriptor
08-21 00:03:19.238    25    25 F ProcessState: Binder driver could not be opened.  Terminating.
08-21 00:03:19.238    25    25 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 25 (anboxd)
armv7-a-neon:/ $ 08-21 00:03:19.278    51    51 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-21 00:03:19.278    51    51 F DEBUG   : Build fingerprint: 'Android/anbox_armv7a_neon/armv7-a-neon:7.1.1/N6F26Q/skmp08201727:userdebug/test-keys'
08-21 00:03:19.278    51    51 F DEBUG   : Revision: '0'
08-21 00:03:19.278    51    51 F DEBUG   : ABI: 'arm'
08-21 00:03:19.278    51    51 F DEBUG   : pid: 41, tid: 41, name: fingerprintd  >>> /system/bin/fingerprintd <<<
08-21 00:03:19.278    51    51 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-21 00:03:19.281    51    51 F DEBUG   : Abort message: 'Binder driver could not be opened.  Terminating.'
08-21 00:03:19.282    51    51 F DEBUG   :     r0 00000000  r1 00000029  r2 00000006  r3 00000008
08-21 00:03:19.282    51    51 F DEBUG   :     r4 b6fbb58c  r5 00000006  r6 b6fbb534  r7 0000010c
08-21 00:03:19.282    51    51 F DEBUG   :     r8 beae2b48  r9 beae2b18  sl beae2b10  fp beae2b8c
08-21 00:03:19.282    51    51 F DEBUG   :     ip 00000009  sp beae2660  lr b6b19377  pc b6b1bbd4  cpsr 20000010
08-21 00:03:19.283    42    42 I gatekeeperd: Starting gatekeeperd...
08-21 00:03:19.283    42    42 E ProcessState: Binder driver protocol does not match user space protocol!
08-21 00:03:19.284    42    42 E ProcessState: Binder ioctl to set max threads failed: Bad file descriptor
08-21 00:03:19.284    42    42 F ProcessState: Binder driver could not be opened.  Terminating.
08-21 00:03:19.284    42    42 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 42 (gatekeeperd)
08-21 00:03:19.298    51    51 F DEBUG   : 
08-21 00:03:19.298    51    51 F DEBUG   : backtrace:
08-21 00:03:19.298    51    51 F DEBUG   :     #00 pc 00048bd4  /system/lib/libc.so (tgkill+12)
08-21 00:03:19.298    51    51 F DEBUG   :     #01 pc 00046373  /system/lib/libc.so (pthread_kill+34)
08-21 00:03:19.298    51    51 F DEBUG   :     #02 pc 0001c70d  /system/lib/libc.so (raise+10)
08-21 00:03:19.298    51    51 F DEBUG   :     #03 pc 0001824f  /system/lib/libc.so (__libc_android_abort+34)
08-21 00:03:19.299    51    51 F DEBUG   :     #04 pc 00017788  /system/lib/libc.so (abort+4)
08-21 00:03:19.299    51    51 F DEBUG   :     #05 pc 00005811  /system/lib/liblog.so (__android_log_assert+112)
08-21 00:03:19.299    51    51 F DEBUG   :     #06 pc 0004e9b1  /system/lib/libbinder.so (_ZN7android12ProcessStateC1Ev+208)
08-21 00:03:19.299    51    51 F DEBUG   :     #07 pc 0004e895  /system/lib/libbinder.so (_ZN7android12ProcessState4selfEv+48)
08-21 00:03:19.299    51    51 F DEBUG   :     #08 pc 0003f221  /system/lib/libbinder.so (_ZN7android21defaultServiceManagerEv+108)
08-21 00:03:19.299    51    51 F DEBUG   :     #09 pc 000057f3  /system/bin/fingerprintd
08-21 00:03:19.299    51    51 F DEBUG   :     #10 pc 00016c3d  /system/lib/libc.so (__libc_init+48)
08-21 00:03:19.299    51    51 F DEBUG   :     #11 pc 00003b44  /system/bin/fingerprintd
08-21 00:03:19.397    10    10 W         : debuggerd: resuming target 41
08-21 00:03:19.398    10    10 W         : debuggerd: handling request: pid=35 uid=1017 gid=1017 tid=35
08-21 00:03:19.409    62    62 E         : debuggerd: Unable to connect to activity manager (connect failed: No such file or directory)
08-21 00:03:19.459    62    62 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-21 00:03:19.459    62    62 F DEBUG   : Build fingerprint: 'Android/anbox_armv7a_neon/armv7-a-neon:7.1.1/N6F26Q/skmp08201727:userdebug/test-keys'
08-21 00:03:19.459    62    62 F DEBUG   : Revision: '0'
08-21 00:03:19.459    62    62 F DEBUG   : ABI: 'arm'
08-21 00:03:19.460    62    62 F DEBUG   : pid: 35, tid: 35, name: keystore  >>> /system/bin/keystore <<<
08-21 00:03:19.460    62    62 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-21 00:03:19.463    62    62 F DEBUG   : Abort message: 'Binder driver could not be opened.  Terminating.'
08-21 00:03:19.463    62    62 F DEBUG   :     r0 00000000  r1 00000023  r2 00000006  r3 00000008
08-21 00:03:19.463    62    62 F DEBUG   :     r4 b6f2858c  r5 00000006  r6 b6f28534  r7 0000010c
08-21 00:03:19.463    62    62 F DEBUG   :     r8 becb6b38  r9 becb6ac0  sl becb6ab8  fp becb6b7c
08-21 00:03:19.463    62    62 F DEBUG   :     ip 00000009  sp becb6608  lr b6b7d377  pc b6b7fbd4  cpsr 20000010
08-21 00:03:19.473    62    62 F DEBUG   : 
08-21 00:03:19.473    62    62 F DEBUG   : backtrace:
08-21 00:03:19.473    62    62 F DEBUG   :     #00 pc 00048bd4  /system/lib/libc.so (tgkill+12)
08-21 00:03:19.473    62    62 F DEBUG   :     #01 pc 00046373  /system/lib/libc.so (pthread_kill+34)
08-21 00:03:19.473    62    62 F DEBUG   :     #02 pc 0001c70d  /system/lib/libc.so (raise+10)
08-21 00:03:19.474    62    62 F DEBUG   :     #03 pc 0001824f  /system/lib/libc.so (__libc_android_abort+34)
08-21 00:03:19.474    62    62 F DEBUG   :     #04 pc 00017788  /system/lib/libc.so (abort+4)
08-21 00:03:19.474    62    62 F DEBUG   :     #05 pc 0000bd65  /system/lib/libcutils.so (__android_log_assert+112)
08-21 00:03:19.474    62    62 F DEBUG   :     #06 pc 0004e9b1  /system/lib/libbinder.so (_ZN7android12ProcessStateC1Ev+208)
08-21 00:03:19.474    62    62 F DEBUG   :     #07 pc 0004e895  /system/lib/libbinder.so (_ZN7android12ProcessState4selfEv+48)
08-21 00:03:19.474    62    62 F DEBUG   :     #08 pc 0003f221  /system/lib/libbinder.so (_ZN7android21defaultServiceManagerEv+108)
08-21 00:03:19.474    62    62 F DEBUG   :     #09 pc 0000cf05  /system/bin/keystore
08-21 00:03:19.474    62    62 F DEBUG   :     #10 pc 00016c3d  /system/lib/libc.so (__libc_init+48)
08-21 00:03:19.474    62    62 F DEBUG   :     #11 pc 000058bc  /system/bin/keystore
08-21 00:03:19.539    10    10 W         : debuggerd: resuming target 35
08-21 00:03:19.540    10    10 W         : debuggerd: handling request: pid=25 uid=0 gid=0 tid=25
08-21 00:03:19.546    74    74 E         : debuggerd: Unable to connect to activity manager (connect failed: No such file or directory)
08-21 00:03:19.596    74    74 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-21 00:03:19.597    74    74 F DEBUG   : Build fingerprint: 'Android/anbox_armv7a_neon/armv7-a-neon:7.1.1/N6F26Q/skmp08201727:userdebug/test-keys'
08-21 00:03:19.597    74    74 F DEBUG   : Revision: '0'
08-21 00:03:19.597    74    74 F DEBUG   : ABI: 'arm'
08-21 00:03:19.597    74    74 F DEBUG   : pid: 25, tid: 25, name: anboxd  >>> /system/bin/anboxd <<<
08-21 00:03:19.597    74    74 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-21 00:03:19.601    74    74 F DEBUG   : Abort message: 'Binder driver could not be opened.  Terminating.'
08-21 00:03:19.601    74    74 F DEBUG   :     r0 00000000  r1 00000019  r2 00000006  r3 00000008
08-21 00:03:19.601    74    74 F DEBUG   :     r4 b6f1b58c  r5 00000006  r6 b6f1b534  r7 0000010c
08-21 00:03:19.601    74    74 F DEBUG   :     r8 bea40b0c  r9 bea40ad0  sl bea40ac8  fp bea40b9c
08-21 00:03:19.601    74    74 F DEBUG   :     ip 00000009  sp bea40618  lr b6c7e377  pc b6c80bd4  cpsr 20000010
08-21 00:03:19.615    74    74 F DEBUG   : 
08-21 00:03:19.615    74    74 F DEBUG   : backtrace:
08-21 00:03:19.616    74    74 F DEBUG   :     #00 pc 00048bd4  /system/lib/libc.so (tgkill+12)
08-21 00:03:19.616    74    74 F DEBUG   :     #01 pc 00046373  /system/lib/libc.so (pthread_kill+34)
08-21 00:03:19.616    74    74 F DEBUG   :     #02 pc 0001c70d  /system/lib/libc.so (raise+10)
08-21 00:03:19.616    74    74 F DEBUG   :     #03 pc 0001824f  /system/lib/libc.so (__libc_android_abort+34)
08-21 00:03:19.616    74    74 F DEBUG   :     #04 pc 00017788  /system/lib/libc.so (abort+4)
08-21 00:03:19.616    74    74 F DEBUG   :     #05 pc 00005811  /system/lib/liblog.so (__android_log_assert+112)
08-21 00:03:19.616    74    74 F DEBUG   :     #06 pc 0004e9b1  /system/lib/libbinder.so (_ZN7android12ProcessStateC1Ev+208)
08-21 00:03:19.616    74    74 F DEBUG   :     #07 pc 0004e895  /system/lib/libbinder.so (_ZN7android12ProcessState4selfEv+48)
08-21 00:03:19.616    74    74 F DEBUG   :     #08 pc 0003f221  /system/lib/libbinder.so (_ZN7android21defaultServiceManagerEv+108)
08-21 00:03:19.616    74    74 F DEBUG   :     #09 pc 000094f5  /system/bin/anboxd
08-21 00:03:19.616    74    74 F DEBUG   :     #10 pc 00009435  /system/bin/anboxd
08-21 00:03:19.616    74    74 F DEBUG   :     #11 pc 00016c3d  /system/lib/libc.so (__libc_init+48)
08-21 00:03:19.616    74    74 F DEBUG   :     #12 pc 00009348  /system/bin/anboxd
08-21 00:03:19.650    10    10 W         : debuggerd: resuming target 25
08-21 00:03:19.650    10    10 W         : debuggerd: handling request: pid=42 uid=1000 gid=0 tid=42
08-21 00:03:19.657    80    80 E         : debuggerd: Unable to connect to activity manager (connect failed: No such file or directory)
08-21 00:03:19.707    80    80 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-21 00:03:19.707    80    80 F DEBUG   : Build fingerprint: 'Android/anbox_armv7a_neon/armv7-a-neon:7.1.1/N6F26Q/skmp08201727:userdebug/test-keys'
08-21 00:03:19.707    80    80 F DEBUG   : Revision: '0'
08-21 00:03:19.707    80    80 F DEBUG   : ABI: 'arm'
08-21 00:03:19.707    80    80 F DEBUG   : pid: 42, tid: 42, name: gatekeeperd  >>> /system/bin/gatekeeperd <<<
08-21 00:03:19.707    80    80 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-21 00:03:19.711    80    80 F DEBUG   : Abort message: 'Binder driver could not be opened.  Terminating.'
08-21 00:03:19.711    80    80 F DEBUG   :     r0 00000000  r1 0000002a  r2 00000006  r3 00000008
08-21 00:03:19.711    80    80 F DEBUG   :     r4 b6fc958c  r5 00000006  r6 b6fc9534  r7 0000010c
08-21 00:03:19.711    80    80 F DEBUG   :     r8 beddfb38  r9 beddfb00  sl beddfaf8  fp beddfb7c
08-21 00:03:19.711    80    80 F DEBUG   :     ip 00000009  sp beddf648  lr b6dd7377  pc b6dd9bd4  cpsr 20000010
08-21 00:03:19.719    80    80 F DEBUG   : 
08-21 00:03:19.719    80    80 F DEBUG   : backtrace:
08-21 00:03:19.719    80    80 F DEBUG   :     #00 pc 00048bd4  /system/lib/libc.so (tgkill+12)
08-21 00:03:19.719    80    80 F DEBUG   :     #01 pc 00046373  /system/lib/libc.so (pthread_kill+34)
08-21 00:03:19.719    80    80 F DEBUG   :     #02 pc 0001c70d  /system/lib/libc.so (raise+10)
08-21 00:03:19.719    80    80 F DEBUG   :     #03 pc 0001824f  /system/lib/libc.so (__libc_android_abort+34)
08-21 00:03:19.719    80    80 F DEBUG   :     #04 pc 00017788  /system/lib/libc.so (abort+4)
08-21 00:03:19.719    80    80 F DEBUG   :     #05 pc 00005811  /system/lib/liblog.so (__android_log_assert+112)
08-21 00:03:19.719    80    80 F DEBUG   :     #06 pc 0004e9b1  /system/lib/libbinder.so (_ZN7android12ProcessStateC1Ev+208)
08-21 00:03:19.719    80    80 F DEBUG   :     #07 pc 0004e895  /system/lib/libbinder.so (_ZN7android12ProcessState4selfEv+48)
08-21 00:03:19.719    80    80 F DEBUG   :     #08 pc 0003f221  /system/lib/libbinder.so (_ZN7android21defaultServiceManagerEv+108)
08-21 00:03:19.719    80    80 F DEBUG   :     #09 pc 00004975  /system/bin/gatekeeperd
08-21 00:03:19.719    80    80 F DEBUG   :     #10 pc 00016c3d  /system/lib/libc.so (__libc_init+48)
08-21 00:03:19.719    80    80 F DEBUG   :     #11 pc 00003f48  /system/bin/gatekeeperd
08-21 00:03:19.776    80    80 E         : debuggerd: failed to kill process 42: No such process
08-21 00:03:19.780    10    10 W         : debuggerd: resuming target 42
08-21 00:03:19.781    10    10 E         : debuggerd: failed to send signal 18 to target: No such process
08-21 00:03:19.935    36    36 I mediacodec: @@@ mediacodecservice starting
08-21 00:03:19.936    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: clock_gettime
08-21 00:03:19.936    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: connect
08-21 00:03:19.936    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: fcntl64
08-21 00:03:19.936    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: socket
08-21 00:03:19.936    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: writev
08-21 00:03:19.942    36    36 W /system/bin/mediacodec: libminijail: logging seccomp filter failures
08-21 00:03:19.942    36    36 E ProcessState: Binder driver protocol does not match user space protocol!
08-21 00:03:19.942    36    36 E ProcessState: Binder ioctl to set max threads failed: Bad file descriptor
08-21 00:03:19.942    36    36 F ProcessState: Binder driver could not be opened.  Terminating.
08-21 00:03:19.942    36    36 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 36 (mediacodec)
08-21 00:03:19.943    10    10 W         : debuggerd: handling request: pid=36 uid=1046 gid=1006 tid=36
08-21 00:03:19.948    85    85 E         : debuggerd: Unable to connect to activity manager (connect failed: No such file or directory)
08-21 00:03:19.948    85    85 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-21 00:03:19.948    85    85 F DEBUG   : Build fingerprint: 'Android/anbox_armv7a_neon/armv7-a-neon:7.1.1/N6F26Q/skmp08201727:userdebug/test-keys'
08-21 00:03:19.948    85    85 F DEBUG   : Revision: '0'
08-21 00:03:19.948    85    85 F DEBUG   : ABI: 'arm'
08-21 00:03:19.948    85    85 F DEBUG   : pid: 36, tid: 36, name: mediacodec  >>> media.codec <<<
08-21 00:03:19.948    85    85 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-21 00:03:19.948    85    85 F DEBUG   :     r0 00000000  r1 00000024  r2 00000006  r3 00000008
08-21 00:03:19.948    85    85 F DEBUG   :     r4 b6f6358c  r5 00000006  r6 b6f63534  r7 0000010c
08-21 00:03:19.948    85    85 F DEBUG   :     r8 00000000  r9 00000000  sl 00000000  fp beccfb8c
08-21 00:03:19.948    85    85 F DEBUG   :     ip 00000009  sp beccf6a0  lr b6899377  pc b689bbd4  cpsr 20000010
08-21 00:03:19.955    85    85 F DEBUG   : 
08-21 00:03:19.955    85    85 F DEBUG   : backtrace:
08-21 00:03:19.955    85    85 F DEBUG   :     #00 pc 00048bd4  /system/lib/libc.so (tgkill+12)
08-21 00:03:19.955    85    85 F DEBUG   :     #01 pc 00046373  /system/lib/libc.so (pthread_kill+34)
08-21 00:03:19.955    85    85 F DEBUG   :     #02 pc 0001c70d  /system/lib/libc.so (raise+10)
08-21 00:03:19.955    85    85 F DEBUG   :     #03 pc 0001824f  /system/lib/libc.so (__libc_android_abort+34)
08-21 00:03:19.955    85    85 F DEBUG   :     #04 pc 00017788  /system/lib/libc.so (abort+4)
08-21 00:03:19.955    85    85 F DEBUG   :     #05 pc 00005811  /system/lib/liblog.so (__android_log_assert+112)
08-21 00:03:19.955    85    85 F DEBUG   :     #06 pc 0004e9b1  /system/lib/libbinder.so (_ZN7android12ProcessStateC1Ev+208)
08-21 00:03:19.955    85    85 F DEBUG   :     #07 pc 0004e895  /system/lib/libbinder.so (_ZN7android12ProcessState4selfEv+48)
08-21 00:03:19.956    85    85 F DEBUG   :     #08 pc 00000e4d  /system/bin/mediacodec
08-21 00:03:19.956    85    85 F DEBUG   :     #09 pc 00016c3d  /system/lib/libc.so (__libc_init+48)
08-21 00:03:19.956    85    85 F DEBUG   :     #10 pc 00000d30  /system/bin/mediacodec
08-21 00:03:19.984    38    38 V MediaUtils: physMem: 2033692672
08-21 00:03:19.984    38    38 V MediaUtils: requested limit: 406738520
08-21 00:03:19.984    38    38 V MediaUtils: actual limit: 406738520
08-21 00:03:19.984    38    38 V MediaUtils: original limits: 4294967295/4294967295
08-21 00:03:19.984    38    38 V MediaUtils: new limits: 406738520/4294967295
08-21 00:03:19.984    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: clock_gettime
08-21 00:03:19.985    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: connect
08-21 00:03:19.985    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: fcntl64
08-21 00:03:19.985    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: socket
08-21 00:03:19.985    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: writev
08-21 00:03:19.985    38    38 W /system/bin/mediaextractor: libminijail: logging seccomp filter failures
08-21 00:03:19.993    10    10 W         : debuggerd: resuming target 36
08-21 00:03:19.993    10    10 E         : debuggerd: failed to send signal 18 to target: No such process
08-21 00:03:20.050    37    37 E ProcessState: Binder driver protocol does not match user space protocol!
08-21 00:03:20.050    37    37 E ProcessState: Binder ioctl to set max threads failed: Bad file descriptor
08-21 00:03:20.050    37    37 F ProcessState: Binder driver could not be opened.  Terminating.
08-21 00:03:20.050    37    37 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 37 (mediadrmserver)
08-21 00:03:20.051    10    10 W         : debuggerd: handling request: pid=37 uid=1013 gid=1031 tid=37
08-21 00:03:20.057    90    90 E         : debuggerd: Unable to connect to activity manager (connect failed: No such file or directory)
08-21 00:03:20.069    38    38 E ProcessState: Binder driver protocol does not match user space protocol!
08-21 00:03:20.069    38    38 E ProcessState: Binder ioctl to set max threads failed: Bad file descriptor
08-21 00:03:20.069    38    38 F ProcessState: Binder driver could not be opened.  Terminating.
08-21 00:03:20.069    38    38 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 38 (mediaextractor)
08-21 00:03:20.108    90    90 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-21 00:03:20.108    90    90 F DEBUG   : Build fingerprint: 'Android/anbox_armv7a_neon/armv7-a-neon:7.1.1/N6F26Q/skmp08201727:userdebug/test-keys'
08-21 00:03:20.108    90    90 F DEBUG   : Revision: '0'
08-21 00:03:20.108    90    90 F DEBUG   : ABI: 'arm'
08-21 00:03:20.109    90    90 F DEBUG   : pid: 37, tid: 37, name: mediadrmserver  >>> /system/bin/mediadrmserver <<<
08-21 00:03:20.109    90    90 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-21 00:03:20.109    90    90 F DEBUG   :     r0 00000000  r1 00000025  r2 00000006  r3 00000008
08-21 00:03:20.109    90    90 F DEBUG   :     r4 b6fbf58c  r5 00000006  r6 b6fbf534  r7 0000010c
08-21 00:03:20.109    90    90 F DEBUG   :     r8 00000000  r9 00000000  sl 00000000  fp be991b8c
08-21 00:03:20.109    90    90 F DEBUG   :     ip 00000009  sp be9916a0  lr b6397377  pc b6399bd4  cpsr 20000010
08-21 00:03:20.117    90    90 F DEBUG   : 
08-21 00:03:20.117    90    90 F DEBUG   : backtrace:
08-21 00:03:20.117    90    90 F DEBUG   :     #00 pc 00048bd4  /system/lib/libc.so (tgkill+12)
08-21 00:03:20.117    90    90 F DEBUG   :     #01 pc 00046373  /system/lib/libc.so (pthread_kill+34)
08-21 00:03:20.117    90    90 F DEBUG   :     #02 pc 0001c70d  /system/lib/libc.so (raise+10)
08-21 00:03:20.117    90    90 F DEBUG   :     #03 pc 0001824f  /system/lib/libc.so (__libc_android_abort+34)
08-21 00:03:20.117    90    90 F DEBUG   :     #04 pc 00017788  /system/lib/libc.so (abort+4)
08-21 00:03:20.117    90    90 F DEBUG   :     #05 pc 0000bd65  /system/lib/libcutils.so (__android_log_assert+112)
08-21 00:03:20.117    90    90 F DEBUG   :     #06 pc 0004e9b1  /system/lib/libbinder.so (_ZN7android12ProcessStateC1Ev+208)
08-21 00:03:20.118    90    90 F DEBUG   :     #07 pc 0004e895  /system/lib/libbinder.so (_ZN7android12ProcessState4selfEv+48)
08-21 00:03:20.118    90    90 F DEBUG   :     #08 pc 00002be9  /system/bin/mediadrmserver
08-21 00:03:20.118    90    90 F DEBUG   :     #09 pc 00016c3d  /system/lib/libc.so (__libc_init+48)
08-21 00:03:20.118    90    90 F DEBUG   :     #10 pc 00002620  /system/bin/mediadrmserver
08-21 00:03:20.157    10    10 W         : debuggerd: resuming target 37
08-21 00:03:20.157    10    10 W         : debuggerd: handling request: pid=38 uid=1040 gid=1026 tid=38
08-21 00:03:20.162    95    95 E         : debuggerd: Unable to connect to activity manager (connect failed: No such file or directory)
08-21 00:03:20.212    95    95 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-21 00:03:20.212    95    95 F DEBUG   : Build fingerprint: 'Android/anbox_armv7a_neon/armv7-a-neon:7.1.1/N6F26Q/skmp08201727:userdebug/test-keys'
08-21 00:03:20.212    95    95 F DEBUG   : Revision: '0'
08-21 00:03:20.212    95    95 F DEBUG   : ABI: 'arm'
08-21 00:03:20.213    95    95 F DEBUG   : pid: 38, tid: 38, name: mediaextractor  >>> media.extractor <<<
08-21 00:03:20.213    95    95 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-21 00:03:20.213    95    95 F DEBUG   :     r0 00000000  r1 00000026  r2 00000006  r3 00000008
08-21 00:03:20.213    95    95 F DEBUG   :     r4 b6fe058c  r5 00000006  r6 b6fe0534  r7 0000010c
08-21 00:03:20.213    95    95 F DEBUG   :     r8 00000000  r9 00000000  sl 00000000  fp beeb0b8c
08-21 00:03:20.213    95    95 F DEBUG   :     ip 00000009  sp beeb06a0  lr b6262377  pc b6264bd4  cpsr 20000010
08-21 00:03:20.220    95    95 F DEBUG   : 
08-21 00:03:20.220    95    95 F DEBUG   : backtrace:
08-21 00:03:20.220    95    95 F DEBUG   :     #00 pc 00048bd4  /system/lib/libc.so (tgkill+12)
08-21 00:03:20.220    95    95 F DEBUG   :     #01 pc 00046373  /system/lib/libc.so (pthread_kill+34)
08-21 00:03:20.220    95    95 F DEBUG   :     #02 pc 0001c70d  /system/lib/libc.so (raise+10)
08-21 00:03:20.220    95    95 F DEBUG   :     #03 pc 0001824f  /system/lib/libc.so (__libc_android_abort+34)
08-21 00:03:20.220    95    95 F DEBUG   :     #04 pc 00017788  /system/lib/libc.so (abort+4)
08-21 00:03:20.220    95    95 F DEBUG   :     #05 pc 00005811  /system/lib/liblog.so (__android_log_assert+112)
08-21 00:03:20.220    95    95 F DEBUG   :     #06 pc 0004e9b1  /system/lib/libbinder.so (_ZN7android12ProcessStateC1Ev+208)
08-21 00:03:20.221    95    95 F DEBUG   :     #07 pc 0004e895  /system/lib/libbinder.so (_ZN7android12ProcessState4selfEv+48)
08-21 00:03:20.221    95    95 F DEBUG   :     #08 pc 00000fb7  /system/bin/mediaextractor
08-21 00:03:20.221    95    95 F DEBUG   :     #09 pc 00016c3d  /system/lib/libc.so (__libc_init+48)
08-21 00:03:20.221    95    95 F DEBUG   :     #10 pc 00000ea0  /system/bin/mediaextractor
08-21 00:03:20.259    10    10 W         : debuggerd: resuming target 38
08-21 00:03:20.259    10    10 E         : debuggerd: failed to send signal 18 to target: No such process
@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Aug 24, 2019

A bit further progress, I modified anbox_init.sh to do ls -lah /dev/

Binder and ashmem exist as they should. Still, they cannot be opened somehow?

+ echo 'Waiting for filesystem being prepared ...'
+ prepare_filesystem
Waiting for filesystem being prepared ...
+ wait 2
+ '[' ! -e /dev/qemu_pipe ']'
+ chown system:system /dev/qemu_pipe
+ chmod 0666 /dev/qemu_pipe
+ '[' ! -e /dev/qemu_trace ']'
+ continue
+ '[' ! -e /dev/goldfish_pipe ']'
+ continue
+ '[' ! -e '/dev/input/*' ']'
+ continue
+ '[' -e /dev/tun ']'
+ chown system:vpn /dev/tun
+ chmod 0660 /dev/tun
+ ls -lah /dev
total 0
drwxr-xr-x  4 root   root        460__bionic_open_tzdata_path: ANDROID_DATA not set!
__bionic_open_tzdata_path: ANDROID_ROOT not set!
 2019-08-24 14:18 .
drwxr-xr-x 14 system system      626 2019-08-24 14:15 ..
srwxrwxrwx  1 system system        0 2019-08-24 14:18 anbox_audio
srwx------  1 system system        0 2019-08-24 14:18 anbox_bridge
crw-rw-rw-  1 root   root    10,  57 2019-08-24 14:18 ashmem
crw-rw-rw-  1 root   root   511,   0 2019-08-24 14:18 binder
c--x--x---  1 root   5      136,   4 2019-08-24 14:18 console
lrwxrwxrwx  1 root   root         13 2019-08-24 14:18 fd -> /proc/self/fd
crw-rw-rw-  1 root   root     1,   7 2019-08-24 14:18 full
crw-rw-rw-  1 root   root    10, 229 2019-08-24 14:18 fuse
drwx------  2 system system      100 2019-08-24 14:18 input
crw-rw-rw-  1 root   root     1,   3 2019-08-24 14:18 null
crw-rw-rw-  1 root   root     5,   2 2019-08-24 14:18 ptmx
drwxr-xr-x  2 root   root          0 2019-08-24 14:18 pts
srw-rw-rw-  1 system system        0 2019-08-24 14:18 qemu_pipe
crw-rw-rw-  1 root   root     1,   8 2019-08-24 14:18 random
lrwxrwxrwx  1 root   root         15 2019-08-24 14:18 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root   root         15 2019-08-24 14:18 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root   root         15 2019-08-24 14:18 stdout -> /proc/self/fd/1
crw-rw-rw-  1 root   root     5,   0 2019-08-24 14:18 tty
crw-rw----  1 system vpn     10, 200 2019-08-24 14:18 tun
crw-rw-rw-  1 root   root     1,   9 2019-08-24 14:18 urandom
crw-rw-rw-  1 root   root     1,   5 2019-08-24 14:18 zero
+ echo 'Starting real init now ...'
Starting real init now ...
+ /init
@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Aug 24, 2019

Binder mismatch is because CONFIG_ANDROID_BINDER_IPC_32BIT is not set in the DKMS module, even though the kernel is 32 bits.

Setting CONFIG_ANDROID_BINDER_IPC_32BIT manually in binder.c in the DKMS module sets the protocol version to 7, and the guest rootfs boots further, but still does not work.

edit

Looks like system/build.prop sets the heap size to 512m, which is too much for the 32-bit address space of the PI. Setting to 128m and re-trying

edit 2

With heap set to 128m I can install APKs and start them, however the rendering window closes and there is no UI.

@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Aug 24, 2019

Starting anbox with anbox session-manager --single-window --window-size=1024,768 fixes the no UI issue.

The default screen size is 0x0 for some reason, I suspect that is what is causing trouble.

I can launch different APKs and it they start up fine.

Input is broken however

08-24 19:37:20.784   106   144 W EventHub: An input event from /dev/input/event1 has a timestamp that appears to have been generated using the wrong clock source (expected CLOCK_MONOTONIC): event time 983041000001000, current time 194388371955852, call time 194388371930982.  Using current time instead.
08-24 19:37:20.785   106   144 W EventHub: An input event from /dev/input/event1 has a timestamp that appears to have been generated using the wrong clock source (expected CLOCK_MONOTONIC): event time 371903000000000, current time 194388372058925, call time 194388371930982.  Using current time instead.
08-24 19:37:20.785   106   144 I InputReader: Dropping key up from device anbox-keyboard because the key was not down.  keyCode=61, scanCode=15
08-24 19:37:20.795   669   705 E libEGL  : called unimplemented OpenGL ES API
08-24 19:37:21.426   106   144 E EventHub: could not get event (wrong size: 216)
08-24 19:37:21.589   106   144 E EventHub: could not get event (wrong size: 120)
08-24 19:37:21.824   669   705 E libEGL  : called unimplemented OpenGL ES API
08-24 19:37:22.075   106   144 E EventHub: could not get event (wrong size: 216)
08-24 19:37:22.187   106   144 E EventHub: could not get event (wrong size: 120)
@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Aug 24, 2019

Switching from uint64_t to uint32_t in

std::uint64_t sec;
for secs and usecs fixes the input problem (rpi is 32-bit userland and expects 32-bit kernel definitions, anbox deals with 64-bit userland by default).

@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Aug 25, 2019

@morphis are you interested to have support for RPI4 / 32 bit userland on this project? I can cleanup my diffs and open a PR to add support, but snap and such need more work.

And there are several crashes that need to be investigated, as well as the bug(s) that break the multi window mode.

I've documented step-by-step what I had to do in https://skmp.dev/blog/anbox-rpi4/

@Discombobulated88

This comment has been minimized.

Copy link

@Discombobulated88 Discombobulated88 commented Aug 26, 2019

I've been trying to get this going on a nvidia jetson nano 64bit ubuntu 18.04 userspace for quite some time.. your tips above may be helpful.

if you could create a aarch64 bit user space tutorial -- i'd ...well i'd do a lot of things

This person started to modify things for arm64 but they are missing some key things you mentioned above and were focusing on snap confinement which I don't really care about. https://github.com/HarleyPato/anbox-arm64

@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Aug 27, 2019

For arm64, just building a rootfs should work. The instructions for that are in https://github.com/anbox/anbox/blob/master/docs/build-android.md

@Discombobulated88

This comment has been minimized.

Copy link

@Discombobulated88 Discombobulated88 commented Sep 1, 2019

@skmp Thanks for the info , I have a question regarding the instructions on your website however.

Even though I should not have to do this if all I need to is re-compile the android image for arm64, on your website you say to unsquashfs the android image to modify a file, your instructions do not say to do this as root or with the sudo command which would result in the file and directory permissions of the image not being maintained.

In it's unmodified state the android image contains some unusual group Id's and user Id's as to not conflict with the host system in some regard. Unsquashing then resquashing without sudo would change the permissions and ownership to that of the current user.. Is this desirable when running anbox locally and unconfined?

@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Sep 12, 2019

I probably run those commands as root already, that is why it worked. I'll update the site.

@ericmigi

This comment has been minimized.

Copy link

@ericmigi ericmigi commented Nov 3, 2019

@skmp I'm working my way through this process, do you happen to have a copy of your android.img built for armv7 that I can borrow? Trying to get this to work on rp4 rasbian buster 32bit.

@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Nov 3, 2019

@ericmigi

This comment has been minimized.

Copy link

@ericmigi ericmigi commented Dec 1, 2019

@skmp ok I got pretty far, but it's failing with this error. rpi4, rasbian 32bit, built a android_arm7l.img. Any tips?

+ echo 'Waiting for filesystem being prepared ...'
Waiting for filesystem being prepared ...
+ wait 2
+ prepare_filesystem
+ '[' ! -e /dev/qemu_pipe ']'
+ chown system:system /dev/qemu_pipe
+ chmod 0666 /dev/qemu_pipe
+ '[' ! -e /dev/qemu_trace ']'
+ continue
+ '[' ! -e /dev/goldfish_pipe ']'
+ continue
+ '[' ! -e '/dev/input/*' ']'
+ continue
+ '[' -e /dev/tun ']'
+ chown system:vpn /dev/tun
+ chmod 0660 /dev/tun
+ echo 'Starting real init now ...'
Starting real init now ...
+ /init
--------- beginning of system
/system/bin/sh: No controlling tty: open /dev/tty: No such device or address
/system/bin/sh: warning: won't have full job control
12-01 01:02:31.554    11    11 I vold    : Vold 3.0 (the awakening) firing up
12-01 01:02:31.554    11    11 V vold    : Detected support for: ext4 f2fs vfat
12-01 01:02:31.568    11    11 E vold    : Failed to open default fstab /fstab.goldfish: No such file or directory
12-01 01:02:31.568    11    11 E vold    : Error reading configuration... continuing anyways: No such file or directory
12-01 01:02:31.585    11    20 D vold    : e4crypt_init_user0
12-01 01:02:31.585    11    20 D vold    : e4crypt_prepare_user_storage for volume null, user 0, serial 0, flags 1
12-01 01:02:31.585    11    20 D vold    : Preparing: /data/system/users/0
12-01 01:02:31.585    11    20 D vold    : Preparing: /data/misc/profiles/cur/0
12-01 01:02:31.586    11    20 D vold    : Preparing: /data/misc/profiles/cur/0/foreign-dex
12-01 01:02:31.586    11    20 D vold    : Preparing: /data/system_de/0
12-01 01:02:31.586    11    20 D vold    : Preparing: /data/misc_de/0
12-01 01:02:31.586    11    20 D vold    : Preparing: /data/user_de/0
12-01 01:02:31.586    11    20 D vold    : e4crypt_unlock_user_key 0 serial=0 token_present=0
12-01 01:02:31.586    11    20 E vold    : Failed to chmod /data/system_ce/0: No such file or directory
12-01 01:02:31.586    11    20 E vold    : Failed to chmod /data/misc_ce/0: No such file or directory
12-01 01:02:31.586    11    20 E vold    : Failed to chmod /data/media/0: No such file or directory
--------- beginning of main
12-01 01:02:31.586     1     1 I vdc     : 200 12 Command succeeded
12-01 01:02:31.604    21    21 I /system/bin/tzdatacheck: tzdata file /data/misc/zoneinfo/current/tzdata does not exist. No action required.
12-01 01:02:31.668    24    24 I qemu-props: connected to 'boot-properties' qemud service.
12-01 01:02:31.668    24    24 I qemu-props: receiving..
12-01 01:02:31.669    24    24 I qemu-props: received: ro.sf.lcd_density=160
12-01 01:02:31.696    24    24 I qemu-props: receiving..
12-01 01:02:31.696    24    24 I qemu-props: exiting (1 properties set).
12-01 01:02:31.718    34    34 I         : installd firing up
12-01 01:02:31.718    34    34 E cutils  : Failed to read /data/.layout_version: No such file or directory
12-01 01:02:31.718    34    34 D         : Assuming that device has multi-user storage layout; upgrade no longer supported
12-01 01:02:31.718    34    34 D         : Upgrading to /data/misc/user directories
12-01 01:02:31.719    35    35 I keystore: Found keymaster0 module Keymaster OpenSSL HAL, version 2
12-01 01:02:31.719    35    35 I SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 131: Creating device
12-01 01:02:31.719    35    35 D SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 132: Device address: 0xb68b5000
12-01 01:02:31.719    35    35 I keystore: Keymaster0 module is software-only.  Using SoftKeymasterDevice instead.
12-01 01:02:31.719    35    35 I SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 131: Creating device
12-01 01:02:31.719    35    35 D SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 132: Device address: 0xb68b5200
12-01 01:02:31.719    35    35 I keystore: SELinux: Keystore SELinux is disabled.
12-01 01:02:31.780    41    41 I fingerprintd: Starting fingerprintd
12-01 01:02:31.813    43    43 I perfprofd: starting Android Wide Profiling daemon
12-01 01:02:31.813    43    43 E perfprofd: unable to open configuration file /data/data/com.google.android.gms/files/perfprofd.conf
12-01 01:02:31.813    43    43 I perfprofd: random seed set to 434446064
12-01 01:02:31.848    42    42 I gatekeeperd: Starting gatekeeperd...
12-01 01:02:31.858    42    42 W gatekeeperd: falling back to software GateKeeper
12-01 01:02:31.858    42    42 I gatekeeperd: cold boot: clearing state
armv7-a-neon:/ $ 12-01 01:02:32.053    40    40 I Netd    : Netd 1.0 starting
12-01 01:02:32.053    40    40 D TetherController: Setting IP forward enable = 0
12-01 01:02:32.256    29    29 E DispSync: Couldn't set SCHED_FIFO for DispSyncThread
12-01 01:02:32.256    29    29 I SurfaceFlinger: SurfaceFlinger is starting
12-01 01:02:32.256    29    29 I SurfaceFlinger: SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
12-01 01:02:32.256    29    29 D libEGL  : Emulator has host GPU support, qemu.gles is set to 1.
12-01 01:02:32.257    29    29 E libEGL  : load_driver(/system/lib/egl/libGLES_emulation.so): dlopen failed: library "/system/lib/egl/libGLES_emulation.so" not found
12-01 01:02:32.321    40    40 E Netd    : cannot find interface dummy0
12-01 01:02:32.329    40    40 E Netd    : Unable to create netlink socket: Protocol not supported
12-01 01:02:32.329    40    40 W Netd    : Unable to open qlog quota socket, check if xt_quota2 can send via UeventHandler
12-01 01:02:32.355    40    40 D MDnsDS  : MDnsSdListener::Hander starting up
12-01 01:02:32.356    40    74 D MDnsDS  : MDnsSdListener starting to monitor
12-01 01:02:32.356    40    74 D MDnsDS  : Going to poll with pollCount 1
12-01 01:02:32.403    29    29 D libEGL  : loaded /system/lib/egl/libEGL_emulation.so
12-01 01:02:32.415    29    29 D libEGL  : loaded /system/lib/egl/libGLESv1_CM_emulation.so
12-01 01:02:32.433    29    29 D libEGL  : loaded /system/lib/egl/libGLESv2_emulation.so
12-01 01:02:32.452    29    29 D         : HostConnection::get() New Host Connection established 0xb689e140, tid 29
12-01 01:02:32.466    29    29 E SurfaceFlinger: Couldn't set SCHED_FIFO for SFEventThread
12-01 01:02:32.473    29    29 D hwcomposer: int hwc_device_open(const hw_module_t *, const char *, hw_device_t **)
12-01 01:02:32.473    29    29 I SurfaceFlinger: Using composer version 1.0
12-01 01:02:32.474    29    29 W SurfaceFlinger: no suitable EGLConfig found, trying a simpler query
12-01 01:02:32.474    29    29 I SurfaceFlinger: EGL information:
12-01 01:02:32.474    29    29 I SurfaceFlinger: vendor    : Android
12-01 01:02:32.474    29    29 I SurfaceFlinger: version   : 1.4 Android META-EGL
12-01 01:02:32.474    29    29 I SurfaceFlinger: extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_ANDROID_create_native_client_buffer EGL_ANDROID_front_buffer_auto_refresh EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer 
12-01 01:02:32.474    29    29 I SurfaceFlinger: Client API: OpenGL_ES
12-01 01:02:32.474    29    29 I SurfaceFlinger: EGLSurface: 8-8-8-8, config=0x0
12-01 01:02:32.476    29    29 W SurfaceFlinger: no suitable EGLConfig found, trying a simpler query
12-01 01:02:32.476    29    29 I SurfaceFlinger: EGL information:
12-01 01:02:32.476    29    29 I SurfaceFlinger: vendor    : Android
12-01 01:02:32.476    29    29 I SurfaceFlinger: version   : 1.4 Android META-EGL
12-01 01:02:32.476    29    29 I SurfaceFlinger: extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_ANDROID_create_native_client_buffer EGL_ANDROID_front_buffer_auto_refresh EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer 
12-01 01:02:32.476    29    29 I SurfaceFlinger: Client API: OpenGL_ES
12-01 01:02:32.476    29    29 I SurfaceFlinger: EGLSurface: 8-8-8-8, config=0x0
12-01 01:02:32.534    29    29 I SurfaceFlinger: OpenGL ES informations:
12-01 01:02:32.536    29    29 I SurfaceFlinger: vendor    : Broadcom
12-01 01:02:32.536    29    29 I SurfaceFlinger: renderer  : V3D 4.2
12-01 01:02:32.536    29    29 I SurfaceFlinger: version   : OpenGL ES 2.0
12-01 01:02:32.536    29    29 I SurfaceFlinger: extensions: GL_EXT_debug_marker GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_OES_EGL_image_external
12-01 01:02:32.536    29    29 I SurfaceFlinger: GL_MAX_TEXTURE_SIZE = 4096
12-01 01:02:32.536    29    29 I SurfaceFlinger: GL_MAX_VIEWPORT_DIMS = 4096
12-01 01:02:32.539    29    29 E cutils-trace: Error opening trace file: Permission denied (13)
12-01 01:02:32.546    29    29 W SurfaceFlinger: no suitable EGLConfig found, trying a simpler query
12-01 01:02:32.546    29    29 I SurfaceFlinger: EGL information:
12-01 01:02:32.546    29    29 I SurfaceFlinger: vendor    : Android
12-01 01:02:32.546    29    29 I SurfaceFlinger: version   : 1.4 Android META-EGL
12-01 01:02:32.546    29    29 I SurfaceFlinger: extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_ANDROID_create_native_client_buffer EGL_ANDROID_front_buffer_auto_refresh EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer 
12-01 01:02:32.546    29    29 I SurfaceFlinger: Client API: OpenGL_ES
12-01 01:02:32.546    29    29 I SurfaceFlinger: EGLSurface: 8-8-8-8, config=0x0
12-01 01:02:32.857    31    31 I         : sMaxFastTracks = 8
12-01 01:02:32.858    32    32 I cameraserver: ServiceManager: 0xb629c3a0
12-01 01:02:32.859    32    32 I CameraService: CameraService started (pid=32)
12-01 01:02:32.859    32    32 I CameraService: CameraService process starting
12-01 01:02:32.860    32    32 W BatteryNotifier: batterystats service unavailable!
12-01 01:02:32.861    32    32 W BatteryNotifier: batterystats service unavailable!
12-01 01:02:32.863    31    31 I audioserver: ServiceManager: 0xb621c3a0
12-01 01:02:32.864    31    31 W BatteryNotifier: batterystats service unavailable!
12-01 01:02:32.864    31    31 I AudioFlinger: Using default 3000 mSec as standby time.
12-01 01:02:32.865    31    31 I AudioPolicyService: AudioPolicyService CSTOR in new mode
12-01 01:02:32.878    36    36 I mediacodec: @@@ mediacodecservice starting
12-01 01:02:32.897    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: clock_gettime
12-01 01:02:32.899    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: connect
12-01 01:02:32.899    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: fcntl64
12-01 01:02:32.899    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: socket
12-01 01:02:32.899    36    36 W /system/bin/mediacodec: libminijail: allowing syscall: writev
12-01 01:02:32.916    31    31 I APM::ConfigParsingUtils: loadAudioPolicyConfig() loaded /system/etc/audio_policy.conf
12-01 01:02:32.918    36    36 W /system/bin/mediacodec: libminijail: logging seccomp filter failures
12-01 01:02:32.957    32    32 E EmulatedCamera_QemuClient: receiveMessage: Unable to obtain payload size: Invalid argument
12-01 01:02:32.957    32    32 E EmulatedCamera_QemuClient: doQuery Response to query 'list' has failed: Invalid argument
12-01 01:02:32.957    32    32 E EmulatedCamera_QemuClient: listCameras: List cameras query failed: No error message
12-01 01:02:32.958    32    32 E cutils-trace: Error opening trace file: Permission denied (13)
12-01 01:02:32.958    32    32 I CameraService: Loaded "Emulated Camera Module" camera module
12-01 01:02:32.958    32    32 E CameraService: setUpVendorTags: Vendor tag operations not fully defined. Ignoring definitions.
12-01 01:02:32.958    32    32 I ServiceManager: Waiting for service media.camera.proxy...
12-01 01:02:32.960    31    31 I AudioFlinger: loadHwModule() Loaded primary audio interface from Anbox audio HW HAL (audio) handle 10
12-01 01:02:32.961    31    31 I AudioFlinger: openOutput(), module 10 Device 2, SamplingRate 44100, Format 0x000001, Channels 3, flags 2
12-01 01:02:32.962    31    31 E audio_hw_generic: Successfully connected Anbox audio server
12-01 01:02:32.962    31    31 I AudioFlinger: HAL output buffer size 1024 frames, normal sink buffer size 1024 frames
12-01 01:02:32.978    38    38 V MediaUtils: physMem: 4095782912
12-01 01:02:32.979    38    38 V MediaUtils: requested limit: 819156580
12-01 01:02:32.979    38    38 V MediaUtils: actual limit: 819156580
12-01 01:02:32.979    38    38 V MediaUtils: original limits: 4294967295/4294967295
12-01 01:02:32.979    38    38 V MediaUtils: new limits: 819156580/4294967295
12-01 01:02:32.979    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: clock_gettime
12-01 01:02:32.979    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: connect
12-01 01:02:32.979    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: fcntl64
12-01 01:02:32.979    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: socket
12-01 01:02:32.979    38    38 W /system/bin/mediaextractor: libminijail: allowing syscall: writev
12-01 01:02:32.989    38    38 W /system/bin/mediaextractor: libminijail: logging seccomp filter failures
12-01 01:02:33.032    31    31 I BufferProvider: found effect "Multichannel Downmix To Stereo" from The Android Open Source Project
12-01 01:02:33.032    31    31 I AudioFlinger: Using module 10 has the primary audio interface
12-01 01:02:33.033    31    91 I AudioFlinger: AudioFlinger's thread 0xb5d83440 ready to run
12-01 01:02:33.037    31    91 W BatteryNotifier: batterystats service unavailable!
12-01 01:02:33.039    31    91 W BatteryNotifier: batterystats service unavailable!
12-01 01:02:33.045    31    91 W BatteryNotifier: batterystats service unavailable!
12-01 01:02:33.045    31    91 W AudioFlinger: no wake lock to update, system not ready yet
12-01 01:02:33.046    31    31 E audio_hw_generic: Error opening input stream format 1, channel_mask 0010, sample_rate 16000
12-01 01:02:33.046    31    91 E cutils-trace: Error opening trace file: Permission denied (13)
12-01 01:02:33.046    31    31 E audio_hw_generic: Successfully connected Anbox audio server
12-01 01:02:33.047    31    92 I AudioFlinger: AudioFlinger's thread 0xb5b8a440 ready to run
12-01 01:02:33.048    31    31 E AudioFlinger: int android::load_audio_interface(const char *, audio_hw_device_t **) couldn't load audio hw module audio.r_submix (No such file or directory)
12-01 01:02:33.048    31    31 E AudioFlinger: loadHwModule() error -2 loading module r_submix
12-01 01:02:33.048    31    31 W APM_AudioPolicyManager: could not open HW module r_submix
12-01 01:02:33.048    31    31 W APM_AudioPolicyManager: Input device 80000100 unreachable
12-01 01:02:33.048    31    31 I RadioService: RadioService
12-01 01:02:33.048    31    31 I RadioService: onFirstRef
12-01 01:02:33.048    31    31 E RadioService: couldn't load radio module radio.primary (No such file or directory)
12-01 01:02:33.049    31    31 E SoundTriggerHwService: couldn't load sound trigger module sound_trigger.primary (No such file or directory)
12-01 01:02:33.076    29    29 D SurfaceFlinger: shader cache generated - 24 shaders in 445.611389 ms
12-01 01:02:33.089    29    29 E SurfaceFlinger: Couldn't set SCHED_FIFO
12-01 01:02:33.089    29    29 D SurfaceFlinger: Set power mode=2, type=0 flinger=0xb68b5000
12-01 01:02:33.089    29    29 W SurfaceFlinger: Couldn't set SCHED_FIFO on display on
12-01 01:02:33.089    39    39 I mediaserver: ServiceManager: 0xb5d9c400
12-01 01:02:33.089    29    84 E SurfaceFlinger: eventControl(0, 1) failed Bad address
12-01 01:02:33.090    37    37 I mediaserver: ServiceManager: 0xb5e9c400
@skmp

This comment has been minimized.

Copy link
Author

@skmp skmp commented Dec 4, 2019

I don't see any fatal errors in the log - how do you start it?

@ericmigi

This comment has been minimized.

Copy link

@ericmigi ericmigi commented Dec 5, 2019

I started it from the commands in your blog post (https://skmp.dev/blog/anbox-rpi4/).

But the news of the day is my friend @akarpenko was able to get it working on ubuntu 64bit with software rendering. So that's a start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.