radiocells-scanner-android icon indicating copy to clipboard operation
radiocells-scanner-android copied to clipboard

Dual SIM support

Open amilopowers opened this issue 9 years ago • 15 comments

Does your app support dual SIM devices? I am thinking about buying a duals SIM device like that I could scan all Swiss networks simultaneousely.

amilopowers avatar Feb 21 '16 18:02 amilopowers

I think this depends on the Android implementation. AFAIU for Android 6 the app should be able to scan with both sim cards otherwise it just uses the default one. Most mobile vendors don't patch the API themselves for Android 5 so an app would have to use "non-standard" calls to scan with all sim cards. This hasn't been done for this app but is certainly possible.

FelixSchwarz avatar Feb 22 '16 11:02 FelixSchwarz

I might give it a try.

amilopowers avatar Feb 22 '16 11:02 amilopowers

Well, I tried it some time ago with a friends dual sim phone, there getAllCellInfo only first sims cells, but as Felix mentions it might vary depending on the device manufactorer and the Android version.

Quote from https://developer.android.com/reference/android/telephony/TelephonyManager.html#getAllCellInfo()

On devices with multiple radios it is typical to see instances of one or more of any these in the list.

app would have to use "non-standard" calls

@FelixSchwarz By instance, have you already experimented with this? Any hints?

wish7code avatar Feb 22 '16 21:02 wish7code

I might try a magic sim adapter for my Nexus 5

amilopowers avatar Feb 22 '16 21:02 amilopowers

@wish7code No, but I provided some debug logs to the author of the proprietary app "netmonitor" which he used to implement dual-sim scanning.

I think (based on the log files I provided) he accessed (vendor specific?) API which had a "gemini" suffix. Maybe http://stackoverflow.com/questions/27767127/android-dual-sim-signal-strength and https://github.com/dragos-niculescu/dualsim/blob/master/src/com/example/dualsim/TelephonyInfo.java might be related.

Also I noticed that MozStumbler has some dual sim support. Maybe openbmap could just use their scanner class?

FelixSchwarz avatar Feb 22 '16 22:02 FelixSchwarz

Something related to that: When I walk around I noticed that I scan always the same cells. Generally I scan the newest technology because I told my phone to use 4G (LTE) if available. But there are 3G and GSM cells around which never get scanned or updated like that.

AFAIU 4G is only for data and therefore cellphones switch to a 3G or GSM cell when calls are made. So are they a) connected to both technologies or do the b) switch pretty fast from 4G to <4G when needed?

Because if a) is true our app should be capable of asking for the cell-ID of the "unused" <4G cell as well.

Like that we wouldn't need to switch cell technology by hand and we gained al lot more cells in a short time.

amilopowers avatar Feb 25 '16 08:02 amilopowers

Today I scanned with MozStumbler and Radiobeacon simuntaneousely. MozScanner got 45 and RB 32 radiocells in the same period. So I guess a) is true that it should be possible to get more cell data.

amilopowers avatar Feb 27 '16 11:02 amilopowers

Just by chance I tried MozStumbler a few minutes ago and on my phone (BQ Aquaris M5) MozStumbler only found the cells from my default SIM.

(One thing I'm asking myself is if it is really necessary for openbmap to develop a custom app completely on their own. It might be an interesting experiment to fork MozStumbler, change the name+references to Mozilla's service and implement openbmap's upload API. Maybe it's even possible to get some kind of API into MozStumbler so the openbmap changes are easier to build.)

FelixSchwarz avatar Feb 27 '16 12:02 FelixSchwarz

@amilopowers I just scanned the MozStumbler code @ https://github.com/mozilla/MozStumbler/blob/7e43c8387963c9d460ecc3fba17fceeefc33a6be/libraries/stumbler/src/main/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/cellscanner/SimpleCellScannerImplementation.java

As far as I can see our friends just use the Android default API getAllCellInfo, basically the same as we do. Possibly they've found a better way to handle neighboring cells (an Android API nightmare).

@FelixSchwarz I'm quite sure it we could integrate a forked MozStumbler server side quite easily. If anyone is volunteering, we'll would be happy to do integrate such modified client.. But aside that, I guess the main differences between both clients are the level of detail of uploaded files and the type of submission (XML vs. JSON) only. While obviously our XML file format is archaic and overbloated for historic reasons, it's still verbose and relatively easy to process for bold researchers :-)

wish7code avatar Feb 28 '16 22:02 wish7code

@FelixSchwarz Thanks for the keyword 'Gemini': there's not much documentation to be found, BUT one link went to some Samsung developer forum. I think I vaguely remember that some Samsung devices expose some extra modem information - at least that's what I understood from the discussions on AIMSID (https://github.com/SecUpwN/Android-IMSI-Catcher-Detector)

Good news nevertheless: Android versions >= 5.1 seems to support dual sim mode https://developer.android.com/about/versions/android-5.1.html#multisim

wish7code avatar Mar 06 '16 19:03 wish7code

Good news nevertheless: Android versions >= 5.1 seems to support dual sim mode

That is true but at least on my device (Android 5.1.?) it seems I still get only scans from the default SIM. It seems Android chipset manufacturers are really sloppy when implementing these APIs...

FelixSchwarz avatar Mar 06 '16 20:03 FelixSchwarz

@FelixSchwarz You could install a custom ROM like www.omnirom.org to upgrade Android. I think it shouldn't void warranty. And if in doubt you can always go back to the original.

amilopowers avatar Mar 06 '16 20:03 amilopowers

Also only first sim scanned: Android 5.1.1, Cyanogenmod 12.1, Zuk Z1

merlink01 avatar Apr 21 '16 11:04 merlink01

Retested on CM 13: Both Sims are scanned now.

merlink01 avatar Jun 29 '16 18:06 merlink01

That's cool to hear!

wish7code avatar Jun 30 '16 19:06 wish7code