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

[WIP] Find out the commits that failed CorePatch #39

Closed
wants to merge 6 commits into from

Conversation

JingMatrix
Copy link
Owner

@JingMatrix JingMatrix commented Sep 20, 2024

CorePatch only fails on certain devices (#32 ).
In this branch, I first revert the commit f3beb86, which is known to cause the CorePatch issue on some devices.

After tests results from users for fore-coming commits, I will gradually figure out which commit in the master branch breaks CorePatch.

JingMatrix and others added 5 commits September 18, 2024 09:53
Requested by #14, a switch is added to the release version.
Patch of msvamp rejected in original repository
mywalk added ui interface

Co-authored-by: mywalk <[email protected]>
Avoid using a local version of this apache module
Tests passed on Android 13 and Android 15 devices
DexBuilder is updated in the LSPlant repo.

Note: we should clean caches of GitHub Actions
@JingMatrix JingMatrix force-pushed the corepatch branch 3 times, most recently from 8331907 to 7a4cebb Compare September 20, 2024 15:49
@JingMatrix JingMatrix linked an issue Sep 20, 2024 that may be closed by this pull request
1 task
@JingMatrix
Copy link
Owner Author

@happypotter321 Now I have to use the most stupid way to find out which commit breaks CorePatch.
Please test the latest CI build and tell me if it works.

@JingMatrix JingMatrix self-assigned this Sep 20, 2024
@happypotter321
Copy link

Just tried the latest Cl build (debug version) and followed the same steps as before, still didn't work for me unfortunately. Are the logs still needed btw? I saved it just in case, here it is.
LSPosed_2024-09-20T22_46_53.295508.zip

@JingMatrix
Copy link
Owner Author

@happypotter321 It is okay if it still fails. The goal here is try to figure out which commit breaks CorePatch (that is my last resort).
Please be patient, if remains about four tests to reach the goal.
Attaching your logs is always easier for me, thanks.
Please try again the latest CI build and tell me your result.

@happypotter321
Copy link

Understood, same result with the build after the previous one I used. Here's the log,
LSPosed_2024-09-20T23_33_44.993648.zip

@JingMatrix
Copy link
Owner Author

JingMatrix commented Sep 20, 2024

The GitHub Actions is quite buggy, please try my local build.
LSPosed-4666b130.zip

Edited: It turned out that I misunderstood how Github Actions works with pull-request. My fault...

@happypotter321
Copy link

That worked: :D

LSPosed_2024-09-21T00_49_36.606984.zip

@JingMatrix
Copy link
Owner Author

JingMatrix commented Sep 20, 2024

So far, I found that CorePatch stops working for you once the following logs present:

[W/Magisk]: Failed to dlopen zygisk module: dlopen failed: library "libicu.so" not found: needed by /system/lib64/libharfbuzz_ng.so in namespace (default)

It seems that some dependency updates breaks CorePatch.

libharfbuzz_ng.so is simply a library for fonts, I don't see why LSPosed needed it.
I guess that it is commit 44570c5 that causes the above error

Please continue trying my local builds and upload your log.
LSPosed-44570c5e.zip

@happypotter321
Copy link

Sure, and yes this one worked too.
LSPosed_2024-09-21T02_48_43.732097.zip

@JingMatrix
Copy link
Owner Author

That is cool, so my previous comment was wrong. It is not related to the dlopen failure of magisk.
Then I conjecture it was caused by the upstream update of LSPlant after commit d4e00ea

Please try this local build:
LSPosed-d4e00eac.zip

@happypotter321
Copy link

This one didn't work, yep.
LSPosed_2024-09-21T03_27_12.505228.zip

@JingMatrix
Copy link
Owner Author

Then the bug might be caused by LSPlt, which confuses me a lot.
Please continue trying my local build, I wanna see if 75e3005 breaks CorePatch. Hoping that it will work.
LSPosed-75e30053.zip

@happypotter321
Copy link

This one didn't work, just tried it.
LSPosed_2024-09-21T11_44_53.637134.zip

@pluseach
Copy link

same here, doesn't work too.. fail.

before installing an app: com.waze
LSPosed_2024-09-21T13_21_29.864141-modules.zip
LSPosed_2024-09-21T13_21_19.406175-verbose.zip

after installing an app: com.waze
LSPosed_2024-09-21T13_22_35.631262-modules.zip
LSPosed_2024-09-21T13_22_48.666308-verbose.zip

@JingMatrix
Copy link
Owner Author

Okay. Then the bug is surely introduced by LSPlt, which might conflict ArtMethod de-optimizing.
To comfirm my conjecture, please also try the following build. It should work.
If so, the commits before 16c09ce are good.
LSPosed-16c09cef.zip

@pluseach
Copy link

yep it works, the app installed successfully.

@happypotter321
Copy link

Same here, app installed with that one.
LSPosed_2024-09-21T12_26_01.446840.zip

@JingMatrix
Copy link
Owner Author

JingMatrix commented Sep 21, 2024

To temporarily fix this issue, I disable LSPlt in the latest commit.
Please try the latest build (debug version) and upload your logs.
I suppose that it should work without problems.

@pluseach
Copy link

pluseach commented Sep 21, 2024

Thank you so much, CorePatch works normally now 🫡

  1. WIP 10970539268

before installing:
LSPosed_2024-09-21T14_17_16.625255.zip
after installing:
LSPosed_2024-09-21T14_18_36.698557.zip

@JingMatrix
Copy link
Owner Author

@happypotter321 I need your log for the latest CI build debug version to better understand the problem.
If it works, you can keep using that version.
@pluseach Thanks for participating this issue. It would be better if you could use the debug version from latest CI build so that I could compare logs,

@happypotter321
Copy link

Yep, just tested it and it works. And okay thanks.
LSPosed_2024-09-21T13_47_00.007991.zip

@pluseach
Copy link

pluseach commented Sep 21, 2024

@JingMatrix Of course, here's the logs:
Installing package com.waze

  1. Latest Release Logs Version 10933177132: Installation Failed
    LSPosed_2024-09-21T15_26_56.888485-before_installing.zip
    LSPosed_2024-09-21T15_28_13.820470-after_installing(fail).zip

Debug Logs Version:
LSPosed_2024-09-21T16_07_01.317515_before-install.zip
LSPosed_2024-09-21T16_09_09.174960_after-install(fail).zip

  1. Latest WIP Release Logs Version 10970714532: Installed Successfully
    LSPosed_2024-09-21T15_32_31.164139-before_installing.zip
    LSPosed_2024-09-21T15_34_49.026593-after_installing(success).zip

Debug Logs Version:
LSPosed_2024-09-21T16_14_06.848650_before-install.zip
LSPosed_2024-09-21T16_16_18.330281_after-install(success).zip

Sorry, I mistakenly mentioned a pull request.

@privacyguy123
Copy link

This build has same number as builds that don't work - is it safe to download Actions build to test?

@JingMatrix
Copy link
Owner Author

@privacyguy123 Sure. The build name of LSPosed zip archive works in another way, only commits from the main branch will increase that number. We are in a pull-request, so the number stays the same.

Even if dladdr could not find function name for an address given by
art_symbol_resolver, we should still process inline hook.
@JingMatrix
Copy link
Owner Author

Hello, everyone. In the latest build, I am try to actually fix the issue instead of a workaround. Please test it and upload the logs if it fails.

@privacyguy123
Copy link

Hello, everyone. In the latest build, I am try to actually fix the issue instead of a workaround. Please test it and upload the logs if it fails.

Installing apps with differing signatures all good on my side now :)

@privacyguy123
Copy link

privacyguy123 commented Sep 22, 2024

Never mind - you have introduced some regression with this build. Watchdog logs toggled off is now doing nothing and forcing log on/setting persists props every reboot again. I don't understand why this setting would be affected at all by new commits, I see the commit for it in the history. @JingMatrix

@JingMatrix
Copy link
Owner Author

@privacyguy123 Thanks for reporting this issue.
It was my fault, I rebase the history with a change, and my device unfortunately didn't show that it breaks some stuff (on others' device). Already fixed in the latest build of master branch now.

@JingMatrix JingMatrix deleted the corepatch branch September 22, 2024 19:07
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.

CorePatch not fully functional on some devices
4 participants