fix(android): validate engine archive prerequisites (#1145)

* fix(android): validate engine archive prerequisites

* fix(android): bound engine metadata reads before allocation
This commit is contained in:
Ysopwnable
2026-10-09 09:15:33 +08:00
committed by GitHub
parent 13935077ba
commit e9ebfb94ef
9 changed files with 180 additions and 17 deletions
+15
View File
@@ -0,0 +1,15 @@
import { writeOrderedZip } from "../artifactEntryOrder.js";
/** ZIP classpath inventory for synthetic protocol tests; not executable bytecode. */
export const writeJadxJarInventory = (
path: string,
extraEntries: readonly string[] = [],
): Promise<void> =>
writeOrderedZip(path, [
"com/atxx/jhmcp/JadxSession.class",
"com/atxx/jhmcp/SessionHolder.class",
"jadx/api/JadxDecompiler.class",
"com/google/gson/Gson.class",
"io/modelcontextprotocol/kotlin/sdk/server/Server.class",
...extraEntries,
]);