using
server = ServerSocket(8080, 8, InetAddress.getByName("127.0.0.1"))
on the device i tried with Android 11 still produces an IPv6 server as shown by netstat -lte
(and not a tcp46
connection as seen in other answers).