0

In my application, out of nowhere, there's a READ_PHONE_STATE permission added. It is not included in my AndroidManifest.xml

I've tried to trace where it comes from, and I have found it in manifest-merger-release-report.txt file, however, it says:

MERGED from [com.android.support:support-compat:25.0.0] /Users/krystian/.android/build-cache/248c8a24bb4ec3d2084b5e847d6f99c8b64177ac/output/AndroidManifest.xml:21:5-23:58
tools:overrideLibrary
    ADDED from [com.android.support:appcompat-v7:25.0.0] /Users/krystian/.android/build-cache/2553918b2c7adcd76a12bd248ad63a4e9f15d38c/output/AndroidManifest.xml:23:9-75
android:targetSdkVersion
    INJECTED from /Users/krystian/projects/mfj/App/android/app/src/main/AndroidManifest.xml
    INJECTED from /Users/krystian/projects/mfj/App/android/app/src/main/AndroidManifest.xml
android:minSdkVersion
    INJECTED from /Users/krystian/projects/mfj/App/android/app/src/main/AndroidManifest.xml
    INJECTED from 

/Users/krystian/projects/mfj/App/android/app/src/main/AndroidManifest.xml
uses-permission#android.permission.READ_PHONE_STATE
IMPLIED from /Users/krystian/projects/mfj/App/android/app/src/main/AndroidManifest.xml:2:1-145:12 reason: com.google.android.gms.location has a targetSdkVersion < 4
uses-permission#android.permission.READ_EXTERNAL_STORAGE

I've checked all of those AndroidPermission.xml files and none of them contain this permission. I went further and ran grep on all of the AndroidManifest.xml file in my build-cache and none of them contain this permission.

How can I identify the library which adds the damn permission?

TL;DR

Something adds an unwanted permission to my AndroidManifest. How can I find a library which does it?

The question which mines supposedly duplicates is a different one, related only to Google Play Services.

Krystian
  • 3,193
  • 2
  • 33
  • 71

1 Answers1

4

Maybe it is added by some lib you are using try adding this line. <uses-permission tools:node="remove" android:name="android.permission. READ_PHONE_STATE" />

philipheinser
  • 311
  • 1
  • 6
  • I know it's because of a lib, I just need to know which one. Also I know about the node remove option, but still, that's just covering a problem with a dirt. I need to get to the root cause. – Krystian Jun 03 '17 at 19:18