getting error while using "su" command

yehonatan picture yehonatan · Oct 6, 2015 · Viewed 7.7k times · Source

I try to make batch file to run adb commands. I want to use su -c, but I get the error:

 su: invalid uid/gid '-c'. 

I saw somewhere that my su version doesn't support -c, how can I enable this?

Answer

desperius picture desperius · Apr 12, 2017

In batch file it should be like this:

adb shell "su 0 <command args>"

For example:

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