WindySha / Xpatch

This is a tool to repackage apk file, then the apk can load any xposed modules installed in the device. It is another way to hook an app without root device.
Apache License 2.0
2.66k stars 399 forks source link

result=jarsigner: 无法对 jar 进行签名: java.lang.NullPointerException #88

Closed polarbear88 closed 3 years ago

polarbear88 commented 3 years ago

file name : resources.arsc originEntry = resources.arsc compress exception = STORED entry where compressed != uncompressed size

./2021-09-05-00-23-57-tmp/zipalign -f -p 4 ./2021-09-05-00-23-57-tmp/unsigned.apk ./2021-09-05-00-23-57-tmp/unsigned_zipaligned.apk

zipalign apk time is :615s

result=dyld: Library not loaded: @rpath/libc++.dylib Referenced from: /Users/cachita/code/Xpatch/./2021-09-05-00-23-57-tmp/zipalign Reason: image not found

zipalign apk failed, just sign not zipaligned apk !!! apkParentPath :./2021-09-05-00-23-57-tmp com.android.apksig.apk.MinSdkVersionException: Failed to determine APK's minimum supported platform version. Use --min-sdk-version to override at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:387) at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:88) at com.storm.wind.xpatch.task.BuildAndSignApkTask.signApkUsingAndroidApksigner(BuildAndSignApkTask.java:163) at com.storm.wind.xpatch.task.BuildAndSignApkTask.signApk(BuildAndSignApkTask.java:97) 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: com.android.apksig.apk.MinSdkVersionException: Failed to determine APK's minimum supported Android platform version at com.android.apksig.ApkSigner.getMinSdkVersionFromApk(ApkSigner.java:957) at com.android.apksig.ApkSigner.sign(ApkSigner.java:278) at com.android.apksig.ApkSigner.sign(ApkSigner.java:214) at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:381) ... 7 more Caused by: com.android.apksig.apk.ApkFormatException: Missing AndroidManifest.xml at com.android.apksig.ApkSigner.getAndroidManifestFromApk(ApkSigner.java:913) at com.android.apksig.ApkSigner.getMinSdkVersionFromApk(ApkSigner.java:955) ... 10 more sign apk time is :0s

result=jarsigner: 无法对 jar 进行签名: java.lang.NullPointerException

polarbear88 commented 3 years ago

下载xpatch的apk就可以了

WindySha commented 3 years ago

已经修复了这个问题,代码已提交,暂时未打出jar包