Search code examples
androidapn

Read APNs in Android 4.2?


I have a problem reading APNs in Android v4.2 (Yes reading, not writing APNS), it is throwing a security exception:

No permission to write APN settings: Neither user 10068 nor current process has android.permission.WRITE_APN_SETTINGS.

Same code used to work on all previous platforms, does anyone know of any work around to this?

Thanks!


Solution

  • This appears to be an intentional change. The git commit where they added this defense includes the following comment:

    Since the DB may contain corp passwords, we should secure it. Using the same permission as writing to the DB as the read is potentially as damaging as a write.

    It is conceivable that your issue will cause them to consider adding a separate read permission, but at least for the time being, this is a regression in 4.2.