Conversation
…ffset
- Add globalThis.FRIDA_JAVA_BRIDGE_DISABLE_JVMTI flag. When true,
tryGetEnvJvmti() returns null without calling
Runtime::EnsurePluginLoaded(), which aborts ART on some Android 16
devices ("method_index < num_methods_" in boot-framework.oat).
Callers already fall back to the non-JVMTI path when jvmti is null.
- getArtClassSpec(): if no u16 matching the methods array length is
found in java/lang/Thread (layout differs on Android 16), use 0 as
"unknown" instead of throwing. 0 is the klass_ header, so it can
never be a valid offset.
- class-model: when copied_methods_offset is 0, iterate over the whole
methods array instead of reading a u16 count, both in model_new()
and in collect_matching_class_methods().
Tested on Android 16 (API 36) with the flag enabled: Java.use, static
method calls and Java.scheduleOnMainThread work. Without the flag,
behavior is unchanged on devices where the class probe succeeds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A workaround for #404
tryGetEnvJvmti() returns null without calling
Runtime::EnsurePluginLoaded(), which aborts ART on some Android 16
devices ("method_index < num_methods_" in boot-framework.oat).
Callers already fall back to the non-JVMTI path when jvmti is null.
found in java/lang/Thread (layout differs on Android 16), use 0 as
"unknown" instead of throwing. 0 is the klass_ header, so it can
never be a valid offset.
methods array instead of reading a u16 count, both in model_new()
and in collect_matching_class_methods().
Tested on Android 16 (API 36) with the flag enabled: Java.use, static
method calls and Java.scheduleOnMainThread work. Without the flag,
behavior is unchanged on devices where the class probe succeeds.