Skip to content
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

handle CMC GC strategy #325

Merged
merged 2 commits into from
Jul 12, 2024
Merged

handle CMC GC strategy #325

merged 2 commits into from
Jul 12, 2024

Conversation

matbrik
Copy link

@matbrik matbrik commented Jul 11, 2024

Fixes #323
It is related to this commit liuyufei@c52014e which was made to force an update of the ArtMethods containing the hooks after a GC.

With the recent updates of Android/libart/Google Play System Updates on certain devices it has been enabled the CMC (MarkCompact collector) instead of CC (ConcurrentCopying).

Copy link
Member

@oleavr oleavr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, thanks! 🤩

lib/android.js Outdated Show resolved Hide resolved
lib/android.js Outdated Show resolved Hide resolved
lib/android.js Outdated Show resolved Hide resolved
lib/android.js Outdated Show resolved Hide resolved
@matbrik
Copy link
Author

matbrik commented Jul 11, 2024

updated description for context

@oleavr oleavr merged commit 4621157 into frida:main Jul 12, 2024
7 of 11 checks passed
@pig837
Copy link

pig837 commented Jul 24, 2024

Still the app is dying on Google Pixel 6 Pro + Android 14 (AP2A.240705.004, 2024.07) + KernelSU 1.0.0 (LKM Mode) + Frida 16.4.7.

When I checked the logcat, the app is dying after Using CollectorTypeCMC GC.

Is there any way?

07-24 14:04:11.776 20686 20686 I dex2oat64: Using CollectorTypeCMC GC.
07-24 14:04:11.848 12389 12685 I WindowManager: WIN DEATH: Window{5fde95f u0 com.abc.def.ghi/com.abc.jkl.mnl}

frida/frida#2899

@pig837
Copy link

pig837 commented Jul 24, 2024

https://android.googlesource.com/platform/art/+/854cb7d94594f027cf0f056d6cd023e7a00df0cd%5E%21/

Enable userfaultfd-based CMC GC by default on Android S(13) and above.

Before this change, the Concurrent Mark-Compact Garbage Collector
(CMC GC) was enabled by default (provided the kernel supports
userfaultfd) on Android T(14) and above. Extend this behavior to
Android S(13) and above.

This reverts commit a9102c122084ced4a5369d2c2174ea1b83b4e1c9.

  • Summary: No problem on Android <= 12 device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SIGSEGV in artQuickGenericJniTrampoline while hooking java methods
3 participants