ksud: refine su and make it compitable with MagiskSU

Supported features:

1.  --mount-master, -M, -mm which would make the command run in global mount namespace.
2. - user to switch a specific user's shell.
3. -v, -V to print version code and name.

fix #330 #306 #305 #32
This commit is contained in:
tiann
2023-04-04 13:50:36 +08:00
parent 6fc8cc7e8e
commit 48e76f9096
6 changed files with 227 additions and 32 deletions

View File

@@ -584,6 +584,15 @@ dependencies = [
"version_check",
]
[[package]]
name = "getopts"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
dependencies = [
"unicode-width",
]
[[package]]
name = "getrandom"
version = "0.2.8"
@@ -793,6 +802,7 @@ dependencies = [
"encoding",
"env_logger",
"extattr",
"getopts",
"humansize",
"is_executable",
"java-properties",