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 "su -c chmod 755 /data/local/tmp/installer"
echo '
echo '
echo ' Installing Xposed Framework ..
echo '
echo '
%adb% shell "su -c /data/local/tmp/installer"
echo '
echo '
echo ' Done, rebooting ..
echo '
echo '
%adb% reboot
Reason behind the failure
Above, the script proceeds flawlessly until it hits:
%adb% shell "su -c chmod 755 /data/local/tmp/installer"
, 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 "su -c chmod 755 /data/local/tmp/installer"
has to be edited to resemble:
%adb% shell "su -c 'chmod 755 /data/local/tmp/installer'"
, 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 "su -c chmod 755 /data/local/tmp/installer"
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.