[Xiaomi Redmi Note 4 [Snapdragon] ROMs, Kernels, Re] cidxtc:
How to dual boot sailfish

What you need

Dual boot patcher apk

Dual boot zip ( https://www.androidfilehost.com/?w=files&flid=235060 )

Firmware (link in OP)

Cm 14.1 (link in OP)

Sailfish os (link in OP)

Whatever other roms you want to use

A sdcard/otg drive/pc and usb cable (you have to fully wipe your device so these files need to be somewhere you can access later)

*first you need to be running a rom with root

*install dual boot patcher apk

*open dual boot patcher apk

*in menu select patch zip file

*select your zip

*choose data slot for install type and name the slot (such as cm/miui/etc)

*If installing aosp type rom you need to patch gapps using same data slot name as rom

*now patch the zips and move to you safe storage place

*once all files have been moved boot into recovery and backup current rom

*you will need to backup to sdcard (not internal) or move backup to pc/otg drive

*now do a factory reset

*now flash firmware (move it from pc if thats where you stored it)

*now do data wipe (the one that asks for confirmation because it fully wipes /data including internal storage)

*reboot into recovery

*now copy all files over to phone if they are on pc

*flash cm 14.1

*flash sailfish

*do a backup (only need boot but full backup wont hurt)

*boot into sailfish

*setup sailfish

*power off and boot into recovery (hold power+vol up till splash screen then release)

*now flash patched rom and gapps if needed

*reboot system (it will automatically boot into the rom you just installed

*setup rom

*install dual boot patcher apk

*set kernel (this saves a copy of boot.img to internal sdcard)

*I also go into the app settings and install boot UI (this allows a boot menu whenever a secondary rom is booted)

*now go into a file manager and copy the boot file from the backup to /sdcard/multiboot/primary

*make sure to rename to boot.img

*now you can use the apk to change rom when running secondary or reboot and a menu will show giving you a chance to change roms

*if running sailfish you must boot into recovery and flash the dualboot zip which allows you to change roms

So a few issues you might run into.

If you update sailfish make sure to backup boot and overwrite the one on /sdcard/multiboot/primary.

If modify boot (systemless root) or new kernel on secondary rom then you need to set kernel again in the app.

Any zip for secondary rom must be patched before flashing.

If you have multiple secondary roms and have passwords set for lockscreen you will have some problems. It can be done but takes a few steps.

For multiple secondary roms with passwords dont setup passwords till all roms are installed.

After passwords are set before the next boot of every rom (excluding sailfish) you will have to delete the password files. The second time they are set they work fine till you install another rom.

FYI

Also secondary roms are stored on /data so if you backup sailfish after installing roms the data backup size will be huge. Also if you restore a sailfish backup all secondary roms will disappear or revert to last state before backup. Updating sailfish via rom or zip does not change secondary roms unless you format data partition.

[MENTION=455718]PiggZ[/MENTION] I would suggest linking this in OP so I can make changes if needed.