Getting an error using the su command

I am trying to make a batch file to run adb commands. I want to use su -c , but I get an error:

  su: invalid uid/gid '-c'. 

I saw somewhere that my su version does not support -c , how can I enable this?

+5
source share
2 answers

In a batch file, it should be something like this:

 adb shell "su 0 <command args>" 

For instance:

 adb shell "su 0 mount -o rw,remount /system" 
+4
source

The standard Android su much simpler than its regular linux counterpart. It does not support any commands other than -c , so it becomes redundant.

usage: su [UID[,GID[,GID2]...]] [COMMAND [ARG...]]

+1
source

Source: https://habr.com/ru/post/1233021/


All Articles