[MOD] [FIX] Remove roaming on home network

Search This thread

kezmdor

Member
Oct 17, 2010
32
12
Dorsten
Disclaimer:
This fix is based on the work of wmn79, his thread concerning this issue can be found here: http://forum.xda-developers.com/goo...od-loose-roaming-r-mvno-home-network-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.

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

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

Fix:
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:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="config_operatorConsideredNonRoaming">
        <item>26203</item>
    </string-array>
</resources>
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-codes-country-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.

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


Cheers
 

Attachments

  • P8000_stock090915_framework-res.zip
    6.6 MB · Views: 251
Last edited:

Stefan Gündhör

Senior Member
Oct 24, 2011
2,368
5,748
Hinterholz 8
Solution for Eragon-ROM users with carrier HoT (Austria) can be found here: http://forum.xda-developers.com/showpost.php?p=64570843&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.

:)
 
Last edited:

tirolerstefan

New member
Sep 18, 2016
1
0
Thanks very much - worked very fine for me with Telering.

folder "res/values-mcc232-mnc7"

arrays.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="config_operatorConsideredNonRoaming">
<item>23203</item>
<item>23204</item>
<item>23205</item>
<item>23207</item>
<item>23210</item>
<item>23214</item>
<item>23216</item>
</string-array>
</resources>
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Disclaimer:
    This fix is based on the work of wmn79, his thread concerning this issue can be found here: http://forum.xda-developers.com/goo...od-loose-roaming-r-mvno-home-network-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.

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

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

    Fix:
    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:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <string-array name="config_operatorConsideredNonRoaming">
            <item>26203</item>
        </string-array>
    </resources>
    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-codes-country-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.

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


    Cheers
    1
    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.
    1
    Is it possible to do this for P9000?

    yes it is :)
    btw
    . in 3 weeks i will have also a p9000 :D
    so developing will be ........:p