技术解析

看 Xposed 的时候发现一条奇怪的 shell 命令,结构是 filepath 2 1 filepath 有点不解,求会的人帮我解释下
0
2021-06-22 09:08:37
idczone

源代码:

int result = rootUtil.execute(getShellPath(updateBinaryFile) + " 2 1 " + getShellPath(mZipPath), callback);

    public synchronized int execute(String command, LineCallback callback) {
        if (mShell == null) {
            throw new IllegalStateException("shell is not running");
        }

        mCallback = callback;
        mCommandRunning = true;
        mShell.addCommand(command, 0, mStdoutListener);
        waitForCommandFinished();

        return mLastExitCode;
    }
    
        public synchronized void addCommand(String[] commands, int code,
                                            OnCommandLineListener onCommandLineListener) {
            this.commands.add(new Command(commands, code, null, onCommandLineListener));
            runNextCommand();
        }

参数代入后的命令是:

/data/data/de.robv.android.xposed.installer/cache/update-binary 2 1 /storage/emulated/0/Android/data/de.robv.android.xposed.installer/cache/downloads/framework/xposed-v89-sdk24-arm64.zip

可以看到执行的就是上面那条命令, 求解,这个命令是啥?


update-binary 是 shell 脚本,后面带了三个参数,有什么问题?

看 update-binary 的代码。

哦哦,我懂了...我脑子瓦特了,,,

数据地带为您的网站提供全球顶级IDC资源
在线咨询
专属客服