Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android kill the Qt app because of permission issue

Android kill the Qt app because of permission issue

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 295 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • thamT Offline
    thamT Offline
    tham
    wrote on last edited by tham
    #1

    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 : libcamera2ndk.so and libmediandk.so, 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) {
        ANDROID_EXTRA_LIBS = \
            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/libcamera2ndk.so \
            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/libmediandk.so \
            C:/Users/yyyy/programs/Qt/android_camera/../../../3rdLibs/opencv/opencv_4.1.2-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_java4.so
    }
    

    Maybe I missed some so files?

    1 Reply Last reply
    0
    • thamT Offline
      thamT Offline
      tham
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved