rentgendroid/android/conf/get_ports.sh
2025-08-07 16:46:36 +02:00

7 lines
188 B
Bash

out=$(adb shell su root "ss -tunlp | tail -n+2 | awk -F \" \" '{print \$5}' | awk -F ':' '{print \$NF}' | sort -n | uniq")
if [ ! -f /ports ]; then
echo -n $out > /ports
fi
echo -n $out