python在adb shell中执行相关命令
device_id = "181827V00500102"
adb_ret = subprocess.Popen("adb -s {} shell".format(device_id), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin= subprocess.PIPE)
print("adb_ret:{}".format(adb_ret))
command = "ifconfig\n".encode("utf-8")
out,error = adb_ret.communicate(input=command)
print("out:{},error:{}".format(out,error))