[Blade Android Development] eduardvi995:
TWRP 3.2.2 Unofficial Port

ZTE Blade A521

(Qualcomm MSM8909)

​

Greetings everyone at XDA. I'm very happy to tell you that I managed to make my first working port of TWRP for the ZTE Blade A521 (a.k.a P809F10), with a Qualcomm MSM8909 chipset. This device had been forgotten in the developers' scene due to the fact that there was no possible way to unlock its bootloader, leaving this phone with no rooting or development possibilities. However, thanks to the developer alexenferman's post:​

Bootloader Unlocking on older Qualcomm ZTE Devices, /Devinfo partition modification​

It is now possible to permanently unlock its bootloader and therefore,flash unsigned images. Thus, i'm glad to now show you this unofficial port of mine to this old and forgotten device. 😁 As this device's sources are still not released by ZTE, it is not possible to compile TWRP or ROMS from source, only ports available. Still watiing for them thougt.

Download:

UniTouch/ZTE-Blade-A521-P809F10-TWRP-3.2.2-Unofficial-

First release of the unofficial port of TWRP fo this device - UniTouch/ZTE-Blade-A521-P809F10-TWRP-3.2.2-Unofficial-

github.com

Installacion Requisites:​

Unlocked Bootloader (Check alexenferman's post: https://xdaforums.com/t/bootloader-...vices-devinfo-partition-modification.4100897/)

PC with ADB Installed (and Drivers)

Qualcomm QDLoader 9008 Drivers installed

MSM8909 Firehose Programmer Collection (https://github.com/programmer-collection/zte)

QPST Tool (Latest Version) (Not portable)

HxD-Hex Editor

Magisk Patched Boot Image (Attached to this post)

TWRP Recovery file

Brain and WIll :D

IMPORTANT: Prior to this procedure, you must make sure your device is the one listed here, as there are two available versions of it. There's a Mediatek ZTE Blade A521, and there's a Qualcomm version, to which this post refers. (You can check this on Settings>About Phone). Also, make sure your device's Android version is 7.1.1. and that it matchs this fingerprint: ATT_MX_BA521_V1.0

Otherwise, I'm not sure it will work. If you dont match the fingerprint, but you match the device, you might be able to unlock bootloader and flash the recovery, but you wont be able to use the attached patched Boot Image, and thus, maybe the recovery wont work, as this device has dm_verity on boot, and it has to be patched for the recovery to fully boot. If you dont want to use my atttached boot image, you can patch your stock boot image yourself and flash it with QFIL.

DISCLAIMER: I´m not responsible for whatever you may do to your phone. Everything you do with these instruccions is under your own responsibility.

Procedure:

First of all, you need to unlock this device's bootloader. You can follow the posted method above, but for more detailed instruccions (and considering there's no development for this device at all) ,I decided to show you how myself. If you already did this, you can jump straight to step

Unlocking ZTE Blade A521's Bootloader​

On the phone, get to the Developer Options and enable OEM Unlock. ( Tick 5 times on Build number on Settings>About phone. Now go to Settings>Advanced Settings>Developer Options>OEM Unlock). Also enable USB Debugging. Done this, connect the device to PC.

Now you have to open QFIL tool and ADB Terminal to continue. (by this time, you should have installed all required tools and drivers for this to work. QFIL Portable tool wont work, as it wont recognize the device. It has to be the installable Software of QPST.) On QFIL, tick Flat Build , and select the Firehose programmer you downloaded before (zte-master\BLADEA521\prog_emmc_firehose_8909.mbn). With this tool opened and the device plugged in on the pc, send these commands on ADB:

adb devices
adb reboot edl

The phone will turn off and a red LED will turn on in the device. Now, quickly check if QFIL Tool detected the phone, and click on Tools>Partition Manager, then click OK. ( This last procedure has to be done fast, as the phone will turn EDL Mode off after 30 seconds) After some seconds. if you did it all right, it should show something like this:

View attachment 5258427

Now do right click on the devinfo partition and only select Manage Partition Data. It will show this:

View attachment 5258429

Now click on Read Data and wait for it to finish. Do not unplug the device, and DO NOT click on Close yet. Now get to the file created in the directory stated on the log (Mostly %appdata%/Roaming/Qualcomm/QFIL/) and right click on such file, then open it with HxD Editor. It has to show this:

View attachment 5258433

As stated in alexenferman's post, you must edit some numbers in this file. If you want more info about what you are doing, check the original post. (https://xdaforums.com/t/bootloader-...vices-devinfo-partition-modification.4100897/)

Edit this (At the first line):

41 4E 44 52 4F 49 44 2D 42 4F 4F 54 21 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

to this:

41 4E 44 52 4F 49 44 2D 42 4F 4F 54 21 00 00 00

01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00

After that, save the file, go back to QFIL and click on Load Image. Select the file you just edited. then click on Close, Close again, then OK. The device will boot normally now. Do not unplug the device yet. When the phone has fully booted, send "adb reboot edl" command again, and follow the stated procedure until you get to the partition manager. There, right click on the Recovery partition, (Make sure you are actually clicking on the Recovery partition, as it could happen that you are managing another partition). Click on Load Image, and select the TWRP Recovery image. After flash finished, Click on Close, DO NOT CLOSE PARTITION MANAGER YET. Now, do right click on the Boot partition, Load Image and flash the patched boot image attached (or you can also flash your own patched boot image). Done this, click on Close, Close again and then click on OK.

Now you have to remove the phone's battery and press Volume Up + Power until phone turns on. If TWRP shows up, you are done :D. If it didnt show up, check if you followed every direction stated above. If you have problems please let me now in the comments.

This Recovery is unofficial, and thus, it might have bugs and issues. If you find one, please state it below.

Special Thanks to TwrpBuilder for his port of TWRP to the ZTE Maven 3, from wich this port was made.

Enjoy :D

​