Update Android on bootloader unlocked, rooted, encrypted device

I currently run stock Android Marshmallow on a Nexus 5 (hammerhead). However, my device is bootloader unlocked, rooted, and encrypted, which makes updating Android difficult. Below are the steps I use to update minor versions of Android (e.g., 6.0.0 to 6.0.1) without losing any data.

Do this at your own risk, I’m not responsible for anything you break 🙂