Change APN in Android Terminal with Root permissions - General Questions and Answers

Hello,
I have succesfully made a script to Add APN Configuration to my Phone inside Terminal with Root permission. Actually I can change the default APN settings, but it take only action after Reboot.
Is it possible to enforce Reload APN Configuration without reboot?
I use my Phone as Internet Access Gateway connected to my Router a Raspberry Pi. I would like to change my outgoing IP-Address from my Mobile ISP if needed. The trick here is to add the very same APN Profile a second time and switch between them. With this trick I get another IP-Address in 2-3 Seocnds and without reboot.
I am able to change the Default APN but I was unable to Switch to another APN Profile without reboot.
I would very pleased if someone have an clever idea to change the APN Profile without Reboot.
Thank you very much!

NOT possible: settings are read-in at boot.

Thanks for your answer!
I made a macro that change the APN with the Userinterface it opens Settings -> Mobile Networks -> APN Accespoints and change the APN to the other and save the actual APN to a file. This action pattern changes the APN for me at the moment. it works, but I thaught about another possibility to not use Macros.

Related

Hangouts APN settings? Do I need to fill it in?

Hangouts as I'm sure you know, has it's own APN settings. Is it safe for me just to delete all of the profiles?
If I delete the APN's in hangouts, It uses the system set APN correct?
Also, my carrier gave me this info, and I want to make sure it's all I need(In device settings)
Name
APN
MMSC
APN type
Is that all I need? Just asking because I noticed there were a bunch of other settings, and my connection always cuts out (probably a carrier/location issue).
Still waiting on hangouts update, thank God they added Google voice.
Bump!
You do not have to fill in the APN settings inside Hangouts unless you are having problems with the application. The settings supplied by your carrier should be all you need to configure in your mobility network APN settings.

US Cellular SM-G920R4 Galaxy S6 APN Data Connection Locked to 3G

I have a US Cellular G920R4, unlocked.
USC has co-opted the data connection. For example, I can add an APN for Verizon and select it, but it doesn't work.
If you set the APN setting to default and remove all APNs, it dispalys a message that states that "APN settings are disabled for the current user profile."
Data is 3G by default.
Also, they've locked the browser such that you can not remove or even change the default home page, which is the USC portal.
How to I eliminate their default setup and restore the APN settings?
I was having a problem with this also and I was able to add a working APN by disabling WiFi first. You'll still see the APN settings disabled error until you add the new APN. You'll then be able to select the radio button next to the APN you added after it has been saved. It worked for me just now so I hope that helps you.
gogozombiii;70527579 I was able to add a working APN by disabling WiFi first. You'll still see the APN settings disabled error until you add the new APN. .[/QUOTE said:
Thank you for taking the time to reply. I am glad the solution worked for you and, hipefully it will help others. The WiFi settings on my device were disabled. I can add an APN and select it as default, but it's ignored - even after I delete all APNs by returning to default settings and starting over.
Click to expand...
Click to collapse

Cannot save MNC parameter for APN settings

My provider recently updated their APN credentials and I now have to enter them manually. The settings can be found here: https://support.vimla.se/articles/article/apn-instaellningar-oneplus
However I have spent well over 30 m trying to save these profiles and it seems impossible on Pie Stable. I have tried alter each field and save and it works up until I reach MNC. The default setting on my default apn profiles are 06. As you can see on my providers website, it should be changed to 08. When I change it to 08 and save the profile completely disappears from the list. Can I add a profile from adb or similarly?

MMS Failing to Send / OnePlus APN Settings Grayed Out and Can't be Edited - Fix

This is one for the search engines since I couldn't find an answer for this out there for this so hopefully this helps someone else.
My MMS messages were suddenly failing to send. I took a look at my logcat and saw that for some reason even though the MMS service was pulling the correct MMSC from the profile, the OkHTTP API was failing to connect to localhost. My only guess is that apparently the MMSC http URL was sending an HTTP redirect to something that my device was resolving to localhost since I could connect to the MMSC with my web browser and ping it successfully by name with a terminal client without it resolving to 127.0.0.1 (localhost). I tried disabling my ad blocker since that's the only thing I could think of that could be causing a DNS resolve to 127.0.0.1, but that wasn't it.
I also knew that my MVNO had updated their MMSC and so I tried adding in a new APN with those settings, with the new MMSC entered both by name and by IP address (note: with OnePlus you always need to specify an MVNO type, in my case GID, for a custom APN to save). From the logcat, I saw that the MMS service was unbelievably still using the grayed out APN profile with the old MMSC, even after a reboot. I verified that my custom APN was in fact selected. I tried deleting the storage from several different phone services, as well as locating and deleting the custom APN file, to no avail.
Finally, I figure out what was going on. OnePlus has an evil APN locking file at:
/system/etc/apns-conf.xml
If an APN name on your SIM matches with an APN name in this file, then you are locked to that APN even if you have defined and selected a custom APN!
So, I made a backup copy of this file first, then I located the grayed out APN profile in this file (search by APN name), deleted it, and rebooted. Looking at the logcat though, I still saw that the phone was not using my custom APN profile!! It turned out that there was a second match for the APN name in this file. I deleted that as well, rebooted, and voila - no more grayed out APN in my APN settings that I'm locked to and can't edit. I verified in logcat that my phone was now using my custom APN profile and now my MMS are working again!
Hope this helps someone else!
Notes:
I'm using the last Oreo/ OxygenOS 5.1.11 for best xPosed support, but I did see on the OP forums that other people were having issues with their MMS and APN grayed out even with Pie on several different OP phones.
Yes, I have an older SIM from my MVNO, but not that old

Question SOLVED: Edit Greyed out APN on Pixel 7 Pro? (No Root)

UPDATE: FOUND SOLUTION IN 3RD POST BELOW!
So im rooted on my Pixel 7 Pro.
Im experiencing daily occurances where my phone goes into NO SERVICE.
Toggling data on or off doesnt work.
Only restarting the phone works.
Which brings me to this..
I have Visible wireless which is Verizon based.
Problem is I cant edit APN what-so-ever.
Its greyed out. So fine tuning my APN is off the table.
However I do have root and I do have access to my build.prop file (even though FX explorer wont let me mount to write which is another problem).
Does anyone know how to work around this APN block or point me in another forums fix?
Im on Factory Unlocked Pixel 7 Pro Android 13.
missionman said:
So im rooted on my Pixel 7 Pro.
Im experiencing daily occurances where my phone goes into NO SERVICE.
Toggling data on or off doesnt work.
Only restarting the phone works.
Which brings me to this..
I have Visible wireless which is Verizon based.
Problem is I cant edit APN what-so-ever.
Its greyed out. So fine tuning my APN is off the table.
However I do have root and I do have access to my build.prop file (even though FX explorer wont let me mount to write which is another problem).
Does anyone know how to work around this APN block or point me in another forums fix?
Im on Factory Unlocked Pixel 7 Pro Android 13.
Click to expand...
Click to collapse
Try this app, and enable apn editing. If it lets you after that you'll be able to. But it doesn't work on Verizon, you can add an apn but only edit the name of it.
GitHub - kyujin-cho/pixel-volte-patch: Rootless replacement for persist.dbg.volte_avail_ovr patch
Rootless replacement for persist.dbg.volte_avail_ovr patch - GitHub - kyujin-cho/pixel-volte-patch: Rootless replacement for persist.dbg.volte_avail_ovr patch
github.com
Thank you TotallyAnxious but I got a working solution that doesnt involve adding modules to Magisk and appears to not require root. I do have Magisk and LSPosed running but this is working on my Visible (Verizon) service.
Ok so Im on a factory unlocked Google Pixel 7 Pro Android 13 (rooted but that doesnt matter and neither does being factory unlocked) with Visible Wireless (Verizon MVNO) and my APN is greyed out. Apparently Visibles carrier update I have for 2023 didnt patch adding apn, they just hid it.
I just downloaded "MIUI Hidden Settings Activity" app in play store by "NetVor - Android Solutions" and opened the "Access Point" shortcut which opens up the hidden by verizon option to add APN and save it! I have my 2nd APN selected right now in settings.
I basically copied everything my carrier APN has except I didnt select "NR" under bearer type which is the 5G connection. It wont let you add "dun" for APN type for tethering/hotspot so I added it in all CAPS as "DUN" and it worked! Tested hotspot and it works great.
Now my phone wont lose service trying to connect to this stupid 5G causing NO SERVICE on my sim.
For many this is how you add APN for troubleshooting.
Important to know: Using this other app called "Network Type Switcher" by "Cracky" in Play Store allows Testing menu which is *#*#4636#*#* on your dialer to "select prefered network type" to remove "NR" (5G) as folks previously have been doing to stick to LTE 4G, however, if your APN bearer allows 5G (NR) then it will try scanning for NR band and when it finds it and cant connect (because of your prefered network type on LTE 4G) it will cause a mismatch and youll lose service showing "NO SERVICE". The only way to fix it is rebooting.
Make sure your Select Prefered Network Type reflects whats in your APN bearer.
In fact as long as you just remove NR (5G) from apn bearer then it wont even scan for it even if your "select prefered network type" allows NR (5G). So no need to change it. Just remove it from your APN bearer and itll stay on 4G LTE.
Removing NR (5G) from apn bearer was my ultimate goal and adding a new apn but If your goal is to just add tethering/hotspot with "DUN" (such as "APN type: default,spul,DUN") then thats all you need to do.
No need to change "select network prefered type".
If you mess up adding a APN and want it deleted just go to settings, network, sims, apn, select the 3 dot menu, reset to default and itll go back to what your carrier set.
I dont think you need root to add APN with this app above. It never prompted for root access and didnt require it. No need to modify build.prop since they just hid the add apn setting.
missionman said:
Thank you TotallyAnxious but I got a working solution that doesnt involve adding modules to Magisk and appears to not require root. I do have Magisk and LSPosed running but this is working on my Visible (Verizon) service.
Ok so Im on a factory unlocked Google Pixel 7 Pro Android 13 (rooted but that doesnt matter and neither does being factory unlocked) with Visible Wireless (Verizon MVNO) and my APN is greyed out. Apparently Visibles carrier update I have for 2023 didnt patch adding apn, they just hid it.
I just downloaded "MIUI Hidden Settings Activity" app in play store by "NetVor - Android Solutions" and opened the "Access Point" shortcut which opens up the hidden by verizon option to add APN and save it! I have my 2nd APN selected right now in settings.
I basically copied everything my carrier APN has except I didnt select "NR" under bearer type which is the 5G connection. It wont let you add "dun" for APN type for tethering/hotspot so I added it in all CAPS as "DUN" and it worked! Tested hotspot and it works great.
Now my phone wont lose service trying to connect to this stupid 5G causing NO SERVICE on my sim.
For many this is how you add APN for troubleshooting.
Important to know: Using this other app called "Network Type Switcher" by "Cracky" in Play Store allows Testing menu which is *#*#4636#*#* on your dialer to "select prefered network type" to remove "NR" (5G) as folks previously have been doing to stick to LTE 4G, however, if your APN bearer allows 5G (NR) then it will try scanning for NR band and when it finds it and cant connect (because of your prefered network type on LTE 4G) it will cause a mismatch and youll lose service showing "NO SERVICE". The only way to fix it is rebooting.
Make sure your Select Prefered Network Type reflects whats in your APN bearer.
In fact as long as you just remove NR (5G) from apn bearer then it wont even scan for it even if your "select prefered network type" allows NR (5G). So no need to change it. Just remove it from your APN bearer and itll stay on 4G LTE.
Removing NR (5G) from apn bearer was my ultimate goal and adding a new apn but If your goal is to just add tethering/hotspot with "DUN" (such as "APN type: default,spul,DUN") then thats all you need to do.
No need to change "select network prefered type".
If you mess up adding a APN and want it deleted just go to settings, network, sims, apn, select the 3 dot menu, reset to default and itll go back to what your carrier set.
I dont think you need root to add APN with this app above. It never prompted for root access and didnt require it. No need to modify build.prop since they just hid the add apn setting.
Click to expand...
Click to collapse
It's an app, not a module. It actually can work without root as described in the readme.
TotallyAnxious said:
It's an app, not a module. It actually can work without root as described in the readme.
Click to expand...
Click to collapse
oh ok i misunderstood. Well then if this ends up failing down the road ill give the method a shot you mentioned.
Thank you!

Categories

Resources