X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/677710ab36bba687b04268704bd92b37638854d0..78faa894f0ffb71d97a90cec9fc390f51dc251c9:/tools/actions/container_manager.py?ds=inline diff --git a/tools/actions/container_manager.py b/tools/actions/container_manager.py index 567c986..520034d 100644 --- a/tools/actions/container_manager.py +++ b/tools/actions/container_manager.py @@ -17,7 +17,8 @@ def start(args): def add_prop(key, cfg_key): value = session_cfg["session"][cfg_key] if value != "None": - props.append(key + "=" + session_cfg["session"][cfg_key]) + value = value.replace("/mnt/", "/mnt_extra/") + props.append(key + "=" + value) if not os.path.isfile(args.work + "/waydroid_base.prop"): raise RuntimeError("waydroid_base.prop Not found") @@ -48,7 +49,7 @@ def start(args): def chmod(path, mode): if os.path.exists(path): command = ["chmod", mode, "-R", path] - tools.helpers.run.root(args, command, check=False) + tools.helpers.run.user(args, command, check=False) # Nodes list if not perm_list: @@ -70,10 +71,6 @@ def start(args): # Graphics "/dev/dri", "/dev/graphics", - - # Wayland and pulse socket permissions - session_cfg["session"]["pulse_runtime_path"], - session_cfg["session"]["xdg_runtime_dir"] ] # Framebuffers @@ -122,10 +119,10 @@ def start(args): # Networking command = [tools.config.tools_src + "/data/scripts/waydroid-net.sh", "start"] - tools.helpers.run.root(args, command, check=False) + tools.helpers.run.user(args, command, check=False) # Sensors - tools.helpers.run.root( + tools.helpers.run.user( args, ["waydroid-sensord", "/dev/" + args.HWBINDER_DRIVER], output="background") # Mount rootfs @@ -138,13 +135,13 @@ def start(args): # Cgroup hacks if which("start"): command = ["start", "cgroup-lite"] - tools.helpers.run.root(args, command, check=False) + tools.helpers.run.user(args, command, check=False) helpers.mount.umount_all(args, "/sys/fs/cgroup/schedtune") #TODO: remove NFC hacks if which("stop"): command = ["stop", "nfcd"] - tools.helpers.run.root(args, command, check=False) + tools.helpers.run.user(args, command, check=False) # Set permissions set_permissions() @@ -195,20 +192,20 @@ def stop(args): # Networking command = [tools.config.tools_src + "/data/scripts/waydroid-net.sh", "stop"] - tools.helpers.run.root(args, command, check=False) + tools.helpers.run.user(args, command, check=False) #TODO: remove NFC hacks if which("start"): command = ["start", "nfcd"] - tools.helpers.run.root(args, command, check=False) + tools.helpers.run.user(args, command, check=False) # Sensors if which("waydroid-sensord"): command = ["pidof", "waydroid-sensord"] - pid = tools.helpers.run.root(args, command, check=False, output_return=True) + pid = tools.helpers.run.user(args, command, check=False, output_return=True) if pid: command = ["kill", "-9", pid] - tools.helpers.run.root(args, command, check=False) + tools.helpers.run.user(args, command, check=False) else: logging.error("WayDroid container is {}".format(status))