Hey all, I want to know... basically the answer to my question in the title. I've looked in a lot of places but maybe I looked wrong or I just didn't find anything, so I decided to ask around a bit.
First of all, I'm pretty sure GMS uses this permission, "READ_PRIVILEGED_PHONE_STATE" to get that info, and there is another permission "READ_PHONE_STATE" which does similar things but leaves out the IMEI, the privileged version has that info.
Both permissions can return info such as carrier related data, subscription info and telephony state.
The telephony framework is what gives GMS this data but I'm still confused on the exact process.
So, if anyone is a bit more knowledgeable in Android, do you have any idea on:
-
Which framework component actually decides whether GMS can receive privileged telephony data?
-
Is the permission enforcement centralized (e.g. in
TelephonyPermissions) or implemented per Binder method? -
Which Binder interface/service is responsible (
ITelephony,PhoneInterfaceManager, something else)? -
Does the telephony framework simply check the caller's permissions and return the requested data, or are there additional gates such as AppOps, carrier privileges, roles, or OEM-specific checks?