ObliviOS Developer portal Project site

Home / Decisions / ADR-115

Amend ADR-108 and correct landed patch 0001: replace the interop-database registration with a dedicated exact-match, in-memory, bond-gated registry.

Accepted, recorded 29 September 2026.

Decision
ADR-115
Date
2026-09-29
Status
AcceptedAccepted (uncompiled, see Consequences)
Mentions
ADR-108
Mentioned by
ADR-118

1Decision

Amend ADR-108 and correct landed patch 0001: replace the interop-database registration with a dedicated exact-match, in-memory, bond-gated registry; serve the SDP vendor override from a per-response copy; clear the registration on unbond; add the missing client wrapper BluetoothDevice#setAirPodsIdentity. Landed as additive patches 0002-0005; 0001 alone must not ship.

2Why and evidence

A pre-build review of 0001 against the live pinned tree found five defects. D1: sdp_dynamic_change_airpods_vendor mutates the shared SDP record (sdpint.h:96, sdp_db.cc:564) with no restore, unlike hfp_fallback (sdp_server.cc:182), so after one AirPods SDP query every peer sees Apple: the device-wide spoof design §3.2 forbids.

D2: length 6 is passed to interop_database_add_addr, which asserts length < sizeof(RawAddress) (interop.cc:1170-1172) with a fatal log (log.h:202-210), aborting the Bluetooth process on first registration; length 5 would only prefix-match (interop_database_match, INTEROP_BL_TYPE_ADDR case). D3: interop entries persist to /data/misc/bluedroid/interop_database_dynamic.conf and are never removed on unbond.

D4: interop_match_addr_or_name also matches by device name. D5: no client path to IBluetooth#setAirPodsIdentity (BluetoothAdapter#getBluetoothService() is package-private). ADR-108's intent (per-accessory scoping, bonded BD_ADDR only, dedicated signature permission) is unchanged; its mechanism "reuse the interop database" is replaced.

3Consequences

Registry: header-only, max 16 exact 6-byte peers, in memory only; airpods_identity_applies() = registered AND BTM_IsBonded (injected checker, fails closed). Registration cleared in AdapterService#handleBondStateChanged on BOND_NONE; refusing to register a non-bonded device is kept, clearing is always allowed. New bt_interface_t::set_airpods_identity, setAirPodsIdentityNative, AdapterNativeInterface#setAirPodsIdentity.

INTEROP_AIRPODS_IDENTITY removed. Landed on the build-server branch sovereignos-airpods-identity as 593ddedbad, 98c91e16d3, 8a31c37d88, b86ac07d9f (git am exit 0; all 17 touched files byte-identical to the worktree by sha256); committed in sovereignos-platform as 1ace719 (patches 0002-0005, airpods/SOURCE.md).

None of this is compiled or run yet: per owner directive the single rebuild follows all planned work; the build plan starts with host compiles of net_test_device and net_test_stack_sdp. New validation cases AIR-029-AIR-032 cover the second-peer regression, lifecycle, process stability, and permission enforcement.

Whether AirPodsApp uses the platform certificate (hidden-API-exempt by signature, Guardian precedent) or its own certificate plus a hidden-api-whitelisted-app sysconfig entry is still open and is decided in the AirPodsApp plan.

4Review when

Re-verify if a Bluetooth-module rebase changes bt_interface_t, sdp_server.cc's attribute loop, or l2c_fcr_chk_chan_modes; if AIR-029 or AIR-032 ever fails on hardware; if the registry cap of 16 proves too low.

Read from docs/governance/decision-log.md, entry ADR-115.