Why does AR Foundation 6 require READ_PHONE_STATE?

Hi,
When using AR Foundation 6.0.1 and Unity 6000.b15, I found that it requires android’s READ_PHONE_STATE permission. Please tell me the reason and information for this. Due to Google Play Store data safety requirements, I would need to know this detail in order to publish it to users.

I have attached the manifest analysis by apkanalyzer. I know this permission was not needed when using Unity 2022.3 and ARFoundation 5.1.

9770943–1400187–arf6.txt (5.39 KB)

This is unfortunately due to a regression in the Unity 6 Editor. The team responsible has been notified, and they’ve identified a fix. I’ve requested a public IssueTracker link so that you can track the progress of this issue.

Hey @Masashi-Wada , the issue was caused by the updated Google build-tools we added into Unity-6. The fix should be landing soon.

Stay updated on the progress of this issue by following the link → issuetracker/UUM-69911

Thank you for your support. That’s a very welcome fix.

Thanks will keep an eye on the issue tracker! I have the same issue where I can’t build for Meta Quest using Unity 6 because of this problem with android.permission.READ_PHONE_STATE issue

I no longer see it on 6000.0.1f1. Thank you!

Still happens to me with Unity 6000.0.1f1

Try doing a clean build and see if that helps regenerate the .gradle files.

The issue was caused by not adding minSdk attribute on .gradle files from libraries, such as the ones used by ARFoundation. If minSdk is not present, Google adds some permissions such as READ_PHONE_STATE, that’s why you must always set it explicitly.

2 Likes