feat: distro/DE selector UI and real, verified proot invocation flags#26
Merged
DaRipper91 merged 4 commits intoJul 21, 2026
Merged
Conversation
Wires PR #25's backend into an actual on-device build flow (menu entry -> distro pick -> DE pick -> confirm code -> build -> back to container list), plus a significant correctness fix to the proot invocation itself found while building this. ## UI (new) - DistroSelectFragment / DeSelectFragment (+ DistroBuildViewModel, activity-scoped like ContainerManageViewModel): RecyclerView pickers following this repo's existing ListAdapter+DiffUtil+ViewBinding pattern (mirrors QuicksFragment/ContainerManageFragment). DE tier 2 entries and any DE unavailable for the picked distro's package manager are visibly disabled, not hidden. - Reuses two existing pieces as-is rather than duplicating them: ConfirmInstallDialogFragment for the container-code prompt (already decoupled via setFragmentResult, works fine from a different fragment) and ProgressDialogFragment for build progress. - Entry point: new "Build New Container" menu item next to the existing Import action in ContainerManageFragment's menu. - New Screen.DistroSelect / Screen.DeSelect(distroAlias) cases in MainViewModel/MainActivity, following the exact existing screen-routing pattern. Deliberately did NOT add fragment back-stack entries for these — the existing ContainerInstall/ContainerMain screens have no back-stack either (confirmed: this app's whole fragment_container navigation has none), so adding one only for the new screens would be inconsistent, not fixing anything. ## Real correctness fix found while wiring this up ProotExec.kt's chroot flags (from PR #25) were a plausible-sounding guess (-r/-w/-b, no --change-id, no proc/sys fakes) that turned out to be meaningfully wrong. Found tiny-computer/images' actual, live proot-distro.tiny.yaml (a real, presumably-working example this repo's own README points people to for the .tiny.yaml format) and its boot_command/export_command use a completely different, more complete flag set: --change-id=1000:1000 (not -r/-w), --kernel-release spoofing, --sysvipc, and — most importantly — bind mounts for /proc/loadavg, /proc/stat, /proc/uptime, /proc/version, /proc/vmstat, and two sysctl entries, all targeting placeholder files ($CONTAINER_DIR/proc/.loadavg etc.) that upstream's own export.sh creates by snapshotting a LIVE session via `tar --transform`. A freshly-pulled distro image has none of these, so DistroInstaller now creates them with plausible static content after extraction and before any first-boot step. ProotExec now has two entry points matching the real file's two real commands: runAsRootCommand (mirrors export_command, used for first-boot/DE-install) and bootCommandTemplate (mirrors boot_command, written into the synthesized .tiny.yaml — TinyYamlBuilder.kt, new). de_packages.yaml gained a session_command field per tier-1 DE (what to run inside the container once its boot_command's X11 socket is ready — verified shape, real dbus-launch/DE-session commands) — tier-2 entries deliberately have none, since how a Wayland-only compositor gets a picture onto this app's Termux:X11 bridge is still the unprototyped question flagged in PR #25, and TinyYamlBuilder refuses to build a container for a DE with no session_command rather than guess one. ## Still not done / still flagged - Not device-tested — this repo still can't build without jniLibs.zip from upstream's releases page. - Tier-2 DE build path exists in DeInstaller (PR #25) but the UI here disables any DE lacking a session_command, so tier-2 is currently unselectable end-to-end until that's prototyped — matches the task brief's "don't block tier 1 on tier 2." - No fragment back-stack / no way to go back a step in the wizard besides the system back button (which exits, matching existing screens) — a real gap, just not a regression. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…CI) to trigger CI on this PR Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
DaRipper91
pushed a commit
that referenced
this pull request
Jul 21, 2026
CI (#27) caught two things on this branch's original ProotExec.kt: 1. A genuine compile error: the KDoc comment's own text contained the literal sequence "PROOT_LOADER*/PROOT_TMP_DIR" — the `*/` inside that prose prematurely closed the doc comment, so everything after it (the rest of the comment, then the real code) got parsed as top-level Kotlin and failed with cascading "Expecting a top level declaration" syntax errors starting at that exact line/column. 2. The underlying proot flags this file guessed at (-r/-w/-b, no --change-id, no proc/sys placeholder files) were also substantively wrong, not just wrapped in a comment with a syntax bug. This was already found and fixed while building PR #26's UI (which needed to actually invoke this to synthesize a working boot_command) by locating tiny-computer/images' real, live proot-distro.tiny.yaml — but the fix only landed on #26's branch, never backported here, which is why CI still caught the old broken version on this one. Pulling over the already-corrected files as-is from #26 rather than re-deriving them: ProotExec.kt (runAsRootCommand/bootCommandTemplate replacing the old runInContainerCommand, using the real verified flags), DistroInstaller.kt (creates the proc/sys placeholder files those real flags' bind mounts require, in a second shell session after extraction completes), DeInstaller.kt (updated call site). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CI (#27) caught this: showFragmentForScreen()'s new Screen.DistroSelect/ DeSelect cases referenced these classes without importing them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… keep the stack clean Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
DaRipper91
merged commit Jul 21, 2026
a09df47
into
refork/distro-manifest-and-installer
2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Depends on #25 — wires that backend into an actual on-device build flow: menu entry -> distro pick -> DE pick -> confirm code -> build (progress dialog) -> back to container list. Also fixes a real correctness issue in #25's
ProotExec.ktfound while building this.Base branch note: this targets
refork/distro-manifest-and-installer(notREFORKdirectly) since it directly uses #25's classes — should be merged after #25, or rebased ontoREFORKonce #25 lands.What's new
DistroSelectFragment/DeSelectFragment/DistroBuildViewModel— RecyclerView pickers following this repo's existingListAdapter+DiffUtil+ViewBindingpattern (mirrorsQuicksFragment). Unavailable DE/distro combos are shown disabled, not hidden.ConfirmInstallDialogFragment(container-code prompt) andProgressDialogFragment(build progress) as-is rather than duplicating them.Screen.DistroSelect/Screen.DeSelectcases following the exact existing screen-routing pattern.Real fix found while wiring this up
#25's
ProotExec.ktchroot flags were a plausible-sounding guess that turned out to be meaningfully wrong. Found the real, liveproot-distro.tiny.yamlintiny-computer/images(this repo's own README points people to it for the.tiny.yamlformat) — its actualboot_command/export_commanduse a different, more complete flag set (--change-id=1000:1000not-r/-w, kernel-release spoofing,--sysvipc, and bind mounts for/proc/loadavgetc. targeting placeholder files that a live session's export script normally snapshots).DistroInstallernow creates those placeholder files after extraction.ProotExecnow hasrunAsRootCommand(mirrorsexport_command) andbootCommandTemplate(mirrorsboot_command, written into the synthesized config via newTinyYamlBuilder.kt).de_packages.yamlgained asession_commandper tier-1 DE (what runs inside the container once its X11 socket is ready). Tier-2 entries deliberately have none —TinyYamlBuilderrefuses to build a container for a DE with nosession_commandrather than guess one, and the UI disables any such DE rather than offering it.Still flagged, not hidden
jniLibs.zip.🤖 Generated with Claude Code