javaandroiddevelopment-environmentandroid-permissionsandroid-usb

Android app needs permission to read media on usb device



I've creating an android app and I recently updated it. However now the app needs permission to read data from a USB device even though I'm not using it anywhere and it doesn't exist anywhere in my AndroidManifest.xml. The only external libraries I'm using is the Giftiz API, ADMob API and AdBuddiz API before the update it only contained the ADMob API and AdBuddiz API, so the new thing is the Giftiz API, buuut other apps using the Giftiz API doesn't need that permission.

Is there any way to find where I'm requesting for that permission in the code? Some kind of find function in Android Studio?
(Here's a link to the app Touchty Cube)

Regards


Solution

  • Is there any way to find where I'm requesting for that permission in the code?

    You can examine the manifest merger report. Assuming that your app is in a module named app/, you can find the report for your debug build in app/build/outputs/logs/manifest-merger-debug-report.txt. It is a bit hard to read, but you will see all of your permissions and where they are coming from:

    uses-permission#android.permission.INTERNET
    ADDED from com.google.android.gms:play-services-ads:7.5.0:20:5
    MERGED from com.google.android.gms:play-services-analytics:7.5.0:21:5
    MERGED from com.google.android.gms:play-services-analytics:7.5.0:21:5
    MERGED from com.google.android.gms:play-services-appinvite:7.5.0:19:5
    MERGED from com.google.android.gms:play-services-maps:7.5.0:21:5
    MERGED from com.google.android.gms:play-services-maps:7.5.0:21:5
    MERGED from com.google.android.gms:play-services-maps:7.5.0:21:5
    MERGED from com.google.android.gms:play-services-wallet:7.5.0:20:5
    MERGED from com.google.android.gms:play-services-maps:7.5.0:21:5
      android:name
        ADDED from com.google.android.gms:play-services-ads:7.5.0:20:22
    uses-permission#android.permission.ACCESS_NETWORK_STATE
    ADDED from com.google.android.gms:play-services-ads:7.5.0:21:5
    MERGED from com.google.android.gms:play-services-analytics:7.5.0:22:5
    MERGED from com.google.android.gms:play-services-analytics:7.5.0:22:5
    MERGED from com.google.android.gms:play-services-maps:7.5.0:20:5
    MERGED from com.google.android.gms:play-services-maps:7.5.0:20:5
    MERGED from com.google.android.gms:play-services-maps:7.5.0:20:5
    MERGED from com.google.android.gms:play-services-nearby:7.5.0:19:5
    MERGED from com.google.android.gms:play-services-maps:7.5.0:20:5
      android:name
        ADDED from com.google.android.gms:play-services-ads:7.5.0:21:22
    

    (from this blog post of mine)