💻 Code and manage servers from Android
🌐 Français · English · العربية
Your phone can be a real emergency workstation: SSH into a server, run git pull, check an APK or debug an app without a cable.
1. A real Linux terminal: Termux
Termux is a full Linux terminal, no root needed.
- Install it from F-Droid or GitHub (the Play Store version lagged behind for a long time, check termux.dev).
- First useful packages: ```bash pkg update && pkg upgrade pkg install git openssh python nodejs termux-setup-storage # access shared storage (~/storage) ```
- Keyboard tip: swipe left on the extra-keys row to get a text input field, or plug in a Bluetooth keyboard.
2. Secure SSH: keys, not passwords
ssh-keygen -t ed25519 -C "my-phone" # creates ~/.ssh/id_ed25519
ssh-copy-id user@my-server.com # copies the public key to the server
Create ~/.ssh/config so you never type addresses again:
Host prod
HostName my-server.com
User deploy
Port 22
IdentityFile ~/.ssh/id_ed25519
ServerAliveInterval 30
Then just run ssh prod. Good practices:
- ✅ Protect the key with a passphrase. Phones get lost more easily than laptops.
- ✅ Use a key dedicated to the phone. If you lose it, you revoke only that key (in the server's
~/.ssh/authorized_keys). - ✅ On the server, disable password login (
PasswordAuthentication no) once the key works. - ✅ Unstable connection (4G, subway)? Run long commands inside
tmuxorscreenso a drop doesn't kill them.
3. Git on the go
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git clone git@github.com:you/project.git
Add your SSH public key to GitHub or GitLab (Settings → SSH keys). A quick fix committed from the phone is fine. Keep big changes for the computer.
4. Debug without a cable: wireless ADB (Android 11+)
- Settings → About phone → tap Build number 7 times to enable developer options.
- Developer options → Wireless debugging → turn on → Pair device with pairing code.
- On the computer (same Wi-Fi network): ```bash adb pair 192.168.1.20:37155 # IP:port and code shown on the phone adb connect 192.168.1.20:41023 # port shown on the "Wireless debugging" screen adb devices ```
Useful commands: adb install app.apk, adb logcat, adb shell pm list packages, adb exec-out screencap -p > screen.png.
5. APKs: install without taking risks
- An APK is a single file. APKS / XAPK / APKM files bundle several APKs (split APKs): you need a compatible installer or
adb install-multiple. - Before installing an APK that doesn't come from the Play Store:
- make sure it comes from the official source (the developer's website or GitHub);
- check the signature:
apksigner verify --print-certs app.apk. An update must have the same certificate as the installed version; - compare the SHA-256 fingerprint if the developer publishes it:
sha256sum app.apk.
- Keep Google Play Protect on, and remove the "Install unknown apps" permission from the app you used to install once you're done.
6. Small tricks that change everything
- Split screen: terminal on one side, documentation on the other.
- Samsung DeX or desktop mode (on some recent devices): screen, keyboard and mouse for a real workstation.
- Battery saver: exclude Termux and your SSH app from battery optimization, or background sessions get killed.
🧪 My apps for developers
I build Android tools to manage code, handle APKs and connect over SSH. Club members test them before anyone else, with free Premium.