Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the font size of method trace view in Android Studio?

In Android Studio, I captured a Method Trace use CPU Monitor, but on my computer (screen size is 1920*1080), the font of the method name in Trace View is so small that I can't see it clearly.

So I want to know any one has the solution to change the size of trace view.

The method trace looks like the following figure: enter image description here Thanks

like image 519
Androina Yang Avatar asked May 16 '17 10:05

Androina Yang


1 Answers

I figure out they just hardcoded font size to 8. So there is only a very weird solution with patching Android Studio jar files.

Steps:

  1. Find /Applications/Android Studio.app/Contents/plugins/android/lib/sdk-tools.jar
  2. Copy it somewhere else(do not forget to make a backup in case something goes wrong).
  3. Unzip it and pick com/android/tools/perflib/vmtrace/viz/CallHierarchyRenderer.class
  4. Take any hex editor and replace byte sequence 0504 4100 with 0504 4180 (actually, you replace 8 in class constant pool with 24)
  5. Pack modified class back jar uf sdk-tools.jar com/android/tools/perflib/vmtrace/viz/CallHierarchyRenderer.class
  6. Copy patched sdk-tools.jar back to its original location

Before Before

After After

like image 179
Kirill Popov Avatar answered Nov 07 '22 22:11

Kirill Popov