X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/91b8a0ffc678418ed07491e6f181de9bcf057c31..d3f4c8c218e017b29b416d9eb7540bee8b5c99d0:/tools/helpers/lxc.py diff --git a/tools/helpers/lxc.py b/tools/helpers/lxc.py index 1c51e0d..c2ca4e7 100644 --- a/tools/helpers/lxc.py +++ b/tools/helpers/lxc.py @@ -74,7 +74,7 @@ def generate_nodes_lxc_config(args): if args.vendor_type != "MAINLINE": if not make_entry("/dev/hwbinder", "dev/host_hwbinder"): raise OSError('Binder node "hwbinder" of host not found') - make_entry("/vendor", "vendor_extra", options="bind,optional 0 0") + make_entry("/vendor", "vendor_extra", options="rbind,optional 0 0") # Necessary device nodes for adb make_entry("none", "dev/pts", "devpts", "defaults,mode=644,ptmxmode=666,create=dir 0 0", False) @@ -190,15 +190,18 @@ def generate_session_lxc_config(args, session): return add_node_entry(nodes, src, dist, mnt_type, options, check=False) # Make sure XDG_RUNTIME_DIR exists - if not make_entry("tmpfs", session["xdg_runtime_dir"], options="create=dir 0 0"): + if not make_entry("tmpfs", tools.config.defaults["container_xdg_runtime_dir"], options="create=dir 0 0"): raise OSError("Failed to create XDG_RUNTIME_DIR mount point") - wayland_socket = os.path.realpath(os.path.join(session["xdg_runtime_dir"], session["wayland_display"])) - if not make_entry(wayland_socket): + wayland_host_socket = os.path.realpath(os.path.join(session["xdg_runtime_dir"], session["wayland_display"])) + wayland_container_socket = os.path.realpath(os.path.join(tools.config.defaults["container_xdg_runtime_dir"], tools.config.defaults["container_wayland_display"])) + if not make_entry(wayland_host_socket, wayland_container_socket[1:]): raise OSError("Failed to bind Wayland socket") - pulse_socket = os.path.join(session["pulse_runtime_path"], "native") - make_entry(pulse_socket) + # Make sure PULSE_RUNTIME_DIR exists + pulse_host_socket = os.path.join(session["pulse_runtime_path"], "native") + pulse_container_socket = os.path.join(tools.config.defaults["container_pulse_runtime_path"], "native") + make_entry(pulse_host_socket, pulse_container_socket[1:]) if not make_entry(session["waydroid_data"], "data", options="rbind 0 0"): raise OSError("Failed to bind userdata") @@ -476,4 +479,10 @@ def shell(args): def logcat(args): args.COMMAND = ["/system/bin/logcat"] + args.uid = None + args.gid = None + args.nolsm = None + args.allcaps = None + args.nocgroup = None + args.context = None shell(args)