Skip to content

Commit

Permalink
The fix for incomplete frida#326
Browse files Browse the repository at this point in the history
When the fix is merged, it introduces new issue, exportName is never
null, it always attaches to null functions, then crash our server.
  • Loading branch information
Severus authored and Severus committed Aug 15, 2024
1 parent 8d2e7d7 commit ed8c632
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/android.js
Original file line number Diff line number Diff line change
Expand Up @@ -1903,12 +1903,12 @@ function ensureArtKnowsHowToHandleReplacementMethods (vm) {
} else {
let exportName = null;
if (apiLevel > 28) {
exportName = '_ZN3art2gc9collector17ConcurrentCopying12CopyingPhaseEv';
exportName = Module.getExportByName('libart.so', '_ZN3art2gc9collector17ConcurrentCopying12CopyingPhaseEv');
} else if (apiLevel > 22) {
exportName = '_ZN3art2gc9collector17ConcurrentCopying12MarkingPhaseEv';
exportName = Module.getExportByName('libart.so','_ZN3art2gc9collector17ConcurrentCopying12MarkingPhaseEv');
}
if (exportName !== null) {
Interceptor.attach(Module.getExportByName('libart.so', exportName), artController.hooks.Gc.copyingPhase);
Interceptor.attach(exportName, artController.hooks.Gc.copyingPhase);
}
}
}
Expand Down

0 comments on commit ed8c632

Please sign in to comment.