No permission to write APN settings


Greetings, I am developing an Android application to create an apn, the problem persists in that it generates an exception of type


In my manifesto I have a permission

uses-permission android:name="android.permission.WRITE_APN_SETTINGS"

The message that gives me the exception is


No permission to write APN settings

But as you already saw, I already have the permission that this action needs.

This I need because I am developing an application that will use apn to connect only.

I'm working on Android 6 (API 23) and I've done the tests on 2 different devices. Thanks in advance.

asked by Enmanuel Pascual Jimenez Guzma 14.08.2017 в 19:31

1 answer


In this case the permission WRITE_APN_SETTINGS that allows to applications changing the configuration of an APN (Access Point Name), strictly requires that your application be configured as a system application.

It is for this reason that even if you have defined the permission when executing your application, it shows the message:


No permission to write APN settings

A system application has root privileges and are installed on the system partition.

It would seem to me that it is not your case to make a system application, but I add a article about this:


By default the Android ROM has a series of   applications necessary for the correct functioning of the system   operative These applications are what we know as "applications   "that are installed by default next to the operating system itself   and they are classified as "system applications".


These applications have certain preferences about applications   of users, for example, that can not be easily uninstalled and   that to do it you need superuser permissions, or "root".   Although it is not recommended that user applications be   system applications (among other things because the space of the   system partition, or ROM, is quite limited), yes it is possible   convert some specific applications into system applications   to make sure that they will always work and that no one person does not   authorized can eliminate them.

answered by 14.08.2017 / 21:05