How to install Android 9.0 Pie based AOSP ROM on Redmi Note 5
1. Download and move the AOSP 9.0 ROM as well as GApps package to device internal storage.
2. Now boot your phone into TWRP Recovery.
3. Now you need to perform factory reset. To do so, go to Wipe > Advanced Wipe > Select Wipe cache, Dalvik cache, System, and data and swipe to confirm it.
4. Similarly, you need to flash the Android 9.0 Pie GApps on your Redmi Note 5.
5. Wipe cache and dalvik cache again
6. Reboot System
7. That’s it! The device will automatically boots to latest Android 9.0 Pie firmware.