Android Debug Bridge (ADB)
The client interact with the server (Android Device) using the ADB to execute commands, this can be done via USB or network port.
List all current connected devices
PS C:\\Users\\iron\\Documents\\android-platform-tools> .\\adb.exe devices
List of devices attached
192.168.33.101:5555 device
PS C:\\Users\\iron\\Documents\\android-platform-tools> .\\adb.exe devices -l
List of devices attached
192.168.33.101:5555 device product:vbox86p model:Samsung_Galaxy_S6 device:vbox86p transport_id:2
PS C:\\Users\\iron\\Documents\\android-platform-tools> .\\adb.exe shell
root@vbox86p:/ # ls
acct
cache
charger
config
d
data
default.prop
dev
etc
file_contexts
fstab.vbox86
root@vbox86p:/ # id
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats)
root@vbox86p:/ #
C:\\Users\\iron\\Documents\\android-platform-tools>adb shell
generic_x86_arm:/ $ whoami
shell
generic_x86_arm:/ $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:shell:s0
generic_x86_arm:/ $ exit
C:\\Users\\iron\\Documents\\android-platform-tools>adb root
restarting adbd as root
C:\\Users\\iron\\Documents\\android-platform-tools>adb shell
generic_x86_arm:/ #
See connected devices:
PS C:\\Users\\iron\\Documents\\android-platform-tools> .\\adb.exe devices
List of devices attached
192.168.33.101:5555 device
emulator-5554 device
Connect to specific devices: