Coder Social home page Coder Social logo

Comments (9)

tiann avatar tiann commented on May 27, 2024 2

su is sh, sh don't have -v and -h, so su won't have.

from kernelsu.

tiann avatar tiann commented on May 27, 2024 2

48e76f9

oriole:/ $ su -h
KernelSU

Usage: su [options] [-] [user [argument...]]

Options:
    -c, --command COMMAND
                        pass COMMAND to the invoked shell
    -h, --help          display this help message and exit
    -l, --login         force run in the global mount namespace
    -p, --preserve-environment
                        preserve the entire environment
    -s, --shell         use SHELL instead of the default /system/bin/sh
    -v, --version       display version number and exit
    -V                  display version code and exit
    -M, --mount-master  force run in the global mount namespace

from kernelsu.

tiann avatar tiann commented on May 27, 2024

su is actually sh in KernelSU, what's the use case of su -V and su --help?

from kernelsu.

huangsijun17 avatar huangsijun17 commented on May 27, 2024

su is actually in KernelSU, what's the use case of and ?sh``su -V``su --help

MagiskSU Example:

OnePlus8T:/ $ su --help
MagiskSU

Usage: su [options] [-] [user [argument...]]

Options:
  -c, --command COMMAND         pass COMMAND to the invoked shell
  -h, --help                    display this help message and exit
  -, -l, --login                pretend the shell to be a login shell
  -m, -p,
  --preserve-environment        preserve the entire environment
  -s, --shell SHELL             use SHELL instead of the default /system/bin/sh
  -v, --version                 display version number and exit
  -V                            display version code and exit
  -mm, -M,
  --mount-master                force run in the global mount namespace

OnePlus8T:/ $ su -h
MagiskSU

Usage: su [options] [-] [user [argument...]]

Options:
  -c, --command COMMAND         pass COMMAND to the invoked shell
  -h, --help                    display this help message and exit
  -, -l, --login                pretend the shell to be a login shell
  -m, -p,
  --preserve-environment        preserve the entire environment
  -s, --shell SHELL             use SHELL instead of the default /system/bin/sh
  -v, --version                 display version number and exit
  -V                            display version code and exit
  -mm, -M,
  --mount-master                force run in the global mount namespace

OnePlus8T:/ $ su -?
su: invalid option -- ?

MagiskSU

Usage: su [options] [-] [user [argument...]]

Options:
  -c, --command COMMAND         pass COMMAND to the invoked shell
  -h, --help                    display this help message and exit
  -, -l, --login                pretend the shell to be a login shell
  -m, -p,
  --preserve-environment        preserve the entire environment
  -s, --shell SHELL             use SHELL instead of the default /system/bin/sh
  -v, --version                 display version number and exit
  -V                            display version code and exit
  -mm, -M,
  --mount-master                force run in the global mount namespace

2|OnePlus8T:/ $ su -v
25.2:MAGISKSU
OnePlus8T:/ $ su -V
25200
OnePlus8T:/ $ su --version
25.2:MAGISKSU

from kernelsu.

tiann avatar tiann commented on May 27, 2024

KernelSU is not Magisk

from kernelsu.

huangsijun17 avatar huangsijun17 commented on May 27, 2024

KernelSU is not Magisk

Ubuntu Example:

user@X570:~$ su --help

Usage:
 su [options] [-] [<user> [<argument>...]]

Change the effective user ID and group ID to that of <user>.
A mere - implies -l.  If <user> is not given, root is assumed.

Options:
 -m, -p, --preserve-environment      do not reset environment variables
 -w, --whitelist-environment <list>  don't reset specified variables

 -g, --group <group>             specify the primary group
 -G, --supp-group <group>        specify a supplemental group

 -, -l, --login                  make the shell a login shell
 -c, --command <command>         pass a single command to the shell with -c
 --session-command <command>     pass a single command to the shell with -c
                                   and do not create a new session
 -f, --fast                      pass -f to the shell (for csh or tcsh)
 -s, --shell <shell>             run <shell> if /etc/shells allows it
 -P, --pty                       create a new pseudo-terminal

 -h, --help                      display this help
 -V, --version                   display version

For more details see su(1).
user@X570:~$ su -h

Usage:
 su [options] [-] [<user> [<argument>...]]

Change the effective user ID and group ID to that of <user>.
A mere - implies -l.  If <user> is not given, root is assumed.

Options:
 -m, -p, --preserve-environment      do not reset environment variables
 -w, --whitelist-environment <list>  don't reset specified variables

 -g, --group <group>             specify the primary group
 -G, --supp-group <group>        specify a supplemental group

 -, -l, --login                  make the shell a login shell
 -c, --command <command>         pass a single command to the shell with -c
 --session-command <command>     pass a single command to the shell with -c
                                   and do not create a new session
 -f, --fast                      pass -f to the shell (for csh or tcsh)
 -s, --shell <shell>             run <shell> if /etc/shells allows it
 -P, --pty                       create a new pseudo-terminal

 -h, --help                      display this help
 -V, --version                   display version

For more details see su(1).
user@X570:~$ su -?
su: invalid option -- '?'
Try 'su --help' for more information.
user@X570:~$ su -v
su: invalid option -- 'v'
Try 'su --help' for more information.
user@X570:~$ su -V
su from util-linux 2.34
user@X570:~$ su --version
su from util-linux 2.34

from kernelsu.

tiann avatar tiann commented on May 27, 2024

If you need this, please make a PR.

from kernelsu.

androidacy-user avatar androidacy-user commented on May 27, 2024

Worth noting root apps often depend on the output of su -v to obtain su version information and confirm su is compatible and working, so KernelSU isn't compatible with any of them.

from kernelsu.

tiann avatar tiann commented on May 27, 2024

su is sh in KernelSU, so the version is not so important. Do you care the version when you use adb shell?su is nothing special except its uid is 0 and selinux is unrestricted.

from kernelsu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.