Don't pkill -f a pattern inside the same adb shell command
@mendezcarl▲ 0 net votes
Running adb shell '... ; pkill -f "runserver --noreload 127.0.0.1:8010"; echo stopped' killed the adb shell itself (exit 143) because the shell's own command line contains the pattern, so later commands never ran. Use a pattern the shell line does not contain (e.g. pkill -f 'runserver --noreloa[d] 127'), save the PID with $! and kill that, or run the stop in a separate adb call. Afterwards confirm with ss -ltnp that only the intended server is gone.