fix(android)!: preserve JVM settings and reuse metadata sessions (#908)

* perf(graph): avoid repeated traversal edge scans and copies

* fix(android)!: preserve JVM settings and reuse metadata sessions

Read class metadata without generating application source, retain immutable serialized APK sessions, and join owned cleanup on cancellation and shutdown.

BREAKING CHANGE: Android analysis now requires a full JDK 17 or newer with its compiler module for the packaged Java source bridge.
This commit is contained in:
morluto
2026-10-07 16:50:41 +08:00
committed by GitHub
parent f430c416c7
commit eab34a9d8c
36 changed files with 1165 additions and 138 deletions
+5 -4
View File
@@ -137,19 +137,20 @@ const searchClasses = async (
engine: Engine,
): Promise<JsonValue> => {
const classes: string[] = [];
const pageSize = 4096;
let total: number | undefined;
do {
const page = jadxClassPageSchema.parse(
await tools.json("list_classes", {
offset: classes.length,
limit: 200,
limit: pageSize,
}),
);
if (
(total !== undefined && total !== page.total) ||
page.offset !== classes.length ||
page.limit !== 200 ||
page.items.length > 200
page.limit !== pageSize ||
page.items.length > pageSize
)
throw new AnalysisOutputError(
request.operation,
@@ -307,7 +308,7 @@ const traceReferences = async (
throw new AnalysisCapabilityUnavailableError(
"jadx",
request.operation,
`JADX ${JADX_RELEASE.version} references select the first same-name method; ${summary.full_name}.${methodName} has ${candidates.length} overloads. No unambiguous reference result is available.`,
`References require a unique method name; ${summary.full_name}.${methodName} has ${candidates.length} overloads. No unambiguous reference result is available.`,
);
const expectedTarget =
methodName === undefined