Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect interpretation of SIM card slots #118

Open
Marucins opened this issue Jul 7, 2023 · 2 comments
Open

Incorrect interpretation of SIM card slots #118

Marucins opened this issue Jul 7, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Marucins
Copy link

Marucins commented Jul 7, 2023

I am using a OnePlus 9 Pro, I have created an SMS/MMS copy on the phone which has two SIM cards.
After uploading this copy to the S23 Ultra, the software misinterprets the SIM card slots. It changes them in reverse. Where SIM1 was is SIM2 and where SIM2 is SIM1.

For "[com.github.tmo1.sms_ie-v2.0.0-pre.2.apk]"

@tmo1
Copy link
Owner

tmo1 commented Jul 7, 2023

Thank you for reporting this. I don't have a dual SIM device, and I don't really know anything about how they work. It woulld be good to get this right, but I doubt I'll be able to get to this in the near future.

@tmo1 tmo1 added the bug Something isn't working label Jul 7, 2023
@tmo1
Copy link
Owner

tmo1 commented Jul 9, 2023

I checked the Android documentation, and I suspect that this problem arises from the fact that Android does not associate messages directly with SIM cards, but rather with "Subscription IDs," and:

there may be cases where the same SIM has a different Subscription ID on different devices or different SIMs have the same ID on different devices.

If your SIM cards have switched IDs on the new device, then that would presumably cause the messages to be associated with the wrong SIM cards. The best way to fix this (short of getting the SIM cards to have the same IDs as on the original device, either by physically swapping them or via some other method) would probably be to adjust all the sub_id values in the JSON via jq or a script.

tmo1 added a commit that referenced this issue Oct 24, 2023
Previously, sub_ids were included in message import. On Android 14 (API
level 34), this causes messages with certain sub_ids to (silently) fail
to import. Preservation of sub_ids is of limited benefit anyway, since
the sub_ids on the target device may not correspond to those of the
source device. The default behavior has therefore been changed to set
all sub_ids to "-1" upon import, since negative values indicate that
"the sub_id cannot be determined":

https://developer.android.com/reference/android/provider/Telephony.TextBasedSmsColumns#SUBSCRIPTION_ID

The old behavior is still available via a settings toggle.

Addresses: #118, #128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants