Last active
April 3, 2024 16:51
-
-
Save waruqi/d927538e1f24cd731f93cad5f60507f7 to your computer and use it in GitHub Desktop.
Set usb charles proxy for android
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 | |
if [ $1 == "1" ]; then | |
echo "start proxy on 127.0.0.1:8888" | |
adb reverse tcp:8888 tcp:8888 | |
adb shell settings put global http_proxy 127.0.0.1:8888 | |
adb shell settings put global https_proxy 127.0.0.1:8888 | |
else | |
echo "stop proxy on 127.0.0.1:8888" | |
adb reverse --remove tcp:8888 | |
adb shell settings put global http_proxy :0 | |
adb shell settings put global https_proxy :0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment