X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/2cc269f5fc393b4dc8049bb72b0c939a5a12190c..2a2097f4ff99287c84bee69f5116cffdc90e73b1:/tools/helpers/arguments.py diff --git a/tools/helpers/arguments.py b/tools/helpers/arguments.py index 1879c76..2f3af66 100644 --- a/tools/helpers/arguments.py +++ b/tools/helpers/arguments.py @@ -21,8 +21,8 @@ def arguments_init(subparser): ret = subparser.add_parser("init", help="set up waydroid specific" " configs and install images") ret.add_argument("-i", "--images_path", - help="custom path to waeiod images (default in" - " /home/.waydroid/images)") + help="custom path to waydroid images (default in" + " /var/lib/waydroid/images)") ret.add_argument("-f", "--force", action="store_true", help="re-initialize configs and images") ret.add_argument("-c", "--system_channel", @@ -58,14 +58,15 @@ def arguments_session(subparser): ret = subparser.add_parser("session", help="session controller") sub = ret.add_subparsers(title="subaction", dest="subaction") sub.add_parser("start", help="start session") - sub.add_parser("stop", help="start session") + sub.add_parser("stop", help="stop session") return ret def arguments_container(subparser): ret = subparser.add_parser("container", help="container controller") sub = ret.add_subparsers(title="subaction", dest="subaction") sub.add_parser("start", help="start container") - sub.add_parser("stop", help="start container") + sub.add_parser("stop", help="stop container") + sub.add_parser("restart", help="restart container") sub.add_parser("freeze", help="freeze container") sub.add_parser("unfreeze", help="unfreeze container") return ret @@ -81,6 +82,9 @@ def arguments_app(subparser): remove.add_argument('PACKAGE', help="package name of app to remove") launch = sub.add_parser("launch", help="start single application") launch.add_argument('PACKAGE', help="package name of app to launch") + intent = sub.add_parser("intent", help="start single application") + intent.add_argument('ACTION', help="action name") + intent.add_argument('URI', help="data uri") sub.add_parser("list", help="list installed applications") return ret @@ -100,9 +104,19 @@ def arguments_fullUI(subparser): ret = subparser.add_parser("show-full-ui", help="show android full screen in window") return ret +def arguments_firstLaunch(subparser): + ret = subparser.add_parser("first-launch", help="initialize waydroid and start it") + return ret + def arguments_shell(subparser): ret = subparser.add_parser("shell", help="run remote shell command") - ret.add_argument('COMMAND', nargs='?', help="command to run") + 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 def arguments_logcat(subparser): @@ -128,6 +142,8 @@ def arguments(): " logfiles (this may reduce performance)") parser.add_argument("-q", "--quiet", dest="quiet", action="store_true", help="do not output any log messages") + parser.add_argument("-w", "--wait", dest="wait_for_init", action="store_true", + help="wait for init before running") # Actions sub = parser.add_subparsers(title="action", dest="action") @@ -141,6 +157,7 @@ def arguments(): arguments_app(sub) arguments_prop(sub) arguments_fullUI(sub) + arguments_firstLaunch(sub) arguments_shell(sub) arguments_logcat(sub)