frida-java-bridge 6.3.4 → 6.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/android.js +15 -3
- package/package.json +1 -1
package/lib/android.js
CHANGED
|
@@ -187,7 +187,11 @@ function _getApi () {
|
|
|
187
187
|
},
|
|
188
188
|
// Android >= 6
|
|
189
189
|
_ZN3art9JavaVMExt12DecodeGlobalEPNS_6ThreadEPv: ['art::JavaVMExt::DecodeGlobal', 'pointer', ['pointer', 'pointer', 'pointer']],
|
|
190
|
-
|
|
190
|
+
|
|
191
|
+
// makeDecodeGlobalFallback() uses:
|
|
192
|
+
// Android >= 15
|
|
193
|
+
_ZNK3art6Thread19DecodeGlobalJObjectEP8_jobject: ['art::Thread::DecodeJObject', 'pointer', ['pointer', 'pointer']],
|
|
194
|
+
// Android < 6
|
|
191
195
|
_ZNK3art6Thread13DecodeJObjectEP8_jobject: ['art::Thread::DecodeJObject', 'pointer', ['pointer', 'pointer']],
|
|
192
196
|
|
|
193
197
|
// Android >= 6
|
|
@@ -314,6 +318,7 @@ function _getApi () {
|
|
|
314
318
|
'_ZN3art9JavaVMExt12AddGlobalRefEPNS_6ThreadEPNS_6mirror6ObjectE',
|
|
315
319
|
'_ZN3art9JavaVMExt12DecodeGlobalEPv',
|
|
316
320
|
'_ZN3art9JavaVMExt12DecodeGlobalEPNS_6ThreadEPv',
|
|
321
|
+
'_ZNK3art6Thread19DecodeGlobalJObjectEP8_jobject',
|
|
317
322
|
'_ZNK3art6Thread13DecodeJObjectEP8_jobject',
|
|
318
323
|
'_ZN3art10ThreadList10SuspendAllEPKcb',
|
|
319
324
|
'_ZN3art10ThreadList10SuspendAllEv',
|
|
@@ -489,7 +494,7 @@ function _getApi () {
|
|
|
489
494
|
temporaryApi['art::JavaVMExt::AddGlobalRef'] = makeAddGlobalRefFallbackForAndroid5(temporaryApi);
|
|
490
495
|
}
|
|
491
496
|
if (temporaryApi['art::JavaVMExt::DecodeGlobal'] === undefined) {
|
|
492
|
-
temporaryApi['art::JavaVMExt::DecodeGlobal'] =
|
|
497
|
+
temporaryApi['art::JavaVMExt::DecodeGlobal'] = makeDecodeGlobalFallback(temporaryApi);
|
|
493
498
|
}
|
|
494
499
|
if (temporaryApi['art::ArtMethod::PrettyMethod'] === undefined) {
|
|
495
500
|
temporaryApi['art::ArtMethod::PrettyMethod'] = temporaryApi['art::ArtMethod::PrettyMethodNullSafe'];
|
|
@@ -3848,8 +3853,15 @@ function makeAddGlobalRefFallbackForAndroid5 (api) {
|
|
|
3848
3853
|
};
|
|
3849
3854
|
}
|
|
3850
3855
|
|
|
3851
|
-
function
|
|
3856
|
+
function makeDecodeGlobalFallback (api) {
|
|
3857
|
+
/*
|
|
3858
|
+
* Fallback for art::JavaVMExt::DecodeGlobal, which is
|
|
3859
|
+
* unavailable in Android versions <= 5 and >= 15.
|
|
3860
|
+
*/
|
|
3852
3861
|
const decode = api['art::Thread::DecodeJObject'];
|
|
3862
|
+
if (decode === undefined) {
|
|
3863
|
+
throw new Error('art::Thread::DecodeJObject is not available; please file a bug');
|
|
3864
|
+
}
|
|
3853
3865
|
|
|
3854
3866
|
return function (vm, thread, ref) {
|
|
3855
3867
|
return decode(thread, ref);
|