Debugging and developing Defold Android through ufw firewall

I am learning how to run and debug from Ubuntu 22 to Android;
I have it generally working, although I guess I have many unknowns to work through.

To make it work I have turned off the firewall. I think it would be good to keep the firewall on.
Each time I run a session, adb logcat, reports a different port in use, is there a way to make this consistent so I can set a port (or range?) in ufw?
What is best practice here? Is this something I need to do in Defold or adb?
What should I go and read? Maybe it all in the Defold docs and I just need to read more slowly:-)
edited:layout:-)

The way ports are set up is documented here:

As you can see the editor always sets the port to “dynamic”. It is done in engine.clj:

One improvements could be for the editor to check if DM_SERVICE_PORT is set and then use that value instead of always setting it to “dynamic”.

Thanks for the reply. I think I will have to keep the firewall off while I debug as I don’t understand enough to ask sensible questions:-)
I will go back to trying to understand why the camera does not work in defold-gyro, but does in extension-camera (I though I should try to work this out for myself rather than being lazy and asking).

1 Like