Africa Matji
Africa Matji

Reputation: 375

Adding an APN using Android APN config file (apns-full-conf.xml )

I need to send APN configuration through an SMS, so the user can import these settings to add a new APN on their device.

In Apple iOS this can be done with an XMl file that contains details about the APN.

I read about this from android docs, /etc/apns-full-conf.xml and adding an apn to this file using below format. Not sure how to implement this. It seems to me like the device needs to be rooted. Anyone that has done this before i would appreciate some help.

 <apn carrier="CarrierXYZ"
   mcc="123"
   mnc="123"
   apn="carrierxyz"
   type="default,supl,mms,ims,cbs"
   mmsc="http://mms.carrierxyz.com"
   mmsproxy="0.0.0.0"
   mmsport="80"
   bearer_bitmask="4|5|6|7|8|12"
  />

Someone was able to achieve this, here is an example of an alert.

enter image description here

Upvotes: 2

Views: 5895

Answers (1)

BLH
BLH

Reputation: 143

If it is OK with you to root and manually copy the file, then you can pull and edit /system/etc/apns-conf.xml and then push it back.

Steps for that would be

adb -s <device> pull /system/etc/apns-conf.xml

// To push
adb -s <device> root
adb -s <device> disable-verity
adb -s <device> reboot

// After boot
adb -s <device> remount
adb -s <device> push apns-conf.xml /system/etc/

Other than that, I am not sure how to install using an SMS message. Saying someone was able to achieve it doesn't really help. I can give you many such functionality that goes into custom ROMs that isn't really available on standard stock ROMs. I work on AOSP and I am not sure whether what you are asking about is a built-in feature or not.

Upvotes: 1

Related Questions