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?
subprocessinstead. alsoadb rebootwithoutshelldoes not require root:subprocess.check_output(['adb', 'reboot'])