[Samsung Galaxy S9  Questions & Answers] aspengrey:
Hello all;

Recently developed an issue with my S9. It won't connect to the computer over USB!

Unrooted, stock Galaxy S9 Firmware (Pi) with May 2019 security Update installed

Tried 4 USB cables (Original, Aukey USB 3.1, brand new USB 2.0, and brand new USB 3.0)

Tried on two different computers and on Android Auto (2017 VW GTI)

Charges perfectly fine from any computer or charger with any cable

Occasionally connects perfectly fine and will stay connected until I unplug it on either Android Auto or PC, regardless of how I move the device around

When it's wanting to connect, I can also unplug it at the phone end and plug it back in and it works fine.

No apparent correlation with 'how' I plug it in or hold the cable or temperature of the room I'm testing it in.

Connects more often to Windows 10 PC than to Android Auto

Occasionally, switching USB port on computer will make it work without replacing the plug on the phone end

On computer, will often 'Beep-beep' to indicate it connected, but doesn't show up in device manager and ADB won't detect it

When not connected, doesn't show up in ADB or Device manager

When it almost-connects on the computer, it will pop up the 'USB settings' notification and permissions dialogue, but then that disappears

Tried a full reset FROM the Settings menu.

Tried clearing cache

Carefully cleaned the USB C port on the phone with canned air and a soft plastic toothpick- didn't seem very dirty

Looking at Logcat files, I see that it starts to connect and then fail out

Other android phones and iphone work fine on Android Auto and on both computers

Any ideas? Is this most likely a hardware issue? (What Samsung support thinks)

Or is there a deeper hard reset/restore I can do? I tried a factory reset from the recovery menu but that failed saying that it had to be done from inside the OS. (New Pie security feature?)

Here's what I believe to be the relevant logcat file from connection to failure.

06-05 20:51:08.329 I/android.hardware.usb@1.1-service.wahoo( 725): partner added
06-05 20:51:08.331 I/android.hardware.usb@1.1-service.wahoo( 725): uevent received DEVTYPE=typec_partner
06-05 20:51:08.332 I/android.hardware.usb@1.1-service.wahoo( 725): port0
06-05 20:51:08.335 I/android.hardware.usb@1.1-service.wahoo( 725): connected:1 canChangeMode:1 canChagedata:0 canChangePower:0
06-05 20:51:08.335 I/UsbPortManager( 1477): ClientCallback: port0
06-05 20:51:08.343 D/UsbPortManager( 1477): addOrUpdatePortLocked()++ : portId=port0, supportedModes=dual, currentMode=ufp, canChangeMode=true, currentPowerRole=sink, canChangePowerRole=false, currentDataRole=device, canChangeDataRole=false
06-05 20:51:08.343 D/UsbPortManager( 1477): addOrUpdatePortLocked() supportedRoleCombinations=272
06-05 20:51:08.344 D/UsbPortManager( 1477): addOrUpdatePortLocked() supportedModes=dual
06-05 20:51:08.344 D/UsbPortManager( 1477): addOrUpdatePortLocked() mPorts DISPOSITION_REMOVED -> DISPOSITION_CHANGED
06-05 20:51:08.344 D/UsbPortManager( 1477): addOrUpdatePortLocked()--
06-05 20:51:08.344 D/UsbPortManager( 1477): mPorts size: 1
06-05 20:51:08.344 I/UsbPortManager( 1477): USB port changed: port=UsbPort{id=port0, supportedModes=dual}, status=UsbPortStatus{connected=true, currentMode=ufp, currentPowerRole=sink, currentDataRole=device, supportedRoleCombinations=[source:host, sink:device]}, canChangeMode=true, canChangePowerRole=false, canChangeDataRole=false
06-05 20:51:08.345 D/UsbPortManager( 1477): mPorts(0) DISPOSITION_CHANGED -> DISPOSITION_READY
06-05 20:51:08.345 D/UsbPortManager( 1477): updatePortsLocked()--
06-05 20:51:08.348 D/UsbDeviceManager( 1477): received ACTION_USB_PORT_CHANGED
06-05 20:51:08.348 I/UsbDeviceManager( 1477): updateHostState UsbPort{id=port0, supportedModes=dual} status=UsbPortStatus{connected=true, currentMode=ufp, currentPowerRole=sink, currentDataRole=device, supportedRoleCombinations=[source:host, sink:device]}
06-05 20:51:08.358 E/BartenderActivityManager( 1477): BarTender: pid : 20445 cached=true abnormal=false kill=false stay=false release=false
06-05 20:51:08.361 E/BartenderActivityManager( 1477): BarTender: pid : 18831 cached=true abnormal=false kill=false stay=false release=false
06-05 20:51:08.362 E/BartenderActivityManager( 1477): BarTender: pid : 20756 cached=true abnormal=false kill=false stay=false release=false
06-05 20:51:08.404 V/UsbDeviceManager( 1477): USB UEVENT: {SUBSYSTEM=android_usb, SEQNUM=6847, ACTION=change, USB_STATE=CONNECTED, DEVPATH=/devices/virtual/android_usb/android0}
06-05 20:51:08.405 I/UsbDeviceManager( 1477): updateState CONNECTED
06-05 20:51:08.405 D/UsbDeviceManager( 1477): handleMessage -> MSG_UPDATE_STATE connected = 1,configured = 0 mCurrentFunctions mtp
06-05 20:51:08.405 D/UsbDeviceManager( 1477): updateUsbNotification(false) : mConnected = true, mConfigured = false, mCurrentFunctions = 4, mHostConnected = false, mSourcePower = false
06-05 20:51:08.406 D/UsbDeviceManager( 1477): id=27, mUsbNotificationId=0, titleRes=17042083
06-05 20:51:08.411 D/ApplicationPolicy( 1477): isStatusBarNotificationAllowedAsUser: packageName = android,userId = -1
06-05 20:51:08.411 D/API test( 1477): getContainerInfo: value is
06-05 20:51:08.411 D/ApplicationPolicy( 1477): isStatusBarNotificationAllowedAsUser: packageName = android,userId = 0
06-05 20:51:08.412 D/API test( 1477): getContainerInfo: value is
06-05 20:51:08.415 D/UsbDeviceManager( 1477): updateUsbNotification : notify id = 27, title = USB for file transfer
06-05 20:51:08.415 D/UsbDeviceManager( 1477): updateUsbStateBroadcastIfNeeded functions 5
06-05 20:51:08.415 D/UsbDeviceManager( 1477): updateUsbStateBroadcastIfNeeded remainingFunctions 5
06-05 20:51:08.416 D/UsbDeviceManager( 1477): broadcasting Intent { act=android.hardware.usb.action.USB_STATE flg=0x31000000 (has extras) } extras: Bundle[{host_connected=false, connected=true, unlocked=true, config_changed=false, adb=true, mtp=true, configured=false}]
06-05 20:51:08.421 V/UsbDeviceManager( 1477): USB UEVENT: {SUBSYSTEM=android_usb, SEQNUM=6848, ACTION=change, USB_STATE=DISCONNECTED, DEVPATH=/devices/virtual/android_usb/android0}
06-05 20:51:08.421 I/UsbDeviceManager( 1477): updateState DISCONNECTED
06-05 20:51:08.429 D/MTPRx (22081): In MtpReceiverandroid.hardware.usb.action.USB_STATE
06-05 20:51:08.430 D/UsbDeviceManager( 1477): sending intent : ACTION_USB_STATE : connected = true, configured = false, mCurrentFunctions = 4, mHostConnected = false, configChanged = false