android: su fails with "No daemon is currently running!" because the shell sandbox does not bind /debug_ramdisk
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- android, kotlin
- Área
- infrastructure, mobile
Línea de trabajo
Encuentra la configuración del entorno aislado de Android shell que crea los argumentos de bind de proot y comprueba cómo gestiona las rutas opcionales del host. Empieza por localizar los binds existentes de /system, /vendor y /apex; después, sigue el rastro hasta donde se prueban esos argumentos. La tarea estará completa cuando /debug_ramdisk se monte si existe y su desde shell pueda acceder al daemon de Magisk; los dispositivos sin root deben seguir funcionando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- On a Magisk-rooted device, run
su -c idin the agent shell. - Observe
No daemon is currently running!. - 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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 221k
- Forks
- 29.6k
- Merge medio
- 5 h 32 min
- PR fusionados (30 d)
- 492
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anomalyco/opencode#60174 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
anomalyco/opencode#60143 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode#60121 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
anomalyco/opencode#59973 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
anomalyco/opencode#59886 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
area:plugins area:security area:skills bug has repro
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
anthropics/claude-code#105911 ·
Los mantenedores suelen responder en 1 día
-
[ko] Translate /team into KoreanAbiertodocumentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
dev-five-git/devup-ui#879 ·
Los mantenedores suelen responder en 11 días
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Fission-AI/OpenSpec#2165 ·
Los mantenedores suelen responder en 1 día
-
🐞 bug 🧐 unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Tencent/tdesign-vue-next#7032 · 1 comentario ·
Los mantenedores suelen responder en 1 día