mroczis / netmonster-core

Android Telephony SDK bridge with some additional features
Apache License 2.0
334 stars 71 forks source link

CA Detection Issue (Mi 11 Ultra Global/Europe) #16

Open Blykam opened 3 years ago

Blykam commented 3 years ago

Hi,

I use the Netmonster App since a long time, but now since I have my new phone it does not work properly as it should. My Mi 11 Ultra is on MIUI 12.5.3 Android 11. At home I have 2CA B1+20 from o2 Germany, but the app does not recognize it like with my old phone properly does.

I noticed that the system app phone info has wrong download and upload values, too. (Already told the MIUI Rom Developers) I suspected that the current ROM of my phone sends wrong readouts, but today I traveled to another city and could read 2CA of B7+20 just fine. The speeds are as expected and LTE+/4G+ icons are there.

Maybe it's also an issue with Netmonster Core. Idk.

Blykam commented 3 years ago

I cross-tested with a SIM of Deutsche Telekom in my Mi 11 Ultra. It seems to detect properly all the time. O2 - de sadly only on B7+B20. The readouts look exactly the same between o2 and DT, so I guess it is a problem of Netmonster not Interpreting correctly? I don't really know where to start.

Blykam commented 3 years ago

To further clarify: Netmonster shows "LTE-A xxxx", but not the other cells on o2 - de. It just works on 2600+800. Telekom and Vodafone work fine. image

Blykam commented 3 years ago

So I tested with a Vodafone.de SIM again and it seems the readout issue is also present here. Probably Telekom, too, but I cannot test that at the moment. I don't have the necessary CA stations here. So the bug is at least reproducable for B1+B20 on the Mi 11 Ultra. My other phone the Mi 9T Pro works fine over all combinations, though. image

Blykam commented 3 years ago

@mroczis Is there a way to send you debug info from NetMonster that maybe tells you more about the issue?

mroczis commented 3 years ago

Detection is based on some officially not published metadata. It works flawlessly on some phones, yet on others it's a bit sketchy. The other factor that comes into the game is carrier-specific configuration. Some manufacturers enable only certain combinations of CA per carrier, behaviour you described could explain the reason why NetMonster works this way. But according to this website https://cacombos.com/device/M2102K1G your device should be able to connect to such combos.

Blykam commented 3 years ago

Detection is based on some officially not published metadata. It works flawlessly on some phones, yet on others it's a bit sketchy. The other factor that comes into the game is carrier-specific configuration. Some manufacturers enable only certain combinations of CA per carrier, behaviour you described could explain the reason why NetMonster works this way. But according to this website https://cacombos.com/device/M2102K1G your device should be able to connect to such combos.

Yes. It supports it and also connects to both. I verified this by speedtesting and with other phones where I can lock the bands and get the same speeds.

I can't share a video on here, but in the phone info screen, where you can see the Physical Channel Config, the config disappears a lot. I assume it is a ROM bug and I already reported it to MIUI Devs. Inkedphoto_2021-06-28_10-54-39_LI photo_2021-06-28_10-54-42

Nevertheless Netmonster seems to catch all the other CA Combos just alright for example 900 + 1800 + 2100. I also noticed it seemed to work once or twice with 800 + 2100, too, but only for a few moments, before disappearing again.

I can provide you Diag-Logs if that would help you.

mroczis commented 3 years ago

PhysicalChannel is unfortunately not accessible for developers for a while. You can see it in Phone Info as you noted but it's buggy. It's not your ROM issue but generally AOSP issue. There were multiple attempts not only from my side to make it public but Google engineers do not feel like we should have access to it. Related issues are : https://issuetracker.google.com/issues/188565322, https://issuetracker.google.com/issues/182811458#comment8.

Blykam commented 3 years ago

Oh that's quite sad, but still thanks for the info. Maybe with Android 12 it works as expected again.

Blykam commented 3 years ago

Detection is based on some officially not published metadata. It works flawlessly on some phones, yet on others it's a bit sketchy. The other factor that comes into the game is carrier-specific configuration. Some manufacturers enable only certain combinations of CA per carrier, behaviour you described could explain the reason why NetMonster works this way. But according to this website https://cacombos.com/device/M2102K1G your device should be able to connect to such combos.

Yes. It supports it and also connects to both. I verified this by speedtesting and with other phones where I can lock the bands and get the same speeds.

I can't share a video on here, but in the phone info screen, where you can see the Physical Channel Config, the config disappears a lot. I assume it is a ROM bug and I already reported it to MIUI Devs. Inkedphoto_2021-06-28_10-54-39_LI photo_2021-06-28_10-54-42

Nevertheless Netmonster seems to catch all the other CA Combos just alright for example 900 + 1800 + 2100. I also noticed it seemed to work once or twice with 800 + 2100, too, but only for a few moments, before disappearing again.

I can provide you Diag-Logs if that would help you.

I noticed that on my other phone in LTE Config "mContextIds" and "mPhysicalCellId" aren't *** or [] values. They have meaningful info. Could that be a ROM Issue? @mroczis

Blykam commented 3 years ago

/**

What could cause the redaction of all cell location info?

Blykam commented 3 years ago

Today my other phone - a Mi 9T Pro - got MIUI 12.5 and Android 11. So I tested if it also has this bug now and voila: The same bug is present on there now, too. Strange enough, one of my friends uses a Samsung Galaxy S21 Ultra with Android 11 and does not have this bug at all. It seems to lie somewhere in the MIUI 12.5 and Android 11 Combo.

Blykam commented 3 years ago

PhysicalChannel is unfortunately not accessible for developers for a while. You can see it in Phone Info as you noted but it's buggy. It's not your ROM issue but generally AOSP issue. There were multiple attempts not only from my side to make it public but Google engineers do not feel like we should have access to it. Related issues are : https://issuetracker.google.com/issues/188565322, https://issuetracker.google.com/issues/182811458#comment8.

Oh no. I understand the real problem now. Android 11+ sucks for API access. I guess Netmonster is half-broken for the time being on phones with 11+. Hopefully proper API access will come back in some future version.

mroczis commented 3 years ago

Physical Channel is not accessible since Android 11, hence there's no way to use it to improve cell info.

Blykam commented 3 years ago

@mroczis Since the latest Netmonster update a few days ago, the CA detection seems to work again somewhat. Weird enough just for Deutsche Telekom, not for Vodafone or o2-de/Telefonica. Did you manage to get a work-around or is it something on the network side?

Philippe2705 commented 2 years ago

Hello, any news ? Same issue on Android 12. I may have a workaround, you can get the Physical Channel configuration by executing this shell command through adb: logcat -b radio RILQ:S | grep UNSOL_PHYSICAL_CHANNEL_CONFIG

Unfortunately, it may require root access and you would need to code the shell command directly in you application.