I am trying to make a python script to check the contents of a database via adb. The thing is that in my code,only the first subprocess.call() is executed and the rest are ignored. Since i am fairly new to Python, i am not sure how to fix it. This is the code:
import subprocessdef root():subprocess.call('adb shell',shell=True)x=input('Enter package name: ')openSql(x)def openSql(x):subprocess.call('cd data/data/%s/databases/'%(x),shell=True)table=input('Enter table name: ')openTable(table)def openTable(table):subprocess.call('sqlite3 table',shell=True)subprocess.call('select * from %s'%(table),shell=True)root()
It gives no error but it just enters root at my emulator and nothing else.
root@android:/ #