-
-
Notifications
You must be signed in to change notification settings - Fork 155
Allow for Runtime._instrumentation being pointer #371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c602376 to
c2929ba
Compare
|
Great patch! Fixes my problem. However, I had this problem arise on a Samsung Galaxy S20+ running Android 13. It appears from the parsed instructions that this is a candidate for I applied the following diff, for your consideration. It is a bit crude in that it checks diff --git a/lib/android.js b/lib/android.js
index b03152a..4ea9190 100644
--- a/lib/android.js
+++ b/lib/android.js
@@ -462,7 +462,7 @@ function _getApi () {
const instrumentationOffset = runtimeOffset.instrumentation;
let artInstrumentation = (instrumentationOffset !== null) ? artRuntime.add(instrumentationOffset) : null;
// TODO: Figure out better detection of https://android.googlesource.com/platform/art/+/17c7ed2de734cf892b005b1d15b3db9855506f14
- const instrumentationIsPointer = apiLevel > 35;
+ const instrumentationIsPointer = runtimeSpec.instrumentationIsPointer;
if (instrumentationIsPointer && artInstrumentation !== null) {
artInstrumentation = artInstrumentation.readPointer();
}
@@ -699,8 +699,8 @@ function _getArtRuntimeSpec (api) {
}
// todo: figure out better detection of https://android.googlesource.com/platform/art/+/17c7ed2de734cf892b005b1d15b3db9855506f14
- const instrumentationIsPointer = apiLevel > 35;
- spec.offset.instrumentation = instrumentationIsPointer
+ spec.instrumentationIsPointer = apiLevel > 35 || tryDetectInstrumentationPointer(api);
+ spec.offset.instrumentation = spec.instrumentationIsPointer
? tryDetectInstrumentationPointer(api)
: tryDetectInstrumentationOffset(api); |
|
@comed-ian Thanks. Im working on detecting ART APEX version here: #373 Would you mind sharing which version of ART you have? |
Sure! Pasting the results below from only the active APEX version. |
22b6714 to
9a03970
Compare
|
Tried latest push |
Thanks for feedback. This MR will probably still see a few changes throughout the day. Is it still broken for you on |
Thank you, it's working fine now, except P.S. My main testing device is Android 12. I am using frida-portal to connect to device. |
The instrumentation field in the Runtime class in some android 15 and all android 16 is now a pointer.
https://android.googlesource.com/platform/art/+/17c7ed2de734cf892b005b1d15b3db9855506f14
This should fix #368
arm64