Closed Djfe closed 2 years ago
I will take a look on this and get back to you.
Tower Collector is able to read data from both SIM cards at the same time when Android 4.2 API is in use. But you're getting just a single cell. Can you tell me what is your setting in app advanced preferences?
API Level is set to automatic
I enabled logging (level debug), set API Level to 4.2 kept GPS running in the background to have a fix right from the start and I exited the app (force close from apps page in system settings)
Then I started the app and started collecting data for some seconds. Stopped collecting and exited the app. Here is a log: 2021-03-11-12-06-24.log
Log file from API Level automatic: 2021-03-11-12-18-16.log
My observation of the logs: the app says all discovered cells are invalid (for some reason that is not in the logs), when in API Level 4.2.
I'm running a OnePlus 3t. Baseband/Firmware is updated to the lastest oneplus release from Android 9 (I made sure of that the last time I updated my custom rom which is Android 10)
Thanks for the logs, it helps a lot!
The first one (which uses 4.2 API) clearly states that mMnc=null which means it's not possible to get the Mobile Network Code. Such (in your case all of them) cells need to be rejected as invalid. This is a bug in Android firmware and needs to be corrected there as there's no other way to read that missing value.
The auto mode due to the bug above switches to 1.0 API which is not very reliable. For instance when the phone switches network type it sometimes reports LTE data as UMTS (WCDMA) and so on. Take a look on your screenshots - on the first one data data is consistent but then you switched to second sim and the data is a mess (second screenshot).
The best would be to use 4.2 API but it's broken. A bit strange is to me that Network Cell Info Lite is able to display value for both SIMs at the same time, which must use 4.2 API.
Mozilla Location Stumbler has been working for me (before I updated to Android 9/10, now uploads fail due to an ssl cipher being removed from Android). It was never able to read data from both SIMs though. (they never implemented support for dual standby)
I'm not sure anymore whether MLS was able to capture more than one cell though. I could downgrade my firmware the next time I set up my Android device in order to test out whether they are bug free.
Network Cell Info Light might have found a Workaround for mmnc? My question is: apart from mmnc in api 4.2 and data from the second slot in api 1.0: does the data look good or should I rather stop collecting data alltogether? ^^
MozStumbler never worked on my phone, it was crashing all the time after few minutes so it's hard to say. And the app is discontinued.
I will look for the workaround for the missing MNC but this is really not according to Android reference.
Regarding API 1.0 the data quality issues may appear only when you switch between network types and in your case it doesn't correctly return the signal strength. I will check the second once more.
I've asked Network Cell Info support if they can support me in that case anyway but they didn't respond so far. Could you please install my helper tool and attach here the result of the run? I will try to find a way on my own. https://github.com/zamojski/TowerInvestigator/releases/tag/1.0.0.0
Ok, thank you. It looks exactly as I thought, the returned data is incomplete (missing MNC). I had reviewed the most important classes of your Havoc OS and they seem not modified so the problem is not at this level - might be related to hardware firmware which was used for your phone.
Do you maybe know if Havoc OS has some additional permission model setup? Something like Xiaomi did before Android 6 was released and that could prevent the app from reading the data?
Can you please share the screenshots from Network Cell Info?
tl;dr I'm fairly certain it only uses google' s build-in permission model so more advanced blocks (like access to the internet) aren't possible on my phone. it is rooted though
I'll share Screenshots later, when I'm not at home. one cell tower has been defect since the last storm so there is barely ever reception for one of my two carriers around here.
I still remember how the user could only choose against it, by not installing an app at all, which most people were not willing to do so app developers where abusing the system. I had something similar to xprivacy installed back in the Android 4 days (required root and was able to provide fake data (empty contact list etc.) to apps to prevent them from crashing, when prohibiting access) https://www.xda-developers.com/protecting-your-privacy-app-ops-privacy-guard-and-xprivacy/
some time after those apps Google realized how big the need was and introduced a more advanced permission system where apps still had to ask the user to grant or prohibit a permission.
DEVICE+SIM:
RAW Data
did you notice, that network cell info Lite also has a setting to choose the api? In my tests it didn't seem to make a difference though (switching to api 14 instead of 23 lax)
would changing the baseband mode in my system settings make a difference?
@Djfe I've made a small change to log more detail about cell towers. Can you please do the following?
I don't expect the phone to collect anything but the logs will be helpful.
ok, will do. Already did a ride in the car today, but the app sadly didn't create a log, even though I set all of the necessary preferences again and confirmed a new folder in the documents dialogue of the OS.
Now that I started the app again, it created a log file, maybe I would've needed to restart the app, after setting the debug preferences?
Make sure to update the app to version 2.8.3 before you take a walk. Once you set it on version 2.8.0 or later it should not forget the path. The restart is not needed.
updating to 2.8.3 was the first thing I did to get the new changes. so the log wasn't created the first run after updating (I set log to debug and api to 4.2 and afterwards started recording towers). only after restarting the app, it created log files.
it didn't forget the path. it just didn't create a log file. it might just be your design that an app start is required to activate logging? (which is fine)
anyways here you go (two logs from me driving in a car today): Archive.zip
In the log file I see that you have 2.8.2 version installed and it comes from F-Droid. It seems that for a week they didn't build my application. I don't know how to check if the build failed there but the fact is that you don't have my latest changes. I wanted to open the issue on F-Droid to ask what might be the cause but I cannot login, password reset email doesn't come but I cannot register because I have the account there...
I think the best would be if the Havoc OS, Android 10, Custom Rom developers fix the issue with missing MNC. This is clearly an issue with the operating system.
My apologies, you're right ^^ I'll record logs again tomorrow
I think the best would be if the Havoc OS, Android 10, Custom Rom developers fix the issue with missing MNC. This is clearly an issue with the operating system.
Most definitely, and you don't need to invest much more time into this. I'll update to their Android 11 version soon, so maybe that improves it, if not, I'll contact them about it on xda. Their Android 10 release won't receive further updates.
I could also test Stock ROM, to see whether that works or whether the issue is related to OnePlus' firmware. (maybe older versions worked fine)
By now (app says 2 days ago) 2.8.3 is available on F-Droid https://f-droid.org/wiki/page/info.zamojski.soft.towercollector/lastbuild_2080385
Here's the log 2021-05-31-15-03-39.log.zip I forgot uploading it 😅
anyways recording wasn't started instantly after app start, so you might need to scroll through the log a bit. I had to get GPS running first
Unfortunately still no valid cell tower identifiers were returned. Please let me know if after the system upgrade the app started collecting the measurements (I hope it will).
@Djfe Did you manage to update your Android version?
Not sure if this is the same problem, but I have a OnePlus 5 (with LineageOS 18.1) and encounter some similar issue : I always have "Signal strength: Not available" and "Main / neighboring: 1/0" (no problem with Network type though, but I didn't try the other SIM slot). Let me know if you need more details!
@bonswouar Custom ROMs usually have some bugs that are rarely fixed. You can try to collect some days when you force it to use Android 4.2 API on Advanced Preferences. Additionally please check if NetMonster app shows you correct data from both SIM cards and all identifiers like MCC, MNC, LAC/TAC and Cell ID are not empty.
@zamojski Thanks for the reply! I had some fears it was about the custom rom..
I hope it can be fixed, using/contributing to "open source location services" is getting really important for lots of custom roms users (specially LineageOS & microG) I think! Just checked at NetMonster, and all the values seem to be correctly populated:
I'm gonna try to force 4.2 API but last time I checked, if I remember correctly, it didn't help (I think it was even worse)
As I remembered, when forcing to use 4.2 API it registers no cell. @zamojski I can provide the debug log file if it can help? Edit : By the way I have only 1 sim card
@bonswouar Please provide the log file, I will take a look if this is the same case.
Here are the first few minutes of my log file (tell me if you need a longer one): 2021-08-31-10-40-16.log
I would say it's even worse in your case, both MCC and MNC which are reported are invalid.
mMcc=null mMnc=null
mMcc=000 mMnc=null
This can only be fixed by developers of your ROM. Another workaround is to use NetMonster logic to try detecting the values but this requires long testing so don't expect any improvements in next couple of weeks.
Thank you for the analysis! I've just reported the problem to the rom's developers, I hope it can be fixed. Although if NetMonster's logic (I don't really get how do they deal with those bad values) can prevent lots of those cases it would be really cool being implemented.
(kinda off-topic) Do you know if those MCC MNC bad values can also induce problems with NLP location modules in general ? As I'm using microG localization services
Do you know if those MCC MNC bad values can also induce problems with NLP location modules in general ? As I'm using microG localization services
I think that can be related because the implementation of Android API is incorrect in your custom ROM and I think microG rely on that like any other app.
@Djfe Did you manage to update your Android version?
hey zamojski sorry for staying absent for half a year. I finally felt compelled enough to update my device. Sorry for not doing this earlier, but it always takes me 2 days to do this properly (including backups and restoring), so I was hesitating.
tl;dr the issue was introduced with OnePlus' Android 9 updates (regression) and never fixed. Android 8 firmware worked fine, but new ROMs require the last firmware update that was released.
long version with some of the logs at the end: I tested three firmwares for my devices: 9.0.6 (Android 9, didn't work) 9.0.5 (Android 9, didn't work) 5.0.8 (Android 8, worked jay)
That explains why MozStumbler worked for me in the past: The last time, I used it, was on Android 8, where mMnc always had correct values, not null.
I then updated my firmware and switched to a custom ROM with Android 10 for which MozStumbler never worked.
If you are wondering: OnePlus changed their versioning scheme. After Android 8, OxygenOS adopted Android's version number to avoid confusion with mainstream customers. There is one version or maybe two (9.0.3/9.0.4) that exist, but I couldn't find a download for them, only 5.0.8 but that was enough for a regression test.
With 9.0.5 or so OxygenOS changed the way they encrypt the /data partition, so either your rom supports the new or the old encryption scheme. I tried going around this, I tried to find a way to flash the baseband into an Android 9 firmware, but I had no luck.
So this results my decision against stumbling/TowerCollector due to faulty firmware. I prefer Android 9 and upwards over mMnc != null
it's still a shame, I wasn't able to get both, but mobile radio/baseband din't work correctly when I tried to flash the old baseband.
I will return to stumbling with my next phone, which I'll buy in November 2022 or so, when ARMv9 is established in the mobile market and 5G has had it's 3rd or 4th generation of devices
I'll close this issue now, feel free to comment.
attachments: some of the logs of the main app (v2.11), I made firmware 5.0.8 - carrier Vodafone.log (Android 8, stock rom) firmware 9.0.6 - carrier Vodafone (Android 11, custom rom).log
I have a OnePlus 3T (Havoc OS, Android 10, Custom Rom)
Signal Strength is "not available" in the first tab.
And if I switch data to my second sim (dual sim-standby) in order to record data from my second carrier, then the network-type is "unknown" If I physically swap SIM cards (2nd in 1st slot, 1st in 2nd slot), then the network type shows up just fine.
Another app that is able to read/display both things just fine: Network Cell Info Lite Sadly the app is not open source, so you cannot simply look at their code, but maybe the info/the app still helps development :) Some info they collected on device/OS specific issues: http://wilysis.com/networkcellinfo/10-android-issues http://wilysis.com/networkcellinfo/15-dual-sim-issues