1 #!/data/data/com.termux/files/usr/bin/sh
4 if [ "$#" != "0" ]; then
5 echo 'usage: termux-info'
6 echo 'Provides information about Termux, and the current system. Helpful for debugging.'
13 if [ -e "$PREFIX/version" ]; then
16 #Last version that didn't have a way to detect Termux version
21 pm list packages -i | grep com.termux
24 apt update >/dev/null 2>&1
25 updatable=$(apt list --upgradable 2>/dev/null | tail -n +2)
26 if [ -z "$updatable" ];then
27 echo "All packages up to date"
32 output="Termux version:
34 Installed Termux apps:
41 $(dpkg --print-architecture)
43 $(getprop ro.build.version.release)
45 $(getprop ro.product.manufacturer)
47 $(getprop ro.product.model)"
49 # Copy to clipboard (requires termux-api)
50 # use timeout in case termux-api is installed but the termux:api app is missing
51 echo "$output" | busybox timeout -t 3 termux-clipboard-set 2>/dev/null
52 busybox timeout -t 3 termux-toast "Information has been copied to the clipboard" 2>/dev/null