Error running systrace tool in ADB using a Jelly Bean 4.1 emulator on Windows 7
Asked Answered
S

3

16

How can I run systrace to show its html output? After watching the Google I/O 2012 talk "For Butter or Worse" I am having trouble getting systrace to work on Windows 7 using the emulator running Jelly Bean 4.1.

I did the following:

  1. Installed Python 2.7, and added the install folder to my PATH
  2. Ran the following: C:\android-sdk\platform-tools\systrace>python systrace.py (with older SDKs: C:\android-sdk\tools\systrace>python systrace.py)

But I get the following error in cmd:

Traceback (most recent call last):
  File "systrace.py", line 212, in <module>
    main()
  File "systrace.py", line 124, in main
    ready = select.select([adb.stdout, adb.stderr], [], [adb.stdout, adb.stderr])
select.error: (10093, 'Either the application has not called WSAStartup, or WSAStartup failed')

Note:

  • I have enabled traces in the emulator: Settings > Developer Options > Enable traces
  • I have also tried with Python 3.2
Stutman answered 2/7, 2012 at 20:33 Comment(0)
B
18

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.

Bunion answered 24/10, 2012 at 17:38 Comment(2)
You can also directly switch to DDMS view from within Eclipse.Envoi
@IgorGanapolsky that means to open a executable in linux independent from the current shell. you can omit that in windowsCachepot
P
3

I also ran into this issue. It appears that systrace.py attempts to use select.select() with file descriptors which, as documented here, is not supported on Windows.

I ended up running the tool from a Linux VM.

Prestidigitation answered 8/7, 2012 at 5:25 Comment(1)
Can you post detailed instructions on what Linux Vm tool you used? :) I'm sure if you did you will get the answer for this.Zygosis
P
0

If you are using eclipse for your development then you can use the built in Systrace utility as well as outlined @ http://developer.android.com/tools/help/systrace.html . Its the easiest way I found for collecting traces.

Postbellum answered 11/10, 2014 at 21:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.