Ship Magisk like GOLDEN; KernelSU optional recycle only; parallel to sunfish-a16-rom standby.
9.2 KiB
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
- 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) - T002 [P] Add stub
docs/008-call-rec-flag-secure-runbook.md(GOLDEN/ EXTENDROM call-rec map, Secure keys, LAB serial, apply order) - T003 [P] Create
vendor/sunfish-a16/patches/008-call-rec-flag-secure/README.md(idempotent apply like005-sigspoof; attribute EXTENDROM/er.shF_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
- T004 Extract F_CALLREC steps from
/srv/rom/references/extendrom/er.shinto a checklist indocs/008-call-rec-flag-secure-runbook.md(Settings controllers, SecureER_ALLOW_ANY_CALL_REC="extendrom_call_recording", DO XML, DialerCallRecorder.canRecordInCurrentCountryearly-return, Dialerconfig.xmloverlay) - T005 [P] Confirm LOS 23.2 Dialer still uses
/srv/rom/src/lineage/packages/apps/Dialer/java/com/android/incallui/call/CallRecorder.javaand that stockcall_recording_enabled/ audio source match or need EXTENDROM overlay (call_recording_enabled=true,call_recording_audio_source=4) - 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) - T007 [P] Locate Settings development dashboard +
development_settings.xmlpaths on LOS 23.2 (same family as005) - 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
- T009 [P] [US1] Port EXTENDROM strings + DO category/switch/info into
/srv/rom/src/lineage/packages/apps/Settings/(keysextendrom_call_recording*, legal details text from EXTENDROM overlay) - T010 [P] [US1] Add
ER_CallRecPreferenceController+ER_CallRecInfo(or equivalent names) under Settings development; wire intoDevelopmentSettingsDashboardFragment; reset Secure to0when DO master disabled - 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 - T012 [US1] Patch
CallRecorder.canRecordInCurrentCountry()to early-returntruewhenSettings.Secure.getInt(…, "extendrom_call_recording", 0) == 1(same injection aser.shF_CALLREC) - T013 [P] [US1] Ensure Dialer call-rec config enabled for sunfish
(EXTENDROM overlay values) under Dialer
callrecord/res/values/config.xmlor product overlay - T014 [US1] Encode US1 changes into
vendor/sunfish-a16/patches/008-call-rec-flag-secure/apply_008_call_rec_flag_secure.pywith EXTENDROM/er.shattribution - 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
- T016 [P] [US2] Settings strings + switch for FLAG_SECURE override under
/srv/rom/src/lineage/packages/apps/Settings/ - T017 [P] [US2] Preference controller for
Settings.Secure.allow_flag_secure_overridewith DO-master reset to0 - T018 [US2] Implement override in inventoried frameworks/SystemUI paths (T006) — source only, no jar binary patchers
- 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)
- 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 session008-baconrunning) 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
- T024 [P] Sync
docs/008-009-design.md,research.md, contracts, and GOLDEN inventory note (extendrom_call_recordingon GOLDEN) with final A16 paths - 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/ - T027 [P] Document
uservsuserdebugDO availability (same caution as005)
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
- Setup + Foundational (esp. T004/T005 from
er.sh) - US1 GOLDEN call-rec → LAB evidence
- Then US2 FLAG_SECURE
- 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.jarbinary patching. - LAB only:
11231JEC207477. Owner handles commit/MR.