PVRHub install failed on rooted Android device.

This topic contains 20 replies, has 4 voices, and was last updated by  pauls 2 years, 9 months ago.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #31812

    yllfever
    Member

    Hi, Guys, I’ve tried very hard on installing the PVRHub tools on my Xiaomi HM1w, which has been rooted. By saying rooted, I mean that I can using “adb root” to access any file on the phone.

    But PVRHub keep telling me that it is unable to get root access!

    And I tried to run PVRHubDaemon before runing PVRHub, it doesn’t change anything.

    Any suggestion?

    #38980

    Joe Davis
    Member

    Hi,

    For PVRHub to work on a rooted device, the PVRHub application must be able to obtain root permissions. This usually requires the presence of an application like SuperSU.

    If you can’t install SuperSU on your device, you can manually run the PVRHubDaemon from the command-line. The daemon must be left running in the background while PVRHub has focus:

    # /data/data/com.powervr.PVRHub/bin/PVRHubDaemon &

    To simplify this, you can script the process (here’s a Windows batch script I use)

    @echo off
    echo Executing PVRHubDaemon in the background...
    start /b cmd /c "adb shell su -c '/data/data/com.powervr.PVRHub/bin/PVRHubDaemon'&"

    set PACKAGE_NAME="com.powervr.PVRHub"
    set ACTIVITY_NAME=".MainActivity"
    echo Restarting PVRHub...
    adb shell am force-stop %PACKAGE_NAME%
    adb shell am start -n %PACKAGE_NAME%/%ACTIVITY_NAME%

    Hope this helps 🙂

    Joe

    #38981

    yllfever
    Member

    Hi, Joe, thanks for your reply.

    I do have a superuser.apk installed in my phone. The problem is that no window shows up asking for root access when I open the PVRHub application.

    I tried your script. It still does not work, only shows a dialog saying “Unable to get root access! Is Superuser.apk installed? See logcat for details. PVRHub out.”

    #38982

    Joe Davis
    Member

    Hi,

    PVRHubDaemon has a feature to generate system report to help us debug situations like this. Here’s a snippet from the PVRHub User Manual (Appendix A) that explains how this feature works;

    System report generator: every time the PVRHubDaemon runs, it writes a report in ‘/data/local/tmp/PVRHubDaemon_report.txt’ which contains all the relevant information of the Android system. By executing the daemon with ‘(-g)’ it will generate a report and terminate (i.e., ‘/data/data/com.powervr/PVRHub/bin/PVRHubDaemon –g’)

    If you send us the log generated by your device, we can try to isolate the cause. You can confidentially share the system report with us by attaching it to a support ticket: https://pvrsupport.imgtec.com/new-ticket

    Thanks,
    Joe

    #38983

    yllfever
    Member

    Hi, Joe, thanks again

    Here is the report:
    E: The system does not appear to be correct.


    ANDROID API VERSION


    I: Android SDK API version = 17


    BUILD PROPERTIES


    ro.build.version.sdk=17
    ro.product.brand=XIAOMI
    ro.product.cpu.abi=armeabi-v7a
    ro.product.cpu.abi2=armeabi
    ro.product.manufacturer=XIAOMI
    ro.opengles.version=131072
    ro.product.model=2013023
    ro.product.name=2013023
    ro.product.board=2013023
    ro.product.device=2013023


    POWERVR DRIVERS


    I: PowerVR DDK suffix =
    E: PVRHubDaemon could not find the driver.
    I: The DDK Version is:


    Version SGX_DDK_Android sgxddk 19 1.9@2564405 (release) mt6589
    System Version String: SGX revision = 1.1.5



    EGL CFG


    I: /system/lib/egl/egl.cfg found
    I: The contents are:


    0 0 android
    0 1 mtk



    PVRTRACE RECORDING LIBRARIES


    I: libPVRTrace appears to be installed in /system/vendor/lib/
    I: The permissions are: 666
    E: The permissions should be 0644

    #38984

    Joe Davis
    Member

    Ah – I think I see what’s going wrong. PVRTrace expects the graphics driver suffix to be “POWERVR”, as is the case on most devices with PowerVR GPUs. According to your ‘egl.cfg’, the graphics driver suffix is “mtk” (it seems MediaTek have renamed the driver).

    The version of PVRHub in our upcoming 3.4 SDK removes the “POWERVR” suffix restriction. In the meantime, you can use the 3.3 SDK PVRHub’s suffix override feature to workaround the issue. Appendix A of the PVRHub User Manual discusses this:

    Driver name override: by default, PVRHubDaemon will only look for driver binaries with ‘_POWERVR’ in their file name. The optional file ‘/data/local/tmp/ddk_suffix.txt’ allows users to override the identifier PVRHubDaemon will use to select a graphics driver. This feature is designed for developers targeting development platforms, where there may be a number of graphics driver builds on the target with different names.

    If you hit any issues, let us know. We may be able to provide you with an early access build of our 3.4 tools.

    Thanks,
    Joe

    #38985

    yllfever
    Member

    Hi, Joe,
    I can not figure out what exactly should I put in the configure file ‘/data/local/tmp/ddk_suffix.txt’, as it seems that PVRHubDaemon didn’t generate this file on my phone.

    Can you give me a example?

    Many thanks.

    #38986

    Joe Davis
    Member

    Hi,

    I don’t have a MediaTek platform to test. I believe you just need to write the replacement suffix to your ddk_suffix.txt. In your case, this would be “mtk”. If this doesn’t work, you could try “_mtk”. I’ll confirm the correct suffix string with the PVRTrace lead engineer tomorrow.

    If you create the TXT file on your development machine, you can adb push it to /data/local/tmp/ (all users have permission to write to this directory).

    Thanks,
    Joe

    #38987

    yllfever
    Member

    Hi, Joe,

    I tried both to put “mtk” and “_mtk” in ddk_suffix.txt, but none of them worked.

    And I also tried to rename my egl related libararies from “libEGL_mtk.so”, “libGLESv1_CM_mtk.so” and “libGLESv2_mtk.so”
    to “libEGL_POWERVR.so”, “libGLESv1_POWERVR.so” and “libGLESv2_POWERVR.so”,
    and modify the egl.cfg to

    0 0 android
    0 1 POWERVR

    The later change doesn’t help either.

    Thanks

    #38988

    Joe Davis
    Member

    Hi,

    Sorry about this. We’ve checked the code. It looks like the feature was documented but never implemented…

    I’ve uploaded 3.4 SDK beta PVRHub and PVRTraceGUI packages to our support portal. You will need to use the new version of PVRTraceGUI to inspect any files recorded with the new PVRHub. The new version of PVRHub removes the suffix restriction, so it should work on your target.

    Here are links to the betas (you’ll need to login/register for the support portal to access them):

    Thanks,
    Joe

    #38989

    Joe Davis
    Member

    Is the beta working on your MediaTek device? We haven’t had a chance to test it on a MediaTek platform yet, so would appreciate any feedback you can give 🙂

    Joe

    #38990

    yllfever
    Member

    Hi, Jeo, thanks again

    The 3.4 beta version works on my phone. Although PVRHub still cannot gain root access, I installed the trace libs successfully after start PVRHubDaemon.

    But there are still some little problems.
    One problem is that closing the PVRHub when it is tracing a application will leave my /system folder unwritable and the file ‘/system/lib/egl/egl.cfg’ uncompleted. So I had to remount /system part and recover egl.cfg by hand.

    Another problem is that when I open the generated .pvrt file using PVRTraceGUI, it complains that “Unable to playback file, binary objects detected. Files that contain binary objects(e.g. shader or program binaries) can only be played back on the platforms on which they were recorded.” While I can see visual images of the frame buffer after every drawcall in the 3.3 version of PVRTraceGUI (with the .pvrt file generated by 3.3 version of PVRTrace).

    #38991

    Joe Davis
    Member

    One problem is that closing the PVRHub when it is tracing a application will leave my /system folder unwritable and the file ‘/system/lib/egl/egl.cfg’ uncompleted. So I had to remount /system part and recover egl.cfg by hand.

    Was PVRHubDaemon still running when you closed PVRHub? Can you share the logcat output with us?PVRHubDaemon is responsible for all system operations that require root permissions, such as remounting /system. If PVRHubDaemon isn’t running, PVRHub will not be able to perform these operations.

    Another problem is that when I open the generated .pvrt file using PVRTraceGUI, it complains that “Unable to playback file, binary objects detected. Files that contain binary objects(e.g. shader or program binaries) can only be played back on the platforms on which they were recorded.”

    This warning is given when the PVRT recording contains binary shaders. As PVRTrace’s Image Analysis (a.k.a. playback) requires all shaders to be given as GLSL ES source, it has to be disabled when shader binaries are detected. If you haven’t submitted shader binaries to OpenGL ES yourself, the binaries may have come from Android’s OpenGL ES shim shader binary cache. I believe you can clear your application’s shader binary cache using the “Clear cache” option in your application’s settings page.

    Hope this helps,
    Joe

    #38992

    yllfever
    Member

    Hi, Joe, Thanks for your detailed replies.
    I have yet another problem associated with the 3.4 beta version of PVRHub.
    I cannot start my GLES application after click the ‘Start PVRTune Profile’ button. And I found that PVRHub changed the file ‘/system/lib/egl/egl.cfg’ to something containing only the following line.
    0 0 PVRTRACE

    #38993

    yllfever
    Member

    OK. I have successfully run another little program while PVRPerfServer is running, though the application I aimed to profile cannot run.
    The problem is that I’m unable to connect to the PVRPerfServer from PVRTuneGUI. I have a wireless network adapter installed on my windows PC, and the PC is connected to the same subnet as the mobile phone.

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