Heimdall Error Protocol initialisation failed! on Ubuntu I want to install CyanogenMod on my Samsung Galaxy S5. I'd downloaded the version and did the excact steps from the wiki. But when I try to flash with Heimdall I get this error:

Ubuntu-Laptop:~/Downloads/cm-12.1-20151007-SNAPSHOT-YOG4PAO333-klte$ sudo heimdall flash --RECOVERY boot.img --no-reboot
Heimdall v1.4.1

Copyright (c) 2010-2014 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
ERROR: Protocol initialisation failed!

Releasing device interface...



I didn't find anything with Google. Please help.

Thanks.
I was experiencing the same problem, and I found a solution that worked for me in a comment on Heimdall issue #228.

The problem for me was that udev was reserving the phone as a modem when I plugged it in.  If you run dmesg and see a line that says "This device cannot do calls on its own. It is not a modem.", then this could work for you.

As root, create a file named /etc/udev/rules.d/79-samsung.rules with the following content:

ATTRS{idVendor}=="04e8", ENV{ID_MM_DEVICE_IGNORE}="1"


Then restart udev with "sudo service udev restart", and unplug/replug the device, and you can try to install again.

If that doesn't work or if it's a different problem, you can edit your question to add the output of these commands:

heimdall detect --verbose --usb-log-level debug
sudo heimdall print-pit --verbose --no-reboot