How to use su command over adb shell?

前端 未结 6 1917
悲&欢浪女
悲&欢浪女 2020-12-14 17:44

I need to make a script that executes a lots of thing on Android device, my device is rooted, when I enter on the shell, I can give the command su, and it works but I need p

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 18:29

    On my Linux I see an error with

    adb shell "su -c '[your command goes here]'"
    

    su: invalid uid/gid '-c'

    The solution is on Linux

    adb shell su 0 '[your command goes here]'
    

提交回复
热议问题