GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — android: su fails with "No daemon is currently running!" because the shell sandbox does not bind /debug_ramdisk · Issue #59942 · anomalyco/opencode

android: su fails with "No daemon is currently running!" because the shell sandbox does not bind /debug_ramdisk #59942

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
android: su fails with "No daemon is currently running!" because the shell sandbox does not bind /debug_ramdisk#59942
Copy link
Labels
triaging

Description

@g0rius
g0rius
opened on Oct 28, 2026
Issue body actions

Description

On a Magisk-rooted Android device, su from the agent shell always fails:

$ su -c id
No daemon is currently running!     # exit 1
$ magisk -c
28.1:MAGISK:R (28100)               # client binary is fine
$ magisk --path
(empty)                             # tmp dir not discoverable

Root is healthy: in Termux on the same device su -c id returns uid=0(root), and the device mount table has magisk on /debug_ramdisk type tmpfs, magisk on /system/bin type tmpfs, magisk on /system/lib64/libzygisk.so type tmpfs.

Cause: Magisk 28.1 keeps magiskd at %s/.magisk/device/socket (format string is in the client binary), where %s is /debug_ramdisk. The Android shell runs under proot with root /data/user/0/com.opencode/files and binds only:

-b /system:/system -b /vendor:/vendor -b /apex:/apex -b /storage:/storage
-b /proc:/proc -b /dev:/dev -b <prefix>:/usr,/bin,/lib,/etc,/share,/tmp,/var,/home
-b /data/app/.../lib/arm64:/opt/oc-lib

/debug_ramdisk is missing, so the client cannot reach the socket. /proc/self/mountinfo inside the sandbox also shows no magisk mounts, consistent with magisk --path being empty.

Plugins

none

OpenCode version

2.0.27 (bootstrap 3, tools 6)

Steps to reproduce

  1. On a Magisk-rooted device, run su -c id in the agent shell.
  2. Observe No daemon is currently running!.
  3. Run the same in Termux: works (uid=0).

Operating System

Android 13 (SDK 33), Realme RMX3834, arm64-v8a; shell runs as u:r:untrusted_app_27:s0

Terminal

app PTY, TERM=xterm-256color, shell oc-shell (bash)

Additional context

Fix: bind /debug_ramdisk into the sandbox when it exists (no-op on unrooted devices):

if (File("/debug_ramdisk").exists()) {
    args += listOf("-b", "/debug_ramdisk:/debug_ramdisk")
}

Optionally also bind /sbin when present (older Magisk / KernelSU < 1.0). /data/adb is not needed for su and should stay out of the sandbox.

Workaround: run root commands in Termux, or start the shell with -b /debug_ramdisk:/debug_ramdisk.

Activity

  1. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Thanks for the detailed write-up and the root-cause analysis.

    One thing to clear up first: as far as I can tell, the proot sandbox you describe isn't part of OpenCode. That's the com.opencode app with its root at /data/user/0/com.opencode/files, the -b ...:/opt/oc-lib binds, oc-shell and the "bootstrap 3, tools 6" version string. OpenCode v2 doesn't ship an Android app, and its shell tool runs commands without a proot sandbox. The Kotlin fix you suggest would have to go into whichever app builds those proot arguments.

    Could you tell us:

    • Which Android app this is and where you got it (Play Store, F-Droid, a GitHub release; a link would help)?
    • Whether su -c id also fails when you run the opencode CLI directly in Termux (installed with npm, @opencode/cli) and ask the agent to run it there?

    You can reply here or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.

    Related Android/Termux issues, though neither covers this problem:

    • [FEATURE]: Add android to v2 npm package supported OS for Termux compatibility #47612: Android support for the v2 npm package on Termux
    • watcher: directory-type subscriptions always fail on android ("backend not supported"), file/entries fall back fine #58503: directory watchers failing on Android/Termux
  2. opencodejr
    added
    triaging
    on Oct 28, 2026
  3. opencodejr
    closed this as not plannedon Oct 31, 2026
  4. opencodejr commented on Oct 31, 2026

    @opencodejr
    opencodejrBot
    on Oct 31, 2026
    Contributor
    More actions

    Closing this as not planned because we haven't heard back. We needed to know which Android app runs the proot sandbox (com.opencode, oc-shell, "bootstrap 3, tools 6"). OpenCode itself doesn't ship that app or build those bind mounts, so the /debug_ramdisk fix would have to go to whoever maintains it.

    If su -c id also fails when you run the opencode CLI directly in Termux, or you can point us to where the app comes from, please reply or open a new issue with those details and we'll look again. Thanks for the thorough analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triaging

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.