deounix deounix - 1 year ago 223
Python Question

Enter adb shell from python

I'm trying to execute command to adb shell from python
I'm using Windows OS

On CMD :

C:\Users\deounix>adb shell
shell@android:/ $ su root
su root
root@android:/ # reboot

What I'm doing is :

import os

os.popen("adb shell & su root & reboot")

But it isn't work

How can I do it?

Answer Source
import os
os.system("adb shell su -c reboot")
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download