A friend of mine asked me how to root Samsung M11 running Android Q couple days ago. As we know that unlock bootloader will factory reset the phone, so I told him to backup all stuff on the phone first. All steps as below:
1.Enable USB Debugging and OEM unlocking in Settings
2.How to Unlock bootloader-
Press and hold the Volume UP and DOWN button first, then connect your phoneto your PC , your phone will boot into a specail mode. Do not press Volume Up, because it will enter Download Mode. Just press and hold the Volume Up key until you can see the “Unlock Bootloader” screen. Then begin to unlock bootloader. Once done your phone will reboot and show warnings as below. It's OK and don't worry about that.
3.Download Firmware and extract it-
Download stock firware zip file of M11 and extract it, then you will see a file APxxxxx, that is the boot image you need. Copy this file into internal storage in M11.
4.Install Magisk to generate patched boot image
5.Flash patchedboot image via Odin in Download Mode-