X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/244ee49a37ae4f19dcc16d1f89eb265bb2cfd6ef..facf2b713da1038bbc960bb7e094bdb80213485e:/tools/actions/container_manager.py diff --git a/tools/actions/container_manager.py b/tools/actions/container_manager.py index bef7483..ee91c52 100644 --- a/tools/actions/container_manager.py +++ b/tools/actions/container_manager.py @@ -69,6 +69,8 @@ def start(args): # Graphics "/dev/dri", "/dev/graphics", + "/dev/pvr_sync", + "/dev/ion", ] # Framebuffers @@ -122,8 +124,9 @@ def start(args): tools.helpers.run.user(args, command, check=False) # Sensors - tools.helpers.run.user( - args, ["waydroid-sensord", "/dev/" + args.HWBINDER_DRIVER], output="background") + if which("waydroid-sensord"): + tools.helpers.run.user( + args, ["waydroid-sensord", "/dev/" + args.HWBINDER_DRIVER], output="background") # Mount rootfs helpers.images.mount_rootfs(args, cfg["waydroid"]["images_path"]) @@ -136,7 +139,8 @@ def start(args): if which("start"): command = ["start", "cgroup-lite"] tools.helpers.run.user(args, command, check=False) - helpers.mount.umount_all(args, "/sys/fs/cgroup/schedtune") + command = ["umount", "-l", "/sys/fs/cgroup/schedtune"] + tools.helpers.run.user(args, command, check=False) #TODO: remove NFC hacks if which("stop"): @@ -202,11 +206,17 @@ def stop(args): # Sensors if which("waydroid-sensord"): command = ["pidof", "waydroid-sensord"] - pid = tools.helpers.run.user(args, command, check=False, output_return=True) + pid = tools.helpers.run.user(args, command, check=False, output_return=True).strip() if pid: command = ["kill", "-9", pid] tools.helpers.run.user(args, command, check=False) + # Umount rootfs + helpers.images.umount_rootfs(args) + + # Umount data + helpers.mount.umount_all(args, tools.config.defaults["data"]) + else: logging.error("WayDroid container is {}".format(status))