[Android General] mrmazak:
The BLU VIVO XL4 has arived.

Sorry this guide is not for very new users, it relies on certain amount of prior knowledge.

**NOTE**

Unlocking Bootloader WILL set warranty flag to "NO"

Make the read-back backup, BEFORE unlocking, so there is a

possibility

to restore warranty to "yes"

Getting SPFlash Tool to work on BLU VIVO XL4

I used sp flash tool version 5.18.28

Needs custom DA file and Auth file. Both have been found from a near clone device.

Open flash tool select the DA file and Auth file from the link below.

add the scatter file from archive. There is a preloader file in the archive also. This is needed for spflash tool to open the Auth file.

Stock Rom and Auth file

Then follow the guide found on youtube.

Not planning to go into too much detail about the actual pulling of the firmware, as there is already

a fantastic guide with step-by-step photos and also a video.

Just the basics

Pull stock rom with spflash tool once just from the "boot region" to get the preloader file.

Process that file with the Wwr_MTK tool to get partition table information.

And one more time pull as one large binary file from the "user region" then split it into

individual images using the tool called "Wwr_MTK" it can be found on other site(Hovatek). I cannot put a

link as it is against forum rules (no advertising other forums)

But there is a youtube video that describes the process. And gives link for download of the tool.

**NOTE-1**

The Wwr_MTK tool did not have the correct chip (mt6762 In fact the "family class" for the chip is mt6765) as an option. Because of this you will need to add it to the tool before using it. Open the downloaded zip.( I used "WwR_MTK_2.40_Eng" ). Open "Template.ini" with text editing software, in the section labeled "CPU" add "MT6765 2" , keep same format as the rest of the file. Save the changes and close Template.ini.

Now when you run the tool, you will be able to create the scatter file as you split the rom into files.

**NOTE-2**

The tool connects to internet and downloads fresh the files and scripts when you start it. There is a 30 second ad screen displayed. If you block internet to the tool, then the add screen turns into 2 minute wait screen. I am not suggesting that you hack the tool to by-pass it, just letting you know what to expect.

IT IS HIGHLY RECOMMENDED TO MAKE YOUR OWN FULL BACKUP BEFORE PERFORMING THESE STEPS

AFTER YOU HAVE MADE FULL BACKUPS

Now to start modifying

DOWNLOAD

UNLOCK BOOTLOADER

unlocking bootloader is no more complicated then then enabling OEM unlock toggle in dev options menu.

Then performing Command in terminal. Just like so many android devices.

Unlock Bootloader

1. Enable Developer options on phone:

open settings--> "about device"--> click build number 5-7 times--> go back one screen in settings

-->select more "more settings" --> scroll to bottom "Develpoer options" --> enable "usb debugging"

2. Open cmd or power shell terminal

3. reboot phone to bootloader with the following commands

adb reboot bootloader

4.Once the phone has finished loading into fastboot mode type this command

fastboot oem unlock

I also did --

MIGHT

be an optional step

fastboot flashing unlock

Do not think both were needed.

After each command when phone was rebooted,

it took extra time to open. But did not show the normal recovery screen while

it did the factory reset. But a reset did happen both times,

as I had the setup wizard each time.

Even after unlocking bootloader, doing a "fastboot boot *xyz.img" (boot or recovery test images)

Phone would only cycle to off then do a full reboot. Doing "fastboot flash boot boot.img" does flash the boot.

And "fastboot flash recovery recovery.img" does flash the recovery.

TWRP

1. Download TWRP From Link above

2. Enable Developer options on phone:

open settings--> "about device"--> click build number 5-7 times--> go back one screen in settings

-->select "more settings" --> scroll to bottom "Develpoer options" --> enable "usb debugging"

3. Open cmd or power shell terminal

4. reboot phone to bootloader with the following commands

adb reboot bootloader

5. Now give the command to flash twrp, assuming you downloaded the file to default download folder

fastboot flash recovery %userprofile%\downloads\TWRP-3_2_3-1020-OMFG-mod_b6-device-name-vivo-wipe-misc.img

5. Reboot to twrp. Needed to boot directly to twrp, or stock recovery will be re-flashed by phone.

fastboot oem reboot-recovery

Once inside twrp It is asking for password to unlock (decrypt)***automatic decrypt not work on this device as of YET***

this is supposed to be same password used to unlock phone.

Because this twrp does not work with encryption, every time you reboot you will have to select language, if changed from default.

To get

recovery

to be functional, you need to make phone patched for both "DM-Verity" and "Force-encryption"

I do this with

"Universal Disabler"

https://xdaforums.com/android/software/universal-dm-verity-forceencrypt-t3817389

There is similar utiliy built into this Recovery image.

to use the built in option , Select ADVANCED, Then RM Forceencrypt

This will flash the lazypatcher with options set to remove encryption both in boot.img and /vender/*fstab : remove dm-verity.

--OR-- manually do the following steps

Steps

1. Download Zip from Link above.

2. Open TWRP

3. Open Wipe menu

4. Select format /data

5. Key in "YES" and swipe

6. Return to Home Page of TWRP

7. Choose reboot menu then recovery

8. Recovery should now have access to Internal memory (temp for now)

9. Use abd push to put the zip file downloaded above to internal memory

adb push %userprofile%\downloads\Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip /sdcard/

10. Select install menu , and install the Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip

Do not rename the file. It installs and makes the patch base on the file name.

If you want to have root also, then flash Magisk at this point.

Now the dm-verity and force encryption are off. You can flash gsi custom rom, if you desire. At the moment, I have only been able to boot the phone with working cell data and calls on the PHH-Phusion --vanilla builds. Do not know why the gapps versions do not allow rill to function.

As of the writing of this I have put up V4 of the TWRP port. This version uses the correct mount points for this phone, not the ones from the source of the port. Also corrected the device name in default.prop, to match device name. Build fingerprint has been left as is. Fixed the micro sdcard name and OTG names. Added mipe to the "misc" /"para" partition to escape a factory reset recovery loop that [uu]could[/u] happen under certain situations.

And my prefered ported recovery from LRTeam TWRP-3_2_3-1020-OMFG-mod_b6-device-name-vivo-wipe-misc.img.

DOWNLOADS

Files

1. Sp Flash tool (v 5.18.28 or newer) https://androidmtk.com/smart-phone-flash-tool

2. stock XL4 ROM, DA file, TWRP all in shared folder https://androidfilehost.com/?w=files&flid=287088

3. stock Xi+ ROM, TWRP in shared folder https://androidfilehost.com/?w=files&flid=287703

4. Unviversal DM-Patch disable tool thread

5. Youtube Guide Video to use backup image splitter tool "WWR_MTK" https://www.youtube.com/watch?v=GMAytZ56hac

Kernel sources have been published 12-12-2018, by BLU

I have them synced to GitHub while I make test builds.

https://github.com/mrmazakblu/BLU-VIVO-XL4-kernel

Default defconfig should be arch/arm64/config/k62mv1_64_bsp_defconfig. Based off of build description in "getprop"

Built kernel has not been able to be booted yet.

TWRP is first ported and provided thanks to [MENTION=8317880]Voinea12[/MENTION]

.