getting error while using “su” command

大城市里の小女人 提交于 2020-01-12 18:45:28

问题


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?


回答1:


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"



回答2:


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

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



来源:https://stackoverflow.com/questions/32963479/getting-error-while-using-su-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!