[JP2026]: BLE GATT advertising broken (unable to transfer banking push tan app)

NOTE: I did analysis of this failure using a test harness on actual hardware together with Claude Opus 5.5

TL;DR and the ground truth: Real cause is that the bluetooth bridge found in appsupport currently doesn’t implement the BLE advertising HCI pass-through so that it always stubs to zero slots. To get my problem fixed I AI-engineered a temporary replacement appsupport-bridge-bt that adds the missing BLE GATT support. Using this replacement I got my banking app moved from the old device to JP 2026 :slight_smile: as BLE GATT is finally added to the bridge.

You can find it here: https://github.com/nekrondev/appsupport-bridge-bt-re

Due to the advent of REA Jolla should really overthink their Open-Source policy (or what it is not).

Cheers,
– Nek

REPRODUCIBILITY: 100% (every attempt)
OS VERSION: 5.2.0.20 (Finlayson)
HARDWARE: Jolla Phone (2026)
UI LANGUAGE: German (de-DE)
REGRESSION: Unknown — not verified against an earlier release; appears to have never worked on this device.

DESCRIPTION:

Inside Android App Support, no app can start BLE advertising (act as a BLE peripheral). Every
BluetoothLeAdvertiser.startAdvertisingSet(...) fails immediately. Classic BLE scanning (central role) works fine; only advertising/peripheral is broken.

Root cause is a self-contradictory, Bluetooth-Core-spec-violating capability report from the
controller/HAL: it sets the LE Extended Advertising feature bit but reports 0 supported advertising
sets. The AOSP Gabeldorsche (GD) stack therefore selects the extended-advertising API and sizes its advertiser pool from that 0, so advertiser allocation always fails (“allocate_advertiser: Number of max instances 0 reached”).

From dumpsys bluetooth_manager (controller block) on the Jolla Phone (2026):

le_local_supported_features: 0x800001000f01fdfd   # bit 12 = LE Extended Advertising = 1
le_number_supported_advertising_sets: 0           # ...but ZERO advertising sets
vendor_capabilities: { is_supported: 1, max_advt_instances: 16, extended_scan_support: 0 }

Per the Bluetooth Core spec, a controller advertising LE Extended Advertising must report at least 1
supported advertising set. Because feature bit 12 is set, GD chooses the EXTENDED path and reads the (zero) set count. Had the bit not been set, GD would fall back to the vendor/legacy path using max_advt_instances = 16.

Comparison: a Sony Xperia 10 II on Sailfish OS 5.1.0.11 reports LE Extended Advertising = false and mNumOfAdvertisementInstancesSupported = 16, uses the vendor/legacy advertising path, and BLE advertising works there.

Impact: any Android app needing to act as a BLE peripheral fails. Concrete user-visible breakage:
the Sparkasse “S-pushTAN” app’s device-change / “Verbindung übernehmen” cannot complete, because the new device must BLE-advertise a transfer service for the old device to discover — it never goes on air, so the old device’s scan finds nothing and provisioning fails after ~30 s.

BT bridge chain on this device: /vendor/bin/hw/android.hardware.bluetooth-service-mediatek →
bluebinder → /dev/vhci → Android GD stack (com.android.bluetooth, App Support API 35).

PRECONDITIONS:

  • Android App Support enabled.
  • Any Android app that advertises as a BLE peripheral (e.g. Sparkasse S-pushTAN “move to new
    device”, or any generic “BLE peripheral/advertiser” test app).
  • Bluetooth turned on.

STEPS TO REPRODUCE:

  1. In App Support, open an app that starts BLE advertising (e.g. S-pushTAN device change, or a BLE advertiser test app) and trigger advertising.

  2. Advertising never starts. In logcat:

    D BluetoothLeAdvertiser: TxPower == ADVERTISE_TX_POWER_MEDIUM
    I bt_shim_advertiser: le_advertising_manager.cc:149 StartAdvertisingSet: in shim layer
    I bt_shim_advertiser: le_advertising_manager.cc:169 StartAdvertisingSet: create advertising set, client_id:255, reg_id:-2
    W bluetooth:          le_advertising_manager.cc:375 allocate_advertiser: Number of max instances 0 reached
    W bluetooth:          le_advertising_manager.cc:554 create_extended_advertiser: Number of max instances reached
    
  3. Capability check without any app, in the App Support container (read-only):

    dumpsys bluetooth_manager | grep -E "le_number_supported_advertising_sets|le_local_supported_features|max_advt_instances"
    

    Observe le_number_supported_advertising_sets: 0 together with the LE Extended Advertising feature bit set in le_local_supported_features.

EXPECTED RESULT:

BLE advertising starts and the device acts as a BLE peripheral (as it does on the Xperia 10 II).

ACTUAL RESULT:

Advertiser allocation fails (“Number of max instances 0 reached”); the device cannot advertise at
all. Any dependent flow (e.g. S-pushTAN device change) fails.

MODIFICATIONS:

None. Developer mode / SSH only. No patches, OpenRepos/Chum packages, Waydroid, or custom BT configuration. All diagnostics were read-only (dumpsys, logcat, getprop); nothing was changed on the device.

ADDITIONAL INFORMATION:

Suggested fix (either is sufficient):

  1. Preferred: correct the MediaTek BT HAL/firmware so a controller advertising LE Extended
    Advertising also returns LE Read Number of Supported Advertising Sets >= 1.
  2. Alternative: do not claim extended advertising — clear LE feature bits 12/13 in the reported
    le_local_supported_features so the GD stack falls back to the vendor ANDROID_HCI path using
    max_advt_instances = 16 (the known-good path already used on the Xperia 10 II). This could also be masked in bluebinder, but the HAL is the correct place.
1 Like

I let Claude try a bit harder but in the end it looks like a firmware problem of the MediaTek chipset.

Follow-up: deeper diagnosis — fault is the MediaTek BT firmware, and the suggested “fall back to legacy” workaround will NOT help

Appended 2026-10-24. Same device/OS as the original report (Jolla Phone (2026), Sailfish OS 5.2.0.20). This follow-up (a) corrects two statements in the original report, (b) adds hard controller/firmware evidence, and (c) revises the suggested fix.


TL;DR

Further investigation confirms the problem is inside MediaTek’s Bluetooth controller firmware, below every layer Jolla ships above it. Two points from the original report need correcting:

  1. The proposed alternative fix (“clear the extended-advertising feature bit so the stack falls back to the vendor/legacy path”) will NOT work. The controller cannot advertise on any path — legacy and vendor advertising fail at the controller just as extended does. So forcing a fallback only changes the failure mode, it does not enable advertising.
  2. The bridge chain in the original report was wrong for the App Support path. bluebinder is not in the App Support Bluetooth path; it only serves the host’s native BlueZ. (Corrected topology below.)

Corrected Bluetooth topology

App Support (Android container) path — this is the pushTAN path:

com.android.bluetooth (AOSP GD stack, API 35)
  → HIDL android.hardware.bluetooth@1.0::IBluetoothHci   (hci_backend_hidl.cc; @1.1 not present)
  → /usr/sbin/appsupport-bridge-bt  /  appsupport-bridge-bt-aidl   (Jolla bridge)
  → /vendor/bin/hw/android.hardware.bluetooth-service-mediatek     (MediaTek vendor HAL)
  → controller firmware

Host native BlueZ path — separate, and NOT used by Android apps:

bluetoothd  →  /usr/sbin/bluebinder (1.0.20)  →  gbinder → MediaTek vendor HAL → /dev/vhci → hci0/hci1

A host-side HCI monitor (AF_BLUETOOTH, HCI_CHANNEL_MONITOR) captured zero frames of App Support Bluetooth traffic, confirming the container does not traverse bluebinder//dev/vhci at all. So bluebinder cannot be involved in, or a fix point for, this bug.


Hardware / firmware identification

Item Value
Controller MediaTek Connac-2 combo, MT6878-class (AP platform mt6858)
Kernel driver bt_drv_6858
HCI version 5.4 (hci_ver = 14), manufacturer = 70 (MediaTek)
Vendor HAL /vendor/bin/hw/android.hardware.bluetooth-service-mediatek, /vendor/lib64/libbluetooth_mtk.so
BT firmware /vendor/firmware/soc7_0_ram_bt_1_1_hdr.bin, …_1a_1_hdr.bin, …_1b_1_hdr.bin — all dated 2025-09-23
FW config /vendor/firmware/BT_FW.cfg (coexistence / TX-power only; nothing governs advertising)

The vendor HAL is a thin HCI passthrough — it contains no advertising/extended-advertising logic (verified by symbol/string inspection). Advertising HCI goes straight from the stack to the firmware, so a malformed advertising response originates in the firmware, not the HAL.


Direct controller evidence (raw HCI)

Decoded from the controller’s own HCI command-complete events (standard btsnoop):

LE_Read_Maximum_Advertising_Data_Length (0x203A) -> status 0x00, max_len = 0x001F (31 bytes)
LE_Read_Number_of_Supported_Advertising_Sets (0x203B) -> status 0x00, num_sets = 0x00
LE local supported features  le_local_supported_features: 0x800001000f01fdfd  (bit 12 = LE Extended Advertising = 1)

The controller claims LE Extended Advertising support (feature bit 12) but reports 0 advertising sets and a 31-byte max advertising data length — i.e. the legacy data size. These values are internally inconsistent and violate the Bluetooth Core spec (a controller advertising extended support must report ≥ 1 advertising set).


All three advertising paths fail at the controller

To determine whether the zero-set report was the only problem, the GD advertiser-selection logic was temporarily patched in a test build to push past the num_instances == 0 allocation gate and to try each advertising API explicitly. All three failed at the controller level:

Advertising path (api_type) Result
Extended (3, the controller’s declared native mode) LE_Set_Extended_Advertising_Parameters (0x2036) returns a command-complete that fails the stack’s complete_view.IsValid() check → on_set_extended_advertising_parameters_complete: assert failed → native abort of com.android.bluetooth
Vendor / ANDROID_HCI (2) native abort in check_status_with_id<LeMultiAdvtCompleteView> (controller claims vendor multi-advertising but mishandles it)
Legacy (1) LE_Set_Advertising_Enable → on_set_advertising_enable_complete: status HARDWARE_FAILURE(0x03); advertising never goes on air

These test patches to the App Support libbluetooth_jni.so were applied only to characterise the failure and were fully reverted afterwards; the device was verified back to the stock library (SHA-256 restored) and left unmodified. The conclusions do not depend on the patches — the capability reads above and the host-side result below are from the stock configuration.

This is why the “clear bit 12 → fall back to legacy/vendor” workaround cannot fix it: legacy (0x200A) returns HARDWARE_FAILURE, and the vendor path crashes. The controller cannot advertise on any path.


Independent confirmation via the host stack (no Android stack involved)

Driving advertising from the host’s BlueZ through the Linux management API — a completely different software path that shares only the MediaTek HAL + firmware (no AOSP GD stack, no appsupport-bridge) — fails the same way:

Controller = mgmt index 1 (addr matches device, supported settings 0x000dbeff — includes the Advertising bit)
MGMT_OP_READ_ADV_FEATURES (0x0036) -> error / not-supported
MGMT_OP_SET_ADVERTISING   (0x0029) -> mgmt-level "success" but no advertising actually results

Same controller, independent stack, same inability to advertise → the fault is isolated to the MediaTek HAL/firmware, which is common to both paths.

Additionally: dmesg/btmtk shows the driver healthy with no firmware coredump or assert (MediaTek aee exception store /data/vendor/aee_exp/bt is empty). The firmware does not crash — it returns incorrect capability data and failing/malformed command-completes. That is a logic defect baked into the firmware blob.


Revised suggested fix

A firmware/HAL update is required; there is no software workaround above the firmware.

  1. Correct the MediaTek BT firmware so the controller actually implements LE advertising and reports consistent capabilities — specifically: a controller that sets the LE Extended Advertising feature bit must return LE Read Number of Supported Advertising Sets ≥ 1 and a correctly-formed LE_Set_Extended_Advertising_Parameters command-complete, and LE_Set_Advertising_Enable must not return HARDWARE_FAILURE.
  2. The previously-suggested “clear feature bit 12 to force the legacy path” is not sufficient — legacy and vendor advertising also fail on this controller (see table above). It should not be pursued as a standalone fix.

Reference device for a known-good comparison: Sony Xperia 10 II on Sailfish OS 5.1.0.11 reports LE Extended Advertising = false, mNumOfAdvertisementInstancesSupported = 16, uses the vendor/legacy path, and BLE advertising works there.

1 Like

The controller DOES advertise — but only once per power-cycle

Correction to follow-up #1 (“cannot advertise on any path”): if the GD advertiser-pool gate is patched past (num_instances ≥ 1) and the legacy path forced, the controller does go on air — a peer connects and a full GATT session runs — even though LE_Set_Advertising_Enable returns a bogus HARDWARE_FAILURE (0x03).

But it is a one-shot: after the first set tears down, every re-enable fails and nothing goes back on air until the firmware is reloaded (a reboot). No software reload works — BT disable/enable, rfkill, and the driver’s bt_dbg chip reset all leave the RAM patch in place.

This is the real blocker for S-pushTAN, which needs the new device to advertise twice (transfer exchange, then reconnect for activation). The first window succeeds; the second never goes on air.

TL;DR and the ground truth: Real cause is that the bluetooth bridge found in appsupport currently doesn’t implement the BLE advertising HCI pass-through so that it always stubs to zero slots. To get my problem fixed I AI-engineered a temporary replacement appsupport-bridge-bt that adds the missing BLE GATT support. Using this replacement I got my banking app moved from the old device to JP 2026 :slight_smile: as BLE GATT is finally added to the bridge.

You can find it here: https://github.com/nekrondev/appsupport-bridge-bt-re

Due to the advent of REA Jolla should really overthink their Open-Source policy (or what it is not).

Cheers,
– Nek

1 Like