[Xiaomi Mi 8 Guides, News, & Discussion] FabreFaction:
Clean flash and build of Havoc OS V3.2 with ViPER4Android FX v2.7.1.0

[FONT=&quot]Clean flash and build of Havoc OS V3.2 with ViPER4Android FX v2.7.1.0[/FONT]

[FONT=&quot]Originally posted on the Havoc OS V3.2 Custom ROM thread for Xiaomi Redmi Note 5 Pro, but thought it might come in handy for someone here[/FONT]

[FONT=&quot]The VIPER4Android FX specific sections are towards the bottom of this post

[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Thanks[/FONT][FONT=&quot] [/FONT]

[FONT=&quot]Thanks @Ruturaj Kadam @jhenrique09 @ZeNiXxX (Viktor Hermann) @SKULSHADY (Anushek Prasal) for the ROM[/FONT]

[FONT=&quot]Thanks to all the other ROM Developers, Testers, Donators and Users[/FONT]

[FONT=&quot]Thanks @kumardeepu for the advice that helped put me on the right track to sort out my problem with ViPER4Android FX 2.7x[/FONT]

[FONT=&quot]Thanks to @gabwielcastwo for his post that put me onto the Audio Modification Library[/FONT]

[FONT=&quot]Thanks to @afah_me for the guide on how to enable ViPER4Android FX on Android 10[/FONT]

[FONT=&quot]Thanks to @Team_DeWitt for the awesome work on keeping VIPER4Android FX alive and kicking[/FONT]

[FONT=&quot]Thanks to all the VIPER4Android FX 2.7x Developers, Testers, Donators and Users[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Problems Encountered[/FONT][FONT=&quot][/FONT]

[FONT=&quot]No gesture input with OpenGapps Nano - Flashed Havoc OS V3.2 Gapps over the top, all okay[/FONT]

[FONT=&quot]Hang on boot after installing the ViPER4Android FX 2.7x Magisk module – See the ViPER4Android FX sections below[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Note[/FONT][FONT=&quot][/FONT]

[FONT=&quot]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[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Original Configuration[/FONT][FONT=&quot][/FONT]

[FONT=&quot]Recovery: OrangeFox R10.0.1[/FONT]

[FONT=&quot]Firmware: Global V10.2.2.0[/FONT]

[FONT=&quot]ROM: Havoc OS V2.5[/FONT]

[FONT=&quot]GAPPS: Open GAPPS Nano[/FONT]

[FONT=&quot]Root: Magisk 19x[/FONT]

[FONT=&quot]Custom Kernel: None[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Rebuild Configuration[/FONT][FONT=&quot][/FONT]

[FONT=&quot]Recovery: OrangeFox R10.0.3[/FONT]

[FONT=&quot]Firmware: Global V11.0.3.0[/FONT]

[FONT=&quot]ROM: Havoc OS V3.2 25-02-2020[/FONT]

[FONT=&quot]GAPPS: Havoc OS V3.2 25-02-2020 GApps[/FONT]

[FONT=&quot]Root: Magisk V20.3[/FONT]

[FONT=&quot]Custom Kernel: None[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Prep Work[/FONT][FONT=&quot][/FONT]

[FONT=&quot]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[/FONT]

[FONT=&quot]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[/FONT]

[FONT=&quot]ES File Explorer[/FONT]

[FONT=&quot]F-Droid[/FONT]

[FONT=&quot]XDA Labs[/FONT]

[FONT=&quot]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)[/FONT]

[FONT=&quot]Backed up WhatsApp – use the internal backup feature of the app to backup to Google Drive[/FONT]

[FONT=&quot]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[/FONT]

[FONT=&quot]Listed my Magisk modules so I can reinstall them on the new build[/FONT]

[FONT=&quot]MIUIcamera v2 PORT – Didn’t reinstall as the camera(s) in the ROM are fine[/FONT]

[FONT=&quot]VIPER4Android FX Legacy – This is deprecated (superseded), so I’ll be using ViPER4Android FX 2.7x on the new build[/FONT]

[FONT=&quot]Copied files from Internal Storage that I want to keep[/FONT]

[FONT=&quot]I tend to keep my camera photos and videos on my internal storage, so I copied those to the SD Card[/FONT]

[FONT=&quot]Ran a final file sync with FolderSync Pro[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Downloads to PC for Havoc OS V3.2[/FONT][FONT=&quot][/FONT]

[FONT=&quot]Recovery: OrangeFox-R10.1_3-Stable-whyred.zip[/FONT]

[FONT=&quot]Firmware: fw_whyred_miui_HMNote5Global_V11.0.3.0.PEIMIXM_ff4c5a6b1a_9.0.zip[/FONT]

[FONT=&quot]ROM: Havoc-OS-v3.2-20200225-whyred-Official.zip[/FONT]

[FONT=&quot]GAPPS: Havoc-OS-v3.2-20200225-whyred-Official-GApps.zip[/FONT]

[FONT=&quot]Root: Magisk-v20.3.zip & MagiskManager-v7.5.1.apk[/FONT]

[FONT=&quot]Custom Kernel: None[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Rebuild onto Havoc OS V3.2[/FONT][FONT=&quot][/FONT]

[FONT=&quot]Powered off and removed SD Card, then hooked it up to my PC[/FONT]

[FONT=&quot]Copied the downloads (above) to SD Card[/FONT]

[FONT=&quot]Put the SD Card back in the SmartPhone and booted into recovery[/FONT]

[FONT=&quot]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[/FONT]

[FONT=&quot]Booted into OrangeFox Recovery Mode menu[/FONT]

[FONT=&quot]Deleted the Android folder from the SD Card - files from previous builds' apps[/FONT]

[FONT=&quot]In File Manager[/FONT]

[FONT=&quot]Navigated to /sdcard1/Android[/FONT]

[FONT=&quot]Pressed the button bottom right with the folder icon on it[/FONT]

[FONT=&quot]Selected Delete from the menu[/FONT]

[FONT=&quot]Swiped to confirm the deletion of the /sdcard1/Android folder[/FONT]

[FONT=&quot]Went back twice[/FONT]

[FONT=&quot]Flashed the downloaded Recovery[/FONT]

[FONT=&quot]Selected Install from the main menu and navigated to the recovery ZIP file[/FONT]

[FONT=&quot]Selected the ZIP file and swiped to install[/FONT]

[FONT=&quot]OrangeFox automatically rebooted back into Recovery once the updated Recovery file was flashed[/FONT]

[FONT=&quot]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[/FONT]

[FONT=&quot]Went to settings[/FONT]

[FONT=&quot]Disabled MIUI OTA[/FONT]

[FONT=&quot]Set the screen brightness and timeout to my preference – 50% and 120secs[/FONT]

[FONT=&quot]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[/FONT]

[FONT=&quot]Dalvik / ART Cache[/FONT]

[FONT=&quot]Cache[/FONT]

[FONT=&quot]System[/FONT]

[FONT=&quot]Vendor[/FONT]

[FONT=&quot]Data[/FONT]

[FONT=&quot]Internal Storage[/FONT]

[FONT=&quot]Rebooted into recovery once more – Menu – Reboot – Recovery[/FONT]

[FONT=&quot]Once booted into recovery, navigated to my Flashable files on my SD Card in the File Explorer[/FONT]

[FONT=&quot]Flashed the Firmware, Wiped Caches and rebooted into recovery once more[/FONT]

[FONT=&quot]Next Flashed ROM, GAPPS and Magisk[/FONT]

[FONT=&quot]Next rebooted into System….. this took a while[/FONT]

[FONT=&quot]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[/FONT]

[FONT=&quot]Went through the Google setup[/FONT]

[FONT=&quot]Configured home WiFi[/FONT]

[FONT=&quot]Copy Apps and Data? Don’t Copy[/FONT]

[FONT=&quot]I was asked for my PIN to continue, which was the PIN I had previously used to lock the SmartPhone[/FONT]

[FONT=&quot]I skipped the Google account/E-mail setup[/FONT]

[FONT=&quot]Deselected Free Up Space on the next screen[/FONT]

[FONT=&quot]Accepted the Google Ts & Cs[/FONT]

[FONT=&quot]Setup Fingerprints (one on each hand so it doesn’t matter which hand I’m holding the SmartPhone with) + PIN for screen lock[/FONT]

[FONT=&quot]Finished the setup[/FONT]

[FONT=&quot]Opened MagiskManager and all looked okay, did the SafetyNet Check successfully[/FONT]

[FONT=&quot]Rebooted the system[/FONT]

[FONT=&quot]Installed F-Droid APK[/FONT]

[FONT=&quot]Updated F-Droid repositories[/FONT]

[FONT=&quot]Installed AdAway from F-Droid, launch, granted SuperUser permissions, enabled Ad Blocking, rebooted[/FONT]

[FONT=&quot]Launched Google Play and entered credentials[/FONT]

[FONT=&quot]Installed my other APK apps, ES File Explorer and XDA Labs[/FONT]

[FONT=&quot]Went into Google Play and set up my Google credentials[/FONT]

[FONT=&quot]Installed NordVPN and set it up[/FONT]

[FONT=&quot]Installed SMS Backup & Recovery and restored my SMS messages and Call Logs[/FONT]

[FONT=&quot]Rebooted into recovery and ran a full backup[/FONT]

[FONT=&quot]Wiped Caches and rebooted into system[/FONT]

[FONT=&quot]Installed and configured VIPER4Android FX (see below)[/FONT]

[FONT=&quot]Installed and configured the rest of my apps[/FONT]

[FONT=&quot]All Done, all working, awesome[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]VIPER4Android FX V2.7x [/FONT][FONT=&quot][/FONT]

[FONT=&quot]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. [/FONT]

[FONT=&quot]The two threads that really helped are:[/FONT]

[FONT=&quot][APP][ALL ROOT SOLUTIONS][6.0+]ViPER4Android FX 2.7[/FONT]

[FONT=&quot][GUIDE] [ANDROID 10] [SAR A-ONLY] Enable Viper4android without stuck bootlogo[/FONT]

[FONT=&quot]I read the GUIDE thread through a few times to come up with a solution that worked for me.[/FONT]

[FONT=&quot]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.[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]VIPER4Android FX V2.7x install and configuration[/FONT][FONT=&quot][/FONT]

[FONT=&quot]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.[/FONT]

[FONT=&quot]Downloaded the post-fs-data.sh.txt attachment[/FONT]

[FONT=&quot]Renamed it to post-fs-data.sh and dropped it onto my SD Card[/FONT]

[FONT=&quot]Installed VIPER4Android FX v2.7.1.0 through Magisk Manager – Go to Downloads in the menu and search for VIPER[/FONT]

[FONT=&quot]Didn’t reboot after the install, just closed Magisk Manager[/FONT]

[FONT=&quot]Launched VIPER4Android FX and it prompted to install the driver, installed the driver, automatically rebooted[/FONT]

[FONT=&quot]Held down the Volume Up key on reboot to launch Recovery[/FONT]

[FONT=&quot]Copied post-fs-data.sh from SD Card to data/adb/modules/Viper4AndroidFX[/FONT]

[FONT=&quot]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[/FONT]

[FONT=&quot]Rebooted with no problems[/FONT]

[FONT=&quot]Installed Audio Modification Library v2.5 through Magisk Manager – Go to Downloads in the menu and search for AUDIO[/FONT]

[FONT=&quot]Rebooted with no problems[/FONT]

[FONT=&quot]ViPER4Android FX now working well with my chosen player (Onkyo HF Player) and Bluetooth headphones[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Still no UNLOCKED on the Boot Screen[/FONT][FONT=&quot][/FONT]

[FONT=&quot]Obviously not a biggie at the moment, I can get into Recovery, the Custom ROM boots, and I have Root, so no real problem[/FONT]

[FONT=&quot]

[/FONT][FONT=&quot]Final Thanks[/FONT][FONT=&quot][/FONT]

[FONT=&quot]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 [/FONT]