How can I activate UDP forwarding for USB communication between a PC and an Android app
So finally, I did not find out how to enable UDP forwarding for USB communication but I did somethings else that works pretty well, but you have to enable USB tethering (from the computer ping the phone to see if it's properly enabled):


Create a TCP server on the phone and a TCP client on the desktop.
Execute adb tcp:port tcp:port on the desktop so it can communicate with the phone on localhost via TCP sockets.
Make the TCP server send the IP address (on the USB tethering network) of your phone to the TCP client.
Then you can close the TCP connection and with the address you can initiate an UDP connection with socket as you would in a normal situation.