Post Reply

[Guide]Set the Straight Talk APN on a (rooted) Stock 4.4.2 AT&T ROM

OP ratkiley

7th July 2014, 03:44 AM   |  #1  
OP Junior Member
Flag Denver
Thanks Meter: 4
 
7 posts
Join Date:Joined: Nov 2012
Donate to Me
More
UPDATE: There is a much simpler solution that anyone can use without learning Linux commanline or file permissions. See this thread for details:

http://forum.xda-developers.com/showpost.php?p=54462957&postcount=13


WARNING: If you do not understand every step of these low-level Linux command-line technical instructions, then do not attempt this method or you may brick your phone! These instructions are written for people who understand android developer tools, Linux command-line tools, and file permissions. If you do not understand these Android development basics, then find another walkthrough.

I got my phone up and running and text messaging, 4G LTE data connectivity, and phone calls worked just fine, however, I noticed I was unable to send and receive MMS messages (picture messaging). I tried every solution I could find on the web for changing the APNs on my rooted LG Optimus G Pro E980, and by trial and error, I discovered the following solution:

The stock Android ROM supplied by AT&T for the Optimus G Pro - Android 4.4.2 (Build E98020G), has disabled the ability to add working APN settings through the system APN settings dialog by defaulting all new APNs to have the (apn) type="default,dun". The settings screen does not let you change this value, so you have to edit the values directly in the SQLite database.

None of the free SQLite-database-editors in the Android market were able to edit the read-only /data/data/com.android.providers.telephony/databases/telephony.db file (after following instructions for editing the APN in the database in the folder where it is stored).

So, using ES File Manager (search for "com.estrongs.android.pop" on google play), I copied it to my SD-Card, copied to my computer and edited it with SQLite Database Browser (a SourceForge project identified as sqlitebrowser).

VERY IMPORTANT: The permissions change when copying the file from your computer to the SDCARD and when copying it from the SDCARD to the /data/data/com.android.providers.telephony/databases/ folder. So, I had to set the permissions back to the original telephony.db permissions & owner. The permissions should match all of the other .db files in the /data/data/com.android.providers.telephony/databases/ folder, like so:

RW-RW----

VERY IMPORTANT:Change the file owner back to "radio" from "root". Change the group back to "radio" from "root". If you do not change the owner and group back to "radio" after you copy the telephony.db file back to the /data/data/com.android.providers.telephony/databases/telephony.db path, the phone.apk process will repeatedly crash until it restarts your phone (and your phone will keep rebooting until you delete the telephony.db file that has incorrect permissions or incorrect owner). To boot, the phone.apk runs under the "radio" group and needs the critical Android OS file: telephony.db to be owned and accessible by the "radio" group.

After creating an APN per Straight Talk's instructions, changing the type field in the carriers (APNs) record stored in the telephony.db, copying over the new telephony.db (and overwriting the original), changing the permissions & owner of the copied file, and rebooting the phone, I was able to send and receive text messages and picture messages (MMS) to myself.
Note: My phone came with the correct "Service Center Address" setting, because it was an AT&T branded phone before I brought it to Straight Talk. However, you may need to change this setting if you came from another carrier with your phone. The correct setting for Straight Talk customers on the AT&T LTE network should be (the same as it is for AT&T customers on an AT&T plan):

Code:
+13123149810
Although the /system/etc/apns-config.xml file has several, misleading APN values in it, this file is not used to store the APN records in Android 4.4.*. Instead, APNs are stored in the /data/data/com.android.providers.telephony/databases/telephony.db SQLite database.

Also, there is a rumor spreading around the internet that you cannot send MMS messages when your WIFI is connected (instead of a 4G LTE connection). That is false: my phone sends and receives MMS messages while the WIFI is connected.
To make it easier for you to change your APN settings on your phone, I have attached my working telephony.db file. It contains only one APN record for Straight Talk on AT&T's LTE network. I deleted all of the other APN records from the database, per Straight Talk's APN instructions.

If you are curious, I also attached the database dump of the attached telephony.db, which was auto-generated by SQLite Database Browser. It is a text file called "telephony-dump.sql".
Attached Files
File Type: zip telephony.zip - [Click for QR Code] (2.9 KB, 91 views)
File Type: zip telephony-dump.zip - [Click for QR Code] (2.1 KB, 34 views)
Last edited by ratkiley; 5th January 2015 at 08:16 PM. Reason: Further clarification
The Following 2 Users Say Thank You to ratkiley For This Useful Post: [ View ]
4th January 2015, 10:51 PM   |  #2  
l337m45732's Avatar
Member
Thanks Meter: 6
 
77 posts
Join Date:Joined: Apr 2010
Donate to Me
More
Hi, I tried this step by step and now my phone does nothing but crash repeatedly. Any way to fix this?
5th January 2015, 07:06 PM   |  #3  
OP Junior Member
Flag Denver
Thanks Meter: 4
 
7 posts
Join Date:Joined: Nov 2012
Donate to Me
More
How to unbrick your phone if you missed steps in the instructions
Quote:
Originally Posted by l337m45732

Hi, I tried this step by step and now my phone does nothing but crash repeatedly. Any way to fix this?

If you do not understand every step of the above low-level Linux command-line technical instructions, then do not attempt this method or you may brick your phone!

It sounds like a permissions issue - the android operating system is crashing because it does not have permission to read the critical OS file: telephony.db. Did you set the owner, group, and permissions on the telephony.db file correctly? If you are unable to change the permissions back on the telephony.db, then follow the instructions above to fix your problem:

Quote:
Originally Posted by ratkiley

VERY IMPORTANT: The permissions change both when copying it to and when copying it from the SD-Card. So, I had to set the permissions back to the original telephony.db permissions & owner, (matching the other .db files in the /data/data/com.android.providers.telephony/databases/ folder):

RW-RW----

VERY IMPORTANT:Change the file owner and group back to "radio" from "root". If you do not change the owner and group back after you copy the file back to the /data/data/com.android.providers.telephony/databases/telephony.db path, the phone.apk process will repeatedly crash until it restarts your phone (and your phone will keep rebooting until you delete the telephony.db file that is owned by "root").

If you don't know how to delete the telephony.db file, then you can flash the stock AT&T android Operating System image file to unbrick your phone. There are many tutorials and walkthroughs on this topic on xda developers. This walkthrough is pretty comprehensive:

http://forum.xda-developers.com/show...41&postcount=1
Last edited by ratkiley; 5th January 2015 at 08:20 PM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes