ADB: Phone is not recognised but Ubuntu 18.04 recognises it
This has solved my problem. I could not turn on USB debugging because the phone was connected to my computer. You have to unplug the phone first, start the USB debugging and plug it back in. Then, adb devices worked.