I want to give cmd automated input command here is my code
import subprocess
from subprocess import Popen, PIPE
p = subprocess.call("cmd",shell=True)
p = Popen('cmd', stdin=PIPE) # NOTE: no shell=True here
p.communicate(os.linesep.join(["apktool d aalpha.apk"]))
This opens cmd
for me in the project directory i.e E:\myproject
. Now I have this apktool in my project directory I am trying to run it automatically providing it the apktool run command in a way that I just open my python file and it executes the apktool.