Default [Q] Custom rom with knox 0x0

Hi
I wan't to install miui rom but i wasn't lost my warranty
If do i a saferoot and modify recover with root explorer or something without odin, and flash miui, the flag goes to 0x1?
Are there any way to flash rom withouth lost warranty?
Sorry for my poor english and thanks!