Last active
March 29, 2022 10:48
-
-
Save GianpaMX/1604acc05282d5bc23a2eb53228bdbb2 to your computer and use it in GitHub Desktop.
Prints phone ip address
This file contains hidden or 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
#!/bin/bash | |
adb() { | |
if [[ $@ == "ip" ]]; then | |
command adb shell netcfg | grep wlan0 | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | |
else | |
command adb "$@" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add
To
~/.profile
fileThen the output would be