Skip to content

Added Executor#1338

Merged
RohitKushvaha01 merged 2 commits intoAcode-Foundation:mainfrom
RohitKushvaha01:executor
Jun 2, 2025
Merged

Added Executor#1338
RohitKushvaha01 merged 2 commits intoAcode-Foundation:mainfrom
RohitKushvaha01:executor

Conversation

@RohitKushvaha01
Copy link
Member

@RohitKushvaha01 RohitKushvaha01 commented Jun 2, 2025

This PR adds an Executor plugin that allows executing shell commands in Acode without requiring Termux.

Example usage:

Executor.exec(
    "echo hello",
    (stdout) => {
        console.log("Executor output: " + stdout);
    },
    (error) => {
        console.warn("Executor error: " + error);
    }
);

⚠️ Limitations

  1. No W^X support:
    Starting from Android 9, executing binary files is not allowed

    • Workaround: You can use /system/bin/linker or /system/bin/linker64 to load and execute non-static binaries, but this only works if the binary is outside internal storage and is dynamically linked.
  2. Shells are not fully supported:
    You can execute shell scripts using shell interpreters (like sh or bash), but do not execute the shell directly (e.g., just "sh"), as it will hang. shells remain active and wait for input until explicitly terminated via Ctrl+C or a kill signal.

@RohitKushvaha01 RohitKushvaha01 merged commit a07877a into Acode-Foundation:main Jun 2, 2025
2 checks passed
@syed-rasel

This comment was marked as spam.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants