# Implementation Plan: microG + GSF Proxy + patched Phonesky **Branch**: `004-microg-phonesky-integration` | **Date**: 2026-09-14 | **Spec**: [spec.md](./spec.md) **Input**: Feature specification from `/specs/004-microg-phonesky-integration/spec.md` ## Summary Add the Google compatibility stack to the sunfish LOS 23.2 / Android 16 tree on **LAB only**: microG GmsCore, GSF Proxy, and **patched Phonesky** as priv-app (AXP-style), without FakeStore, Magisk, or KernelSU. Signature spoofing beyond what LOS already provides stays in `005`. Proprietary APKs live only under `/srv/rom/` (never Git). ## Technical Context **Language/Version**: Android.mk / Soong (`Android.bp` where needed); bash runbooks on `rom-dev01` **Primary Dependencies**: LineageOS 23.2 tree (`/srv/rom/src/lineage`); microG release APKs; AXP `packages_apps_phonesky` permission XMLs + signed APK from project AXP archive; LOS restricted signature spoofing (baseline) **Storage**: Host paths `/srv/rom/prebuilts/{microg,phonesky}/`, secrets under `/srv/rom/secrets/` **Testing**: LAB flash + `pm`/`dumpsys` + microG Self-Check screenshots; no unit-test harness required **Target Platform**: Pixel 4a (`sunfish`) LAB `11231JEC207477`; Android 16 **Project Type**: Android ROM packaging / device product overlay **Performance Goals**: N/A (functional compatibility) **Constraints**: No proprietary APKs in Git; no GOLDEN flash; no Magisk/KSU in `004`; Phonesky signing keys host-only **Scale/Scope**: Three system packages + permission XMLs + product makefile + runbook; one rebuild + LAB flash ## Constitution Check *GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.* | Gate | Status | |------|--------| | LAB only; never GOLDEN | pass | | No proprietary Google APKs in Git | pass (host `/srv/rom/prebuilts`) | | Phonesky = patched priv-app, not FakeStore primary | pass | | No Magisk/KSU in Compatibility path before `006`/`007` | pass (`004` rootless) | | Spoofing restricted / auditable → full policy in `005` | pass (use LOS baseline only here) | | Prefer AXP reference for packaging | pass (archive Phonesky + XMLs) | | Prefer small attributable changes | pass (vendor/product overlay, not megapatch) | **Post-design**: unchanged — design stays packaging + docs. ## Project Structure ### Documentation (this feature) ```text specs/004-microg-phonesky-integration/ ├── plan.md ├── research.md ├── data-model.md ├── quickstart.md ├── contracts/ │ └── packages.md └── tasks.md ``` ### Host + tree (not all in Git) ```text # Meta repo (this workspace) docs/004-phonesky-runbook.md docs/004-lab-selfcheck.md vendor packaging stubs / product mk (synced to rom-dev01 tree) # rom-dev01 (canonical build) /srv/rom/src/lineage/ # LOS tree /srv/rom/prebuilts/microg/ # GmsCore + GsfProxy APKs (gitignored host) /srv/rom/prebuilts/phonesky/ # Phonesky APK + permission XMLs /srv/rom/secrets/phonesky-signing/ # keys if we re-sign (optional first pass) /srv/rom/artifacts/004-…/ # build zip + self-check evidence ``` ## Complexity Tracking | Violation | Why needed | Simpler alternative rejected because | |-----------|------------|--------------------------------------| | None | — | — | ## Phase 0 / Phase 1 See `research.md`, `data-model.md`, `contracts/packages.md`, `quickstart.md`.