Skip to content

ci: dedupe builds + docs: unrooted-device quick start - #3

Merged
1a1a11a merged 3 commits into
mainfrom
claude/gallant-fermat-xau2al
Jun 17, 2026
Merged

ci: dedupe builds + docs: unrooted-device quick start#3
1a1a11a merged 3 commits into
mainfrom
claude/gallant-fermat-xau2al

Conversation

@1a1a11a

@1a1a11a 1a1a11a commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

Two small, independent improvements:

1. CI: stop double-running builds

Feature-branch pushes were triggering two identical Android CI runs — one for the push event and one for the pull_request event. This restricts the push trigger to main, so branches build once (via pull_request) and main still builds on push. Also adds:

  • a concurrency group that cancels superseded in-progress runs on rapid re-pushes, and
  • least-privilege permissions: contents: read.

2. Docs: unrooted-device quick start (docs/UNROOTED.md)

Requested guide for starting on an unrooted device:

  • What works without root: process / system / filesystem snapshots via the Python CLI in Termux (it reads /proc directly and auto-falls back to snapshot-only when ftrace isn't accessible). The app routes its collectors through su, so the CLI is the unrooted path.
  • Getting root for the full block trace: rootable emulator (adb root on non-Play/AOSP images), Magisk, or a userdebug/eng build.
  • A per-stream "root required?" table.
  • Linked from the README, and corrected the old inaccurate "the app runs without root" note (block-I/O — and the app's 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

claude added 2 commits June 17, 2026 02:16
…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
Copilot AI review requested due to automatic review settings June 17, 2026 02:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/UNROOTED.md Outdated
Comment on lines +67 to +70
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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.

Comment thread docs/UNROOTED.md Outdated
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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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).

Suggested change
[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
@1a1a11a
1a1a11a merged commit df9f1b1 into main Jun 17, 2026
1 check passed
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.

3 participants