Skip to content

Instantly share code, notes, and snippets.

View kdb13's full-sized avatar

Kahan D. Bhalani kdb13

View GitHub Profile
@kdb13
kdb13 / connect.sh
Created January 24, 2022 06:47
A Linux alias command to connect to your Android device with ADB wirelessly.
# 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`"