[Samsung Galaxy S 5 Unified Development] curiousrom:
S5 Connecting to PC - adb Wireless Debugging

What is the OS of your computer?

If it's Windows install the most recent drivers found in Samsung Developers - Android USB Driver for Windows.

If you used Heimdall & it's clunky Zadig.exe sidekick on Windows it may have messed up the drivers including making Odin3 fail to connect to the S5 and that may fix it. If you did use Heimdall can you reboot the S5 with print-pit in Heimdall? You could try uninstalling the driver you installed with Zadig.exe if you remember it. Maybe it's MSM8x60 or Gadget Serial or something else that you may see in Device Manager with the S5 connected & Heimdall opened.

On the S5 what does it say in > Settings > About phone > Android version > LineageOS version?

Try turning off the device, wait a few seconds then turn back on. Reboot the computer and try an other USB port or with/without a USB hub.

What are you trying to do? Connecting using adb or file transfer?

In TWRP recovery MTP file transfer & adb is enabled by default. Can you connect to PC using that? AFAIK adb is enabled in Lineage recovery. Don't know about file transfer with that recovery.

If it's not setup yet see What is ADB? How to Install ADB, Common Uses, and Advanced Tutorials (for Windows, macOS or Linux).

***

USB File transfer

With USB debugging enabled in Developer options & connected to the computer do you get a notification saying "Android System - Charging this device via USB"? If so, tap on it to get more options & select File Transfer as seen in the screenshot. On my Windows 10 PC the device model appears in Explorer. SM-G900M in my case.

If it fails try in Developer options > Default USB configuration > File Transfer.

***

Connecting via adb

With the S5 connected you should get a notification saying "USB debugging connected".

In the terminal or command prompt window type adb devices and if the response is:

List of devices attached

f3d3xxxx {device's serial number} unauthorized

then on the S5 there should be a popup asking to "Allow USB debugging?".

If not, disconnect & in Developer options > Revoke USB debugging authorizations. Then reconnect and you should get that popup.

Warning: there is an annoyance in Android 11: it will automatically revoke adb authorizations by default after 7 days if you do not enable Disable adb authorization timeout in Developer options as seen in the screenshot.

This could be important if for example your screen does not turn on & you want to use adb. In that case you will not be able to re-authorize the computer to connect to the device because it was automatically disabled and you can't see the prompt.

***

adb Wireless debugging

In previous Lineage version it was called ADB over network. In LineageOS 18.1 it's named Wireless debugging and you can add a quick tile shortcut with Developer options > Quick settings developer tiles. After that edit the quick tiles & drag it up.

With your device connected to the same Wifi network as you computer in ADB over network you could could connect in adb with just the IP address. For example:

adb connect 192.168.100.3

Now in Wireless debugging you need to include also the port which changes every time you use it. An other Android 11 annoyance. For example:

adb connect 192.168.100.3:43791

To see what it is currently for your device long press Wireless debugging as seen in the screenshot.

I copy/paste that from a adb doc I keep but with checking the new port every time.

***