- April 19, 2011 at 9:44 pm #30506
Is there any guide for using PVRTrace with android apps ? I searched forums and doc’s with no luck. I tried to put PVRTrace libs into application folder, then I run application but pvrtrace.cfg never appeard.
Thanks in advance,
MarcinMay 8, 2011 at 7:55 pm #34865
at this point I doubt PVRTrace works with android so my new question is did anyone of you managed to run PVRTrace for android app ?May 9, 2011 at 9:55 am #34866
Sorry for not getting back to you sooner, we had hoped to get it out last release but because of the Java layer in Android, this has proved trickier than we expected. It is something we are working on, but at the moment there is no PVRTrace for Android unfortunately. When we’ve got working Android libraries we will post on the forums to let everyone know that they’re available.
TobiasNovember 21, 2011 at 6:06 pm #34867
It’s been a while since I tried to work with PVRTrace and Android. Now it seems like this is supported functionality so I tried to use it and here is what happend.
I follow insctuctions from PVRTrace docs. First I copied libraries (not so easy, it is necessary to change read-only file system), then I created pvrtrace.cfg (content below) and copy that to device root directory. Finally I fixed egl.cfg. From this moment none of my GL2 applications works because of exception. Please take a look at logcat output, it would be great if you could tell me what am I doing wrong, thanks in advance.
EglLibraryPath = /system/lib/egl/libEGL_POWERVR_SGX540_120.so
Es1LibraryPath = /system/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
Es2LibraryPath = /system/lib/egl/libGLESv2_POWERVR_SGX540_120.so
TraceFile = /mnt/sdcard/trace.pvrt
RecordData = 0
StartFrame = 0
EndFrame = 1
I/PVRTrace( 3375): Opening trace file: /mnt/sdcard/trace.pvrt
W/PVRTrace( 3375): Failed to open trace file, continuing without recording.
D/libEGL ( 3375): loaded /system/lib/egl/libEGL_PVRTRACE.so
D/libEGL ( 3375): loaded /system/lib/egl/libGLESv1_CM_PVRTRACE.so
D/libEGL ( 3375): loaded /system/lib/egl/libGLESv2_PVRTRACE.so
W/com.android.name( 3375): creating OpenGL ES 2.0 context
E/com.android.name( 3375): After eglCreateContext: EGL error: 0x3001
W/dalvikvm( 3375): threadid=10: thread exiting with uncaught exception (group=0x40015578)
E/AndroidRuntime( 3375): FATAL EXCEPTION: GLThread 11
E/AndroidRuntime( 3375): java.lang.RuntimeException: createContext failed: EGL_SUCCESS
E/AndroidRuntime( 3375): at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1099)
E/AndroidRuntime( 3375): at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1091)
E/AndroidRuntime( 3375): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:933)
E/AndroidRuntime( 3375): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1284)
E/AndroidRuntime( 3375): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1138)
W/ActivityManager( 227): Force finishing activity
MarcinNovember 22, 2011 at 12:14 pm #34868
The likely culprit is that trace doesn’t seem to be able to write to /mnt/sdcard/ – this will be because your app doesn’t have permission to write here. If you’ve had to change the filesystem anyway, it might be an idea to create a folder with full write access and write to there instead. Alternatively write to /data/data/<processname>/, replacing <processname> with the name of the process that your app uses (you can find this out using top, or just looking through the directories in /data/data/) . Either of these should get your tracing again. Trace crashing for this reason is actually a bug that we’ve fixed and will be releasing an update for shortly.