yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] heino69:
question

Hi CazeW,

maybe you can give me a hand...

I'm not sure if I understood the idea of your module correct, therefore a short description of my problem and hopefully you can tell me if (and how) I can use your module for this :D

I'm using a SIM from a subprovider (discounter) from the biggest provider in my country.

Due to the fact that the "internal" table (which MNC belongs to which provider) of my OnePlus 2 (running stock Oxygen 3.1.0) isn't up to date (at least this is my understanding of this problem), I have to enable data roaming, otherwise internet connection is not working...

But with this roaming enabled, some apps are complaining, sync will not work because of roaming costs...

The MNC of the major provider is 01

the MNC of the subprovider is 12

How can configure your module to "fake" my SIM to be part of this 01 MNC?

Thanks in advance!
[Xposed Framework Modules] CazeW:
In your case, you would only need to enable the National roaming option. So, disable roaming in system settings, enable National roaming in the app and toggle flight mode on and off for the changes to take effect.
[Xposed Framework Modules] heino69:
sounds great, but I can't activate national roaming in your app (grayed out).

Data roaming is disabled in system settings (even after reboot with disabled data roaming setting)...

Any hint what I'm doing wrong here?
[Xposed Framework Modules] CazeW:
Ah yeah, I forgot the Oneplus 2 is a dualsim phone. In that case enable Saved roaming, go to Manage saved networks and add the network to the list.
[Xposed Framework Modules] heino69:
wow, GREAT, working now - THANX!!!

But in this case, I don't need to set the national roaming (still grayed out), instead only adding the network to saved roaming for the corresponding SIM is the trick, right?

You just made my day !
[Xposed Framework Modules] CazeW:
Yes, that is enough. National roaming is grayed out atm on dualsim phones just because of GUI design. Saved roaming is like national roaming on steroids, giving more control over the networks. The national roaming setting is the same thing as adding all the networks with the same MCC as the SIM to the Saved roaming list.
[Xposed Framework Modules] droidsmith:
Thank you for sharing this module!

I'm currently running Phronesis n7 ROM on my note 3.

Not sure if you are aware, but supposably all note 7 ports for the note 3 have a connection error when manually connecting to mobile network, which is how I would previously connect in lollipop to my roaming network of choice.

Your module seems to be a great solution, and a vast improvement over how automatic network selection operates.

I'm a little confused. Just to be clear, you haven't had a chance to add the option to force connect to roaming providers?

Thanks again, and great job!
[Xposed Framework Modules] CazeW:
Unfortunately no, I've spent a lot of hours trying to find where and how Android negotiates the connection to a network but so far come out empty handed.
[Xposed Framework Modules] macros3001:
One quick question. I'd like to use the country selection for EU countries.

Do I have to turn roaming ON in phone settings and the app will only allow roaming in the white listed countries or do I turn roaming OFF in phone settings and then it will allow roaming only in white listed countries?

Thx for advice!
[Xposed Framework Modules] CazeW:
Always leave the roaming setting in phone settings on OFF.
[Xposed Framework Modules] bealer:
Fantastic app. Sort of thing that should somehow be part of Android. Really helpful for 3 'Feel At Home' as we travel around a lot.

Tiny thing I couldn't get working. I'm dual sim. Under Saved Networks for a network, MNC is shown as optional in the UI but i always have to specify it for the network to work (was trying to emulate per country roaming).

Might have missed a post, but any further thoughts on putting it up on github or gitlab? Would be great to contribute as I'd like to be able to backup/restore saved networks as I've got quite a few.
[Xposed Framework Modules] CazeW:
If you don't specify a MNC number, the app will check the name of the network and the MCC for the comparison. So if you want to enable roaming on let's say all the 3 networks in UK, you have to name the saved network as '3' (and have the UK MCC number of course).

Haven't put any thought on github but I am working on an update that will save the networks to a file that you can then copy or move to a different phone. Right now your best choice for backup is something like Titanium Backup.
[Xposed Framework Modules] sofamensch:
I have installed version 1.22 on a Huawei G610 (Dual Sim) Mediatek phone and want to use it for the first sim only. However the national roaming does not have an effect. An error to a field occurs repeatedly in the xposed framework. Log attached.

java.lang.NoSuchFieldError: com.android.internal.telephony.gsm.GsmServiceStateTracker#mPhone
[Xposed Framework Modules] CazeW:
Thanks for the report about the error. I've sent you a PM.
[Xposed Framework Modules] Sebastl:
Technical question:

Used National Roaming 0.2 and Roaming Control for quite some time now. Even with Mediatek Duals SIM always working like a charm . Thanks alot at this point !

But now my phone got an Update and it seems com.android.internal.telephony.gsm.GsmServiceState Hooking still works as the Roaming Icon "R" disappears.

But: In order to get mobile data working i have to explicitly activate "Roaming" in the phones settings again with that new Update.

Any idea to track down or debug sth ?

Thanks everybody !
[Xposed Framework Modules] CazeW:
What phone and what Android version are you using? Also, check the log in the Xposed framework app if Roaming Control is throwing any errors and post that log.
[Xposed Framework Modules] Sebastl:
Thx for the ultrafast reply. I wanted to dive a little into the lower levels - thats why i asked this way.

Everything else is running correctly and properly setup without errors.

Blackview BV6000 Android 6.0 Update 20161108

12-07 19:27:23.100 I/Xposed ( 1800): Amplify: Allowing Wakelock NlpWakeLock. Max Interval: 240000 Time since last granted: 1511298

12-07 19:27:46.335 I/Xposed ( 3625): Roaming Control: Network/Whitelist saved roaming set successfully

12-07 19:28:12.954 I/Xposed ( 3625): Roaming Control: Network/Whitelist saved roaming set successfully

12-07 19:28:58.782 I/Xposed ( 3625): Roaming Control: Network/Whitelist saved roaming set successfully

12-07 19:29:03.039 I/Xposed ( 3625): Roaming Control: Network/Whitelist saved roaming set successfully

Thats the cleaned log of deactivating WiFi, switching of Roaming, changing APN, and switching on Roaming again. No errors present.

Additional hint: other users complaining about the handover from WiFi to MobileData defunctional.

They changed the radio in that update.

Techsavy and willing to search ;)
[Xposed Framework Modules] CazeW:
Like you said, the app seems to be working correctly as the R icon is disappearing as well. It's a strange bug as when the R disappears, the phone is thinking that you're on a home network so you shouldn't need to enable the roaming setting. Unfortunately I don't know how to debug it as the problem seems to be in that update/ROM.
[Xposed Framework Modules] Sebastl:
Thanks for explaining your side.

I started from zero: The result from the +AT CREG Command is 5 as expected (logged in, roaming)

Android Dev Docs of GsmServiceStateTracker say:

/**

* Since the roaming state of gsm service (from +CREG) and

* data service (from +CGREG) could be different, the new SS

* is set to roaming when either is true.

*

* There are exceptions for the above rule.

* The new SS is not set as roaming while gsm service reports

* roaming but indeed it is same operator.

* And the operator is considered non roaming.

*

* The test for the operators is to handle special roaming

* agreements and MVNO's.

*/

But when youre hooking the PollStateDone that part shouldnt matter.

Before i write to much: Own Thread ? ;)
[Xposed Framework Modules] CazeW:
I don't mind you posting your findings here but you might get more help/tips having it in an own thread.
[Xposed Framework Modules] Sebastl:
Okay then i got a question: i just checked Omas National Roaming 0.2 src which actually just sets newSS.setRoaming(false) in PollStateDone

In Android 6 it seems it is split up into mNewSS.setVoiceRoaming(true) And mNewSS.setDataRoaming(true)

Are you setting both to false ? That would be a possibility
[Xposed Framework Modules] CazeW:
On Android 6 and later, setRoaming() sets both the setVoiceRoaming() and setDataRoaming() to the value you give it.

This is the code from ServiceState.

public static final int ROAMING_TYPE_NOT_ROAMING = 0;
public static final int ROAMING_TYPE_UNKNOWN = 1;

public void setRoaming(boolean roaming) {
mVoiceRoamingType = (roaming ? ROAMING_TYPE_UNKNOWN : ROAMING_TYPE_NOT_ROAMING);
mDataRoamingType = mVoiceRoamingType;
}
[Xposed Framework Modules] Sebastl:
Hupps, i somehow oversaw that allocation.sorry
[Xposed Framework Modules] restNow:
National roaming on dual-SIM phones

Fort of all, thank you CazeW for this great xposed module! Thank you for your time working on it!

I have a question: what exactly do i have to do if i want to enable national roaming on a dual-SIM phone?

If i understand it correctly i have to enable "Saved network roaming" with Roaming type "Network mode" and then at "Manage saved networks" add all networks which my phone uses for national roaming, correct?

Do i have to add them all manually? Because i don't know all the exact names of all networks it could connect to... is there a way to add all networks from my home country in this list without knowing all names?

thank you :)
[Xposed Framework Modules] CazeW:
That is correct. Unfortunately adding them manually is currently the only way. You don't need to know the names if you know their MNC values, not that it makes it a lot easier though. The easiest way is probably to add the networks when you notice that you've connected to a new one.
[Xposed Framework Modules] restNow:
Oh! I didn't know that it is possible to add it via MCC + MNC without name...

I found a list of all MNC values available in my country, so adding it via MCC + MNC may be a better option for me, thank you very much! And thank you for your super-quick reply! :)

---------- Post added at 10:41 AM ---------- Previous post was at 10:32 AM ----------

I just noticed, that i have to specify a name, even if i fill out MCC + MNC. Otherwise it wont let me add the network...

Does it matter, if the name is not 100% correct? Or will it be ignored, if MCC + MNC match?
[Xposed Framework Modules] CazeW:
The app will first compare the MCC + MNC values and if it can't find a match that way, then it will compare the name.
[Xposed Framework Modules] restNow:
OK, thank you very much! :)
[Xposed Framework Modules] CazeW:
I need beta testers for a new version of the app as I don't currently have a device where I can use Xposed. The whole app is almost completely rewritten from scratch. Need people with regular and dual sim phones (running at least Lollipop). Toss me a PM if you're interested.
[Xposed Framework Modules] CazeW:
So people don't want a nicer UI, proper dual-sim support, import/export possibility of network/country lists and future-proofing for Nougat (if we ever get Xposed on Nougat). Oh well. ¯\_(ツ)_/¯
[Xposed Framework Modules] CazeW:
Beta version added to OP and repository.
[Xposed Framework Modules] ccurak:
Hello,

i just found your app today and it was the thing i needed. So i installed from repository site 1.5 version and it didnt work for me, and i came here to ask why.

Then i saw the old version 1.22 and installed it, and it works as it should.

So i think there is something wrong with new version, non beta should be also added to repository download site.

My phone cubot x9 miui 8

Thank you for this app, it helps alot.
[Xposed Framework Modules] CazeW:
Thanks for letting me know that it isn't working. A log from the installer (or logcat) would have helped me to determine why it isn't working but this helps too. The older version is also in the repository, you just have to click on the "show older versions".
[Xposed Framework Modules] CazeW:
Beta 2 is up. Hopefully fixing the problem from beta 1.
[Xposed Framework Modules] thegag:
Thanks for your work!

My question: I live in Germany near to the border of France. Many times the signal of the french networks are stronger than the german. As soon as my phone choses the french it will not go back to the germans. Is there a posibillity that my phone will not choose the french networks automatically (whitelist/blacklist networks)?

Thanks for your help.
[Xposed Framework Modules] CazeW:
With this app, unfortunately no. Only way to stop it from switching is that you manually select your German network in the phone settings instead of automatic selection.
[Xposed Framework Modules] garzel14:
What does this app do then, if it doesn't stop roaming?
[Xposed Framework Modules] CazeW:
It makes the phone think the roaming network is your home network, removing the roaming icon and allowing you to use data without needing to toggle roaming on in system settings. I made it originally as I have a subscription that I can use in several countries like I was at home and my phone didn't show the connection speed while roaming.
[Xposed Framework Modules] apache04:
Hi!

I had been using V1.22 for quite some time to hide the R icon, and it worked really well. But now all of a sudden, it stopped working. The R icon doesn't go away, no matter what setting I use. I've tried reinstalling and everything with no avail. Any ideas?

Device: OnePlus One

OS: CM13 by Jgcaap
[Xposed Framework Modules] CazeW:
Is the app enabled in the xposed installer? And have you tried the 1.50beta2? I also need either the logcat or the log from the xposed installer to be able to determine what's wrong. Try clearing the data for the app, enabling saved roaming and adding your network and toggling flight mode on and off. If it still doesn't work, send me one of those logs.
[Xposed Framework Modules] Droidphilev:
Hmm, what if he adds france as blacklisted country? It should not go on a French network or am i that wrong? I used your apps many times while travelling at sea just to block the onboard network.
[Xposed Framework Modules] CazeW:
It doesn't block the phone from connecting to that/those networks. The phone can and might still connect to them in automatic mode, but it blocks the phone from thinking that any of those networks is its home network. In other words, it will put the phone in roaming mode.
[Xposed Framework Modules] Droidphilev:
Strange, it worked for me in the past. I whitelisted all countries that i visited except the onboard network. I never had a signal on board while using your app. I even reported this amazing feature in the past here:

https://xdaforums.com/showpost.php?p=67653041&postcount=77
[Xposed Framework Modules] CazeW:
Well, technically it shouldn't stop the phone from connecting to that onboard network, it should just stop it from using data on that network. So it's either a happy coincidence or the app has a hidden feature that even I didn't know of. :D
[Xposed Framework Modules] Droidphilev:
Lol, ok. If all goes well it will be in june that i test it again. Will report ;)
[Xposed Framework Modules] FNetV1:
I have a little problem here, I am under sprint and their tower on my neighborhood seems to be under performing with 4G LTE connection speeds of 0.50 Mbps download and 0.01 Mbps upload, it's been this way since like 2 months ago and this is frustrating as I use a VoIP app to make and receive calls and the connection speeds goes so low that it appears my VoIP connectivity, not only that, but sometimes streaming audio via Tunin radio or playing a YouTube video seems to be buffering alot. Before I used to solve this kind of problems by going to network selection and changing from "Automatic" to "Roam Only" way back in the days to force the phone to connect to a network Sprint has a roaming agreement with, today I am using a Moto G3 (2015) XT1548 CDMA variant and just found out "Roam Only" is missing from that list. My objective is to force my phone to roam on Verizon in order to get acceptable network performance until I wait for Sprint to fix their broken towers here. I installed the OP's Xposed module and I tried everything. Including switching force roaming and even manually adding vzwinternet MCC: 310 MNC: 12 under the module's whitelist area and switching on white list only and my MotoG3 still connects to Sprint, so no dice.

Any ideas how I can forcey phone to Roam Only in the time being? Or perhaps I am using the wrong module to accomplish the task, if so any recommendations?

ROM that I am running: Stock Rooted Marshmallow 6.0.1

Thanks!
[Xposed Framework Modules] CazeW:
This module won't accomplish that. What Force Roaming does is that you can for example make the phone think that you're roaming while you're on your home network. It's mostly for stopping the phone from thinking it's on a home network when it's in fact roaming. The only thing this app would do for you is that when you connect to Verizon, it could get rid of the R roaming icon.

You could try just manually selecting the Verizon network from the network list in phone settings.
[Xposed Framework Modules] FNetV1:
Oh ok thanks for the clarification. Network list is another problem I am having, it seems to be grayed out in my phone and when I installed an app to give me a direct shortcut to it, it stays "Searching for Network" perpetually.

There was an app called "Roam Control" that used to do this but the Dev seems to have gone out of business and its no longer available. There has to be another app or an Xposed module that can make the phone force to Roam Only mode.
[Xposed Framework Modules] EuGenGer:
Hello, is the app without root rights and xposed not usable?
[Xposed Framework Modules] CazeW:
The app requires root and xposed.
[Xposed Framework Modules] Sebastl:
Hey Caze, just saw the betas and your support requests. If you still need someone with a dualsim for testing/debugging you can count on me. Android 6/xposed/root
[Xposed Framework Modules] CazeW:
It would be great if you could test the 1.50beta2 and report back if it is working as it should. Because at the moment I have no way to confirm it myself, so I can only assume it's working because nobody is reporting otherwise.
[Xposed Framework Modules] michaelvue:
Fix this on ls665. Even with force roaming on it doesnt roam. Want to roam on verizon instead on Sprint since i literaly have 0 bars on sprint.
[Xposed Framework Modules] CazeW:
This app doesn't force the phone to connect to a network over another. If you use Force Roaming on Verizon and connect to it, the phone will display the roaming icon for you and make the phone think it's roaming. If you used Saved Roaming on Verizon, it will remove the roaming icon and make the phone think you are on a home network. In neither of these situations though will it make Verizon the more preferred network over Sprint.
[Xposed Framework Modules] Sebastl:
Hey Caze. Sorry it took so long but i waited until i drove abroad to verify my findings.

To sum it up: It is strange ;)

Running v1.22 smoothly with a DualSim Android 6 Phone with latest Magisk/Root and Xposed. Allow Data Roaming is activated to exclude potential errors from my maybe buggy Radio ( See a few pages before)

My SIM1 Telco is an MVNO operating with card MNC 07 on a MNC 03 network

RC 1.5 correctly reads the network operators name but shows MNC 7 when i try to add it under "manage saved networks". If i try to manually edit it to 3 it throws an error " you already have a network with same Name and mcc"

SIM2 is from the neighbour country and also has a SIM MNC of 07 and roams on a 05 Network. v1.5 again shows 07 and throws the same error while editing.

The roaming "r" therefore never disappears.

My guess: did you mix up getSimOperator() and getNetworkOperator() ?

Afterwards i tried the Country Mode cause i thought relying on MCC only should work then - but strangely it didnt for me. Flight mode on/off

Ticking "Match mnc names" also didnt make a change.

The Design is awesome, very clear and self explaining. I like it very much !!!

(Maybe) one minor thing: In "settings" within the "manage saved networks" nothing changes if i tick country or name

And now finally the relevant xposed Log parts (multiple entries cleaned):

osed ( 3986): RoamingControl: hooked com.android.internal.telephony.gsm.GsmServiceStateTracker.pollStateDone

03-29 14:23:53.761 I/Xposed ( 3986): RoamingControlOperator networkNameShort, networkNameLong or networkNumeric is empty

03-29 14:23:54.906 I/Xposed ( 3986): RoamingControlOperator networkNameShort, networkNameLong or networkNumeric is empty

03-29 14:23:58.304 I/Xposed ( 3986): RoamingControlSIM operator not found RoamingControlOperator networkNameShort, networkNameLong or networkNumeric is empty
[Xposed Framework Modules] CazeW:
Thank you, this is exactly the kind of feedback I needed. Currently traveling but I'll take a look at this as soon as I get back home.
[Xposed Framework Modules] CazeW:
Stable 1.50 is finally done and up, read changelog.
[Xposed Framework Modules] toBsucht Psp:
After enable your modul (API23, v87-arm64) my device do not show a R for natinal roaming but data doesn´t work anymore.

It even doesn´t work if i enable data roaming. Sadly i have to disable the modul and reboot till my data conection works again. Guess i have to check the setup.

Getting it well tuned would be fine, here close to boarded!

Btw i also installed previous version without more success but dual sim support in 1.5 seems to work flawless ;)

Any recomanded tutorial / video for noobs?
[Xposed Framework Modules] CazeW:
That is quite strange. If the R is disappearing, the module is working like it should but can't explain why data stops working. Send me logcat and the xposed logs from after the R disappears.