• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
5
Question by Xyxn · Jun 16, 2015 at 05:37 AM · androidand

READ_PHONE_STATE permission since 5.1

since 5.1 i my apps asking for READ_PHONE_STATE permission, which gives bad reputation and is unacceptable. no, i didnt change my manifest at all someone with the same issue/concerns?

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image mark71 · Jun 18, 2015 at 11:43 AM 0
Share

Yes, I am waiting for answer. I posted a question some days ago and created a thread in the android forum. Someone else has created a bug report. I make games for kids and this permission leads to bad ratings and many questions. I hope that it is a bug as it is not mentioned in the 5.1 release notes. Only Unity can explain why this permission has been added but so far, there has been no word from them. I don't understand why it takes so long, it is not a difficult question for Unity.

avatar image Dave-Carlile · Jun 18, 2015 at 12:48 PM 0
Share

I'm sure you can appreciate that they're likely getting thousands of questions daily, for probably much more serious things.

Are you able to change the manifest and remove the permission? That would at least give you a workaround.

avatar image Xyxn · Jun 18, 2015 at 01:04 PM 0
Share

yes there are ways to modify a apk, google was my friend and helped me alot. if someone has a question about modifying feel free to message me. about those 'thousands of questions' sure i guess they get many but if i am not completely wrong i read a statement somewhere that unity is the most used engine for mobileplatform. if that's the case i doubt the 'much more serious things'

6 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Kastar-Troy · Apr 11, 2018 at 01:11 AM

Posted this elsewhere but hope this helps someone:

So this is a really crappy change in the manifest merger, cause it seems to be responding to files which have nothing to do with the manifest.

I made a blank project and copied across my plugins folder to reproduce, and it did. I then went to remove anything which could cause be affected, and it turns out it wasnt any of the actual plugins, it was /plugins/Android/res/, which was simply a collection of xml files containing localised strings, and png files.

what the actual F is this manifest merger doing?

Anyway, easy way to find out what is putting Read State into your config, is trial and error with a copied version of your project, keep deleting stuff in plugins till read state disappears. Bit of Scientific method always does the trick.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by lucks17 · Sep 15, 2017 at 05:00 AM

For remove READ_PHONE_STATE permission on android in UNITY, you need to put in all manifests

  <uses-sdk android:minSdkVersion="14"/> 

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by RINNUXEI · Sep 11, 2017 at 03:55 AM

For whom are using Android SDK tools higher than 26.x.x, found my solution.

  1. Uninstall the latest Android SDK tools. (Using SDK manager or deleting the tools folder within your sdk directory)

  2. Download Android SDK tools 25.2.5 . (https://androidsdkoffline.blogspot.jp/p/android-sdk-tools.html)

  3. Copy the tools folder into HOME/Library/Android/sdk/

  4. Enjoy your day :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hema_dubal · Sep 20, 2017 at 06:39 AM 0
Share

This is it! Helped me! Thanks :)

avatar image
10

Answer by Aurore · Jul 13, 2015 at 02:59 PM

An answer from Yury on the on the forums http://forum.unity3d.com/threads/unity-5-1-adds-android-permission-read_phone_state-automatically-how-to-remove-it.333431/#post-2202146;

"The Android build enforces READ_PHONE_STATE if the code has references to SystemInfo.deviceUniqueIdentifier. INTERNET is added when any network classes are referenced. ACCESS_NETWORK_STATE is added when calling Application.internetReachability.

There is no bug in Android code, just the new services dlls are calling different API enforcing these "unnecessary" permissions. There might be an issue with the services' dlls though.

In addition, there is always a workaround - you can export the project, modify it as you wish and build in Eclipse/Android Studio.

Of course the code won't crash if the permission is missing. Just some functionality may be unavailable."

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rsodre · Sep 08, 2017 at 02:50 AM 0
Share

I'm using Unity 5.6.2 and think this is not true anymore, The problem must be related to this issue.

avatar image
0

Answer by eekgames · Jul 10, 2015 at 02:54 PM

I had the same problem with READ_PHONE_STATE being added to my Android manifest when I upgraded from Unity 4.3.4f1 to 5.1.1f1.

It turns out the permission is added due to a line of code in a library I'm using (Futile 2D):

    isOpenGL = SystemInfo.graphicsDeviceVersion.Contains("OpenGL");​

I changed the code as follows:

    #if UNITY_ANDROID
       isOpenGL = true;​
    #else
       isOpenGL = SystemInfo.graphicsDeviceVersion.Contains("OpenGL");​
    #endif​

Now my Android build no longer including READ_PHONE_STATE, which is a relief - users can find that permission a bit suspicious.

EDIT: I thought this had worked, but actually I was mistaken; the READ_PHONE_STATE permission crept back in :(

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rougeIkon · Jul 10, 2015 at 03:23 PM 0
Share

this is interesting, I am not using Futile2D library, but am wondering if there is a similar fix, somehere, but I am totally lost as to where to start with that!

avatar image eekgames · Jul 10, 2015 at 04:44 PM 0
Share

Rougelkon, my fix didn't work after all, I was mistaken; sorry to lead you astray with my foolishness :(

avatar image furic · Jul 21, 2016 at 06:35 AM 0
Share

Unity should have a document on what functions require READ_PHONE_STATE!

avatar image rsodre · Sep 08, 2017 at 02:49 AM 0
Share

I'm using Unity 5.6.2 and think this is not true anymore, The problem must be related to this issue.

  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why I install and run AVD then run unity but not display anything? 0 Answers

Character Movement Problem 0 Answers

Galaxy Note 3 No Shadows 1 Answer

mouseOrbit script for android 0 Answers

Bizarre Missing Assembly 'Common' Error 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges