[Q] How Do You Define A Default APN In A Build? - Android Software/Hacking General [Developers Only]

Hi folks;
I'm porting CM7 over to the Motorola Triumph (Virgin) and have MMS working, BUT (there's always a "but!")
Virgin uses.... somewhat "odd" configuration parameters. I found that I can set an APN that will get it to function.
Remember, this is a CDMA ROM......
Anyway, that's great, except I want it to be the default in the build. THAT I cannot get to work. I have it defined in the overlay area and it gets into the framework ok, but the [preferred="true"] tag is ignored and the APN is not selected.
If I grab APN Manager from the market I can see it, and if I select it then it activates and all is well.
Does anyone know how you specify in the build that this APN should be activated by default so that the user doesn't have to do anything? As it stands right now *no* APN is marked active when the build cold-boots.
Thanks in advance!

Genesis3 said:
Hi folks;
I'm porting CM7 over to the Motorola Triumph (Virgin) and have MMS working, BUT (there's always a "but!")
Virgin uses.... somewhat "odd" configuration parameters. I found that I can set an APN that will get it to function.
Remember, this is a CDMA ROM......
Anyway, that's great, except I want it to be the default in the build. THAT I cannot get to work. I have it defined in the overlay area and it gets into the framework ok, but the [preferred="true"] tag is ignored and the APN is not selected.
If I grab APN Manager from the market I can see it, and if I select it then it activates and all is well.
Does anyone know how you specify in the build that this APN should be activated by default so that the user doesn't have to do anything? As it stands right now *no* APN is marked active when the build cold-boots.
Thanks in advance!
Click to expand...
Click to collapse
All I can think of is that there's still an old telephony.db hanging around.
Did you delete the db file: /data/data/com.android.providers.telephony/database/telephony.db?

This is on a new load (e.g. a data wipe)
The APN is there but it refuses to automatically activate. If I go in with APN Manager and turn it on it remains on, but I have yet to figure out what the magic combination is that results in (on a cold boot with a wiped data - factory reset) the APN being activated.
Alternatively does anyone know what the magic incantation is to do this programmatically (e.g. what I'd have to include to build up a small program that looks at the current APN and if there isn't one set, pokes the system to set the correct one?)

Related

[Q] Adding MMS APN in Android 2.2

Hello All,
Firstly, my apologies if this seems like a redundant thread. I found similar threads, but none that actually answered my question.
I'm a first-time Android owner, and I recently picked up the Samsung Galaxy S 4G (running Android 2.2) since I've been stuck with T-mobile for what seems like forever. I am big on saving battery, so I'm in the habit of disabling my mobile data when I'm not using it. However, I still want to be able to enable MMS.
Originally I had downloaded APNdroid since it has the option to still enable MMS while toggling mobile data. I know that this occurs through the widget adding suffixes to the APN names, but this device only comes with a "T-Mobile US" APN which encompasses both Internet AND MMS. Upon searching this forum, it appears that this is standard practice since Android 2.1 was released, but I could be wrong.
So I know you can go in and change the APN type to "internet" only. And I know that you can ADD a new APN. Buuuuut how the heck do I add one that works?? It asks for name, apn, proxy, port, user name, password, server, etc. I have NO earthly idea what information I need to provide here. I attempted to replicate the settings of the existing APN in a new APN and then designated one as Internet and one as MMS, but that didn't work.
Is there a way to create a separate MMS APN, or is it not possible with the newer versions of the Android OS?
N.B. I have not rooted my phone.
thank you so much

[Q] Edit the registry to properly configure MMS on my WP7 phone?

I'm using an unlocked LG Optimus 7 phone (Mango, build 7720) on the T-Mobile USA network. Aside from a lack of 3G support on the T-Mo USA network, this phone is really working great*!
...*except for MMS support.
For whatever reason, the built-in profiles for this phone do NOT include T-Mobile USA, which is really a bummer. I was able to test with an AT&T sim card, change the profile accordingly, and test MMS -- and that worked fine -- but no such luck with T-Mo USA... even with adding a new APN.
Has anyone figured this out? Since we have access to the registry via the MFG app, can we get in there and change the necessary values? MMS isn't the most critical function, but it is awfully nice to have.
Anyone??
Try this basically you need to set a flag to re-get the apn settings from your network.
Laquox said:
Try this basically you need to set a flag to re-get the apn settings from your network.
Click to expand...
Click to collapse
Wow. That did it! I've tried EVERYTHING *except* for those little registry keys that you mentioned, and honestly... I only needed to change the "ConfigurationStatus" entry. Crazy!
For the record, I....
- Launched the MFG app
- Went to the Engineer Menu > Other Setting
- Opened the Edit Registry item
- Chose HKEY_LOCAL_MACHINE from the 1. drop down
- Entered System\AutoDataConfig for the Input SUB_PATH
- Entered in each of the provided four entries for the Input KEY (and chose DWORD instead of String)
- Hit Query to find the current value
- Typed in the proper value (if needed) for the Input Data field and hit Set
- Hit Query one last time to verify
When all was completed, I backed out, turned off the phone, booted back up and tested. Voila! Working like a charm.
LG Optimus 7 (Mango 7720) on T-Mobile USA.
Thanks so much, Laquox! You rule
yipcanjo said:
Thanks so much, Laquox! You rule
Click to expand...
Click to collapse
Glad that worked for you. I looked all over the place and found that info on some other site and was like hmm.. sure why not. And it did the trick. Glad it worked for you to.
does this need a data connection to work?
i don't have a data plan atm, and tried this using wifi.
it doesn't send or receive.
kvizz said:
does this need a data connection to work?
i don't have a data plan atm, and tried this using wifi.
it doesn't send or receive.
Click to expand...
Click to collapse
MMS does indeed require a data connection. Or more accurately a mms plan and the ability to use your carriers data connection.
100% worked
i have tried many options, it was this one wich worked with me
i am using Etisalat - UAE sim card with LG E900
many thanks for all
Wow!! This little magical reg-key helped me also, tried for days with HTC 7 Pro, for some reason connection app didn't work but this did the trick, thank you!
can someone please help me my mms isn't working i have a Lg quantom C900B with telstra (AUS) and cant get this to make MMS work is there a noob friendly guide?
Thanks
Laquox said:
Glad that worked for you. I looked all over the place and found that info on some other site and was like hmm.. sure why not. And it did the trick. Glad it worked for you to.
Click to expand...
Click to collapse
It's been working great, but for some reason I keep "losing" my ability to send/receive MMS messages. I'll go through the four registry values....
Code:
[HKEY_LOCAL_MACHINE\System\AutoDataConfig]
"RunADC"=dword:1
"ConfigurationStatus"=dword:0
"Attempt"=dword:0
"MaxAttemptsAllowed"=dword:3
....and I'm finding that "RunADC", "Attempt", and "MaxAttemptsAllowed" all seem to have NULL values when I query them. "ConfigurationStatus" has consistently remained with a "0" (zero) value.
Anyone else see this behavior? Any fix?
yipcanjo said:
It's been working great, but for some reason I keep "losing" my ability to send/receive MMS messages. I'll go through the four registry values....
Code:
[HKEY_LOCAL_MACHINE\System\AutoDataConfig]
"RunADC"=dword:1
"ConfigurationStatus"=dword:0
"Attempt"=dword:0
"MaxAttemptsAllowed"=dword:3
....and I'm finding that "RunADC", "Attempt", and "MaxAttemptsAllowed" all seem to have NULL values when I query them. "ConfigurationStatus" has consistently remained with a "0" (zero) value.
Anyone else see this behavior? Any fix?
Click to expand...
Click to collapse
My values are resetting too, but it happens as soon as I restart my device, so I dont even get temporary MMS ability... ConfigurationStatus and Attempt reset to 1. The others remain as the values I set them too.
I also tried some recommendations from another thread. No luck at all.

ICS Leak DUN type APN [Solution]

Hi! Just a small contribution for the ICS leak!
Testing the ICS leak, I was trying to set the APN of my carrier when I got an error: You are not allowed to add a new DUN APN. DUN APN is only provisioned by the carrier. The problem is: whitout setting this, I was not abble to get the tether working. It connects, but can't access the network.
But I found a solution, maybe not the best one, but worked like a charm: writing myself in file /data/data/com.android.providers.telephony/databases/telephony.db. When you open this database, in the field carriers, you will see a lot of APNs that came preloaded. Any user APN will be in the end of the list (mine ended in line 83). My advice: write everything you need on the System APP and look for it in the end of the database file. After you find it, just add dun in the fild type.
Cheers,
Luis.
Helped me a lot specially guys with MB865(ATT) and using odr career.
Dun yet?
Interestingly, I tried this one but whenever I'd change the dun in those settings it would disable that apn and I wouldn't be able to re-enable it!
Theres a bunch of settings in:
data/data/com.motorola.android.providers.settings/databases/settings.db/settings/data
One of them is dun_apn_changable!!!! Set it to 1 and you're good to go
I also changed usb_entitlement_check to 0, dun_nat_enabled to 1, dun_enable to 1, and tether_reverse_nat_enabled to 1 (whatever that does, sounds good)
Save your changes, reboot, and you're good to set any apn up with all the dun's you want.

[Q] CM10 on Rogers, no LTE.

All right, so, I have tried everything I can think of, but nothing has worked, so I decided to try asking here. I am have been on the CM10 builds for about a week, and I am loving them. I never really liked sense, so an AOSP JB rom is great (aside from the battery life). Before CM10, I was on ViperXL, and LTE worked fine, but after switching to CM10 (or any other AOSP roms) it just stops working. I can get everything else, Edge, 3G, and HSPA, but LTE just won't work. Just a couple hours ago I did a wipe and a clean install of the October 3rd nightly, and I am still having the issue.
One thing I haven't tried is flashing a 4.0.3 rom, and then the CM10 rom, but the FAQ says that issue has been fixed so I doubt it would help.
Anyway, thanks in advance for the help!
Check your APN settings. These settings worked for me.
http://forum.xda-developers.com/showpost.php?p=19434188&postcount=2
I've had the exact same issue. I'm on Rogers too. I've double and triple checked the APN (ltemobile.apn) and it is definitely correct. I first noticed this on PA, and now get the same thing on CleanROM. Yesterday, I ran the Rogers RUU and that got LTE. So I went back to CleanROM (same radio image) and now only get HSPA. If I try to use the ltemobile.apn APN it fails with the message "Connection failed due to incorrect APN setting." Hope this info is useful for anyone with educated guesses
andyondroid said:
Check your APN settings. These settings worked for me.
http://forum.xda-developers.com/showpost.php?p=19434188&postcount=2
Click to expand...
Click to collapse
I checked, I had all that set correctly, still no LTE
If anyone else has suggestions, I would be glad to hear them.
person66 said:
I checked, I had all that set correctly, still no LTE
If anyone else has suggestions, I would be glad to hear them.
Click to expand...
Click to collapse
From my experience i've had no issues with Rogers LTE on Sense roms and CM10. I would probably try deleting the APN and re-adding it.
I'd also check the network type. In dialer, dial *#*#4636#*#* and under Phone Information check that the network type is set to 'GSM/WCDMA/LTE auto'
Beyond that, trying running the latest Rogers modem/baseband. I'm using 0.18as.32.09.28L with no issues.
I've only had my One X a week so beyond this, i'm out of ideas.
andyondroid said:
From my experience i've had no issues with Rogers LTE on Sense roms and CM10. I would probably try deleting the APN and re-adding it.
I'd also check the network type. In dialer, dial *#*#4636#*#* and under Phone Information check that the network type is set to 'GSM/WCDMA/LTE auto'
Beyond that, trying running the latest Rogers modem/baseband. I'm using 0.18as.32.09.28L with no issues.
I've only had my One X a week so beyond this, i'm out of ideas.
Click to expand...
Click to collapse
there is an option in setting...you have to change from wcdma to lte...in mobile settings...
i can confirm lte works with cm10...worst case try flash a 4.0.3 rom then flash cm10..
Here's my experience: you no longer need the sense flash method. Make share you do a system, factory, cache and dalvik wipe. Do system and factory twice, as it did not always 100% work for me.
Then boot up. Go to apns and delete all the non-lte ones. Set the lte/wcdma/gsm setting there.
Next go to *#*#4636#*#* in dialer. Check phone information so that network says lte/gsm(prl).
Reboot and hopefully it will all stick.
Also I noticed that the default lte APN has port 80 and not MMS port 80. Make sure that is correct
Sent from my One XL
Okay, I've made some progress on this. I did a factory reset and system wipe from TWRP recovery then re-installed CleanROM 5 from scratch. When it booted up I added the ltemobile.apn APN. This time it successfully connected to the APN, but it still did not get past HSPA. I then booted back into recovery and replaced /system/build.prop with the build.prop from the Rogers 1.94.631.3 stock ROM (http://forum.xda-developers.com/showthread.php?t=1812544). When it booted up it got LTE coverage.
So there must be something key in build.prop required to get LTE to connect. I've attached the two build.prop files in case anyone with trained eyes wouldn't mind diffing them and suggesting what setting might be the key to unlocking LTE.
With CM10 I had to delete the APNs and re-add them, even if they were correct. Not sure why.
denversc said:
Okay, I've made some progress on this. I did a factory reset and system wipe from TWRP recovery then re-installed CleanROM 5 from scratch. When it booted up I added the ltemobile.apn APN. This time it successfully connected to the APN, but it still did not get past HSPA. I then booted back into recovery and replaced /system/build.prop with the build.prop from the Rogers 1.94.631.3 stock ROM (http://forum.xda-developers.com/showthread.php?t=1812544). When it booted up it got LTE coverage.
So there must be something key in build.prop required to get LTE to connect. I've attached the two build.prop files in case anyone with trained eyes wouldn't mind diffing them and suggesting what setting might be the key to unlocking LTE.
Click to expand...
Click to collapse
Any chance you have figured out how to get it working on CM10? I tried the other suggestions, like deleting the apns and then entering them again, wiping everything, and I checked that the network was set to lte/gsm(prl). Still no LTE unfortunately.
person66 said:
Any chance you have figured out how to get it working on CM10?
Click to expand...
Click to collapse
Nope. I'm still rockin' HSPA on CleanROM. Some day I will probably mess around with the build.prop to see if I can figure it out. I really have no idea though. You should try running the RUU just to see if you get lte like I did.
Just got LTE working on Rogers with CM10, finally!
1.) First, I flashed the official stock Rogers ICS Baseband/Modem. You can check to see if you already have the correct modem by going to Settings, choosing About Phone, and checking your "Baseband version".
2.) Second, I corrected the APN settings that come default with CM10. The APN for ltemobile.apn need to be change, since the CM10 settings incorrectly set the Port as 80 (should be left blank), set the MMS port as blank (should be "80"), and set the APN type as something along the lines of 'default' (should be either "*" or "internet + mms"). Make sure you click the menu hardbutton and choose "Save", and go back and check to see that it did indeed save. I also selected the Rogers LTE amonst the list of the four different APNs (Rogers, Rogers LTE, Rogers Tethering, Rogers WAP - not sure if this last step makes a difference but this is what I did anyway).
3.) Go to your phone dialer, and type in *#*#4636#*#*. A "Testing" menu should pop up. Select "Phone information", scroll down to the bottom and under 'Set preferred network type", I chose "LTE/GSM auto (PRL)".
4.) Voila, this worked. I did not need to restart, just gave it a minute and the icon changed from H+ (HSPA+) to 4G (LTE). You can confirm LTE status by either doing a speed test and seeing the results, or go to Settings, scroll to the bottom and choose "About Phone", then "Status", and under "Mobile network type" it should say LTE. On mine it said "LTE:13".
Others, please experiment and try to see if you get the same results.
Cheers
adams03 said:
Just got LTE working on Rogers with CM10, finally!
3.) Go to your phone dialer, and type in *#*#4636#*#*. A "Testing" menu should pop up. Select "Phone information", scroll down to the bottom and under 'Set preferred network type", I chose "LTE/GSM auto (PRL)".
Cheers
Click to expand...
Click to collapse
This I think is the main thing. I'm on AT&T but up until just recently every time I flashed an AOSP ROM I had to go into this menu and set it to LTE/GSM. It would always default to WCDMA Preferred for some reason. It doesn't happen anymore but it used to happen every time I flashed an AOSP ROM or even when I rebooted. I had to change it and then it would be fine until I rebooted again.
Thanks, this worked on my SGH-I727R on Rogers.
I wonder why the apn settings load wrong in CM10 when the system reads them from the SIM card...? This never happened to me on previous aosp ICS roms.
what setting do you have for the tethering apn?
i am having issues having other devices running off my hotspot
this is what i currently have for tethering
Name: Rogers Tethering
APN: ltedata.apn
Proxy: Not set
Port: Not set
User Name: Not set
Password: Not set
Server: Not Set
MMSC : Not set
MMS Proxy: Not set
MMS Port: Not set
MCC : 302
MNC: 720
Authentication Type: Not Set
APN Type: dun
thanks in advance
g35thrilla said:
what setting do you have for the tethering apn?
i am having issues having other devices running off my hotspot
this is what i currently have for tethering
Name: Rogers Tethering
APN: ltedata.apn
Proxy: Not set
Port: Not set
User Name: Not set
Password: Not set
Server: Not Set
MMSC : Not set
MMS Proxy: Not set
MMS Port: Not set
MCC : 302
MNC: 720
Authentication Type: Not Set
APN Type: dun
thanks in advance
Click to expand...
Click to collapse
It's funny you posted this. I am on AT&T and recently I have not been able to get tethering devices to work, but up until recently, I have never had a problem.
my bud has the same phone unrooted with rogers gonna check his apn settings and see if they differ.
K well I just got off the phone with rogers. All the APN setting are fine but still no tethering. Well if it don't won't it don't work. If anyone is successfully tethering on cm10.1 build Jan 12 2013 with Rogers plz let me know.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app

Caf 0.9 lte solution found - (4g)

I HAVE SUCCESSFULLY TESTED THIS, BUT WILL NOT BE HELD RESPONSIBLE FOR ANY NEGATIVE RESULTS, BY TRYING THIS, YOU AGREE TO TAKE FULL RESPONSIBILITY FOR YOUR ACTIONS, YOU HAVE BEEN WARNED
For Sprint and Virgin mobile users, i found a solution for LTE, (It will give you 4g for some reason, but it works).
EDIT: THIS NOW WORKS ON CM 13 ROMS WITH NO APN LISTINGS, HERE IS WHAT TO DO:
1. INSTALL ROM, FLASH GAPPS,
2. REPLACE APNS-CONF WITH THE ONE FROM THE BELOW LINK THAT I POSTED FOR THE CAF 0.9 FIX
3 SET PERMISSIONS OF APN-CONF TO 0644, REBOOT TO TWRP, DO FACTORY RESET.
4. WHEN YOU HAVE BOOTED INTO ROM, DOWNLOAD APN CHANGER BY ANNANDO FROM GOOGLE PLAY
5. IT WON'T SHOW ANY APNS, BUT JUST IGNORE IT AND ADD ONE ANYWAY WITH THE FOLLOWING INFORMATION (IT IS PART OF THE FIX)
For Sprint users: USE SPRINT FOR THE NAME, AND n.sprpre.ispsn for the apn name. set MMSC to http://mms.sprintpcs.com SET MMSPROXY TO: 68.28.31.7 MMS PORT: 80 MCC: 310 MNC: 120 BEARER: LTE
IT TURNS OUT THE ABOVE STEP IS NECESSARY. FOR SOME REASON, EVEN WHEN THE APN ISN'T SHOWING, IT STILL IS REQUIRED, WHICH IS REALLY STRANGE
FOR VIRGIN MOBILE USERS: DO THE SAME AS SPRINT, EXCEPT PUT n.ij.ispsn for the apn name.
6. After you have done that, do to dialer and press *#*#4636#*#* and go to phone information and, like in caf, turn off radio, set network mode to cdma/lte auto prl, (again ignore the fact it says its already set on it) turn THE RADIO BACK ON, LTE WILL BE ON AFTER THE NETWORK ICON GOES CRAZY AFTER A MINUTE OR 2.
Sprint and Virgin Mobile: You need to flash rom in twrp, (wipe data, cache, and dalvik cache before flashing, (DO NOT WIPE SYSTEM OR THE INSTALL WILL FAIL) then gapps, then factory reset, (To avoid force close errors due to gapps), When the rom boots up, sign into google play account, and download root browser. After downloading that, download the apns-conf file from here: https://drive.google.com/open?id=0B-KfJE4M0My6MnBiWWtoQW04U0U and replace the current apn-conf under system/etc with the new one you just downloaded, and set permissions to 0644, reboot to twrp, and factory reset (so the rom resets telephony.db) Then, after the rom boots up, go under mobile networks, to access point names, and the third one down will be a sprint one. Edit this one. Follow these guidelines for your respective carrier,
VIRGIN MOBILE Change the apn to n.ij.ispsn, and set the bearer to LTE Only, and Turn off the other option that is ticked under here. Then go to your phone dialer and type in *#*#4636#*#* It will bring up a menu, click on phone information menu. Then, once your in there, turn the radio off, and set the network mode to cdma/LTE auto prl, (It will already look it is on this by default, But Just Bear With Me) DO NOT MESS WITH ANY OTHER SETTINGS IN HERE UNLESS YOU KNOW WHAT YOU ARE DOING) Then turn the radio back on, and BOOM, you will have 4g. (The network indicator will look like its going haywire for a minute, but give it some time for the 4g to pop up).
SPRINT: Change the apn to n.sprpre.ispsn, and set the bearer to LTE Only, and Turn off the other option that is ticked under here. Then go to your phone dialer and type in *#*#4636#*#* It will bring up a menu, click on phone information menu. Then, once your in there, turn the radio off, and set the network mode to cdma/LTE auto prl, (It will already look it is on this by default, But Just Bear with me.) DO NOT MESS WITH ANY OTHER SETTINGS IN HERE UNLESS YOU KNOW WHAT YOU ARE DOING) Then turn the radio back on, and BOOM, you will have 4g. (The network indicator will look like its going haywire for a minute, but give it some time for the 4g to pop up).
I hope this helps somebody. Thanks for taking the time to read this, and have a wonderful day!
Thanks man, going to give this a shot
Sent from my XT1526 using Tapatalk
Does the built in APN editor in the ROM work?
Sent from my aosp_surnia using Tapatalk
starkly_raving said:
Does the built in APN editor in the ROM work?
Sent from my aosp_surnia using Tapatalk
Click to expand...
Click to collapse
Its strange, but it works, for some reason, you cannot see it. I know this because I can't apply my fix in any of the cm 13 ROMs without inputting the proper APN with the correct details. It won't show, but its there. I know that probably doesn't make any sense, but its the best way I can explain it. I'm not sure what is causing the APN to be invisible, but nonetheless it still has an effect, even with its "non existant status". Sorry for the long winded answer!

Categories

Resources