diff --git a/brut.apktool/apktool-lib/src/main/java/com/faker/android/FakerMain.java b/brut.apktool/apktool-lib/src/main/java/com/faker/android/FakerMain.java index 298a408..4ad08b0 100644 --- a/brut.apktool/apktool-lib/src/main/java/com/faker/android/FakerMain.java +++ b/brut.apktool/apktool-lib/src/main/java/com/faker/android/FakerMain.java @@ -2,7 +2,7 @@ public class FakerMain { ///TODO 来个中文注释吧 - static String apkFilePath = "C:\\Users\\Yang\\Desktop\\apk\\超级进球.apk"; + static String apkFilePath = "C:\\Users\\Yang\\Desktop\\apk\\大亨联盟_killer.apk"; public static void main(String[] args) { System.out.println(apkFilePath); FakerTransfer.translate(apkFilePath,null); diff --git a/brut.apktool/apktool-lib/src/main/java/com/faker/android/FileUtil.java b/brut.apktool/apktool-lib/src/main/java/com/faker/android/FileUtil.java index 1a19cbb..07b67bc 100644 --- a/brut.apktool/apktool-lib/src/main/java/com/faker/android/FileUtil.java +++ b/brut.apktool/apktool-lib/src/main/java/com/faker/android/FileUtil.java @@ -6,6 +6,9 @@ public class FileUtil { public static void autoReplaceStr(File file, String oldstr, String newStr) throws IOException { + if(oldstr==null||newStr==null){ + return; + } Long fileLength = file.length(); byte[] fileContext = new byte[fileLength.intValue()]; FileInputStream in = null; diff --git a/brut.apktool/apktool-lib/src/main/java/com/faker/android/Importer.java b/brut.apktool/apktool-lib/src/main/java/com/faker/android/Importer.java index faeb731..a0bf35d 100644 --- a/brut.apktool/apktool-lib/src/main/java/com/faker/android/Importer.java +++ b/brut.apktool/apktool-lib/src/main/java/com/faker/android/Importer.java @@ -161,7 +161,12 @@ boolean mergeFaker(SourceCode sourceCode, XSrcTarget xSrcTarget) throws IOExcept if(jniLibsARM64V8A.exists()){ PatchManger.copyDirFromJar(sourceCode.getJniLibs()+"/arm64-v8a",jniLibsARM64V8A.getAbsolutePath()); } - if(!jniLibsARMV7A.exists()&&!jniLibsARM64V8A.exists()){ + + File armeabi = new File(targetjniLibs,"armeabi"); + if(armeabi.exists()){ + PatchManger.copyDirFromJar(sourceCode.getJniLibs()+"/armeabi-v7a",armeabi.getAbsolutePath()); + } + if(!jniLibsARMV7A.exists()&&!jniLibsARM64V8A.exists()&&!armeabi.exists()){ PatchManger.copyDirFromJar(sourceCode.getJniLibs()+"/armeabi-v7a",jniLibsARMV7A.getAbsolutePath()); PatchManger.copyDirFromJar(sourceCode.getJniLibs()+"/arm64-v8a",jniLibsARM64V8A.getAbsolutePath()); }