From 5987478a0bfee1ad99438420c7315b1d6477a851 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Mon, 9 Nov 2026 16:09:58 -0500 Subject: [PATCH] fix(native): droiddeckctl native prepares the rootfs with the setting off --- .../main/java/com/droiddeck/launcher/agent/AgentNative.kt | 2 ++ .../java/com/droiddeck/launcher/session/SessionFiles.kt | 8 +------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/agent/AgentNative.kt b/app/src/main/java/com/droiddeck/launcher/agent/AgentNative.kt index 0d2fffc73..613cbe2c3 100644 --- a/app/src/main/java/com/droiddeck/launcher/agent/AgentNative.kt +++ b/app/src/main/java/com/droiddeck/launcher/agent/AgentNative.kt @@ -14,6 +14,8 @@ object AgentNative { fun run(context: Context, request: JSONObject, timeoutMs: Long): JSONObject { val root = LinuxRuntime.rootDir(context) com.droiddeck.launcher.session.SessionFiles.stage(context, root) + // with the setting off, staging leaves the rootfs as proot wants it + if (!com.droiddeck.launcher.session.SessionPrefs.nativeUserland(context)) NativeGuest.prepare(context, root) if (!NativeGuest.available(root)) throw AgentException("NATIVE_UNAVAILABLE", "The rootfs has no native hook or glibc loader yet; start a session once") val argvJson = request.optJSONArray("argv") ?: throw AgentException("INVALID_REQUEST", "argv is required") val argv = (0 until argvJson.length()).map { argvJson.getString(it) } diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt index a24c3f295..28d00775a 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt @@ -258,13 +258,7 @@ object SessionFiles { preload.append("/usr/local/lib/libfakeinput.so\n") } val nativeUserland = SessionPrefs.nativeUserland(context) - if (nativeUserland) { - val relinked = com.droiddeck.launcher.runtime.NativeGuest.relinkAbsoluteSymlinks(context, root) - if (relinked > 0) Log.i(TAG, "native userland: $relinked absolute symlinks made relative") - val patched = com.droiddeck.launcher.runtime.NativeGuest.patchForSeccomp(root) - if (patched > 0) Log.i(TAG, "native userland: $patched system call sites in ld.so and libc answer Android's blocked calls") - com.droiddeck.launcher.runtime.NativeGuest.syncLibraryDirs(root) - } + if (nativeUserland) com.droiddeck.launcher.runtime.NativeGuest.prepare(context, root) if (ProotFastPath.enabled(context)) { val library = com.droiddeck.launcher.agent.AgentEnv.fastPathLibrary(context) preload.append(library + "\n")