Portrait mode became one of the most popular features for cameras in 2017. Apple's iPhone lineup, the Galaxy Note8, the OnePlus 5T, and even the Essential Phone have it in their camera apps. However, owners of older phones were left out of the fun. Luckily, serial Google Camera modder Charles Chow has created a modded Google Camera APK with portrait mode on board for the first-generation Pixel and Pixel XL, the Nexus 6P, and the Nexus 5X.
Chow is well-known in the Android community for porting these newer features to older phones. Most recently, he also brought modified versions of AR Stickers and ARCore to Nexus 6P and 5X users as well. Those features are fascinating, but not nearly as useful as portrait mode is. His explanation of the mod is probably more complicated than he lets on, but to the end user, portrait mode simply replaces the lens blur mode. Taking a photo in this mode will produce two images: one HDR+ photo with zero shutter lag, and one with the portrait effect applied.
To get this feature on your Pixel, Pixel XL, Nexus 6P, or Nexus 5X, simply download Camera NX v7.3 via APK Mirror. This version of Camera NX is based off of Google Camera 5.1.016, which is the same as the most recent v5.1.018. You can also use the previously-mentioned AR Stickers/ARCore mods in conjunction with this for the maximal Pixel 2 camera experience, though those aren't without their bugs.