[Xiaomi Redmi Note 5 Pro ROMs, Kernels, Recoveries,] FabreFaction:
Clean flash and build of Havoc OS V3.2 with ViPER4Android FX v2.7.1.0

Clean flash and build of Havoc OS V3.2 with ViPER4Android FX v2.7.1.0

Thanks

Thanks @Ruturaj Kadam @jhenrique09 @ZeNiXxX (Viktor Hermann) @SKULSHADY (Anushek Prasal) for the ROM

Thanks to all the other ROM Developers, Testers, Donators and Users

Thanks @kumardeepu for the advice that helped put me on the right track to sort out my problem with ViPER4Android FX 2.7x

Thanks to @gabwielcastwo for his post that put me onto the Audio Modification Library

Thanks to @afah_me for the guide on how to enable ViPER4Android FX on Android 10

Thanks to @Team_DeWitt for the awesome work on keeping VIPER4Android FX alive and kicking

Thanks to all the VIPER4Android FX 2.7x Developers, Testers, Donators and Users

Problems Encountered

No gesture input with OpenGapps Nano - Flashed Havoc OS V3.2 Gapps over the top, all okay

Hang on boot after installing the ViPER4Android FX 2.7x Magisk module – See the ViPER4Android FX sections below

Note

I haven’t listed the blow by blow steps I took for the rebuild below, I’ve not listed all rework and rebuilds I needed to get the final working build, just the steps to a final working build. So you don’t have to plough through all of my mistakes, just the steps that worked

Original Configuration

Recovery: OrangeFox R10.0.1

Firmware: Global V10.2.2.0

ROM: Havoc OS V2.5

GAPPS: Open GAPPS Nano

Root: Magisk 19x

Custom Kernel: None

Rebuild Configuration

Recovery: OrangeFox R10.0.3

Firmware: Global V11.0.3.0

ROM: Havoc OS V3.2 25-02-2020

GAPPS: Havoc OS V3.2 25-02-2020 GApps

Root: Magisk V20.3

Custom Kernel: None

Prep Work

Listed all the Apps I want on my new build - e.g. went through all the apps I’ve currently got installed and made a note of the ones I want on my new build. I didn’t want every app that is currently installed as loads of them I have downloaded and used once or never

Backed up APKs for apps I can’t get from the PlayStore - I use AB&S Pro (App Backup and Share Pro) as it seems to create clean APKs I can install easily

ES File Explorer

F-Droid

XDA Labs

Backed up SMS and Call Logs - SMS Backup & Restore (I backup to my SD Card as my SD Card content syncs with a server on my home network using FolderSync Pro)

Backed up WhatsApp – use the internal backup feature of the app to backup to Google Drive

Backed up FolderSync Pro database – makes it easier to setup up my folder syncs on my new build as the backup contains and encrypts tokens and passwords

Listed my Magisk modules so I can reinstall them on the new build

MIUIcamera v2 PORT – Didn’t reinstall as the camera(s) in the ROM are fine

VIPER4Android FX Legacy – This is deprecated (superseded), so I’ll be using ViPER4Android FX 2.7x on the rebuild

Copied files from Internal Storage that I want to keep

I tend to keep my camera photos and videos on my internal storage, so I copied those to the SD Card

Ran a final file sync with FolderSync Pro

Downloads to PC for Havoc OS V3.2

Recovery: OrangeFox-R10.1_3-Stable-whyred.zip

Firmware: fw_whyred_miui_HMNote5Global_V11.0.3.0.PEIMIXM_ff4c5a6b1a_9.0.zip

ROM: Havoc-OS-v3.2-20200225-whyred-Official.zip

GAPPS: Havoc-OS-v3.2-20200225-whyred-Official-GApps.zip

Root: Magisk-v20.3.zip & MagiskManager-v7.5.1.apk

Custom Kernel: None

Rebuild onto Havoc OS V3.2

Powered off and removed SD Card, then hooked it up to my PC

Copied the downloads (above) to SD Card

Put the SD Card back in the SmartPhone and booted into recovery

Pressed and held Power, Volume Up and continued to hold these two buttons down during boot until the MI logo had been on the screen for a second or so, then released the buttons

Booted into OrangeFox Recovery Mode menu

Deleted the Android folder from the SD Card - files from previous builds' apps

In File Manager

Navigated to /sdcard1/Android

Pressed the button bottom right with the folder icon on it

Selected Delete from the menu

Swiped to confirm the deletion of the /sdcard1/Android folder

Went back twice

Flashed the downloaded Recovery

Selected Install from the main menu and navigated to the recovery ZIP file

Selected the ZIP file and swiped to install

OrangeFox automatically rebooted back into Recovery once the updated Recovery file was flashed

The new version of OrangeFox looked a lot different to me than the old version. The menu of the previous version was replaced with a series of sections selectable from buttons at the bottom of the screen – Files (File Manager), Backups, Wipe, Menu (more functions/options including reboot). This took a little getting used to but it’s sort of Material Design, so it doesn’t take long to work out how to use this new interface

Went to settings

Disabled MIUI OTA

Set the screen brightness and timeout to my preference – 50% and 120secs

Wiped everything, selected the Wipe button from the bottom of the screen and selected the partitions to wipe – I’m going for a super clean build so I selected all the internal partitions

Dalvik / ART Cache

Cache

System

Vendor

Data

Internal Storage

Rebooted into recovery once more – Menu – Reboot – Recovery

Once booted into recovery, navigated to my Flashable files on my SD Card in the File Explorer

Flashed the Firmware, Wiped Caches and rebooted into recovery once more

Next Flashed ROM, GAPPS and Magisk

Next rebooted into System….. this took a while

On my first boot I ended up stuck on the Mi logo screen and the Unlocked message was gone. So I held down the power button to reboot, the Unlocked message was still missing but the OS booted

Went through the Google setup

Configured home WiFi

Copy Apps and Data? Don’t Copy

I was asked for my PIN to continue, which was the PIN I had previously used to lock the SmartPhone

I skipped the Google account/E-mail setup

Deselected Free Up Space on the next screen

Accepted the Google Ts & Cs

Setup Fingerprints (one on each hand so it doesn’t matter which hand I’m holding the SmartPhone with) + PIN for screen lock

Finished the setup

Opened MagiskManager and all looked okay, did the SafetyNet Check successfully

Rebooted the system

Installed F-Droid APK

Updated F-Droid repositories

Installed AdAway from F-Droid, launch, granted SuperUser permissions, enabled Ad Blocking, rebooted

Launched Google Play and entered credentials

Installed my other APK apps, ES File Explorer and XDA Labs

Went into Google Play and set up my Google credentials

Installed NordVPN and set it up

Installed SMS Backup & Recovery and restored my SMS messages and Call Logs

Rebooted into recovery and ran a full backup

Wiped Caches and rebooted into system

Installed and configured VIPER4Android FX (see below)

Installed and configured the rest of my apps

All Done, all working, awesome

VIPER4Android FX V2.7x

This was quite pain to get sorted, my first install left me hanging on the MI logo on boot, but I got there in the end with a tweaked install of VIPER4Android FX v2.7.1.0 and the addition of Audio Modification Library v2.5.

The two threads that really helped are:

[APP][ALL ROOT SOLUTIONS][6.0+]ViPER4Android FX 2.7

[GUIDE] [ANDROID 10] [SAR A-ONLY] Enable Viper4android without stuck bootlogo

I read the GUIDE thread through a few times to come up with a solution that worked for me.

I got the driver working pretty quickly, but it wouldn’t work with my Bluetooth headphones, it was enabled but not processing. Installing the Magisk module Audio Modification Library finally sorted it out for me.

VIPER4Android FX V2.7x install and configuration

Downloaded the post-fs-data.sh.txt file attached to the first post on the GUIDE thread and followed the third method in the first post to get it installed and working.

Downloaded the post-fs-data.sh.txt attachment

Renamed it to post-fs-data.sh and dropped it onto my SD Card

Installed VIPER4Android FX v2.7.1.0 through Magisk Manager – Go to Downloads in the menu and search for VIPER

Didn’t reboot after the install, just closed Magisk Manager

Launched VIPER4Android FX and it prompted to install the driver, installed the driver, automatically rebooted

Held down the Volume Up key on reboot to launch Recovery

Copied post-fs-data.sh from SD Card to data/adb/modules/Viper4AndroidFX

Set the file permissions on post-fs-data.sh to 0755 – the GUIDE suggested 0644 (rw-r-r) but that didn’t work for me

Rebooted with no problems

Installed Audio Modification Library v2.5 through Magisk Manager – Go to Downloads in the menu and search for AUDIO

Rebooted with no problems

ViPER4Android FX now working well with my chosen player (Onkyo HF Player) and Bluetooth headphones

Still no UNLOCKED on the Boot Screen

Obviously not a biggie at the moment, I can get into Recovery, the Custom ROM boots, and I have Root, so no real problem

Final Thanks

Thanks again to XDA, Developers, Testers, Donators, Posters and Users, without whom none of this would be possible - for me anyway, there’s no way I could have sorted all this out on my own :D