Don't fetch signature when lv=0
This commit is contained in:
parent
e8ccca40a9
commit
19089a3097
|
|
@ -149,7 +149,8 @@ public class LSPatch {
|
|||
System.out.println("Parsing original apk...");
|
||||
ZFile zFile = ZFile.openReadWrite(tmpApk);
|
||||
|
||||
// save the apk original signature info, to support crach signature.
|
||||
if (sigbypassLevel > 0) {
|
||||
// save the apk original signature info, to support crack signature.
|
||||
String originalSignature = ApkSignatureHelper.getApkSignInfo(srcApkFile.getAbsolutePath());
|
||||
if (originalSignature == null || originalSignature.isEmpty()) {
|
||||
throw new PatchError("get original signature failed");
|
||||
|
|
@ -161,6 +162,7 @@ public class LSPatch {
|
|||
} catch (Throwable e) {
|
||||
throw new PatchError("Error when saving signature: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
// get the dex count in the apk zip file
|
||||
dexFileCount = findDexFileCount(zFile);
|
||||
|
|
|
|||
|
|
@ -72,9 +72,8 @@ public class ApkSignatureHelper {
|
|||
}
|
||||
}
|
||||
jarFile.close();
|
||||
return new String(toChars(certs[0].getEncoded()));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return certs != null ? new String(toChars(certs[0].getEncoded())) : null;
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue