[Asus ZenFone Max Pro M1  Guides, News, & Discussio] AstroBiswas:
This Guide Can Also Be Used For Unlocking & Relocking Bootloader, Installing TWRP & Rooting

If Any Ota Messes With The Implementation Then Whole Procedure Needs To Be Redone

To mitigate the problem requesting developers for making a hack for Relocking Bootloader Without Wiping Data PM me if Interested

Data Will Be Wiped So Make Backup First

What Will We Be Doing

: Unlocking Bootloader, Installing TWRP,Flashing Camera2api Enabler, Installing Back Stock Recovery, Relocking Bootloader

Procedure:

1. Download this rar and you'll get 2 folders namely unlock and ASUS_Android_USB_drivers_for_Windows

2. Install the drivers according to your OS (happens Automatically In Most Cases) and open the unlock folder

3. Reboot your phone to fastboot mode by pressing volume up + power on at the same time.

4. Connect it to pc and open unlock.bat in unlock folder

5. Long Press Power Button & Reboot. A wiping Data screen will appear followed by an encrypting sceen then the phone will reboot (A warning of unlocked bootloader will show up initially)& then the initial setup screen will show up don't add any thing & skip the setup(there will be another wipe).

6. Download Cam2Api & copy it to sd card or internal storage of phone. Then switch off the phone once again & reboot in fastboot mode once more.

7. Download TWRP from here & Install Minimal ADB to root of C drive.

8. Copy the twrp to the adb folder in your C drive.

9. Open the 'cmd-here.exe' the adb window will open

10. With the phone connected in fastboot mode type in adb "fastboot flash recovery twrpasus.img" & press enter then type "fastboot boot twrpasus.img" & hit enter.

11. Switch Off the phone & boot in twrp by pressing vol down+power, opening TWRP will take time

12. A decryption popup will open in twrp skip it.

13. Select Install Zip & slect the storage where you have kept the cam2api.zip & flash it, then select reboot system.

14. Download Gcam from here (Arnova v8 is best) & copy it to phone and install it, check if it works, dont configure it. Reboot your phone to fastboot mode

15. Download stock asus recovery from here & copy it to the adb folder.

16. Again open the adb & type "fastboot flash recovery recovery.img"

17. Download Zenfone_Max_M1_Pro_Relock.zip and extract it.

18. Open the directory where you extracted the file

19. In that directory, open a file named relock_bl.cmd

20. A Command (CMD) prompt will do the rest of the work for you.

Let the phone restart.

21. It will then erase all the data on your phone once again (excluding Micro SD card).

23. Reboot

22. Now the phone won’t show the “bootloader unlocked” warning that was displayed after you unlocked the bootloader. Now setup the phone and install the Gcam downloaded earlier also all manual camera apps will work fine too.

Done! You Have Successfully Relocked Bootloader & Enabled Camera 2 api in stock rom. As the bootloader is locked & we have'nt rotted our phone you have your warranty and ota updates work well. If any kind of future ota breaks the camera2api then you have to redo the procedure once again.

Installing Magisk Or SuperSU while twrp is installed will root your phone (breaks ota updates though)

Credits to:

[MENTION=4913907]Sudeep Duhoon[/MENTION] : For Original Unofficial unlock & Camera2api Enabler script

[MENTION=5634111]Shivam Kumar Jha[/MENTION] For Unofficial TWRP

[MENTION=5536476]style2345[/MENTION] For Providing ASUS Stock Recovery

[MENTION=8690770]myapky[/MENTION] For Relocking Script

Hit Thanks If This Helped You!