Created
April 4, 2022 11:56
-
-
Save Leeonardoo/850f3ffb9b51ab3388eb61ca1daec384 to your computer and use it in GitHub Desktop.
ADB-All and localhost port forwarding
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
#!/bin/bash | |
# Place it on /usr/bin/ | |
adb devices | while read line | |
do | |
if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ] | |
then | |
device=`echo $line | awk '{print $1}'` | |
echo "$device $@ ..." | |
adb -s $device $@ | |
fi | |
done |
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
#!/bin/bash | |
# Place it on /usr/bin/ | |
adb-all reverse tcp:3000 tcp:3000 | |
adb-all reverse tcp:80 tcp:80 | |
adb-all reverse tcp:8080 tcp:8080 | |
adb-all reverse tcp:8088 tcp:8088 | |
adb-all reverse tcp:443 tcp:443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment