[Nexus 6P Android Development] masamunecyrus:
Well, I just decided to switch to this coming from Pure Nexus (Nougat). I got the dreaded "please insert sim" issue, so I'll start documenting what I've done to try to fix it.

Before I start, I'm on an unlocked Google Nexus 6p. My carrier is Verizon. My phone has a fingerprint+PIN lock and is encrypted.

edit: It's the encryption, guys.

Having an encrypted phone prior to installing Nitrogen OS causes the "no SIM" issue. Click the button below to see the steps I took to diagnose the issue.

First, the prerequisites:

Nitrogen OS (Nitrogen-OS-O-angler-20171107.zip)

Gapps (BeansGappsMini-arm64-8.x.x-unofficial_NovemberUpdate.zip)

TWRP (twrp-3.1.1-0-angler.img)

Magisk (Magisk-v14.0.zip)

Factory image (OPR5.170623.011, Nov 2017) (angler-opr5.170623.011-factory-0e60ceb6.zip)

ElementalX Kernel (ElementalX-N6P-5.04.zip)

Now, let's try wiping and flashing.

Extract angler-opr5.170623.011-factory-0e60ceb6.zip and start the flashing process.

Reboot to bootloader

fastboot flash bootloader bootloader-angler-angler-03.77.img

fastboot reboot-bootloader

fastboot flash radio radio-angler-angler-03.84.img

fastboot reboot-bootloader

fastboot flash boot boot.img

fastboot flash system system.img

fastboot flash vendor vendor.img

fastboot flash recovery twrp-3.1.1-0-angler.img

Reboot to Recovery

TWRP Advanced Wipe --> Dalvik / ART Cache, System, Data, Internal Storage, cache

adb push Nitrogen-OS-O-angler-20171107.zip /sdcard

adb push BeansGappsMini-arm64-8.x.x-unofficial_NovemberUpdate.zip /sdcard

adb push ElementalX-N6P-5.04.zip /sdcard

adb push Magisk-v14.0.zip /sdcard

TWRP install Nitrogen OS, Beans Gapps, ElementalX Kernel, Magisk

Wipe cache/dalvik

Reboot System

No sim card found. Crap. Let's try again. This time, complete wipe, including the PIN and everything. And I'll skip the kernel.

Reboot to bootloader

fastboot flash boot boot.img

fastboot format cache

fastboot format userdata

fastboot flash system system.img

fastboot flash vendor vendor.img

fastboot flash recovery twrp-3.1.1-0-angler.img

Reboot to Recovery

TWRP Factory Reset

adb push <NitrogenOS, Gapps, Magisk> /sdcard

TWRP install Nitrogen OS, Beans Gapps, Magisk

Wipe cache/dalvik

Reboot System

Please insert sim card. Ugh. Ok, let's flash stock and make sure it detects the sim card.

Reboot to bootloader

fastboot flash boot boot.img

fastboot format cache

fastboot format userdata

fastboot flash system system.img

fastboot flash vendor vendor.img

fastboot flash recovery recovery.img

Reboot System

SIM seems to be found! Great. I go through the quick install. Everything is working. Enable Fingerprint+PIN and encrypt. Enable Developer Mode, turn on USB debugging, and reboot to bootloader. Now,

Reboot to bootloader

fastboot flash recovery twrp-3.1.1-0-angler.img

Reboot to Recovery

TWRP Factory Reset

adb push <NitrogenOS, Gapps, Magisk> /sdcard

TWRP install Nitrogen OS, Beans Gapps, Magisk

Wipe cache/dalvik

Reboot System

Please insert SIM. Crap. Well, let's try this all again, ONE AT A TIME, and without any security, at all. No fingerprint+PIN.

Reboot to bootloader

fastboot flash boot boot.img

fastboot format cache

fastboot format userdata

fastboot flash system system.img

fastboot flash vendor vendor.img

fastboot flash recovery recovery.img

Reboot System

Ok. System booted up. SIM is detected! Setup -nothing-. Immediately reboot to bootloader. Let's install everything one-at-a-time. Let's also try flashing vendor.img again via TWRP after flashing Nitrogen OS.

Reboot to bootloader

fastboot flash recovery twrp-3.1.1-0-angler.img

Reboot to Recovery

adb push <NitrogenOS, Gapps, Magisk> /sdcard

adb push vendor.img /sdcard

Now, one at a time.

TWRP install Nitrogen OS

Wipe cache/dalvik

Reboot System

It works! Well, sort of. SIM card is detected--great! However, it booted straight to the homescreen (skipped setup) and I'm also getting Google Play Services crashes. That's fine. It was a dirty flash on a phone that wasn't even set up properly. Let's do a factory reset and flash Nitrogen.

Reboot to Recovery

TWRP Factory Reset

TWRP install Nitrogen OS

Wipe cache/dalvik

Reboot System

SIM works, again! More crashes, though, and again, straight to the homescreen. Ok, let's get Gapps installed.

Reboot to Recovery

TWRP Factory Reset

TWRP install Nitrogen OS

TWRP install Gapps

Wipe cache/dalvik

Reboot System

I think we're in business! SIM is detected. It booted to the setup. Let's get this set up.

Log into my account

Set fingerprint+PIN

Turn ON secure start-up

Turn on USB debugging

The moment of truth. Let's just reboot the phone--don't install anything, just give it a reboot now that Fingerprint+PIN and Secure Start-up are enabled.

Reboot System

Type in my PIN

The phone boots and I have SIM!

"Google Play Services has stopped working." Well, that's great. Let's hope it's an isolated incident.

Alright, let's get Magisk and ElementalX going.

Reboot to Recovery

Type in my PIN

TWRP Install ElementalX

TWRP Install Magisk

Wipe cache/dalvik

Reboot to System

Everything seems to be working. SIM is still detected. I was able to update Magisk Manager to the newest version and elevate to superuser via adb shell su. Let's give it one more reboot to make sure it's still working...

And, it seems to be working!

If you want to install Nitrogen OS on a phone with Secure start-up enabled, you'll have to do a complete wipe, including nuking your encryption. You can turn back on Fingerprint+PIN and Secure Start-up after you've flashed Nitrogen OS, but your phone cannot be encrypted until Nitrogen OS is already installed, otherwise you'll get the SIM card error.

You can go from encrypted phone to Nitrogen OS using the following steps:

First, the prerequisites:

Nitrogen OS (Nitrogen-OS-O-angler-20171107.zip)

Gapps (BeansGappsMini-arm64-8.x.x-unofficial_NovemberUpdate.zip)

TWRP (twrp-3.1.1-0-angler.img)

Magisk (Magisk-v14.0.zip)

Factory image (OPR5.170623.011, Nov 2017) (angler-opr5.170623.011-factory-0e60ceb6.zip)

ElementalX Kernel (ElementalX-N6P-5.04.zip)

Then, wipe and install Nitrogen OS

Extract angler-opr5.170623.011-factory-0e60ceb6.zip and start the flashing process.

Reboot to bootloader

fastboot flash bootloader bootloader-angler-angler-03.77.img

fastboot reboot-bootloader

fastboot flash radio radio-angler-angler-03.84.img

fastboot reboot-bootloader

fastboot format cache

fastboot format userdata

fastboot flash boot boot.img

fastboot flash system system.img

fastboot flash vendor vendor.img

fastboot flash recovery twrp-3.1.1-0-angler.img

Reboot to Recovery

TWRP Factory Reset

adb push Nitrogen-OS-O-angler-20171107.zip /sdcard

adb push BeansGappsMini-arm64-8.x.x-unofficial_NovemberUpdate.zip /sdcard

adb push ElementalX-N6P-5.04.zip /sdcard

adb push Magisk-v14.0.zip /sdcard

TWRP install Nitrogen OS, Beans Gapps, ElementalX Kernel, Magisk

Wipe cache/dalvik

Reboot System