Add IMS/VoLTE/VoWiFi stack and fix Dual-SIM cellular mobile data

- Add Qualcomm MCFG .mbn parser and profile store (bananarchy-imsctl), QMI_PDC/QMI_IMSDCM VoLTE daemon (bananarchy-imsd), and SWu IKEv2/EAP-AKA/ESP/SIP/AMR VoWiFi engine (bananarchy-vowifi) with disabled-by-default (auto) 4G-only activation and xmodem/xfiles/xcallscreen UI support.

- Add libmm-wds-bind.so QMI_SERVICE_WDS PRIMARY subscription binding (including serialized post-mux/data-port binding), msm-modem-uim-selection DSDS PS-domain handoff, cs-only dial pause/restore (10-bananarchy-dpm.sh), cold-boot mmcli -K recovery, and networks.so connection.autoconnect no race fix.

- Add offline test suites (test-ims-mbn.py, test-imsd-volte.py, test-vowifi-swu-ims.py, test-lte-mobile-data.py), update docs (CHANGELOG.md Unreleased, README.md, MANUAL.md, AGENTS.md), and pin rebuilt 4-target image SHA-256 hashes in scripts/check-rebuild.sh.
This commit is contained in:
Luxferre committed 2026-11-20 19:18:58 +02:00
1 parent 03bc80f267
commit c40ec932de
65 files changed
+11916 -129

No files matched your search

+63 -2
View File
@@ -103,7 +103,10 @@ def test_run_aligned(tmp):
write_text(bl_bright, "0\n")
proc = subprocess.Popen([str(bin_path), "1", str(helper)], env=env)
try:
time.sleep(2.2)
deadline = time.monotonic() + 2.5
while time.monotonic() < deadline and not tick_log.exists():
time.sleep(0.05)
time.sleep(1.5)
finally:
proc.terminate()
proc.wait(timeout=5)
@@ -276,7 +279,65 @@ def test_power_policy_rat(tmp):
if res.returncode != 0 or (rundir / "rat_parked").exists():
return fail("unpark-rat failed after wifi-up")
print("[ok] bananarchy-power-policy.sh GSM verification, fallback, call guard, wifi-up, unpark-rat, and DSDS hysteresis")
# 6) IMS coexistence guards:
# 6a) Active VoLTE (without VoWiFi) skips GSM RAT parking when keep_lte_on_screen_off=1.
ims_state = tmp / "ims_state.env"
ims_conf = tmp / "ims.conf"
accept_ra = tmp / "accept_ra"
write_text(ims_conf, "keep_lte_on_screen_off=1\n")
write_text(ims_state, "VOLTE_ACTIVE=1\nVOWIFI_ACTIVE=0\nVOWIFI_IPV6_EPDG=0\n")
write_text(accept_ra, "1\n")
env["BANANARCHY_IMS_STATE_PATH"] = str(ims_state)
env["BANANARCHY_IMS_CONF_PATH"] = str(ims_conf)
env["BANANARCHY_ACCEPT_RA_PATH"] = str(accept_ra)
res = run_policy(env, "_park_rat")
if res.returncode != 0 or (rundir / "rat_parked").exists():
return fail("active VoLTE (without VoWiFi) must skip GSM RAT parking")
# 6b) Active VoWiFi allows GSM RAT parking; VOWIFI_IPV6_EPDG=0 mutes accept_ra,
# while VOWIFI_IPV6_EPDG=1 preserves wlan0 accept_ra across screenoff/screenon.
mock_bin = tmp / "bin"
mock_ip = mock_bin / "ip"
write_text(mock_ip, """#!/bin/sh
if [ "$1" = "-4" ] && [ "$2" = "addr" ]; then
echo "2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500"
echo " inet 192.168.1.10/24 brd 192.168.1.255 scope global wlan0"
fi
exit 0
""")
mock_ip.chmod(0o755)
env["PATH"] = f"{mock_bin}:{env.get('PATH', '')}"
write_text(ims_state, "VOLTE_ACTIVE=1\nVOWIFI_ACTIVE=1\nVOWIFI_IPV6_EPDG=0\n")
write_text(accept_ra, "1\n")
res = run_policy(env, "screenoff")
if res.returncode != 0 or accept_ra.read_text().strip() != "0":
return fail("VOWIFI_IPV6_EPDG=0 must mute wlan0 accept_ra on screenoff")
deadline = time.monotonic() + 3.0
while time.monotonic() < deadline and not (rundir / "rat_parked").exists():
time.sleep(0.05)
time.sleep(0.1)
if not (rundir / "rat_parked").exists():
return fail("active VoWiFi screenoff should allow cellular GSM standby parking")
res = run_policy(env, "screenon")
if res.returncode != 0 or accept_ra.read_text().strip() != "1":
return fail("screenon must restore wlan0 accept_ra to 1")
write_text(ims_state, "VOLTE_ACTIVE=1\nVOWIFI_ACTIVE=1\nVOWIFI_IPV6_EPDG=1\n")
res = run_policy(env, "screenoff")
if res.returncode != 0 or accept_ra.read_text().strip() != "1":
return fail("VOWIFI_IPV6_EPDG=1 must keep wlan0 accept_ra unmuted")
deadline = time.monotonic() + 3.0
while time.monotonic() < deadline and not (rundir / "rat_parked").exists():
time.sleep(0.05)
time.sleep(0.1)
if not (rundir / "rat_parked").exists():
return fail("active VoWiFi (IPv6 ePDG) should allow cellular GSM standby parking")
res = run_policy(env, "screenon")
if res.returncode != 0:
return fail(f"screenon after VoWiFi failed: {res.stderr}")
print("[ok] bananarchy-power-policy.sh GSM verification, fallback, call guard, IMS VoLTE/VoWiFi coexistence, wifi-up, unpark-rat, and DSDS hysteresis")
return 0