Fixed IP shown as '0.0.0.0' when using hotspot instead of WLAN #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: when not connected to WiFi, and using Hotspot/AP instead, it was possible to connect to phone, however WADB would show '0.0.0.0' as IP. It was required to identify default gateway from computer, and use that IP address to connect.
Solution: use root shell to pull IP address of AP device. Iff no there is no WLAN connection (0.0.0.0 was about to be shown), default gateway of AP is shown instead (if any)
Bonus: altered app's interface to display both WLAN and AP IPs, if both are available (notification and tile still still show WLAN only, otherwise fallback to AP)
Tested on Pixel 5 Android 12L.