PVRTrace and Android

This topic contains 4 replies, has 2 voices, and was last updated by  Tobias Hector 6 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #30506

    shajder
    Member

    Hi All,

    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,
    Marcin

    #34865

    shajder
    Member

    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 ?

    #34866

    Hi shajder,

    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.

    Thanks,

    Tobias

    #34867

    shajder
    Member

    Hi again,

    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.

    pvrtrace.cfg content:

    [host]
    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

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

    logcat :

    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

    regards
    Marcin

    #34868

    Hi Marcin,

    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.

    Thanks,

    Tobias

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.