Skip to content

Commit

Permalink
fix null point bug
Browse files Browse the repository at this point in the history
  • Loading branch information
oobask committed Oct 20, 2020
1 parent d3a25dc commit 46933b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 46933b1

Please sign in to comment.