ADB Auto Port Mapping
When you debug an Android device or emulator, the debuggee app connects to the JetWhale host's WebSocket server on localhost. For that to work, the device needs an adb reverse port forwarding so that localhost:<port> on the device reaches the host machine.
JetWhale can manage this for you: with ADB auto port mapping enabled, the host watches ADB for device connections and sets up (and tears down) the reverse port forwarding automatically — no manual adb reverse commands needed.
Enabling it
Open Settings → General in the JetWhale host and toggle ADB auto port mapping.
While enabled, the host:
Locates your
adbbinary automatically (see How adb is found).Runs
adb track-devicesto watch devices connect and disconnect.When a device comes online, runs the equivalent of:
shelladb -s <serial> reverse tcp:<serverPort> tcp:<serverPort>for each active server port — the plain ws port and, when a certificate is active, the wss port too — so both endpoints reach the host.
When a device goes offline, removes its reverse mappings.
If the ADB server restarts or crashes (for example, another tool ran adb kill-server), JetWhale automatically re-attaches to the device tracking stream after a short backoff — you don't need to toggle the setting again.
Disabling the setting stops the device tracking and removes all reverse mappings JetWhale created.
How adb is found
JetWhale looks for the adb executable in the usual locations, in order:
- Common binary directories such as
/usr/binand/usr/local/bin - The default Android SDK location —
$HOME/Android/Sdk/platform-toolson Linux,$HOME/Library/Android/sdk/platform-toolson macOS $ANDROID_HOME/platform-toolsand$ANDROID_SDK_ROOT/platform-tools- Finally, plain
adbresolved via yourPATH
If none of these work in your environment, make sure adb is on the PATH of the shell that launches the JetWhale host, or set ANDROID_HOME.
Manual setup (if you prefer)
If you'd rather manage the forwarding yourself, leave the setting off and run:
adb reverse tcp:<serverPort> tcp:<serverPort>after each device connection, using the ports shown in Settings → Server (repeat for the wss port if the agent connects over wss).
Non-Android platforms
Desktop, iOS Simulator, and Web debuggees run on the same machine (or share its network stack), so they reach the host directly on localhost — no port mapping is involved.