LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

waydroid-shell

Run a command inside the Waydroid container

TLDR

Open an interactive shell
$ sudo waydroid shell
copy
Run one command
$ sudo waydroid shell -- [command]
copy
Run as a user ID
$ sudo waydroid shell --uid [uid]
copy
Run as a user and group
$ sudo waydroid shell --uid [uid] --gid [gid]
copy

SYNOPSIS

waydroid shell [options] [command...]

DESCRIPTION

waydroid shell runs a program inside the Waydroid Android container. It is a subcommand of waydroid, not a separate program. The container must already be running. With no command, the shell is interactive. Arguments after the options are the program to execute, which is how `waydroid shell -- getprop` runs one Android command and returns.

PARAMETERS

-u, --uid uid

User ID to run as. When --gid is omitted, the group ID is set to the same value.
-g, --gid gid
Group ID to run as.
-s, --context context
SELinux or AppArmor context to transition into. Ignored when --nolsm is set.
-L, --nolsm
Skip the mandatory-access-control transition and the container seccomp filter.
-C, --allcaps
Do not drop capabilities.
-G, --nocgroup
Do not move the process into the container cgroup.
command
Program and arguments to run. With no command, an interactive shell starts.

INSTALL

sudo dnf install waydroid
copy
sudo pacman -S waydroid
copy
sudo apk add waydroid
copy
nix profile install nixpkgs#waydroid
copy

CAVEATS

--nolsm, --allcaps, and --nocgroup weaken the container boundary and can leak privileges to Android. Root on the host is required for the LXC attach that implements this command.

SEE ALSO

waydroid(1), lxc(1), adb(1)

RESOURCES

Copied to clipboard
Kai