Skip to content

Fix subId resolution for SIM selection (use active/selectable subIds)#3

Open
gin419 wants to merge 1 commit intoTurbo1123:masterfrom
gin419:fix/subid-mapping
Open

Fix subId resolution for SIM selection (use active/selectable subIds)#3
gin419 wants to merge 1 commit intoTurbo1123:masterfrom
gin419:fix/subid-mapping

Conversation

@gin419
Copy link

@gin419 gin419 commented Jan 11, 2026

Background

On Pixel 7 Pro (Android 16 BP4A.251205.006), selectableSubscriptionInfoList returns [4] but the app still applied subId=1 when SIM1 or Apply to All was chosen. This caused CarrierConfig override to fail and the app exited.

Changes

  • Treat SIM1/SIM2 selection as slot index (0/1), not subId.
  • Resolve target subIds from active/selectable subscriptions only.
  • Apply “ALL” to selectable list first, falling back to active list.
  • Skip historical subscriptions (simSlotIndex = -1).
  • Add log: Resolved target subIds: [...].
  • Document local.properties SDK setup in README (EN/CN).

Verification

  • Verified on two physical devices, details below:
  • Device: Pixel 7 Pro, Android 16 (BP4A.251205.006)
  • Shizuku enabled, non-root.
  • Logcat shows Resolved target subIds: [4].
  • No more “Selected SubId: 1” or “Invalid phoneId ... for subId 1”.
  • VoLTE config applies successfully.

背景

在 Pixel 7 Pro(Android 16 BP4A.251205.006)上,selectableSubscriptionInfoList 只有 [4],
但应用在选择 SIM1 或 Apply to All 时仍使用 subId=1,导致 CarrierConfig override 失败并退出。

修改内容

  • 将 SIM1/SIM2 视为 slotIndex(0/1),而非 subId。
  • 目标 subId 只从 active/selectable 订阅解析。
  • Apply to All 优先使用 selectable 列表,不存在时退回 active 列表。
  • 跳过历史订阅(simSlotIndex = -1)。
  • 新增日志:Resolved target subIds: [...]
  • README 中补充 local.properties SDK 配置说明(中英)。

验证

  • 已在 2 部真机上验证通过,设备信息如下:
  • 设备:Pixel 7 Pro,Android 16(BP4A.251205.006)
  • Shizuku 已启用,无 root。
  • logcat 出现 Resolved target subIds: [4]
  • 不再出现 “Selected SubId: 1” 和 “Invalid phoneId ... for subId 1”。
  • VoLTE 配置应用成功。

@Mystery00
Copy link

Can you try my fork? :)
https://github.com/Mystery00/TurboIMS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants