Skip to content

Commit

Permalink
Update LSPatch.java
Browse files Browse the repository at this point in the history
  • Loading branch information
HSSkyBoy committed Mar 31, 2024
1 parent c8929eb commit d5bfd4f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions patch/src/main/java/org/lsposed/patch/LSPatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,6 @@ public void patch(File srcApkFile, File outputFile) throws PatchError, IOExcepti
logger.d("original minSdkVersion: " + minSdkVersion);
}

final boolean skipSplit = apkPaths.size() > 1 && srcApkFile.getName().startsWith("split_") && appComponentFactory == null;
if (skipSplit) {
logger.i("Packing split apk...");
for (StoredEntry entry : srcZFile.entries()) {
String name = entry.getCentralDirectoryHeader().getName();
if (dstZFile.get(name) != null) continue;
if (name.startsWith("META-INF") && (name.endsWith(".SF") || name.endsWith(".MF") || name.endsWith(".RSA"))) continue;
srcZFile.addFileLink(name, name);
}
return;
}

logger.i("Patching apk...");
// modify manifest
final var config = new PatchConfig(useManager, debuggableFlag, overrideVersionCode, sigbypassLevel, originalSignature, appComponentFactory);
Expand Down Expand Up @@ -354,4 +342,4 @@ private byte[] modifyManifestFile(InputStream is, String metadata, int minSdkVer
os.close();
return os.toByteArray();
}
}
}

0 comments on commit d5bfd4f

Please sign in to comment.