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

Implied READ_PHONE_STATE permission #1234

Closed
chris6647 opened this issue Oct 4, 2019 · 7 comments
Closed

Implied READ_PHONE_STATE permission #1234

chris6647 opened this issue Oct 4, 2019 · 7 comments
Assignees
Labels
bug Something isn't working iot Issues with the AWS Android SDK for Internet of Things (IoT)

Comments

@chris6647
Copy link

I am experiencing the same issue as #380
Having upgraded from com.amazonaws:aws-android-sdk-iot:2.6.18 to com.amazonaws:aws-android-sdk-iot:2.16.1@aar
I now find the permission READ_PHONE_STATE having been added, as the merge report states:

uses-permission#android.permission.READ_PHONE_STATE
IMPLIED from <project>/src/debug/AndroidManifest.xml:2:1-20:12 reason: com.amazonaws.iot has a targetSdkVersion < 4

When I tried to include the source code from release_v2.16.1 and its dependant modules, as new modules in my app, the merge report didn't mention this implied permission.

After this update, I also find that the native platforms of my final apk has been restricted to:
arm64-v8a, armeabi-v8a, x86, x86_64
from none, though I'm not 100% sure this is related yet.

I hope you're able to advise!
Thanks in advance.

@TrekSoft TrekSoft added iot Issues with the AWS Android SDK for Internet of Things (IoT) question General question labels Oct 7, 2019
@raphkim raphkim self-assigned this Oct 8, 2019
@raphkim raphkim added bug Something isn't working and removed question General question labels Oct 8, 2019
@raphkim
Copy link
Contributor

raphkim commented Oct 8, 2019

Hi @chris6647

Thank you for reporting this bug. Would you be able to try building from the new PR #1239 to see if your issue is resolved?

@raphkim raphkim added the pending-community-response Issue is pending response from the issue requestor label Oct 11, 2019
@chris6647
Copy link
Author

Hello @raphkim
Thanks for helping out :) This doesn't seem to actually fix the issue, because, as I tried to explain before, I only get the the inferred permission when getting the artifact via maven, and not when either copying in the source in a module manually, or building the aar locally and including that. I tested with 2.16.1.
The only way I see that I can test your code properly, is if you can either make a snapshot available, or share an aar file built exactly like you'd do normally.

@raphkim
Copy link
Contributor

raphkim commented Oct 11, 2019

You would have needed to clone the repo and build the aar file yourself to be able to use it. However, this will be available in 2.16.2 release in the near future to be taken directly from maven if you would prefer to test it then.

@chris6647
Copy link
Author

That's exactly what I did - fetched the repo, and built the aar myself. But as I said, that didn't change anything as the previous release also worked like that. It only doesn't work when fetched from maven for some reason. I'll hold out for the 2.16.2 release and test it properly then.

@palpatim palpatim removed the pending-community-response Issue is pending response from the issue requestor label Oct 18, 2019
@FilippoVigani
Copy link

Any updates on this?

@FilippoVigani
Copy link

FilippoVigani commented Jan 27, 2020

Due to this issue: eclipse-paho/paho.mqtt.java#633 I had to rollback the aws iot version to 2.16.0, since from 2.16.1 the paho version was upgraded to 1.2.2. However now I'd like to fix this issue here. Any suggestions to work around it in the meantime?

EDIT: I managed to remove the permission with:

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

On my Manifest.xml file

@jpignata
Copy link
Contributor

Thanks for posting a workaround! This is fixed in new versions and we will have that Paho issue addressed shortly. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iot Issues with the AWS Android SDK for Internet of Things (IoT)
Projects
None yet
Development

No branches or pull requests

6 participants