[Asus Zenfone 9] svenagain:
If you hold all three buttons (both volume and power) for 30 seconds, the phone will turn off and probably start turning on from still holding the power button. If that doesnt make anything appear, BUT the computer recognizes a device when you plug it in (in Windows Device Manager or using the command lsusb in linux), then there's hope. If not, you could try seeing if there is a change on the computer with holding the phones buttons for 30sec while plugged.

If the hardware ID says 900e (vendor ID 05C6 remains constant) instead of 9008, then you need to take apart the phone:/ Pretty sure EDL cables don't work.

Spoiler content hidden.

The best tool is https://github.com/bkerler/edl and I've copied the install instructions here, hopefully clarifying some confusing parts.

You also need to download the melf file and put it into the edl folder.

There are more some older Windows tools that are no longer updated, and you have to send xbl_s_devprg_ns.melf to sahara mapping 13 with QSaharaServer and then you can send whatever fh_loader commands you want. bkerler/edl will run the qfil commands so the process is kinda the same.

Spoiler content hidden.

If you have 9008 and bkerler/edl installed, you can run printgpt to check the connection without messing anything up:

edl --loader=xbl_s_devprg_ns.melf printgpt --memory=UFS --lun=0

There should be some text that starts with (sahara) until the melf unlocks (firehose) and that code will only give you the GPT Table for Logical Unit Number (LUN) 0. However, theres are seven (0-6) and I've included the tables here without the firehose text:

Spoiler content hidden.

Try to make backups of anything you can first:

edl --loader=xbl_s_devprg_ns.melf --memory=UFS rl BACKUPS --genxml

This will create a folder called BACKUPS and might take a couple hours. There's another backup command just copies whole binary data for each LUN.

I used https://github.com/CaptainThrowback/update_payload_extractor to generate the partition imgs from the stock firmware. An old version of the full firmware is publicly released https://www.asus.com/us/supportonly/zenfone 9/helpdesk_download/

Use the --old-dir argument to use the full firmware to generate the next version using the OTA then using that for the next version until reaching the final version. The dynamic partitions have hash error so either use --skip_hash --ignore_block_size or select the partitions:

./extract.py --partitions abl aop aop_config bluetooth boot cpucp devcfg dsp dtbo featenabler hyp imagefv keymaster modem multiimgoem qupfw qweslicstore recovery shrm tz uefi uefisecapp vbmeta vbmeta_system vendor_boot xbl xbl_config xbl_ramdump xrom --old_dir 142 --output_dir 165 165.bin

It finally worked for me to not include any of my backed up partitions (only from stock) into LUN4 and only include those backed up (none from stock) into LUN0. I have stock xbl, xbl_config, and multiimgoem and backed up apdp/apdpb and multiimgqti_a/multiimgqti_b in LUN1 and LUN2. I tried flashing one LUN at a time, but it worked best to flash them all together.

It was necessary to wipe the previous data that was ruining my phone with zeroes, but I'm not sure if all three of the extra xml files were necessary or in the right order. This will wipe your phone also I didn't check this code.

For Windows:

FOR /L %G IN (0,1,2,3,4,5,6) DO python edl --loader=xbl_s_devprg_ns.melf --memory=UFS qfil wipe_rawprogram_PHY%G.xml patch%G.xml .
FOR /L %G IN (0,1,2,3,4,5,6) DO python edl --loader=xbl_s_devprg_ns.melf --memory=UFS qfil rawprogram%G_BLANK_GPT.xml patch%G.xml .
FOR /L %G IN (0,1,2,3,4,5,6) DO python edl --loader=xbl_s_devprg_ns.melf --memory=UFS qfil rawprogram%G_WIPE_PARTITIONS.xml patch%G.xml .
FOR /L %G IN (0,1,2,3,4,5,6) DO python edl --loader=xbl_s_devprg_ns.melf --memory=UFS qfil rawprogram%G.xml patch%G.xml .
FOR /L %G IN (0,1,2,3,4,5,6) DO python edl --loader=xbl_s_devprg_ns.melf printgpt --memory=UFS --lun=%G
python edl --loader=xbl_s_devprg_ns.melf reset

For linux:

for i in 0 1 2 3 4 5 6; do python3 edl --loader=xbl_s_devprg_ns.melf --memory=UFS qfil wipe_rawprogram_PHY$i.xml patch$i.xml .; done;
for i in 0 1 2 3 4 5 6; do python3 edl --loader=xbl_s_devprg_ns.melf --memory=UFS qfil rawprogram$i_BLANK_GPT.xml patch$i.xml .; done;
for i in 0 1 2 3 4 5 6; do python3 edl --loader=xbl_s_devprg_ns.melf --memory=UFS qfil rawprogram$i_WIPE_PARTITIONS.xml patch$i.xml .; done;
for i in 0 1 2 3 4 5 6; do python3 edl --loader=xbl_s_devprg_ns.melf --memory=UFS qfil rawprogram$i.xml patch$i.xml .; done;
for i in 0 1 2 3 4 5 6; do python3 edl --loader=xbl_s_devprg_ns.melf printgpt --memory=UFS --lun=$i; done;
python3 edl --loader=xbl_s_devprg_ns.melf reset

The last line for reset will restart the phone, hopefully getting to the bootloader this time, or possibly trying to boot system. If it tries to boot into an empty system, it will become 900e, so turn the phone off by pressing all 3 buttons for 30 seconds, hold the vol+ while it turns on to start the bootloader menu, then select recovery, which should reboot into stock recovery and and have an option to easily transfer to stock fastbootd, where twrp can be flashed if the bootloader is unlocked, then reboot to bootloader to reboot into recovery again. I used a twrp backup at that point. If it doesn't go to recovery and only the bootloader, select power off and use the test point tweezers to enter 9008 again to flash again.

I've included the xmls both on a file host and here as plain text for extra posterity. I've also uploaded the stock firmware partitions I compiled for the latest version (A14v75), not including the ones with hash errors, but including vbmeta_system and xrom eventhough I didn't flash those. Mediafire wouldn't accept boot.img for some reason so I had to 7z that one.

Spoiler content hidden.

I posted more background info where there were first posted: https://xdaforums.com/t/zenfone-9-ai2202-repair-to-bootloader-package.4485073/page-4#post-89339495

and as I got help here: https://xdaforums.com/t/anyone-have-the-raw-firmware-for-zenfone-9.4653137/

Don't use these tools for profit unless you're allowed to or whatever legal inconsequence jargon

MediaFire

MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.

www.mediafire.com