Files
sunfish-admin 12d2179c20 AXP Magisk resurrection track: Speckit 009 port AXP/LOS22 to LOS23.
Ship Magisk like GOLDEN; KernelSU optional recycle only; parallel to sunfish-a16-rom standby.
2026-09-16 21:56:22 +00:00

227 lines
9.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Tasks: Call recording unlock + FLAG_SECURE override (`008`/`009`)
**Input**: Design docs from `/specs/008-call-rec-flag-secure/`
**Prerequisites**: `plan.md`, `spec.md`, `research.md`, `data-model.md`,
`contracts/`, `quickstart.md`; constitution native-ROM rules; **AXP GOLDEN /
EXTENDROM call-rec model** (not Magisk modules)
**Primary oracle (call-rec)**: AXP/EXTENDROM native stack — same Secure key
already observed on GOLDEN LAB dump
(`.local-artifacts/002-golden/…/settings/secure-*.txt` →
`extendrom_call_recording=1`):
| Piece | Host reference |
|-------|----------------|
| Apply logic | `/srv/rom/references/extendrom/er.sh` (`F_CALLREC` / unrestricted call recording) |
| DO controllers | `/srv/rom/references/extendrom/config/call-rec/…/CallRecPreferenceController.java` (+ Info) |
| Strings / Dialer config overlay | `/srv/rom/references/extendrom/overlays/call-rec/` |
| Docs | `/srv/rom/references/axp/archive/…/knowledge/callrec/` |
**FLAG_SECURE**: project-specific native DO (not AXP Pro catalog). Magisk
modules are **agent-only mental aids** if ever consulted — **never** ship,
install, or task-move zips into the tree.
**Organization**: US1 call-rec (GOLDEN model) → US2 FLAG_SECURE → US3 packaging.
**Out of scope**: Magisk/Zygisk runtime; static Dialer RRO product; per-app
FLAG_SECURE lists (not planned); full AXP auto-record policy UI; `007`; GOLDEN
flash; commit/MR.
## Format: `[ID] [P?] [Story] Description`
- **[P]**: Can run in parallel (different files, no incomplete deps)
- **[Story]**: US1…US3 from `spec.md`
## Path conventions
- Meta repo: `vendor/sunfish-a16/`, `docs/`, `specs/008-call-rec-flag-secure/`
- Build host: `/srv/rom/src/lineage/`, `/srv/rom/references/extendrom/`,
`/srv/rom/artifacts/008-call-rec-flag-secure/`
- GOLDEN settings sample (read-only): `.local-artifacts/002-golden/`
---
## Phase 1: Setup (Shared Infrastructure)
**Purpose**: Artifact dirs + patch scaffolding; **no Magisk zip handling**
- [x] T001 [P] Create host dirs `/srv/rom/artifacts/008-call-rec-flag-secure/`
(`call-rec/`, `flag-secure/`) and `/srv/rom/logs/008-build/`
(android-build writable)
- [x] T002 [P] Add stub `docs/008-call-rec-flag-secure-runbook.md` (GOLDEN/
EXTENDROM call-rec map, Secure keys, LAB serial, apply order)
- [x] T003 [P] Create `vendor/sunfish-a16/patches/008-call-rec-flag-secure/README.md`
(idempotent apply like `005-sigspoof`; attribute EXTENDROM/`er.sh` F_CALLREC;
FLAG_SECURE as native project patch)
**Checkpoint**: Dirs + stubs exist
---
## Phase 2: Foundational (Blocking Prerequisites)
**Purpose**: Port map from GOLDEN/EXTENDROM onto LOS 23.2 paths; Secure key
plumbing; **no bacon yet**
**⚠️ CRITICAL**: Blocks all user stories
- [x] T004 Extract F_CALLREC steps from
`/srv/rom/references/extendrom/er.sh` into a checklist in
`docs/008-call-rec-flag-secure-runbook.md` (Settings controllers, Secure
`ER_ALLOW_ANY_CALL_REC` = `"extendrom_call_recording"`, DO XML, Dialer
`CallRecorder.canRecordInCurrentCountry` early-return, Dialer
`config.xml` overlay)
- [x] T005 [P] Confirm LOS 23.2 Dialer still uses
`/srv/rom/src/lineage/packages/apps/Dialer/java/com/android/incallui/call/CallRecorder.java`
and that stock `call_recording_enabled` / audio source match or need
EXTENDROM overlay (`call_recording_enabled=true`,
`call_recording_audio_source=4`)
- [x] T006 [P] Inventory A16 `FLAG_SECURE` / screenshot / screen-record sites
under `/srv/rom/src/lineage/frameworks/base/` (+ SystemUI); list candidates
in the runbook (native source patches only)
- [x] T007 [P] Locate Settings development dashboard +
`development_settings.xml` paths on LOS 23.2 (same family as `005`)
- [x] T008 Scaffold idempotent
`vendor/sunfish-a16/patches/008-call-rec-flag-secure/apply_008_call_rec_flag_secure.py`
(dry-run + markers; body filled by story tasks)
**Checkpoint**: Foundation ready — US1/US2 can proceed in parallel
---
## Phase 3: User Story 1 — Call recording (GOLDEN / EXTENDROM model) (P1) 🎯 MVP
**Goal**: Native DO **Disable call recording restrictions** writing Secure
`extendrom_call_recording` (GOLDEN-compatible); Dialer allows any country when
`1`
**Independent Test**: `adb shell settings get secure extendrom_call_recording`;
toggle; record call per `quickstart.md` and
`contracts/call-recording-surface.md`
### Implementation for User Story 1
- [x] T009 [P] [US1] Port EXTENDROM strings + DO category/switch/info into
`/srv/rom/src/lineage/packages/apps/Settings/` (keys
`extendrom_call_recording*`, legal details text from EXTENDROM overlay)
- [x] T010 [P] [US1] Add `ER_CallRecPreferenceController` + `ER_CallRecInfo`
(or equivalent names) under Settings development; wire into
`DevelopmentSettingsDashboardFragment`; reset Secure to `0` when DO
master disabled
- [x] T011 [US1] Add
`Settings.Secure.ER_ALLOW_ANY_CALL_REC = "extendrom_call_recording"` in
`/srv/rom/src/lineage/frameworks/base/core/java/android/provider/Settings.java`
- [x] T012 [US1] Patch
`CallRecorder.canRecordInCurrentCountry()` to early-return `true` when
`Settings.Secure.getInt(…, "extendrom_call_recording", 0) == 1` (same
injection as `er.sh` F_CALLREC)
- [x] T013 [P] [US1] Ensure Dialer call-rec config enabled for sunfish
(EXTENDROM overlay values) under Dialer
`callrecord/res/values/config.xml` or product overlay
- [x] T014 [US1] Encode US1 changes into
`vendor/sunfish-a16/patches/008-call-rec-flag-secure/apply_008_call_rec_flag_secure.py`
with EXTENDROM/`er.sh` attribution
- [ ] T015 [US1] LAB validate *(blocked: wait 008-bacon + Magisk-free flash)* on `11231JEC207477`; evidence under
`/srv/rom/artifacts/008-call-rec-flag-secure/call-rec/`
**Checkpoint**: US1 independently testable (MVP)
---
## Phase 4: User Story 2 — Global FLAG_SECURE override (P1)
**Goal**: DO **Allow screenshots of secure windows** → Secure
`allow_flag_secure_override`; native capture paths honour it globally
**Independent Test**: Secure window OFF fail / ON success;
`settings get secure allow_flag_secure_override`; `quickstart.md` §FLAG_SECURE
### Implementation for User Story 2
- [x] T016 [P] [US2] Settings strings + switch for FLAG_SECURE override under
`/srv/rom/src/lineage/packages/apps/Settings/`
- [x] T017 [P] [US2] Preference controller for
`Settings.Secure.allow_flag_secure_override` with DO-master reset to `0`
- [x] T018 [US2] Implement override in inventoried frameworks/SystemUI paths
(T006) — **source only**, no jar binary patchers
- [x] T019 [US2] Encode US2 into
`vendor/sunfish-a16/patches/008-call-rec-flag-secure/apply_008_call_rec_flag_secure.py`
- [ ] T020 [US2] LAB validate *(blocked: wait 008-bacon + Magisk-free flash)*; evidence under
`/srv/rom/artifacts/008-call-rec-flag-secure/flag-secure/`; note any
remaining DRM blocks in the runbook
**Checkpoint**: US1 + US2 both work
---
## Phase 5: User Story 3 — Native attributable packaging (P2)
**Goal**: Idempotent `vendor/sunfish-a16` apply; Magisk-free image
**Independent Test**: Apply dry-run twice; feature works without Magisk
(SC-005)
- [x] T021 [US3] Finish apply script (idempotent, backups, clear missing-path
errors); README lists every touched path
- [ ] T022 [US3] Apply on `rom-dev01`, bacon detached *(apply done; bacon session `008-bacon` running)* via
`/srv/rom/artifacts/bin/rom-detach`, flash LAB **without** Magisk modules
for this feature
- [ ] T023 [US3] Record Magisk-free PASS *(blocked: post-flash)* under
`/srv/rom/artifacts/008-call-rec-flag-secure/` + runbook
**Checkpoint**: Packaging complete
---
## Phase 6: Polish & Cross-Cutting
- [x] T024 [P] Sync `docs/008-009-design.md`, `research.md`, contracts, and
GOLDEN inventory note (`extendrom_call_recording` on GOLDEN) with final
A16 paths
- [x] T025 [P] Verify DO master-off resets **both** Secure keys to `0`
- [ ] T026 Run full `quickstart.md` *(blocked: post-flash)* checklist; evidence index README under
`/srv/rom/artifacts/008-call-rec-flag-secure/`
- [x] T027 [P] Document `user` vs `userdebug` DO availability (same caution as
`005`)
---
## Dependencies & Execution Order
- **Setup → Foundational → US1 ∥ US2 → US3 → Polish**
- **US1** after Phase 2; no dep on US2
- **US2** after Phase 2; no dep on US1 (coordinate Settings XML)
- **US3** after US1+US2 encoded in apply script
### Parallel opportunities
- T001 ∥ T002 ∥ T003
- T004 then T005 ∥ T006 ∥ T007
- After Phase 2: US1 track (T009–T013) ∥ US2 track (T016–T018)
- T024 ∥ T025 ∥ T027
---
## Implementation Strategy
### MVP
1. Setup + Foundational (esp. T004/T005 from `er.sh`)
2. US1 GOLDEN call-rec → LAB evidence
3. Then US2 FLAG_SECURE
4. US3 packaging + Magisk-free proof
### Suggested MVP scope
**US1 only** (native EXTENDROM/GOLDEN call-rec). US2 still required before
calling roadmap `008`+`009` done.
---
## Notes
- Product is **native ROM** patches. Magisk zips are not part of the feature.
- Prefer Secure-setting Dialer gate (GOLDEN) over always-on country XML RRO.
- Prefer frameworks source patches over `services.jar` binary patching.
- LAB only: `11231JEC207477`. Owner handles commit/MR.