[Xposed] [EXPERIMENTAL] National Roaming

Search This thread

oma

Member
Sep 22, 2005
38
43
Do you need to enable data roaming to get a connection even in your home network? If so, you probably know the hassle this causes when you travel abroad, or live near the border where your phone can sometimes log into another network. You have to disable data roaming every time, and if you forget, you'll get an unpleasant surprise on your next phone bill.

Maybe you know CyanogenMod's "National Roaming" feature that enables roaming only in your home country, so you don't have to disable roaming manually when you leave the country. I've used this in the past and got used to it, so much that having to live without it would annoy me a lot.

Since I just got a new phone for which CyanogenMod isn't available, I wrote an Xposed module which mimics this feature. My new phone happens to be an MTK6589 dual SIM device (Tronsmart TS7), so I also added support for the dual SIM modifications MediaTek made.

It's in a very early stage and mostly untested. It "works" insofar as the roaming icon is gone and I get a data connection without enabling roaming. I don't know if it properly detects when you're really roaming. It should, but I can't test it for now since I don't live near the border and don't have a working foreign SIM. If somebody could test whether it actually works, that would be greatly appreciated!

Requirements:
Xposed Framework
It *should* work on any Android version Xposed runs on, but so far I've only tested it on my TS7's stock 4.2.1.

Play Store?
I intend to publish it there as well, but only after it has been a bit more thoroughly tested and enough people reported that it works and doesn't cause any issues.

Source code:
https://github.com/leromarinvit/NationalRoaming

Version history (old versions here):
v0.2 - 2013-08-29 - fix Android 4.3 compatibility
v0.1 - 2013-08-25 - initial release

Technical details:
The module works by hooking pollStateDone() in com.android.internal.telephony.gsm.GsmServiceStateTracker. This function notifies listeners when the roaming state changes. So to fake the roaming state everything else sees, we only have to change it before this function is called. The logic is simple: We're roaming if and only if the MCC (mobile country code - first three digits of the numeric operator id) stored on the SIM and provided by the network differ.

In the past, I've manually patched framework.jar for some ROMs for my device and some others, by modifying isRoamingBetweenOperators()* to follow the same logic as this module. With Xposed available now, writing this as a module seems like a much cleaner solution that will work on many more devices than one could reasonably maintain manually, and with much less effort.

* I initially tried to hook this function with Xposed. However, this didn't work, because while the function exists in MediaTek's stock ROM, it never seems to be called.
 

Attachments

  • NationalRoaming-0.2.apk
    241.1 KB · Views: 45,264
Last edited:

robspr

New member
Apr 20, 2011
1
0
I tried you module, but it doesn't work for me. I still have to enable "roaming" to get a data connection. The app "phono" shows "roaming" if I use a national roaming provider.

My network operator is "three austria", using only 3G (UMTS) networks but allows national roaming on the 2G network of "t-mobile austria". My phone is a Nexus 4 with stock rom (Android 4.3) , the XPosed framework works for XPrivacy, MaDaCo Toolkit and NFC LockScreenOff Enabler.

Can I help to find a solution?

Edit: Thanks for your dev version, works great for me now.
 
Last edited:

Lion_1

Senior Member
Jan 6, 2011
94
22
Thank you very much, oma, for this great little module --> this is really useful for me...!
 

oma

Member
Sep 22, 2005
38
43
Was anyone able to actually test it yet, either by roaming onto a foreign network, or popping in a foreign SIM?
 

coolnessQ

Senior Member
Aug 8, 2012
955
295
28
Rotterdam
Aaahw why didnt you post this 4 weeks back :(

Than my bills for my vacation were lower...

Verstuurd van mijn GT-I9505
 

Lion_1

Senior Member
Jan 6, 2011
94
22
Was anyone able to actually test it yet, either by roaming onto a foreign network, or popping in a foreign SIM?
Yes, for me its works perfect.
I have national roaming, and the "R" sign is gone -> so i can switch off the data roaming, which is much safer....
Thanks again.
 

neugieriger

Member
Aug 23, 2007
5
2
Linz
I'm living in Austria using Hutchinsons Network "3". Yesterday I tested your module near the Czech Republic and it works perfect!

With data roaming disabled data transfer in the czech network did not work (as expected) but swiching between "3"'s austrian 2G-networks works fine.

Congratulation, great work. Let us know when we can find your program in google's play store.

Sent from my Mobistel Cynus T5 using xda app-developers app
 

oma

Member
Sep 22, 2005
38
43
That's good to hear! Before I put it on the Play Store, I want to add an activity that does some sanity checks (is Xposed installed? enabled? module enabled?) and tells the user what to do if anything isn't set up correctly so I don't get loads of "I installed this and it doesn't do anything, there's not even a launcher icon!!!1" comments.
 

victorharsh

Senior Member
Nov 1, 2011
456
150
Many thanks, it's suppose to working fine in my MTK6589 device, roaming R sign is gone, I will report some more results after a week when I am roaming in other state.

Sent from my Q800 using xda app-developers app
 

maphin1974

Member
Oct 12, 2010
9
0
Help me ! how to mod in casio gzone 201L! im not acept call in! thanks! english my bad. Sorry.

Sent from my HTC Butterfly using Tapatalk 2
 

oma

Member
Sep 22, 2005
38
43
Help me ! how to mod in casio gzone 201L! im not acept call in! thanks! english my bad. Sorry.

You can't receive incoming calls any more? This definitely shouldn't happen, and is a major bug. Thanks for catching this! Does the problem go away when you disable National Roaming or Xposed?

Edit: This seems to be a combined GSM/CDMA/LTE device, correct? Which of the radios are you using, i.e. what's your provider and which network type is it?
 
Last edited:

bubblegum77

New member
May 12, 2011
3
0
Difference with GravityBox Implementation ?

Hi,

Thanks a lot for this module, it was on my todo-list for months.
Could you explain me quickly the differences with GravityBox's implementation ?
It seems to me that theirs lake per-SIM handling, am I right ?

Corresponding commit in GravityBox is :
https : // github.com/C3C0/GravityBox/commit/1df00a88d7c9692e5c13b0d82c9fe12c011f3eae

Thanks anyway for your work.
 

oma

Member
Sep 22, 2005
38
43
My device is GSM LU+ of Korea, I'm used in Vietnam.

So you have a Korean SIM, but are currently in Vietnam, right? Which provider are you roaming on, do you know which technology it uses (GSM/UMTS or CDMA)? CDMA could potentially be a problem with the current implementation. But the most important question is still: Does the problem go away if you disable National Roaming?

Hi,

Thanks a lot for this module, it was on my todo-list for months.
Could you explain me quickly the differences with GravityBox's implementation ?
It seems to me that theirs lake per-SIM handling, am I right ?

Corresponding commit in GravityBox is :
https : // github.com/C3C0/GravityBox/commit/1df00a88d7c9692e5c13b0d82c9fe12c011f3eae

Thanks anyway for your work.

That's cool, I haven't seen this yet. Thanks! The biggest differences seem to be that GravityBox only supports 4.2+ (or at least it did last time I checked), but the implementation looks cleaner. It should support MTK dual SIM as well (the "Gemini" stuff).
 
Last edited:

mercurio.

Senior Member
Mar 31, 2011
119
43
Do you need to enable data roaming to get a connection even in your home network? If so, you probably know the hassle this causes when you travel abroad, or live near the border where your phone can sometimes log into another network. You have to disable data roaming every time, and if you forget, you'll get an unpleasant surprise on your next phone bill.

Maybe you know CyanogenMod's "National Roaming" feature that enables roaming only in your home country, so you don't have to disable roaming manually when you leave the country. I've used this in the past and got used to it, so much that having to live without it would annoy me a lot.
...

.

thanks a lot. works great on x68 Razr i !!
 

J0s3f

Senior Member
May 24, 2010
63
13
On my Sony Xperia Z LTE is not working with the module activated :crying:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 41
    Do you need to enable data roaming to get a connection even in your home network? If so, you probably know the hassle this causes when you travel abroad, or live near the border where your phone can sometimes log into another network. You have to disable data roaming every time, and if you forget, you'll get an unpleasant surprise on your next phone bill.

    Maybe you know CyanogenMod's "National Roaming" feature that enables roaming only in your home country, so you don't have to disable roaming manually when you leave the country. I've used this in the past and got used to it, so much that having to live without it would annoy me a lot.

    Since I just got a new phone for which CyanogenMod isn't available, I wrote an Xposed module which mimics this feature. My new phone happens to be an MTK6589 dual SIM device (Tronsmart TS7), so I also added support for the dual SIM modifications MediaTek made.

    It's in a very early stage and mostly untested. It "works" insofar as the roaming icon is gone and I get a data connection without enabling roaming. I don't know if it properly detects when you're really roaming. It should, but I can't test it for now since I don't live near the border and don't have a working foreign SIM. If somebody could test whether it actually works, that would be greatly appreciated!

    Requirements:
    Xposed Framework
    It *should* work on any Android version Xposed runs on, but so far I've only tested it on my TS7's stock 4.2.1.

    Play Store?
    I intend to publish it there as well, but only after it has been a bit more thoroughly tested and enough people reported that it works and doesn't cause any issues.

    Source code:
    https://github.com/leromarinvit/NationalRoaming

    Version history (old versions here):
    v0.2 - 2013-08-29 - fix Android 4.3 compatibility
    v0.1 - 2013-08-25 - initial release

    Technical details:
    The module works by hooking pollStateDone() in com.android.internal.telephony.gsm.GsmServiceStateTracker. This function notifies listeners when the roaming state changes. So to fake the roaming state everything else sees, we only have to change it before this function is called. The logic is simple: We're roaming if and only if the MCC (mobile country code - first three digits of the numeric operator id) stored on the SIM and provided by the network differ.

    In the past, I've manually patched framework.jar for some ROMs for my device and some others, by modifying isRoamingBetweenOperators()* to follow the same logic as this module. With Xposed available now, writing this as a module seems like a much cleaner solution that will work on many more devices than one could reasonably maintain manually, and with much less effort.

    * I initially tried to hook this function with Xposed. However, this didn't work, because while the function exists in MediaTek's stock ROM, it never seems to be called.
    4
    Here it is. Show/hide the icon via Xposed Installer
    PROCESS_OUTGOING_ CALLS removed.
    Application settings must be configured after installation.

    Tom
    2
    Your module saved me from a lot of trouble, thank you. I do however have a few requests for added functionalities. First one would be to be able to hide the app from the application drawer. The second would be instead of using the European union Roaming Like At Home (RLAH) mode, would it be possible to have a button that would add the current network to a list of networks that you want to be able to use without roaming?

    Here is an update as per the first request. The application can hide by option in settings dialog.
    Unhide can be done by calling ##### (5 times #) at keypad and then calling that.
    That is why
    <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />

    Hide and unhide can take up to 5 seconds to propagate in android.

    Tom
    2
    Ok, I see. Is your module in addition to the one from the threadstarter or not?

    It is alternative with improvements. Use one or the other.
    1
    Aaahw why didnt you post this 4 weeks back :(

    Than my bills for my vacation were lower...
    Ouch :(. I'm afraid I can't offer anything but my sympathy... 4 weeks ago I was still using CM10 on my old phone, so I didn't need it...