Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
563 views
in Technique[技术] by (71.8m points)

android - Error running systrace tool in ADB using a Jelly Bean 4.1 emulator on Windows 7

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-sdkplatform-toolssystrace>python systrace.py (with older SDKs: C:android-sdkoolssystrace>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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...