Android permissions: Phone Calls: read phone state and identity

(Answering my own question in case anyone else runs into this problem and searches for it.)

Digging around in PackageParser.java in the android source, I found out that the system will automatically assign

android.permission.WRITE_EXTERNAL_STORAGE and 
android.permission.READ_PHONE_STATE

to any app that declares a targetSdk version of less than 4 (donut). There must be a compatibility reason for this, maybe apps targeting older versions could assume they had these permissions without declaring them explicitly. So, if you don’t want these permissions added to your app implicitly, add a section like the following in AndroidManifest.xml

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4" />

That is all.

Have fun, -Mike

Leave a Comment