Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Systrace No such file or directory

Here's the error message

D:\Programming\Tools\ADT_bundle\sdk\platform-tools\systrace>python systrace.py
Traceback (most recent call last):
  File "systrace.py", line 315, in <module> 
    main()
  File "systrace.py", line 64, in main
    os.execv(legacy_script, sys.argv)
OSError: [Errno 2] No such file or directory

I look into systrace.py, it seems that the legacy_script "systrace-legacy.py" is missing on the file system. I have read several related posts on stackoverflow, and I've already put directory containing adb in the %PATH%. The problem still exists. I'm writting to ask if any way to solve this problem.

like image 554
Wei Yang Avatar asked Jul 25 '13 07:07

Wei Yang


People also ask

What is Systrace in os?

Systrace is a legacy platform-provided command-line tool that records device activity over a short period of time in a compressed text file. The tool produces a report that combines data from the Android kernel, such as the CPU scheduler, disk activity, and app threads.

Why is my BusyBox saying no such file or directory?

Any idea why is says "No such file or directory"? You likely need to include the util-linux-fsck package into your busybox image. The warning is saying that there is a file missing which the util-linux-fsck package provides.

What is Systrace in Android?

Systrace The Systrace tool helps analyze the performance of your application by capturing and displaying execution times of your applications processes and other Android system processes.

How do I run a device trace in Android Studio?

In Android Studio, open an Android application project. Open the Device Monitor by selecting Tools > Android > Android Device Monitor. In the Devices tab, select the device on which to run a trace. If no devices are listed, make sure your device is connected via USB cable and that debugging is enabled on the device.

Is Systrace owned by Google?

systrace is owned by the Google Android and Google Chrome teams and is open source as part of the Catapult project. In addition to systrace, Catapult includes other useful utilities.


2 Answers

This was fixed in SDK tools release 22.0.5... sort of.

The systrace-legacy.py script was added to the platform-tools directory rather than the tools directory, because the script is (gradually) being moved there. So if you continue to follow the old instructions, you will still have the same problem. If you run the script from the platform-tools/systrace directory instead, it should now work.

You can also run it from the Eclipse ADT plugin.

like image 119
fadden Avatar answered Oct 19 '22 09:10

fadden


I think is some issue in AOSP You can check this file there: https://android.googlesource.com/platform/external/chromium-trace/+/664f21bcaf14044e5e9b09cb7beb8724d18fb851

you can download from AOSP repository:

git clone https://android.googlesource.com/platform/external/chromium-trace
cd chromium-trace
git checkout 2384642
ls systrace-legacy.py

copy this file to sdk and everything should work

like image 36
Jacek Marchwicki Avatar answered Oct 19 '22 08:10

Jacek Marchwicki