Prd/resources/scripts/fetch-dialer-reference.sh
Lucy Doupalů be9f14ce34 Helpdesk - operator console + patched GrapheneOS Dialer for call handling
A small helpdesk system: an office Pixel running a patched GrapheneOS Dialer
answers technician calls, records both call legs as separate channels, and a
Ruby backend transcribes them through Whisper and files an AI summary against
the caller.

Squashed to a single commit for sharing. No credentials are included; secrets
live outside the repo in /etc/helpdesk/env on the server or a gitignored
.claude/env.local locally. See .claude/env.local.example for the shape.

Start at README.md, then docs/architecture.md.
2026-07-27 18:50:32 +02:00

30 lines
1.6 KiB
Bash

#!/usr/bin/env bash
# Fetch reference material for the Dialer patch:
# - the current GrapheneOS Dialer (base = in-tree callrecV2), and
# - the archived PR #12 recording code (reachable ONLY by its head SHA — there is NO 'call-recording' branch).
# Clones go to resources/grapheneos/ (git-ignored). Patch details: components/dialer-patch/ and the
# build runbook docs/runbooks/graphene-build.md.
set -euo pipefail
DEST="${1:-resources/grapheneos}"
mkdir -p "$DEST" && cd "$DEST"
REPO=https://github.com/GrapheneOS/platform_packages_apps_Dialer.git
echo "==> Clone current Dialer (default branch 17; base your patch on in-tree callrecV2)"
git clone --filter=blob:none "$REPO" Dialer || (cd Dialer && git fetch)
echo "==> Fetch archived PR #12 recording code (reference for auto-record-on-answer)"
cd Dialer
git fetch origin 'refs/pull/12/head:pr-12' || \
echo " (if refs/pull/12/head is unavailable, fetch the head SHA 454a45b2855440f671f2c429fb7f1830a7869c8b directly)"
echo "==> Key files to study (paths per research):"
cat <<'EOF'
java/com/android/dialer/callrecord/impl/CallRecorderService.java (MediaRecorder engine)
java/com/android/dialer/callrecord/res/values/config.xml (audio source: 4 = VOICE_CALL)
java/com/android/incallui/CallButtonPresenter.java (auto-record-on-answer, ~500ms after ACTIVE)
java/com/android/dialer/app/res/xml/call_recording_settings.xml (auto_call_recording_key toggle)
InCallServiceImpl.java / CallList.java (wiring + webhook anchor points)
EOF
echo "NOTE: callrecV2 (commit 6f68bcbd) supersedes the archived CallRecorderService (deprecated 697e728b)."