Is wiping the data partition totally unnecessary after this adb fail and stock restore? I uninstalled this version of Xposed, because I wanted to try this one. Note: Thanks to this comment I was actually able to flash the latter too, but it gave me a bootloop. So I would caution others against that package.

So the procedure for the latter was adb, but it turns out adb doesn't work for flashing Xposed on my device. (Zenfone 2) I had only managed to install my previous version of Xposed using recovery flashing.

But when I tried the adb script, though, I got this output. However, the phone didn't reboot or anything. Just like last time. (Even though I waited a fair amount of time.)

Even though there is no evidence of it, I figured there may be a small chance that this failed adb script had done some sort of damage to my firmware. So I decided to flash the stock firmware again "just because". Why not? Anyway, that's already done.


Is there any potential use to also wipe the data partition?
Was there any potential benefit to restore the firmware like I did?


(I'm gonna root again and install the same Xposed Framework I initially had.)
Analyzing the InstallXposedFramework.bat script tells us the reason behind the script failure. The content of the script follows:
@echo off

set adb=files\adb.exe

echo '
echo '
echo ' Connecting ZenFone ..
echo '
echo '
%adb% wait-for-devices

echo '
echo '
echo ' Pushing files ..
echo '
echo '
%adb% push assets\xposed-sdk21-x86\system /data/local/tmp/system
%adb% push files\installer /data/local/tmp
%adb% shell &quot;su -c chmod 755 /data/local/tmp/installer&quot;

echo '
echo '
echo ' Installing Xposed Framework ..
echo '
echo '
%adb% shell &quot;su -c /data/local/tmp/installer&quot;

echo '
echo '
echo ' Done, rebooting ..
echo '
echo '
%adb% reboot


Reason behind the failure
Above, the script proceeds flawlessly until it hits:
%adb% shell &quot;su -c chmod 755 /data/local/tmp/installer&quot;

, whose arguments haven't been formatted correctly. Specifically, chmod, 755 and /data/local/tmp/installer are intended as three separate arguments to be supplied to su -c, which accepts one mandatory argument (that is, the command to be executed), an optional login id and an optional and arbitrary number of arguments at the end.

Patch for the script
To make the script work, the line:
%adb% shell &quot;su -c chmod 755 /data/local/tmp/installer&quot;

has to be edited to resemble:
%adb% shell &quot;su -c 'chmod 755 /data/local/tmp/installer'&quot;

, since chmod 755 /data/local/tmp/installer is an unique command (chmod) with two arguments of its own (755 /data/tmp/installer). The whole of it will then be supplied as the only argument to su -c and be executed with root permissions, allowing the script to proceed its execution.

If the phone bootloops
Then the Xposed version supplied alongside the script is somehow incompatible. The bootloop is independent from the installer script.

Should I wipe the Data partition and reflash the firmware, if I execute the original InstallXposedFramework.bat?
Absolutely not, and there's why: the commands that push Xposed to your device are the following:
%adb% push assets\xposed-sdk21-x86\system /data/local/tmp/system
%adb% push files\installer /data/local/tmp

. Since, as explained before, the command:
%adb% shell &quot;su -c chmod 755 /data/local/tmp/installer&quot;

is buggy and therefore makes the script hang, nothing is in fact installed. The only thing to do, is to check if the folder /data/local/tmp is empty, and delete anything inside it if it's not.