X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/1be55b971dadcf952aeed25d7c84efc2b71d4c85..dd038eddd7ec11c6fbe37f9082b6215291e0537f:/tools/helpers/arguments.py diff --git a/tools/helpers/arguments.py b/tools/helpers/arguments.py index 5f1893e..b3182b9 100644 --- a/tools/helpers/arguments.py +++ b/tools/helpers/arguments.py @@ -110,6 +110,12 @@ def arguments_firstLaunch(subparser): def arguments_shell(subparser): ret = subparser.add_parser("shell", help="run remote shell command") + ret.add_argument("-u", "--uid", help="the UID to run as (also sets GID to the same value if -g is not set)") + ret.add_argument("-g", "--gid", help="the GID to run as") + ret.add_argument("-s", "--context", help="transition to the specified SELinux or AppArmor security context. No-op if -L is supplied.") + ret.add_argument("-L", "--nolsm", action="store_true", help="tell LXC not to perform security domain transition related to mandatory access control (e.g. SELinux, AppArmor). If this option is supplied, LXC won't apply a container-wide seccomp filter to the executed program. This is a dangerous option that can result in leaking privileges to the container!!!") + ret.add_argument("-C", "--allcaps", action="store_true", help="tell LXC not to drop capabilities. This is a dangerous option that can result in leaking privileges to the container!!!") + ret.add_argument("-G", "--nocgroup", action="store_true", help="tell LXC not to switch to the container cgroup. This is a dangerous option that can result in leaking privileges to the container!!!") ret.add_argument('COMMAND', nargs='*', help="command to run") return ret @@ -117,6 +123,13 @@ def arguments_logcat(subparser): ret = subparser.add_parser("logcat", help="show android logcat") return ret +def arguments_adb(subparser): + ret = subparser.add_parser("adb", help="manage adb connection") + sub = ret.add_subparsers(title="subaction", dest="subaction") + sub.add_parser("connect", help="connect adb to the Android container") + sub.add_parser("disconnect", help="disconnect adb from the Android container") + return ret + def arguments(): parser = argparse.ArgumentParser(prog="waydroid") @@ -154,6 +167,7 @@ def arguments(): arguments_firstLaunch(sub) arguments_shell(sub) arguments_logcat(sub) + arguments_adb(sub) if argcomplete: argcomplete.autocomplete(parser, always_complete_options="long")