ADB Cheatsheet
Proxy
To start the proxy
adb shell settings put global http_proxy <ip>:<port>To stop the proxy
adb shell settings put global http_proxy :0 Installation
# to install app
adb install apk.apk # /path/to/apkList and find packages/apk path
# to list path
adb shell pm list package
adb shell pm list package | grep <app info> #com.example.myapp
# to find path
adb shell pm path <package> #com.example.myapp
#-> output: /data/app/~ysdfoLA==/com.example.myapp-itdhuLUMgJXxQY_8dIt7RA=/Port forwarding
# this will forward your android 127.0.0.1:8001 to your computer 127.0.0.1:9001
$> adb reverse tcp:8001 tcp:9001
# to list your current port forwarding rules
$> adb reverse --list
host-26 tcp:9001 tcp:9001
host-26 tcp:8001 tcp:9001
# to kill/close any port forwarding rule
$> adb reverse --remove tcp:8001
$> adb reverse --list
host-26 tcp:9001 tcp:9001
# to kill/close ALL port forwarding rules
$> adb reverse --remove-allLast updated