Adb目录
..android-sdkplatform-tools
Logcat监听安卓模拟器
MuMu模拟器的端口:7555
#!/usr/bin/env python import os import sys Cmd_kill = "adb kill-server" Cmd_start = "adb start-server" Cmd_connect = "adb connect 127.0.0.1:7555" Cmd_devices = "adb devices" Cmd_profiler = "adb forward tcp:54999 localabstract:Unity-com.xxxx.yyy" Cmd_logcat = "adb logcat -s Unity -d > log.txt" def conn2Nox(): os.system(Cmd_kill) os.system(Cmd_start) os.system(Cmd_connect) os.system(Cmd_devices) os.system(Cmd_profiler) os.system(Cmd_logcat) os.system("pause") pass def main(): conn2Nox() pass if __name__ == "__main__": main()