deounix deounix - 1 month ago 25
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?

import os
os.system("adb shell su -c reboot")