question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[5.5.0] getInstallReferrer reqiure READ_PHONE_STATE and WRITE_EXTERNAL_STORAGE

See original GitHub issue

Question

Hello my app was to require READ_PHONE_STATE and WRITE_EXTERNAL_STORAGE permissions on Android after update to 5.5.0.

I checked in this commit extra permissions not required. Then can’t build this commit and after build next commit in my android/app/build/intermediates/bundle_manifest/debug/processDebugManifest/bundle-manifest/AndroidManifest.xml added:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

I don’t use getInstallReferrer and don’t want request extra permissions form user. Can it be excluded?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
mikehardycommented, Feb 11, 2020

So you want something like this in your AndroidManifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
  xmlns:tools="http://schemas.android.com/tools" package="com.kullki.kscore">

  <uses-permission tools:node="remove" android:name="android.permission.READ_EXTERNAL_STORAGE" />
  <uses-permission tools:node="remove" android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

3reactions
Bardiamistcommented, Feb 11, 2020

@mikehardy

Note, that commit (I checked) also added:

<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

I have crash on device if try add:

<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" tools:node="remove" />

So, my full removing permissions code:

<!-- https://github.com/react-native-community/react-native-device-info/issues/955 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove" />

READ_EXTERNAL_STORAGE looks very dangerous:) Would good to make these permissions optional.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[5.5.0] getInstallReferrer reqiure READ_PHONE_STATE and ...
Question Hello my app was to require READ_PHONE_STATE and WRITE_EXTERNAL_STORAGE permissions on Android after update to 5.5.0.
Read more >
android - READ or WRITE EXTERNAL STORAGE permission
Yes, I am not getting error. I had defined permissions in AndroidManifest.xml <uses-permission android:name="android.permission.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found