I have my Samsung Note9 (updated, on latest Android 9) connected via USB on Ubuntu Linux, latest platform-tools_r28.0.1. When I run adb shell, it works perfectly. The problem is, the device disconnects after the while (about 30 seconds).
I have the "stay awake" option enabled, but even if the screen remains on, adb keeps disconnecting. I discovered when I prevent the phone from sleeping by touching it, adb remains connected.
Am I do something wrong?