Android: Run systrace under windows

Run systrace under Windows, there is an error occurs.

C:\..\sdk\platform-tools\systrace>python systrace.py --set-
tags=gfx,view,wm
Traceback (most recent call last):
  File "systrace.py", line 286, in <module>
    main()
  File "systrace.py", line 60, in main
    device_sdk_version = get_device_sdk_version()
  File "systrace.py", line 44, in get_device_sdk_version
    stderr=subprocess.PIPE)
  File "C:\Python27\lib\subprocess.py", line 710, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 958, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified


The systrace python script uses the select() system call, and that doesn't work on Windows. The latest preview (ADT21 rc9) of the Android SDK tools include support for collecting system trace from within the monitor tool.

Launch monitor as:

./tools/monitor &

Click on a device, and at the top right of the device panel, you should have an toolbar itemn that allows you to collect system trace.



你可能感兴趣的:(Android: Run systrace under windows)