Portrait mode on the Pixel 2 is one of the things that continues to impress me on the phone even after months of using it, and it's something that was recently ported over to the first-generation Pixel, Nexus 6P, and Nexus 5X as an update to Charles Chow's Camera NX app. Now, thanks to another developer by the name of Arnova8G2 on the XDA Developers forums, the Pixel 2's portrait mode can be used on certain non-Google phones running Oreo.
With Arnova8G2's modification to Chow's latest work, NX Camera 7.3 can be installed on other Android devices with a fully functional portrait mode. The OnePlus 3/3T, Moto G5S Plus, and Galaxy Note 8 are among the devices that have been confirmed to work with this, and while it should be compatible with most Android phones on Oreo, you'll need to download the app and test it out for yourself.
Portrait mode is currently only working for rear cameras, but it's expected that Arnova8G2 will release an updated version of the app so that it can be used with front-facing cameras, too.
Although this isn't an official solution, it is something worth trying out if you can't pick up the Pixel 2 but want to dive into the world of excellent portrait shots. The app seems to be working just fine for some folks, but others are reporting that it continually crashes. Again, your milage will vary.
If you decide to try the app for yourself, drop a comment down below and let us know what your results are.