anbox / anbox

Anbox is a container-based approach to boot a full Android system on a regular GNU/Linux system
https://anbox.io
GNU General Public License v3.0
8.91k stars 1.16k forks source link

Anbox exits after splash screen display #743

Open inva1 opened 6 years ago

inva1 commented 6 years ago

image inva@inva ~ $ anbox session-manager [ 2018-06-03 21:17:40] [daemon.cpp:59@Run] Failed to connect to socket /var/snap/anbox/common/sockets/anbox-container.socket: Connection refused inva@inva ~ $

`inva@inva ~ $ anbox system-infoversion: 4 snap-revision: 99 os: name: Linux Mint version: 18.3 (Sylvia) snap-based: true kernel: version: Linux version 4.13.0-43-generic (buildd@lcy01-amd64-029) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)) #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 binder: true ashmem: true graphics: egl: vendor: NVIDIA version: 1.4 extensions:

container.log container-manager.log kernel.log lxc-monitord.log system.log system-info.log screenshot from 2018-06-03 22-13-20

morphis commented 6 years ago

This seems to be an issue with the used Nvidia GL driver 340:

06-03 15:12:11.902   307   323 E OpenGLRenderer: GL error:  GL_INVALID_VALUE
06-03 15:12:11.906   307   323 F OpenGLRenderer: GL errors! frameworks/base/libs/hwui/renderthread/CanvasContext.cpp:550
--------- beginning of crash
06-03 15:12:11.906   307   323 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 323 (RenderThread)

Not sure which GL call fails here but this continuously fails the UI from coming up.

@inva1 Do you have a chance to try with a newer version of the Nvidia driver?

thebestofall007 commented 6 years ago

Morphis, I am also having this problem, but I am not using Nvidia drivers or graphics, but Intel graphics, so I am not sure if mine would be graphics related.

Here is my system info: anbox system-info version: 4 snap-revision: 113 cpu: arch: x86 brand: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz features: os: name: Linux Mint version: 19 (Tara) snap-based: true kernel: version: Linux version 4.15.0-24-generic (buildd@lgw01-amd64-056) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018 binder: true ashmem: true graphics: egl: vendor: Mesa Project version: 1.4 (DRI2) extensions:

anbox-system-diagnostics-2018-07-04.zip (for some reason the system couldn't recognize the tar file format when I dragged and dropped, and some of the files were too big to upload, so I had to repackage the logs as a zip.)

I also noticed that anbox seems to continue running after the splash screen disappears and I have to manually close it with "killall anbox" from the terminal.

Please let me know if you need anything else.

damko commented 6 years ago

I have exactly the same issue on debian testing. I tried builiding from source and installing from snap: same result.

this is what I get with session-manager:

> anbox session-manager
[ 2018-07-26 01:33:13] [daemon.cpp:59@Run] Failed to connect to socket /var/snap/anbox/common/sockets/anbox-container.socket: No such file or directory

this is my system info

version: 4 snap-revision: 92 os: name: Debian GNU/Linux version: snap-based: true kernel: version: Linux version 4.16.0-2-amd64 (debian-kernel@lists.debian.org) (gcc version 7.3.0 (Debian 7.3.0-23)) #1 SMP Debian 4.16.16-2 (2018-06-22) binder: true ashmem: true graphics: egl: vendor: Mesa Project version: 1.4 (DRI2) extensions:

  • EGL_ANDROID_native_fence_sync
  • EGL_CHROMIUM_sync_control
  • EGL_EXT_buffer_age
  • EGL_EXT_create_context_robustness
  • EGL_EXT_image_dma_buf_import
  • EGL_EXT_image_dma_buf_import_modifiers
  • 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_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_KHR_wait_sync
  • EGL_MESA_configless_context
  • EGL_MESA_drm_image
  • EGL_MESA_image_dma_buf_export
  • EGL_NOK_texture_from_pixmap
  • EGL_WL_bind_wayland_display gles2: vendor: Intel Open Source Technology Center vendor: OpenGL ES 3.0 Mesa 17.2.8 extensions:
  • GL_EXT_blend_minmax
  • GL_EXT_multi_draw_arrays
  • GL_EXT_texture_filter_anisotropic
  • GL_EXT_texture_compression_dxt1
  • 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_float_linear
  • 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_ANGLE_texture_compression_dxt3
  • GL_ANGLE_texture_compression_dxt5
  • GL_EXT_robustness
  • 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_robustness
  • GL_OES_depth_texture_cube_map
  • GL_OES_surfaceless_context
  • GL_EXT_color_buffer_float
  • GL_EXT_separate_shader_objects
  • GL_EXT_shader_integer_mix
  • GL_INTEL_performance_query
  • GL_EXT_compressed_ETC1_RGB8_sub_texture
  • GL_EXT_draw_buffers_indexed
  • GL_EXT_draw_elements_base_vertex
  • GL_EXT_polygon_offset_clamp
  • GL_EXT_texture_border_clamp
  • GL_KHR_blend_equation_advanced
  • GL_KHR_context_flush_control
  • GL_OES_draw_buffers_indexed
  • GL_OES_draw_elements_base_vertex
  • GL_OES_sample_shading
  • GL_OES_sample_variables
  • GL_OES_shader_multisample_interpolation
  • GL_OES_texture_border_clamp
  • GL_EXT_blend_func_extended
  • GL_KHR_no_error
  • GL_EXT_clip_cull_distance
  • GL_MESA_shader_integer_functions
Micro1337 commented 5 years ago

I created an account just to share the work around I've found to this problem. I combined solutions from multiple different sources, along with some brain-power, and got Anbox working for me.

I know I have Mesa Project and Intel Open source, just like thebestofall007 and damko.

I was having the same error

Failed to connect to socket /var/snap/anbox/common/sockets/anbox-container.socket: Connection refused error, and after I would reboot, I would get snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks

I ran

$ sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/* and $ systemctl start snapd.service

which got me back to my original error of

Failed to connect to socket /var/snap/anbox/common/sockets/anbox-container.socket: Connection refused" when I tried to run "anbox session-manager

I was also getting the

Anbox does not start: "Application manager service is not running yet"

error when I'd run

$ anbox.appmgr

After running the following commands

$ export PATH=$PATH:/snap/bin $ sudo snap start anbox

All I had to do was open two terminals, In the first one I ran

$ anbox session-manager

and left that terminal open. In the other terminal I ran

$ anbox.appmgr

Now Anbox is running.

After a reboot, I just run the commands again to open Anbox.

$ sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/* $ systemctl start snapd.service $ export PATH=$PATH:/snap/bin $ sudo snap start anbox $ anbox session-manager In new terminal $ anbox.appmgr

P.S.

I ran the following command to make sure Anbox-installer was installed, idk if this is necessary

$ sudo snap install --classic anbox-installer && anbox-installer

if it is, you should only have to run this once.

Sorry for the long post, I hope this helps someone, I'm going to post in on some other forums where I've seen these problems.

Cheers, and good luck.

QuantumTarantino commented 2 years ago

@Micro1337 comment worked for me on Kali 2022.1