[Asus ZenFone AR Questions & Answers] Sparklapse:
Updates

Update 1:

So I reflashed the original zip firmware with twrp. Now I'm stuck at the asus logo.

Update 2:

I tried again with flashing the original zip firmware. This firmware is provided by the asus website but when I did a full wipe and flash in twrp, when attempting to reboot it said that there was no os installed so turns out the zip files are just updates and not the whole image. I've found an image here but have yet to test it. Fingers crossed it doesn't include a rootkit.

Update 3:

Well this is new (at least for me)... So I downloaded the zip from the link in the second update and instead of a single rom file I got a bunch of img and bin files. It said to use the 'qualcomm flash image loader' sooooo yeah. I loaded up the program (in a vm since im running on osx) and the files it asks for in all available options don't exist in the firmware folder. On the bright side there seems to be valuable files in the firmware folder like the 'system.img'. After trying to deconstruct the type of rom structure is being used (with reference to this) I copied over the offical update zip from the asus site and the 'system.img' from third-party site. I'll wipe and flash both then update what happens.

Update 3.5:

As a side note, if I manage to get this to work I'll post a guide with relevant files to restore to stock from this state.

Update 4:

SUCSESS! I flashed the update zip from asus using twrp and flashed the 'system.img' using fastboot. I'm now seeing a beautiful spinning wheel. After more digging into the firmware folder from the third-pary there was an sh file which flashed many files to the device with fastboot. Currently setting up the device but will update if there's any major issues/crashes/bugs

Update 4.1:

So not even a second in and wifi doesn't work. Probably need to flash a few more images. Gonna flashing everything from fastboot this time round.

Update 4.5:

So to give some context, here is the '.sh' file that came with the third-party firmware.

#!/bin/bash

#./fastboot getvar version-bootloader
STORAGE_TYPE=unknown

uname -a
OS_VERSION=`getconf LONG_BIT`

if [ "$OS_VERSION" == 32 ]; then
echo "We don't support 32bit os environment, exit!"; exit 1
fi

rm fastboot.log

echo "Saving log to fastboot.log"

echo "flash partition:0 gpt_both0.bin..."
./fastboot flash partition:0 gpt_both0.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash partition:1 gpt_both1.bin..."
./fastboot flash partition:1 gpt_both1.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash partition:2 gpt_both2.bin..."
./fastboot flash partition:2 gpt_both2.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash partition:3 gpt_both3.bin..."
./fastboot flash partition:3 gpt_both3.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash partition:4 gpt_both4.bin..."
./fastboot flash partition:4 gpt_both4.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash partition:5 gpt_both5.bin..."
./fastboot flash partition:5 gpt_both5.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash bootloader bootloader.img ..."
./fastboot flash bootloader bootloader.img > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash dsp adspso.bin..."
./fastboot flash dsp adspso.bin >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash mdtp mdtp.img..."
./fastboot flash mdtp mdtp.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash splash splash.img..."
./fastboot flash splash splash.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash asusfw asusfw.img..."
./fastboot flash asusfw asusfw.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "reboot-bootloader..."
./fastboot reboot-bootloader >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "wait for 5 seconds for bootloader to be ready..."
sleep 5

echo "flash modem NON-HLOS.bin..."
./fastboot flash modem NON-HLOS.bin >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash boot boot.img..."
./fastboot flash boot boot.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash recovery recovery.img..."
./fastboot flash recovery recovery.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "flash system system.img..."
./fastboot flash system system.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "format ADF..."
./fastboot format ADF >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "format asdf..."
./fastboot format asdf >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

echo "format metatdata..."
./fastboot erase metadata >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi

./fastboot oem uart-off

./fastboot reboot -w

I'm not gonna use the script since there's a few things here and there I wanna change as well as input the most up to date images where possible.

Update 5:

Back at square 1... kinda. I'm gonna try and flash files only from the third-party provider this time. Also no twrp since I tried installing twrp and then tried to do a factory reset. Also to the guys that 'ported' twrp it really only works to wipe things and view root directories (at least in my experience) .

Update 6:

I think I'm gonna cry I'm so happy. After pulling an all nighter I now have wifi and a bootable phone! I'm gonna set it up and hopefully be able to go to sleep while google re-downloads all my apps.

Update 6.1:

So I'll post the whole process to restore in the next post but I've been awake for almost 30 hours so another time it will be. Also I learnt my lesson to make NAND backups from now on.

Update 7:

After a short time of use, the device slowed a bit. This could have been cause of anything but I decided a reboot would resolve the issue but instead revealed another. The device was once again stuck at the asus logo. I quickly tried re-flashing some of the files without doing a full wipe in the hope I would be able to keep my data but nothing. I've sent an email to ASUS asking for a full stock rom but am doubtful I will get any files back so I'll keep looking for solutions.

Update 8:

Okay, I think I've finally got this down. So I redid a full wipe and reset through fastboot. As soon as I got into the device I did a factory reset. This must have done something which allowed me to later reboot the device without it getting stuck. Considering how much I've added on this thread I'll create a new thread as a guide to complete this