diff --git a/xpatch/src/main/assets/android.keystore b/xpatch/src/main/assets/android.keystore new file mode 100644 index 0000000..879c1dc Binary files /dev/null and b/xpatch/src/main/assets/android.keystore differ diff --git a/xpatch/src/main/java/com/storm/wind/xpatch/task/BuildAndSignApkTask.java b/xpatch/src/main/java/com/storm/wind/xpatch/task/BuildAndSignApkTask.java index ce55b3b..82880af 100644 --- a/xpatch/src/main/java/com/storm/wind/xpatch/task/BuildAndSignApkTask.java +++ b/xpatch/src/main/java/com/storm/wind/xpatch/task/BuildAndSignApkTask.java @@ -38,7 +38,16 @@ public class BuildAndSignApkTask implements Runnable { File keyStoreFile = new File(keyStoreFilePath); // assets/keystore分隔符不能使用File.separator,否则在windows上抛出IOException !!! - FileUtils.copyFileFromJar("assets/keystore", keyStoreFilePath); + String keyStoreAssetPath; + if (isAndroid()) { + // BKS-V1 类型 + keyStoreAssetPath = "assets/android.keystore"; + } else { + // BKS 类型 + keyStoreAssetPath = "assets/keystore"; + } + + FileUtils.copyFileFromJar(keyStoreAssetPath, keyStoreFilePath); boolean signResult = signApk(unsignedApkPath, keyStoreFilePath, signedApkPath);