diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-22 11:04:05 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-22 11:04:05 +0200 |
| commit | 1e8083b08293dc3737aadde6b43cf755510f47e3 (patch) | |
| tree | 60f4953e379beefb0cca0f6e58692429108037fc | |
| parent | e31f3a60ac17d4be1724493304bc1084dcf3a7a2 (diff) | |
| download | mygram-droid-1e8083b08293dc3737aadde6b43cf755510f47e3.tar.gz mygram-droid-1e8083b08293dc3737aadde6b43cf755510f47e3.zip | |
Plan: read the viewer password from /tmp/mygram.pw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | docs/superpowers/plans/2026-10-22-mygram-droid.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/superpowers/plans/2026-10-22-mygram-droid.md b/docs/superpowers/plans/2026-10-22-mygram-droid.md index ebe1b2b..1c12f9e 100644 --- a/docs/superpowers/plans/2026-10-22-mygram-droid.md +++ b/docs/superpowers/plans/2026-10-22-mygram-droid.md @@ -65,10 +65,10 @@ The instance now runs in viewer-password mode. Field names in the code below com - [ ] **Step 1: Get the password without putting it in the repo or the transcript** -Ask the user to run (they type it, it never lands in git): +The user keeps it in `/tmp/mygram.pw`, deliberately gone after a reboot. If the file is missing, ask the user to recreate it (they type it, it never lands in git or the transcript): ``` -! mkdir -p ~/.config/mygram-droid && read -rsp 'viewer password: ' p && printf %s "$p" > ~/.config/mygram-droid/viewer.pw && chmod 600 ~/.config/mygram-droid/viewer.pw +! read -rsp 'viewer password: ' p && (umask 077; printf %s "$p" > /tmp/mygram.pw) ``` Ask the user for the instance base URL too (it is in agent memory as well). Below it is `$B`. @@ -77,7 +77,7 @@ Ask the user for the instance base URL too (it is in agent memory as well). Belo ```bash S=<scratchpad>; B=<instance base url> -python3 -I -c 'import json,sys; print(json.dumps({"password": open(sys.argv[1]).read()}))' ~/.config/mygram-droid/viewer.pw | +python3 -I -c 'import json,sys; print(json.dumps({"password": open(sys.argv[1]).read()}))' /tmp/mygram.pw | curl -s -c "$S/jar" -H 'x-foldergram-intent: 1' -H 'Content-Type: application/json' --data-binary @- "$B/api/auth/login" ``` @@ -2543,7 +2543,8 @@ Replace the `## Testing` section with: - Package `mygram.droid`. UI is built in code, no layout XML. - Verify every UI change on the TV (see Target device). - For API probes use a cookie jar in a scratch directory and the viewer - password from `~/.config/mygram-droid/viewer.pw` (outside the repo). + password from `/tmp/mygram.pw` (outside the repo, gone after a + reboot; ask the user to recreate it). ``` - [ ] **Step 3: Commit** @@ -2577,7 +2578,7 @@ Then OK on the entry; expect the password prompt. Type it without echoing: ```bash adb shell input keyevent KEYCODE_DPAD_CENTER; sleep 2 -adb shell input text "$(cat ~/.config/mygram-droid/viewer.pw)" +adb shell input text "$(cat /tmp/mygram.pw)" adb shell input keyevent KEYCODE_DPAD_DOWN KEYCODE_DPAD_CENTER sleep 6; adb exec-out screencap -p > "$S/home.png" ``` |
