ci: dedupe builds + docs: unrooted-device quick start - #3
Conversation
…ilege perms Feature-branch pushes were triggering the Android CI twice (once for the push event, once for the pull_request event). Restrict the push trigger to main so branches build once via pull_request; main still builds on push. Add a concurrency group that cancels superseded in-progress runs on rapid re-pushes, and pin least-privilege permissions (contents: read). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VbHpkJ1MdVfGz9bi6Ekb1i
Add docs/UNROOTED.md explaining what works without root and how to get root for the full block trace: - Snapshot-only on an unrooted device via the Python CLI in Termux (it reads /proc directly and falls back to snapshot-only when ftrace is inaccessible); the app needs su, so the CLI is the unrooted path. - Getting root: rootable emulator (adb root on non-Play images), Magisk, or a userdebug/eng build. - A per-stream "root required?" table. Link it from the README and correct the old, inaccurate "app runs without root" note (the app routes collectors through su, so it needs root even for snapshots). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VbHpkJ1MdVfGz9bi6Ekb1i
There was a problem hiding this comment.
Code Review
This pull request adds a new documentation file docs/UNROOTED.md and updates the README.md to explain how to use the tool on unrooted Android devices (via Termux for snapshot-only mode) and how to obtain root access for full block-I/O tracing. The review feedback suggests a simpler alternative for running the app on emulators by disabling SELinux instead of installing Magisk, and recommends correcting a relative link reference in the documentation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| Python — e.g. via Termux installed in the AVD, or an image with Python). To use | ||
| the **app** on an emulator you additionally need an `su` binary; install Magisk | ||
| on the AVD (e.g. the community *rootAVD* script) so the app's root requests | ||
| resolve. |
There was a problem hiding this comment.
On userdebug or eng emulator images (such as the standard "Google APIs" image), the su binary is already built-in. Instead of installing Magisk via rootAVD (which can be complex and fragile), you can simply disable SELinux enforcement to allow the app to use the built-in su binary. This is a much faster and easier alternative for emulator-based testing.
| Python — e.g. via Termux installed in the AVD, or an image with Python). To use | |
| the **app** on an emulator you additionally need an `su` binary; install Magisk | |
| on the AVD (e.g. the community *rootAVD* script) so the app's root requests | |
| resolve. | |
| Python — e.g. via Termux installed in the AVD, or an image with Python). To use | |
| the **app** on an emulator, you can either disable SELinux on a `userdebug` image (run `adb root` then `adb shell setenforce 0` to allow the app to use the built-in `su` binary), or install Magisk on the AVD (e.g. via the community *rootAVD* script) so the app's root requests resolve. |
| Root with [Magisk](https://github.com/topjohnwu/Magisk); grant the app (or | ||
| `adb shell`) root. Then follow the normal flow in the | ||
| [README](../README.md#-android-app-recommended) or | ||
| [docs/ANDROID_APP.md](ANDROID_APP.md). |
There was a problem hiding this comment.
Since UNROOTED.md is already located inside the docs/ directory, the link text docs/ANDROID_APP.md might be slightly confusing as it suggests a nested docs/docs/ path. It is cleaner to use [ANDROID_APP.md](ANDROID_APP.md) or [Android App Guide](ANDROID_APP.md).
| [docs/ANDROID_APP.md](ANDROID_APP.md). | |
| [ANDROID_APP.md](ANDROID_APP.md). |
…leanup Address PR #3 review on docs/UNROOTED.md: - userdebug / "Google APIs" emulator images ship a built-in su, so `adb root` + `adb shell setenforce 0` lets the app use it — offer that as a simpler alternative to Magisk/rootAVD for emulator testing, and add setenforce 0 to the adb-root snippet to avoid SELinux denials on the CLI path. - Fix the self-referential link text (docs/ANDROID_APP.md -> ANDROID_APP.md) and drop the fragile emoji-heading anchor from the README link. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VbHpkJ1MdVfGz9bi6Ekb1i
Summary
Two small, independent improvements:
1. CI: stop double-running builds
Feature-branch pushes were triggering two identical
Android CIruns — one for thepushevent and one for thepull_requestevent. This restricts thepushtrigger tomain, so branches build once (viapull_request) andmainstill builds on push. Also adds:concurrencygroup that cancels superseded in-progress runs on rapid re-pushes, andpermissions: contents: read.2. Docs: unrooted-device quick start (
docs/UNROOTED.md)Requested guide for starting on an unrooted device:
/procdirectly and auto-falls back to snapshot-only when ftrace isn't accessible). The app routes its collectors throughsu, so the CLI is the unrooted path.adb rooton non-Play/AOSP images), Magisk, or auserdebug/engbuild.su-based snapshots — need root).No app/CLI code or schema changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VbHpkJ1MdVfGz9bi6Ekb1i
Generated by Claude Code