Opening ADB on an unsecured connection is a security threat as it gives access to entire filesystem. So, it is better if you connect to ADB over WIFI. If you still opt for connecting to ADB over 3G/4G network, below are the steps:
-
To reset, turn off USB debugging on your device and turn it on again.
-
Kill the ADB server on your PC using command adb kill-server
-
Connect your device to the PC using the USB cable and type adb devices. This will automatically restart the ABD server again.
-
Enter adb tcpip 5555 on your PC terminal. This will switch the adbd daemon on your device to tcp-ip mode.
-
Disconnect your device from USB. Connect your device to the same wireless network as your PC, either the same WIFI or use your phone as a hotspot.
-
Determine your phone's ip. You can do this in the WIFI settings on your phone. If you are using your phone as hotspot, then generally your ip should be 192.168.43.1.
-
Connect to ADB via tcp using adb connect .
This should hopefully connect your device to pc via tcp-ip.