[Blade General] lyoks:
Before doing this, carefully read the material and read the instructions. If you do everything point by point, then you will succeed.

1. Setup

Donwload the following utilities:

Partitions Flashing Tool - Universal partition tools for qualcomm snapdragon 435

http://4pda.ru/forum/index.php?s=&showtopic=952274&view=findpost&p=85383238

Custom Recovever - TWRP-3.3.1.0-V9Vita.img

https://drive.google.com/file/d/1diPzJ_qcZRvzVFPRdE139ggCk9vgzG72/view?usp=sharing

Disable encryption - Disable_Dm-Verity_ForceEncrypt_08.02.2019[1].zip (attached in theme)

2. Install

When you download all utillites, unpack Partition Flasting Tool in any folder and open batch file - PFT_V1.5_EN.bat, connect you're smartphone to PC, and press in utillites number 2 (ADB to Reboot EDL mode changer). You're phone go to EDL mode 9008. Tape number 4 (Backup One Partition), Enter COM Port, Enter target partition name: recovery. Next step is flash custom recovery - twrp.

Put file - TWRP-3.3.1.0-V9Vita.img in files folder, rename him in twrp.img. When is done, press number 5 (Flash one partition),

Enter COM Port:

Enter Target partition name: - recovery

Enter Flashing file name: - twrp (or your recovery file name)

After the installation of the process, turn on phone in recovery mode (VolumeUP+Power). In TWRP use swipe and go to Wipe, press right button Format Data, tape YES and OK. Done?! Go to EDL mode, use number 2 (ADB to Reboot EDL mode changer) in utillites PFT 1.5. Now need flash stock recovery (that you're backup). Use number 5 (Flash one partition),

Enter COM Port:

Enter Target partition name: - recovery

Enter Flashing file name: - recovery (or your recovery file name)

How it complete, turn on phone in recovery mode, now we are in stock recovery, press wipe data \ factory reset. Next go to EDL, use number 2 (ADB to Reboot EDL mode changer). Flash TWRP again as we as we did before. In EDL mode use press number 5 (Flash one partition):

Enter COM Port:

Enter Target partition name: - recovery

Enter Flashing file name: - twrp (or your recovery file name)

At the end of the installation, turn on phone in recovery mode (VolumeUp+Power), put zip file Disable_Dm-Verity_ForceEncrypt_08.02.2019[1].zip in any folder, flash him (this disable encryption (Otherwise you get an error - encryption failed)). When zip flash is done, reboot phone as system, now you have Working TWRP and correct Stock\Custom Roms install without error.

3. Install Custom Roms

Download any TREBLE Rom, example LineageOS 16.0:

https://xdaforums.com/project-treble/trebleenabled-device-development/gsi-lineageos-16-0-gsi-arm64-ab-how-to-t3908029

Copy to phone and flash as img in system image, reboot to system, and wait for the installation process to complete. Use for your own purposes.

4. Install Custom Roms

Go to https://opengapps.org, Download any pack (pico), copy on the phone folder, reboot to recovery mode, go to Wipe, press left button - advanced wipe, tap on system (set checkbox on system), Tap on Repair or Change File System, next Change File System. Now you will not have error 70.

For root use magisk 16.0 or 16.7

Source link​

http://4pda.ru/forum/index.php?s=&showtopic=952274&view=findpost&p=88816929​