endpoint
Returns where the debug server listens and the token that a client sends, or null when the server does not listen: before start, after stop, while the app is in the background, and when the bind failed.
Use it for a client in the app's process, such as an instrumentation test that calls the HTTP API at LustroEndpoint.url, or to show a developer how to connect: the adb forward command for LustroEndpoint.port, or a LustroEndpoint.lanUrls entry when DebugConfig.bindAddress opts into LAN exposure.
The token gives full access to the app's data through the server, so show it only in a debug build. With LAN exposure it changes each time the app's process starts, so do not keep it across processes. The first call can read the token from a private file; StrictMode can report that read on the main thread.