Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#59,942 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
android, kotlin

調査の方向性

proot の bind 引数を作成する Android shell サンドボックスの設定を見つけ、任意のホストパスをどのように処理するか確認してください。まず既存の /system、/vendor、/apex の bind を探し、次にそれらの引数がテストされている箇所をたどってください。/debug_ramdisk が存在する場合に bind され、shell の su から Magisk のデーモンにアクセスできれば完了です。root 化されていないデバイスでも引き続き動作する必要があります。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
221k
フォーク
29.6k
平均マージ
5時間 32分
マージ済み PR(30日)
492

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。