Credentials. The Telegram bot token gives control over the phone's listener, so keep it private and do not paste it into shared logs or chats.
Who it is forA phone owner who is away from the device and wants to check battery or toggle hardware by sending a message from Telegram.
The problemChecking or changing phone state, such as battery level or the flashlight, requires being physically near the phone.
The outcomeTexts sent to your bot return results from the phone, and you can switch models with /model from Telegram.
What you need first
- An Android phone with Termux and the Termux:API app installed
- Python and git available in Termux, with the Ubuntu PRoot environment set up as the README describes
- A Telegram bot token if you want remote control
Steps
- In Termux, run
pkg update && pkg upgrade, thenpkg install termux-api python git,pkg install proot-distro,proot-distro install ubuntu, andproot-distro login ubuntu. - Inside Ubuntu, run
apt update && apt upgrade -yandapt install git python3 python3-pip python3-venv ca-certificates -y. - Run
git clone https://github.com/AbuZar-Ansarii/Needle.git, thencd Needle,python3 -m venv myenv,source myenv/bin/activate, andpip3 install -r requirements.txt. - Start the listener with
python3 app.py --model 3 --telegram YOUR_BOT_TOKEN, replacing YOUR_BOT_TOKEN with your token. - Send your bot a message such as "what is the battery percentage and health?" and check that the reply contains battery details.
Prompt for your agent
Using the Needle repo at <repo path>, set up the Termux environment, then start the Telegram listener with python3 app.py --model 3 --telegram <bot token>. Send the bot the message "turn on the flashlight" and report the reply. Verify that the reply confirms the torch action and that /model returns the current model.
Caveat. The README does not describe the Telegram bot's access controls, so anyone who can message the bot may be able to trigger phone commands.
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page