0.9.11 move_to_new_app: migration restore refuses the archive over silence_boot_chime on stock SMT1019 (no root/helper) — move can never complete

オープン
#190 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@maxlyth がすでに取り組んでいます。

2026年10月25日 から。

評価

この issue はまだ評価されていません。

説明

enhancement question

ha-paneld version: 0.9.11 (build 1202) as the move target; panel runs 0.9.8 (build 967) legacy app. Panel Assistant integration 0.9.0.

Panel hardware: ZHICAI SMT1019 / WF2489T

What happened?

The move_to_new_app repair cannot complete on a stock (non-root, no helper) SMT1019, because the migration-mode restore on the new app refuses the whole archive over silence_boot_chime:

W ha-paneld/http: restore failed
W ha-paneld/http: java.lang.IllegalStateException: silence_boot_chime live apply refused
    at io.panelassistant.android.http.AcceptedConfigTransaction$applyAccepted$6.invokeSuspend$lambda$0(AcceptedConfigTransaction.kt:214)
    at io.panelassistant.android.util.RendererPreparationCoordinator.transaction(RendererPreparationCoordinator.kt:59)
    at io.panelassistant.android.http.AcceptedConfigTransaction$applyAccepted$6.invokeSuspend(AcceptedConfigTransaction.kt:120)
I ha-paneld/http: restore: Restore partially completed

Panel Assistant then logs Moving rk3576_u_xxxx to the new app stopped: move_failed (None) and rolls the panel back to the old app (which works — the rollback is clean every time). Three attempts, identical result, with silence_boot_chime at true and at false.

Why it can never succeed on this firmware, from reading the source:

  • AcceptedConfigTransaction.applyAccepted runs every key in SettingsRegistry.liveApplyKeys() carried by the archive through applySetting() and does check(applied) { "$k live apply refused" } (line 214). A single refused live key fails the entire restore.
  • silence_boot_chime is a live key with default true and type BOOL, so every archive carries it and there is no way to leave it unset (POST /api/v1/config {"silence_boot_chime": null} → expected a boolean).
  • BootChimeController.applyTransition tries helper → root → app path. On stock SMT1019 there is no helper and no su. The app path (applyBootChimeDirect) writes Settings.System volume_ring_speaker, which is not in PUBLIC_SETTINGS, so the settings provider throws for any non-privileged app regardless of WRITE_SETTINGS:
    W ha-paneld/bootchime: app boot-chime write failed: You cannot keep your settings in the secure settings.
    The outcome is FAILED (not UNAVAILABLE, because the exception is an IllegalArgumentException, not a SecurityException), so the setting stays "pending" forever. The legacy app has lived with that for months (apply_pending: {"silence_boot_chime": ...} in GET /api/v1/config); the new app's restore treats the same condition as fatal.
  • Because _async_settled in the integration requires the restore outcome to be a whole success, a "partially completed" restore ends the move.

Expected: a live key whose hardware apply is structurally impossible on this panel (no helper, no root, app path refused by the platform) should be stored as pending during a restore — exactly as the running app already handles it — rather than refusing the archive. Alternatively the migration-mode restore could exclude silence_boot_chime (and any other device-scope live key with FAILED/UNAVAILABLE outcome) from the fail-closed set, or classify the volume_ring_speaker write refusal as UNAVAILABLE so the key is dropped from liveApplyKeys() on this panel.

Impact: every stock SMT1019/WF2489T owner is blocked from moving to io.panelassistant.android before v1.0.

Steps to reproduce

  1. Stock SMT1019 (firmware ZX-SMT1019-R157-V2.0-10.1-GG-K1.89U-20260522, user build, no su, no helper), ha-paneld 0.9.8 legacy app healthy, Panel Assistant 0.9.0, ADB authorised, native transport.
  2. Run the move_to_new_app repair and confirm.
  3. Install (0.9.11), launch, KEEP_LEGACY, HOME claim and SET_ASIDE_LEGACY all succeed; POST /api/v1/restore on the new app fails with the trace above (~5 s after HTTP listening on :8888); the move reports move_failed and revives the legacy app.
  4. Same with silence_boot_chime set to false on the legacy app before the move.

Diagnostic dump (/diag)

Captured on the legacy 0.9.8 app after the rollback (device/discovery identifiers redacted):

ha-paneld diagnostics — 0.9.8 (build 967)
[captured] 2026-10-12T23:22:19.886963-05:00 uptime=4h19m
[package] io.github.maxlyth.hapaneld

[panel]
ha-paneld=0.9.8 (build 967)
Android=14 (API 34)
Firmware=ZX-SMT1019-R157-V2.0-10.1-GG-K1.89U-20260522
Device=Electron rk3576_u (WF2489T)
CPU=8 cores · arm64-v8a · rk30board
RAM=3.8 GB total · 2.3 GB free
Storage=48.8 GB (data) · 42.7 GB free
Display=1280×800 px · logical 160 dpi
System WebView=com.google.android.webview 154.0.8037.106
HA Companion=not installed
MQTT state=connected · TCP/IPv4 · last-ok 43s ago · last-auth 9344s ago · auth-ok · family Automatic (next IPv4)
Security mode=Relaxed
Keep panel responsive=on · power locks held
Prevent idle dim=on · timeout never
Android dashboard lock=off
LED=Rockchip /dev/ledjni helper daemon (RGB)
Nav actions (a11y)=yes
Navbar=Off
Zigbee=none
Relays=none
Network ADB=active (5555) · external — not persisted by ha-paneld
Audio playback=idle
App database=1.6 MB used · 2.0 MB on disk · schema 14
Local-state sync=2263s ago · brightness 115→111 · 4903s ago · brightness 115→111 · 7483s ago · brightness 115→111 · 7603s ago · brightness 160→122
State convergence=43 channels · 0 dirty · 0 in-flight · 16 unknown · ack 144/0 · pending none

[build] fingerprint=Apolosign/WF2489T/WF2489T:14/UQ1A.240205.004.B1/202407:user/release-keys
board=rk30sdk product=WF2489T hardware=rk30board abis=arm64-v8a,armeabi-v7a,armeabi
[boot-security] verified=orange flash=unlocked vbmeta=unknown build=user debuggable=unknown
[env] selinux=? su=false write_settings=true a11y=true daemon=false shizuku=manager_missing evdev=stopped/none ledjni=true
[display-sizing] android_base_logical_dpi=? current_logical_dpi=? override_dpi=none font_scale=1.0 profile_recommended_dpi=? profile_recommended_font_scale=none
[renderer] mode=builtin state=rendered outcome=ok fault=none detail=none recovery=none transport=http address_family=automatic observed_age=2h35m process_age=2h35m package_updated=2h35m theme=dark/dark
[ha-network] state=healthy cause=none responsiveness=healthy measuring=true socket=live window=5m probes=30 round_trips=30 p50=3 p95=5 max=6 jitter=0 loss=0.0% consecutive=0 server_errors=0 auth_errors=0 last_reply_age=2828
[ha-path-probe] state=healthy family=ipv4 bursts=6 sent=30 received=30 loss=0.0% p50=1 p95=1 max=1 jitter=0 dead_bursts=0 interval=600s last_burst_age=563088
[camera] state=absent outcome=camera-unavailable fault=none detail=not_enumerated recovery=none clients=0 last_frame=never failures=0 indication=none stream_clients=0 stream_port=off encoder=none encode=none delivered=none requested_fps=none snapshot_exposure=none/0
[storage-health] state=healthy pressure_state=healthy usable_bytes=42704785408 total_bytes=48827768832 used_percent=12.539961522852161 database_bytes=1634304 wal_bytes=457352 sidecar_bytes=32768 page_size_bytes=4096 page_count=399 freelist_count=1 schema_version=14 quick_check=ok auto_vacuum=incremental checked_at=1791855989034 failure=none failure_operation=none remediation=not_run
[power-safety] state=caution keep_awake=true wake_lock=true wifi_lock_required=true wifi_lock=true prevent_idle_dim=true screen_timeout_ms=2147483647 interactive=true power_source=ac plugged_mask=1 stay_on_mask=0 stay_on_effective=false device_idle=false doze_exempt=false screen_off=daemon_blpower screen_off_selected=unknown screen_off_reason="not yet exercised; no screen-off has occurred since this controller was constructed" reasons=doze_not_exempt,stay_on_disabled
[sysfs] leds=[] backlight=[] devfreq=[]
[labels] ls: /sys/class/leds/*/: Permission denied ls: /sys/class/backlight/*/: No such file or directory ls: /dev/ledjni: Permission denied
[hardware]
  inputs=[]
  i2c=[]
  iio=[]
  thermal=[]
  relays=[]
[packages] android=not installed minimal=not installed
[vendor-tame] known=6 installed=6 active=5 disabled=1
[capabilities] Root (su)=none | Helper daemon=none | Verified app update / screenshot / display=none | Screen brightness=ok | Screen on/off=degraded | RGB LED=ok | Reboot / reload / launcher=none

Home Assistant version

2026.9.4

Relevant logs

New app (0.9.11) during the restore, attempt 3:

20:46:09.582 I ha-paneld/http: HTTP listening on :8888
20:46:09.5xx D ha-paneld/su: su binary not found; root-only operations are unavailable
20:46:1x.xxx D ha-paneld/helper: daemon not reachable (Connection refused)
20:46:1x.xxx W ha-paneld/permissions: writesettings permission not repaired (no_helper); dependent features remain unavailable
20:46:1x.xxx W ha-paneld/bootchime: app boot-chime write failed: You cannot keep your settings in the secure settings.
20:46:1x.xxx W ha-paneld/bootchime: silence failed through app and root settings paths
20:46:13.005 W ha-paneld/http: restore failed
20:46:13.005 W ha-paneld/http: java.lang.IllegalStateException: silence_boot_chime live apply refused
20:46:14.188 I ha-paneld/http: restore: Restore partially completed

Home Assistant:

2026-10-12 20:46:13.377 ERROR [custom_components.panel_assistant.coordinator] Error requesting panel_assistant rk3576_u_xxxx data: Panel identity changed
2026-10-12 20:46:31.288 WARNING [custom_components.panel_assistant.panel_move] Moving rk3576_u_xxxx to the new app stopped: move_failed (None)

Legacy app (0.9.8), steady state, same panel:

W ha-paneld/bootchime: app boot-chime write failed: You cannot keep your settings in the secure settings.
W ha-paneld/bootchime: exact boot-chime restore failed; retaining snapshot for retry

GET /api/v1/config → "apply_pending": {"silence_boot_chime": "true"} (and POST /api/v1/config answers saved-apply-pending).

Side note for the same model: the move's install step also has to survive Google Play Protect's "Send app for a security check?" prompt, which pops on every ADB install on this firmware and consumed the 180 s install budget (install_ambiguous) until I picked "Always send unknown apps". Worth a line in the move docs.

主要言語
Kotlin
スター
63
フォーク
5
平均マージ
1日 5時間
マージ済み PR(30日)
11

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

panel-assistant/android のほかの issue

panel-assistant/android の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。