I am trying to execute adb commands in an automated way from python script. Please note that I am using python 2.7 in Windows. If I manually do it, the sequence is like this:
C:\Project\python>adb shell
login:<enter login id e.g. root>
Password: <enter password e.g. test>
Last login: Thu Feb 9 12:29:46 UTC 2017 on pts/0
~ # date
date
Thu Feb 9 12:55:06 UTC 2017
I am trying to handle this sequence from python script. I have tried using subprocess.call("adb shell date") but it fails saying that cannot execute commands without logging in. I am not sure how to to pass the login id and password. Sorry for the noob question, as I am very new to Python.
Appreciate your help guys !!
Cheers