Skip to content

tools/phone-smoke: nothing may read the script's stdin - #130

Merged
derekross merged 1 commit into
mainfrom
phone-smoke-stdin
Oct 28, 2026
Merged

derekross merged 1 commit into
mainfrom
phone-smoke-stdin

Conversation

@derekross

Copy link
Copy Markdown
Owner

From the laptop, phone-smoke reaches the phone on bash's stdin (tools/phone-ssh "bash -s" < tools/phone-smoke).

pacman -Q also loads the sync databases. If one of them is signed by a key the phone doesn't trust (a --local build's, RELEASES §10), pacman asks on stderr whether to import the key, and reads the answer from stdin: the rest of the script. The report then never prints. @nesmeck found this on panther and posted the fix on #79, and we said we'd make it on our side.

What changes

  • pacman -Q reads /dev/null. As a side effect it can never answer "yes" to a key import, so it stays read-only.
  • The commands run as the desktop user (as_user) also read /dev/null. None of them needs input.
  • A comment says why nothing in the script may read stdin.

Checks

  • Reproduced first: a stand-in pacman that reads stdin the way fgets does, with the script piped into bash -s as phone-ssh does.
    • Before: it took the last 1212 bytes of the script, and no report printed.
    • After: it reads nothing, and the full report prints.
  • tests/all and tools/pr-check pass.

The script is read-only by design, so it was run with --here on the laptop. No phone was involved.

🤖 Generated with Claude Code

From the laptop, phone-smoke reaches the phone on bash's stdin
(tools/phone-ssh "bash -s" < tools/phone-smoke). pacman -Q also loads
the sync databases, and one signed by a key the phone doesn't trust (a
--local build's, RELEASES §10) makes it ask on stderr whether to import
the key and read the answer from stdin: the rest of the script. The
report then never printed. A contributor found this on panther (#79).

pacman -Q now reads /dev/null, which also means it can never answer
yes to a key import, and so do the commands run as the desktop user,
which never need input.

Reproduced with a stand-in pacman that reads stdin as fgets does,
piped like tools/phone-ssh: before, it took the last 1212 bytes and no
report printed; after, it reads nothing and the full report prints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekross
derekross merged commit 32edb11 into main Oct 28, 2026
2 checks passed
@derekross
derekross deleted the phone-smoke-stdin branch October 28, 2026 21:55
nesmeck added a commit to nesmeck/omarchy-mobile that referenced this pull request Oct 29, 2026
The Pixel 7 Pro's GPU always-on and feedbackd udev rules, and its
sleep.conf.d drop-in, byte-identical (the package test compares them).
mem_sleep reads "s2idle [deep]" on these kernels, and gs201 never wakes
from deep, so Suspend has to be s2idle before anyone taps it.

tools/extract-vendor-firmware takes -d panther: the same gs201 vendor
files under the same names as cheetah, with panther's board and codename,
so the CS40L26 gets this phone's own cs40l26.wmfw and cs40l26.bin.

NOTES records the GPU and haptics boots (kernel derekross#129 and derekross#130), that
power off restarts the phone within the kernel's first tenth of a second
(PSCI SYSTEM_OFF, measured with a shutdown hook that logged to userdata),
and that USB stays off the bus after a replug until USI13 is enabled for
omamobile-usb-rescue. The Pixel 7 row and BRINGUP-M1 say derekross#108 and derekross#109
are merged, and link the new kernel PRs from the GPU and Haptics cells.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derekross added a commit that referenced this pull request Oct 30, 2026
The matrix and the Wanted list against what has merged since #140, with
each pull request's state checked on GitHub today:

- Pixel 7 (panther): the GPU and haptics nodes (kernel #129, #130) were
  closed because they landed unchanged through kernel #134, merged with
  the touchscreen node and s2idle by default; device-panther 0.1.1 (#145)
  carries the GPU's always-on rule, the feedbackd rule and the sleep.conf
  drop-in. GPU and Haptics stay "testing" and now cite #134, #145 and the
  2026-10-28 notes. Touch stays WIP: kernel #134's body records touches
  driving Hyprland and the PIN screen, but the driver fixes (kernel #133)
  and the kernel option with the touch notes (#149) are still in review.
  Suspend: "no" with the s2idle default named, since the notes say it
  hasn't run.
- Pixel 6 Pro (raven): Haptics "no" -> "works": HAPTICS-TORCH-PLAN H5
  passed (2026-10-28/29), cs40l25-vibra and the node merged as kernel
  #114, feedbackd's rule in device-raven 0.1.27 (#113). Display names
  its open kernel PR, #116.
- Pixel 7a (lynx): Bluetooth "no" -> WIP: the merged WIFI-PLAN (#133)
  records it scanning through its own UART; kernel #98 and #98 are in
  review. The Wanted line says so too.
- Pixel 7 Pro (cheetah) detail: Boot names the AVB footers a chained
  vbmeta_b needs (NOTES 2026-10-28 and 10-29, #104); Suspend describes
  the merged tier 1 auto-sleep (#64, off by default behind the
  omamobile-sleep toggle, P0-P5 on 2026-10-26) in place of the old
  "until S8" text. Nothing from the open #171, #172, #174-#176.
- Wanted: coral's #52 is merged, so its line no longer says "in review";
  flame gets a line for its native install in review (#55, #56, #58,
  #59, split out of #17); the OnePlus 13 (dodge) is listed with #111 and
  kernel #115, both open.

The Pixel 9a row and the Pixel 9 family line are left to #165. Every
status word still parses with the website's parseCell.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
The matrix and the Wanted list against what has merged since derekross#140, with
each pull request's state checked on GitHub today:

- Pixel 7 (panther): the GPU and haptics nodes (kernel derekross#129, derekross#130) were
  closed because they landed unchanged through kernel derekross#134, merged with
  the touchscreen node and s2idle by default; device-panther 0.1.1 (derekross#145)
  carries the GPU's always-on rule, the feedbackd rule and the sleep.conf
  drop-in. GPU and Haptics stay "testing" and now cite derekross#134, derekross#145 and the
  2026-10-28 notes. Touch stays WIP: kernel derekross#134's body records touches
  driving Hyprland and the PIN screen, but the driver fixes (kernel derekross#133)
  and the kernel option with the touch notes (derekross#149) are still in review.
  Suspend: "no" with the s2idle default named, since the notes say it
  hasn't run.
- Pixel 6 Pro (raven): Haptics "no" -> "works": HAPTICS-TORCH-PLAN H5
  passed (2026-10-28/29), cs40l25-vibra and the node merged as kernel
  derekross#114, feedbackd's rule in device-raven 0.1.27 (derekross#113). Display names
  its open kernel PR, derekross#116.
- Pixel 7a (lynx): Bluetooth "no" -> WIP: the merged WIFI-PLAN (derekross#133)
  records it scanning through its own UART; kernel derekross#98 and derekross#98 are in
  review. The Wanted line says so too.
- Pixel 7 Pro (cheetah) detail: Boot names the AVB footers a chained
  vbmeta_b needs (NOTES 2026-10-28 and 10-29, derekross#104); Suspend describes
  the merged tier 1 auto-sleep (derekross#64, off by default behind the
  omamobile-sleep toggle, P0-P5 on 2026-10-26) in place of the old
  "until S8" text. Nothing from the open derekross#171, derekross#172, derekross#174-derekross#176.
- Wanted: coral's derekross#52 is merged, so its line no longer says "in review";
  flame gets a line for its native install in review (derekross#55, derekross#56, derekross#58,
  derekross#59, split out of derekross#17); the OnePlus 13 (dodge) is listed with derekross#111 and
  kernel derekross#115, both open.

The Pixel 9a row and the Pixel 9 family line are left to derekross#165. Every
status word still parses with the website's parseCell.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant