WindySha/Xpatch

zipalign apk failed, just sign not zipaligned apk !!!

vxbmtu94516 opened this issue · 4 comments

openjdk version "17" 2021-09-14
OpenJDK Runtime Environment (build 17+35-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 17+35-Ubuntu-120.04, mixed mode, sharing)

用4.2 4.3 4.4最后都会报这个zipalign失败

/home/bdk/2021-10-17-20-44-53-tmp/zipalign  -f  -p  4  /home/bdk/2021-10-17-20-44-53-tmp/unsigned.apk  /home/bdk/2021-10-17-20-44-53-tmp/unsigned_zipaligned.apk

 zipalign apk time is :30s

  result=/home/bdk/2021-10-17-20-44-53-tmp/zipalign: 1: Syntax error: word unexpected (expecting ")")

 zipalign apk failed, just sign not zipaligned apk !!!
 out put apk  :2100100-xposed-signed.apk

在mac或者windows下试试看?

这是windows10的

openjdk version "17" 2021-09-14
OpenJDK Runtime Environment (build 17+35-2724)
OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)
 The running os is Windows 10
java.io.IOException: Cannot run program "chmod": CreateProcess error=2, 系统找不到指定的文件。
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
        at java.base/java.lang.Runtime.exec(Runtime.java:594)
        at java.base/java.lang.Runtime.exec(Runtime.java:418)
        at java.base/java.lang.Runtime.exec(Runtime.java:315)
        at com.storm.wind.xpatch.util.ShellCmdUtil.chmod(ShellCmdUtil.java:80)
        at com.storm.wind.xpatch.util.ShellCmdUtil.chmodNoException(ShellCmdUtil.java:62)
        at com.storm.wind.xpatch.task.BuildAndSignApkTask.zipalignApk(BuildAndSignApkTask.java:183)
        at com.storm.wind.xpatch.task.BuildAndSignApkTask.run(BuildAndSignApkTask.java:56)
        at com.storm.wind.xpatch.MainCommand.doCommandLine(MainCommand.java:221)
        at com.storm.wind.xpatch.base.BaseCommand.doMain(BaseCommand.java:125)
        at com.storm.wind.xpatch.MainCommand.main(MainCommand.java:83)
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
        at java.base/java.lang.ProcessImpl.create(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:494)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
        ... 11 more
chmod exception path --> E:\jdk-17\xpatch\2021-10-18-13-50-12-tmp\zipalign exception -->Cannot run program "chmod": CreateProcess error=2, 系统找不到指定的文件。

E:\jdk-17\xpatch\2021-10-18-13-50-12-tmp\zipalign  -f  -p  4  E:\jdk-17\xpatch\2021-10-18-13-50-12-tmp\unsigned.apk  E:\jdk-17\xpatch\2021-10-18-13-50-12-tmp\unsigned_zipaligned.apk

 zipalign apk time is :276s

  result=
java.io.IOException: Cannot run program "chmod": CreateProcess error=2, 系统找不到指定的文件。
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
        at java.base/java.lang.Runtime.exec(Runtime.java:594)
        at java.base/java.lang.Runtime.exec(Runtime.java:418)
        at java.base/java.lang.Runtime.exec(Runtime.java:315)
        at com.storm.wind.xpatch.util.ShellCmdUtil.chmod(ShellCmdUtil.java:80)
        at com.storm.wind.xpatch.util.ShellCmdUtil.chmodNoException(ShellCmdUtil.java:62)
        at com.storm.wind.xpatch.task.BuildAndSignApkTask.signApk(BuildAndSignApkTask.java:96)
        at com.storm.wind.xpatch.task.BuildAndSignApkTask.run(BuildAndSignApkTask.java:67)
        at com.storm.wind.xpatch.MainCommand.doCommandLine(MainCommand.java:221)
        at com.storm.wind.xpatch.base.BaseCommand.doMain(BaseCommand.java:125)
        at com.storm.wind.xpatch.MainCommand.main(MainCommand.java:83)
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
        at java.base/java.lang.ProcessImpl.create(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:494)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
        ... 11 more
chmod exception path --> E:\jdk-17\xpatch\2021-10-18-13-50-12-tmp exception -->Cannot run program "chmod": CreateProcess error=2, 系统找不到指定的文件。
 out put apk  :2100100-xposed-signed.apk

这个结果是正常的,chmod报错日志可以忽略,不影响任何功能。

收到