Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.15.0 Release adds unwanted permissions #665

Closed
toxikman opened this issue Jan 25, 2020 · 7 comments
Closed

5.15.0 Release adds unwanted permissions #665

toxikman opened this issue Jan 25, 2020 · 7 comments
Labels

Comments

@toxikman
Copy link

toxikman commented Jan 25, 2020

Because the Facebook core library now includes a dependency on com.android.installreferrer:1.1, which (perhaps because of a bug) fails to include a targetSdkVersion in the library manifest. Therefore, gradle will assume the installreferrer library targets Android API < 4, in which case, the build tools will implicitly add these permissions to the AndroidManifest.xml:

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

Expected Results:
Having a dependencies on the Facebook Sdk should not add unwanted Android permissions.

Build Tools Configuration
Using gradle 4.6 and gradle library 3.2.1 (required by Unity 2017.4.x)
Android Build Tools 29.0.2
Android SDK Platform 29

@carlos-mg89
Copy link

I realized about this as well.

Although not ideal, the temporary way to prevent these permissions from being requested is to add in the AndroidManifest.xml the following line:

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

This is kind of a regression, since it happened on previous versions of this library, as I saw while looking for issues. Probably because of a different matter though.

@Feenposhleen
Copy link

Feenposhleen commented Jan 30, 2020

This issue is really annoying for us Flutter (and maybe other cross-platform) users, since FB plugins mostly uses major-only dependency versions[0] for the FB core sdk. Manually mending manifests (in our case, generated) as suggested may not be possible for us.

installreferrer:1.1 should probably be considered broken, and downgraded until fix is published. Read/write external storage are no-joke permissions that end users should be/are wary of.

[0] https://github.com/rafalbednarczuk/facebook_analytics/blob/3ce264e030c5014007074a40261ee7d00e2d99b5/android/build.gradle#L42
https://github.com/oddbit/flutter_facebook_app_events/blob/5416cfa185028d41e6beacdbcc9485a1ab939196/android/build.gradle#L44

@Mxiim
Copy link
Contributor

Mxiim commented Jan 30, 2020

Hi,
I agree that this is a big issue. I will take a look at it today.

Mxiim pushed a commit to Mxiim/facebook-android-sdk that referenced this issue Jan 30, 2020
Summary:
See facebook#665
and https://stackoverflow.com/questions/59263642/install-referrer-library-v1-1-adds-permissions

Differential Revision: D19643851

fbshipit-source-id: 575573121dd73120580f775529a2b2c25346c497
facebook-github-bot pushed a commit that referenced this issue Feb 3, 2020
Summary:
Pull Request resolved: #671

See #665
and https://stackoverflow.com/questions/59263642/install-referrer-library-v1-1-adds-permissions

Reviewed By: jingping2015

Differential Revision: D19643851

fbshipit-source-id: 7d285fd22b117338de9b256877f11a9f1fe94034
facebook-github-bot pushed a commit that referenced this issue Feb 3, 2020
Summary: Attempts to solve #665

Reviewed By: jingping2015

Differential Revision: D19699219

fbshipit-source-id: 84baaa1533cde237f5d31a62f67677ee09cd3b75
@stale
Copy link

stale bot commented Jun 23, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Jun 23, 2020
@stale
Copy link

stale bot commented Jul 3, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Jul 3, 2020
@toxikman
Copy link
Author

toxikman commented Jul 3, 2020

It looks like Google has fixed this manifest problem in install-referrer version 2.0. Perhaps the Facebook team should consider updating to this if the latest version is important to have.

@sistr22
Copy link

sistr22 commented Oct 12, 2020

I have to say it's a big issue for us too. We currently are manually removing the permission but it's far from ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants
@toxikman @sistr22 @Feenposhleen @Mxiim @carlos-mg89 and others