Run executables from shared storage in Termux.
Have you ever tried to execute a binary from ~/storage/shared and seen this?
~/storage/shared $ ./a.out
bash: ./a.out: Permission deniedYour binary isn't broken.
Modern Android mounts shared storage with the noexec flag, which prevents binaries from being executed directly from locations like ~/storage/shared.
noexec is a lightweight CLI that works around this restriction by temporarily copying the executable into Termux's executable directory, running it with all of its arguments, and automatically removing the temporary copy when it finishes.
curl -fsSL https://noexec.vercel.app/install.sh | bashAfter installation, the noexec command will be available in your Termux session.
noexec <executable> [arguments...]Run a compiled C program:
noexec ./a.outPass command-line arguments:
noexec ./a.out hello worldRun a binary from another location:
noexec ~/storage/shared/my_programAndroid does not allow executables to run directly from shared storage.
For example:
~/storage/shared $ ./a.out
bash: ./a.out: Permission deniedAlthough the file exists and may already have executable permissions, Android blocks execution because the filesystem is mounted with the noexec option.
Instead of asking you to manually move binaries into Termux's executable directories every time, noexec automates the process.
When you run:
noexec ./a.out arg1 arg2noexec performs the following steps:
- Copies the executable into Termux's executable directory.
- Preserves executable permissions.
- Executes it with every argument you supplied.
- Waits for the program to exit.
- Deletes the temporary copy automatically.
Your original executable is never modified.
- 🚀 Run executables directly from shared storage
- 🧹 Automatic cleanup after execution
- ⚡ Lightweight and fast
- 📦 Zero dependencies beyond standard Unix utilities
- 🔒 Original executable remains untouched
- 💬 Supports command-line arguments
- 🛠 Works with binaries produced by C, C++, Rust, Go, Zig, and other compiled languages
Display help:
noexecDisplay version:
noexec --versionor
noexec -vShow project information:
noexec --credits- Termux
- Bash
- Standard Unix utilities (
cp,chmod,rm)
No.
Your executable remains exactly where it is. A temporary copy is created solely for execution and is deleted immediately afterwards.
No.
Temporary files are removed automatically once execution finishes.
Yes.
Everything after the executable path is forwarded exactly as provided.
Example:
noexec ./server --port 8080 --debugBug reports, feature requests, and pull requests are always welcome.
If you discover an issue or have an idea for improvement, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.