Important: Please read the Qt Code of Conduct -

Android kill the Qt app because of permission issue

  • Trying to build an app with Qt5.12.3 and opencv4.1.2(android prebuild version from the opencv home).

    Mobile : Sony xperia XA1 Ultra
    Qt: 5.12.3
    NDK : r19c
    minimum target: 24
    maximum target: 28
    Android library link to : and, I link to the libs of api 28, not 24(android-28\arch-arm\usr\lib)
    permissions: <uses-permission android:name="android.permission.CAMERA"/>
    arch : armeabi-v7a

    Because I need to process the frames of the camera at real time, I use the NdkCameraManager to capture the screen of the camera, but this cause the permission issue

    Error messages:

    W RenderThread: type=1400 audit(0.0:353504): avc: denied { read } for name="perf_ioctl" dev="proc" ino=4026533700 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0

    This is weird, how could this cause permission issue?

    Edit : Extra so files I add into the project

    contains(ANDROID_TARGET_ARCH, armeabi-v7a) {
            C:/Users/yyyy/programs/Qt/android_camera/../../../3rdLibs/Android/android-ndk-r19c-windows-x86_64/android-ndk-r19c/platforms/android-28/arch-arm/usr/lib/ \
            C:/Users/yyyy/programs/Qt/android_camera/../../../3rdLibs/Android/android-ndk-r19c-windows-x86_64/android-ndk-r19c/platforms/android-28/arch-arm/usr/lib/ \

    Maybe I missed some so files?

  • The real issue is "ACameraManager_getCameraIdList" make the app crash, will open a new post

Log in to reply