[MOD] [FIX] Remove roaming on home network

32 posts
Thanks Meter: 13
By kezmdor, Member on 19th September 2015, 11:15 PM
Post Reply Email Thread
This fix is based on the work of wmn79, his thread concerning this issue can be found here: http://forum.xda-developers.com/goog...twork-t2969702
Backup your system!
This fix works for me and I share this with you. I am not responsible for any damage to your phone or any data loss you encounter.

When connecting to home mobile network you have to enable data roaming in order to get data working.

Your mobile provider is using different MNC numbers which are not recognized by Android as a non roaming network.

According to wmn79's thread we can fix this by modding the framework-res.apk of Android. He mentions in his thread to push the modified apk with custom recovery update.zip. As I want to stay on stock rom this is no solution for me and fortunately there is a way without custom recovery.
  • Root your phone. I am on stock 090915 (OTA) and it came pre-rooted. All I need to do was installing SuperSU from Playstore.
  • Copy framework-res.apk from /system/framework to your computer
  • Install apktool (http://ibotpeaches.github.io/Apktool/install/)
  • Install framework: "apktool if framework-res.apk"
  • Decompile framework-res.apk: "apktool d framework-res.apk"
  • Edit/Create Files in created framework-res folder (details below)
  • Compile framework-res.apk: "apktool b -c framework-res"
  • Copy the modded framework-res.apk (It is inside the framework-res/dist folder) to the Downloads folder of your phone. Do not copy it directly to the /system/framework folder!
  • Use your favorite file explorer (I use ES File Exporer), mount /system read/write and move the framework-res.apk from your Downloads folder to /system. Again, do not move it to /system/framework folder!
  • Inside the /system folder check and correct the permissions of the file, it should be rw-r--r-- and should belong to root:root.
  • Now you should move (do not use copy!) the file from the /system folder to /system/framework
  • Shortly after this is done on my phone several Google services and apps were killed, just for your information. They work again without problems after a reboot.
  • Reboot your phone
The process of moving the framework-res.apk to the /system/framework folder is for example in this video: https://www.youtube.com/watch?v=SbjQcFpt39k

So you know how to install the mod, but what is it about? When you decompiled the framework-res.apk there is a folder named "res" inside of the folder "framework-res". In this folder you have to create a new one with the mnc and mcc numbers from your apn settings. I describe this on the example of O2 in Germany. O2 has mcc 262 and mnc is 07. The folder to create is "values-mcc262-mnc07" inside this folder create a file named "arrays.xml". Actually I just copied the hole thing from another folder and edited it to the following contents:
<?xml version="1.0" encoding="utf-8"?>
    <string-array name="config_operatorConsideredNonRoaming">
The item consists of the mcc and mnc number of the network which can be used without roaming. In this example this is the former E-Plus network which is merged with the O2 network. E-Plus network has mcc 262 and mnc 03. I got the information regarding mcc and mnc numbers from this site: http://mcclist.com/mobile-network-co...ntry-codes.asp
There can be more than one item in the string-array list.

I have done this, tested it and for me it's working perfectly. You can find my framework-res.apk attached if you are on O2 as well. If you are on a different network and got stuck on my explanation just give me the mcc and mnc numbers and I provide you with a framework-res.apk. As the framework-res.apk is tight to the ROM this will only work if you are on stock 090915.

Using a framework-res.apk which is not for your ROM can end in a bootloop!

Attached Files
File Type: zip P8000_stock090915_framework-res.zip - [Click for QR Code] (6.64 MB, 246 views)
The Following 9 Users Say Thank You to kezmdor For This Useful Post: [ View ] Gift kezmdor Ad-Free
20th September 2015, 04:34 PM |#2  
neonero's Avatar
Thanks Meter: 15
I follow this fix and i have no more "R" on both sim "Virgin" and "Free" FR.
20th September 2015, 05:54 PM |#3  
OP Member
Flag Dorsten
Thanks Meter: 13
Originally Posted by neonero

I follow this fix and i have no more "R" on both sim "Virgin" and "Free" FR.

I am happy I could help and appreciate the feedback.
The Following User Says Thank You to kezmdor For This Useful Post: [ View ] Gift kezmdor Ad-Free
31st December 2015, 02:37 AM |#4  
Stefan Gündhör's Avatar
Senior Member
Flag Hinterholz 8
Thanks Meter: 5,769
Solution for Eragon-ROM users with carrier HoT (Austria) can be found here: http://forum.xda-developers.com/show...postcount=3438

The attached .zip contains all the changes that I performed to the framework-res.apk inside the res-folder, so If you use a different ROM and/or a different ROM version, you might just patch YOUR framework-res with the same files.

By the way, I also had to wipe cache/dalvik in recovery before the changes were detected by the ROM.

2nd April 2016, 08:41 AM |#5  
Junior Member
Thanks Meter: 0
Is it possible to do this for P9000?
3rd April 2016, 07:46 AM |#6  
skeleton1911's Avatar
Senior Member
Flag münster
Thanks Meter: 14,795
Donate to Me
Originally Posted by Qhris

Is it possible to do this for P9000?

yes it is
. in 3 weeks i will have also a p9000
so developing will be ........
The Following User Says Thank You to skeleton1911 For This Useful Post: [ View ] Gift skeleton1911 Ad-Free
5th April 2016, 09:07 PM |#7  
richardsoffice's Avatar
Senior Member
Flag Ipswich
Thanks Meter: 45
Originally Posted by skeleton1911

. in 3 weeks i will have also a p9000
so developing will be ........

looking forward to getting my 9000 light as well.
15th April 2016, 09:57 PM |#8  
Junior Member
Thanks Meter: 0
18th September 2016, 10:19 PM |#9  
Junior Member
Thanks Meter: 0
Thanks very much - worked very fine for me with Telering.

folder "res/values-mcc232-mnc7"

<?xml version="1.0" encoding="utf-8"?>
<string-array name="config_operatorConsideredNonRoaming">
Post Reply Subscribe to Thread


Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes