Skip to content

Commit

Permalink
支持MuMu模拟器多开连接
Browse files Browse the repository at this point in the history
  • Loading branch information
lisai9093 committed Jul 25, 2024
1 parent eee965b commit e7ea28b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion action.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,21 @@ def startup():
elif os.path.isfile(mumu_path):
print('检测到MuMu模拟器')
adb_path=mumu_path
comm=[adb_path,'connect','127.0.0.1:7555']
#选择模拟器端口
while True:
try:
raw=input('选择MuMu模拟器端口(直接回车使用默认7555):')
port=int(raw)
except ValueError:
if len(raw)==0:
port=7555
break
print('请输入数字')
continue
else:
break
mumu_ip='127.0.0.1:'+str(port)
comm=[adb_path,'connect',mumu_ip]
out=subprocess.run(comm,shell=False,capture_output=True,check=False)
out=out.stdout.decode('utf-8')
print(out)
Expand Down

0 comments on commit e7ea28b

Please sign in to comment.