termux/termux-api — reverse-engineered prompt
Reverse engineered prompt
Build me an Android companion app for Termux that lets shell commands and scripts use phone features through a simple command line API. I want something I can install as an APK, then call from Termux and get results back in stdout so scripts can read them easily. It should handle stdin and stdout cleanly, route requests from the Termux side into the app, ask for any needed Android permissions at runtime, and return helpful errors instead of crashing.
Please make it work the way the Termux add on is supposed to, including the detail that it needs to be signed with the same key as the main Termux app so permissions actually work. Keep it focused on exposing Android device functionality to command line use, not a full GUI app. If you need to, look up the current Termux docs online. Also give me a few simple example commands or test steps so I can quickly verify the app is working.
Want more depth? Deep Reverse