今天闲来无事,写了一个基于Python的脚本,主要实现脚本运行adb shell命令,后期如果需要其他功能,依旧可以在此基础上进行扩展。废话不多说,上脚本,截图、源码在下边。

os
test_adb_port():os.system()i = ().readline()j = i.split()[-]c = j.replace(, )= os.system(%c)os.system()os.system()
test_testmsg(b):a = os.system(%b[][])a == :c = test_adb_port()%(b[],c):%b[]
zhushi = [,,]
command = [,,]
l = (,(zhushi,command))
b l:test_testmsg(b)

    monkey的一些命令也也可以加上。如果需要用到安卓手机底层linux系统的命令,在linux有此命令函数库的情况下,可用''号隔开。

        例如: adb shell  dumpsys cpuinfo | gerp  包名

        在cmd下需要加引号:adb shell  ’dumpsys cpuinfo | gerp  包名’