Created
January 24, 2022 06:47
-
-
Save kdb13/e304b1b36a51e91ed01c6b22f59172c6 to your computer and use it in GitHub Desktop.
A Linux alias command to connect to your Android device with ADB wirelessly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put the following lines within your .bashrc file. | |
# Get default gateway's IP address | |
alias defaultip="ip r | grep default | grep -o -E "[0-9]+.[0-9]+.[0-9]+.[0-9]+"" | |
# ADB shortcut | |
# Note: Linux users shall replace "adb.exe" with just adb. | |
# I'm using WSL and hence I used adb.exe to access the Windows version | |
alias connect="adb.exe connect `defaultip`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment