# Sensors
tools.helpers.run.root(
- args, ["waydroid-sensord", args.HWBINDER_DRIVER], output="background")
+ args, ["waydroid-sensord", "/dev/" + args.HWBINDER_DRIVER], output="background")
# Mount rootfs
helpers.images.mount_rootfs(args, cfg["waydroid"]["images_path"])
helpers.lxc.start(args)
session_cfg["session"]["state"] = helpers.lxc.status(args)
+ timeout = 10
+ while session_cfg["session"]["state"] != "RUNNING" and timeout > 0:
+ session_cfg["session"]["state"] = helpers.lxc.status(args)
+ logging.info(
+ "waiting {} seconds for container to start...".format(timeout))
+ timeout = timeout - 1
+ time.sleep(1)
+ if session_cfg["session"]["state"] != "RUNNING":
+ raise OSError("container failed to start")
tools.config.save_session(session_cfg)
if not hasattr(args, 'hardwareLoop'):
command = ["pidof", "waydroid-sensord"]
pid = tools.helpers.run.root(args, command, check=False, output_return=True)
if pid:
- command = ["killall", pid]
+ command = ["kill", "-9", pid]
tools.helpers.run.root(args, command, check=False)
else: