X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/9cec7cac9481750a4955c5bbc6c68a218d4635db..7a18aa633143a9a0397ef7c6fe558d7497aa3db9:/tools/helpers/lxc.py diff --git a/tools/helpers/lxc.py b/tools/helpers/lxc.py index d42ad3c..9caff23 100644 --- a/tools/helpers/lxc.py +++ b/tools/helpers/lxc.py @@ -107,6 +107,11 @@ def generate_nodes_lxc_config(args): make_entry("tmpfs", "var", "tmpfs", "nodev 0 0", False) make_entry("/var/run", options="rbind,create=dir,optional 0 0") + # tmp + make_entry("tmpfs", "tmp", "tmpfs", "nodev 0 0", False) + for n in glob.glob("/tmp/run-*"): + make_entry(n, options="rbind,create=dir,optional 0 0") + return nodes @@ -147,19 +152,11 @@ def make_base_props(args): "ro.board.platform"] for p in hardware_props: prop = tools.helpers.props.host_get(args, p) - hal_prop = "" if prop != "": - for lib in ["lib", "lib64"]: - hal_file = "/vendor/" + lib + "/hw/" + hardware + "." + prop + ".so" - command = ["readlink", "-f", hal_file] - hal_file_path = tools.helpers.run.user(args, command, output_return=True).strip() - if os.path.isfile(hal_file_path): - hal_prop = re.sub(".*" + hardware + ".", "", hal_file_path) - hal_prop = re.sub(".so", "", hal_prop) - if hal_prop != "": - return hal_prop - if hal_prop != "": - return hal_prop + for lib in ["/odm/lib", "/odm/lib64", "/vendor/lib", "/vendor/lib64", "/system/lib", "/system/lib64"]: + hal_file = lib + "/hw/" + hardware + "." + prop + ".so" + if os.path.isfile(hal_file): + return prop return "" props = [] @@ -277,7 +274,7 @@ def shell(args): command.append(args.COMMAND) else: command.append("/system/bin/sh") - subprocess.run(command, env={"PATH": os.environ['PATH'] + "/system/bin:/vendor/bin"}) + subprocess.run(command, env={"PATH": os.environ['PATH'] + ":/system/bin:/vendor/bin"}) def logcat(args): if status(args) != "RUNNING":