7 lines
188 B
Bash
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
|