# Help setting up PVRTrace on Android

**URL:** <https://forums.imgtec.com/t/help-setting-up-pvrtrace-on-android/1316>\
**Category:** PowerVR Insider\
**Tags:** pvrtrace\
**Created:** [February 24, 2012, 2:24am UTC](https://forums.imgtec.com/t/help-setting-up-pvrtrace-on-android/1316 "2012-02-24T02:24:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulscode](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/paulscode/32/142_2.png) [@paulscode](https://forums.imgtec.com/u/paulscode)\
**Post date:** [February 24, 2012, 2:24am UTC](https://forums.imgtec.com/t/help-setting-up-pvrtrace-on-android/1316/1 "2012-02-24T02:24:40Z")

</div>

I appologize for asking a question that has been asked before, but tips from other threads did not solve my problems.&nbsp; I am having a problem setting up PVRTrace on my Droid X, using the documentation here:

&nbsp;
  

[https://www.imgtec.com/powervr/insider/docs/PVRTrace.User%20Manual.1.23.2.3f.External.pdf](https://www.imgtec.com/powervr/insider/docs/PVRTrace.User%20Manual.1.23.2.3f.External.pdf)
  

&nbsp;
  

The only issue I had with the above instructions, was&nbsp;with step 3:
  

_3. If 'pvrtrace.cfg' does not exist, generate one by running the application to be traced._
  

Running the application does not generate this file.&nbsp; Instead, I created it manually, as follows:
  

&nbsp;
  

**[host]  
EglLibraryPath = /system/lib/egl/libEGL\_POWERVR\_SGX530\_125.so  
Es1LibraryPath = /system/lib/egl/libGLESv1\_CM\_POWERVR\_SGX530\_125.so  
Es2LibraryPath = /system/lib/egl/libGLESv2\_POWERVR\_SGX530\_125.so**
  

&nbsp;
  

**[record]  
TraceFile = /mnt/sdcard/trace-%pid.pvrt  
RecordData = 0  
StartFrame = 0  
EndFrame = 1**  

  

&nbsp;
  

I've placed&nbsp;this&nbsp;pvrtrace.cfg file&nbsp;in both the root directory / and in the SD Card root /mnt/sdcard, and given it permission 666.&nbsp; Additionally, my app has permission to write to the sdcard (which I've verified by generating test files from the code).
  

&nbsp;
  

Everything else went as expected, following the guide I mentioned above.&nbsp; I copied libPVRTrace.so to /system/lib as instructed in step 1, and libGLESv2\_PVRTRACE.so to /system/lib/egl as instructed in step 2, and gave them permission 644.&nbsp; I created a PVRTRACE version of egl.cfg in /system/lib/egl, as instructed in step 7, and gave it permission 644.&nbsp; The only other issue I had was needing to remount /system and / in order to be able to write to them, since they are read-only by default&nbsp;(I&nbsp;suggest adding that to the documentation to save folks the trouble of having to look up how to do this).
  

&nbsp;
  

However, replacing&nbsp;egl.cfg with the PVRTRACE version and running the app I want to trace&nbsp;has two critical problems:
  

&nbsp;
  

1) The graphics for the app do not display.&nbsp; Instead there is a thin white rectangle at the top of the screen.
  

2) The trace file is not generated.
  

&nbsp;
  

Please let me know if you have any suggestions, or if you require additional information.
paulscode2012-02-24 03:25:27

---

<div class="post-metadata">

**Author:** ![dgonzalez](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@dgonzalez](https://forums.imgtec.com/u/dgonzalez)\
**Post date:** [February 24, 2012, 10:03am UTC](https://forums.imgtec.com/t/help-setting-up-pvrtrace-on-android/1316/2 "2012-02-24T10:03:29Z")

</div>

Hi paulscode,

Reading what the documentation tells us:

2. Copy: **"libEGL\_PVRTRACE.so**", "libGLESv2\_PVRTRACE.so" (OpenGL ES 2.0) or "libGLESv1\_CM\_PVRTRACE.so" (OpenGL ES 1.1).

Has you copied the  
  
**libEGL\_PVRTRACE.so** to /system/lib/egl?Â

I think that could be your problem.

One Tip: The record library for android use the logcat system to save all the message.

You can query the logcat for possible error using adb shell

- adb logcat -c // Clean the log cat
- Run the app
- adb logcat -d

- OR -

- adb shell
- logcat -c
- logcat -f output 
- Run the app
- Ctrl+C
- adb pull /path/output

Regards,

DGonzalez

  
  
  
  
[Edit: fixed quotes, Gordon]Gordon2012-02-24 11:19:40

---

<div class="post-metadata">

**Author:** ![paulscode](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/paulscode/32/142_2.png) [@paulscode](https://forums.imgtec.com/u/paulscode)\
**Post date:** [February 24, 2012, 7:26pm UTC](https://forums.imgtec.com/t/help-setting-up-pvrtrace-on-android/1316/3 "2012-02-24T19:26:41Z")

</div>

I'll try copying libEGL\_PVRTRACE.so to /system/lib/egl, but the way I understand that sentence (assuming it is normal English grammar,&nbsp;and not pseudo computer logic),&nbsp;is "A&nbsp;XOR B&nbsp;XOR C",&nbsp;rather than&nbsp;"A&nbsp;AND (B&nbsp;XOR C)".&nbsp; If this is the problem, then that guide needs to be updated, because I doubt I'm the only one who interpreted it that way.&nbsp; I'll post an update shortly after I try it out.

  

  

--EDIT--  

That worked brilliantly.&nbsp; Thanks a million!!
paulscode2012-02-24 22:37:39
