I installed the Mi remote application on an Android phone with an infrared port...
That means you are using an IR receiver dongle at serial port, right?
Code
Supported protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm
Enabled protocols: lirc sony
Do you use a LIRC RC? If not, disable it at Settings -> Services and reboot, as mentioned at your first link (part Troubleshooting).