niklashigi / apk-mitm

🤖 A CLI application that automatically prepares Android APK files for HTTPS inspection
https://npm.im/apk-mitm
MIT License
3.98k stars 352 forks source link

Failed to load signer "signer #1" java.io.IOException: Invalid keystore format #130

Open XcantloadX opened 1 year ago

XcantloadX commented 1 year ago
C:\Users\ZhouXiaokang>apk-mitm "C:\Users\ZhouXiaokang\Documents\Tencent Files\3188996979\FileRecv\MobileFile\Ktalk_1.0.34.apk"

  ╭ apk-mitm v1.2.1
  ├ apktool v2.6.1
  ╰ uber-apk-signer v1.2.1

  Using temporary directory:
  C:\Users\ZHOUXI~1\AppData\Local\Temp\apk-mitm-c50952ec3c980ae2ddb9daec29288368

  √ Checking prerequisities
  √ Decoding APK file
  √ Applying patches
  √ Encoding patched APK file
  × Signing patched APK file
    →  - zipalign success

   Failed!  An error occurred:

source:
        C:\Users\ZhouXiaokang\AppData\Local\Temp\apk-mitm-c50952ec3c980ae2ddb9daec29288368
zipalign location: BUILT_IN
        C:\Users\ZHOUXI~1\AppData\Local\Temp\uapksigner-5236887357259032735\win-zipalign_29_0_2.exe4132922213886830118.tmp
keystore:
        [0] eab1181c C:\Users\ZhouXiaokang\.android\debug.keystore (DEBUG_ANDROID_FOLDER)

01. tmp.apk

        SIGN
        file: C:\Users\ZhouXiaokang\AppData\Local\Temp\apk-mitm-c50952ec3c980ae2ddb9daec29288368\tmp.apk (65.45 MiB)
        checksum: 9752aea83a639b4c81ab75c87c2c6045f611f68ad23da2a06a60e8f38f97b16 (sha256)
        - zipalign success
Failed to load signer "signer #1"
java.io.IOException: Invalid keystore format
        at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:663)
        at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
        at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
        at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
        at java.security.KeyStore.load(KeyStore.java:1445)
        at com.android.apksigner.SignerParams.loadKeyStoreFromFile(SignerParams.java:353)
        at com.android.apksigner.SignerParams.loadPrivateKeyAndCertsFromKeyStore(SignerParams.java:239)
        at com.android.apksigner.SignerParams.loadPrivateKeyAndCerts(SignerParams.java:181)
        at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:277)
        at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:83)
        at at.favre.tools.apksigner.SignTool.sign(SignTool.java:314)
        at at.favre.tools.apksigner.SignTool.execute(SignTool.java:150)
        at at.favre.tools.apksigner.SignTool.mainExecute(SignTool.java:45)
        at at.favre.tools.apksigner.SignTool.main(SignTool.java:33)

  The full logs of all commands are available here:
  C:\Users\ZHOUXI~1\AppData\Local\Temp\apk-mitm-c50952ec3c980ae2ddb9daec29288368\logs

C:\Users\ZhouXiaokang>