-
Notifications
You must be signed in to change notification settings - Fork 30
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
Install fails if hasSystemFeature method not found #1
Comments
Yeah as I see, after fix it, if can add a option like, if you want the patch for ApplicationPackageManager.smali press the Volume+ if not press Volume- |
I agree. Will make the patching portion to be optional in the upcoming release.
Thanks for the debug log. The log does shows some unexpected output from $apm_line, which I'm thinking is what causing the error. Please try this test version to see if it solves the issue that @VisionR1 and you are encountering when patching the hasSystemFeature method. |
@changhuapeng |
Same result with the test build here for me. |
Thanks for testing. Would it be possible for the both of you to send me your unedited framework.jar? You can get it by running |
|
|
Hopefully this will do the job: FrameworkPatcherGo-test2.zip |
Yeah, this working, even in emulator i tried it and it works. |
Yes! This one works. Interestingly, on the version where I commented out the "optional" portion so that the patch would complete, I ended up with a "bad signature" error in Key Attestation Demo, resulting in the certificate appearing to be revoked. However, now that it patched completely, the app no longer shows that error. Unfortunately, I'm still only passing Basic Integrity, so I still need to find a different keybox that actually works. I tried adding a different keybox with 3 certs, but it ends up in a bootloop. I'm going to try changing the props to see if maybe I need to use props from a device that supports HARDWARE-BACKED Attestation. Thanks for all your hard work on this! P.S. While the installation and patching went fine, I think the logging may be slightly incorrect, as seen below:
The "replaced by" section appears to be the same as what precedes it, so not sure what it's supposed to be showing there. But again, that's just a visual error and the actual patching appears to be working correctly. |
Yeah and mine the same, but like you say is just a visual error, the main purpose works. |
Thanks to you both for testing and verifying that this new fix is working correctly! Upcoming release will contain this fix as well as providing user a choice to patch ApplicationPackageManager or not.
That's not a visual bug since the script actually did replaced the original string with a new similar string. The reason is that from the few framework.jar that I referenced from during development, none of the original string was the correct string right from the start. Hence, the script wasn't expecting such and simply overwriting what was originally correct with what it should be corrected with. I supposed I can write a simple check to fix this confusion. Thanks for highlighting this! |
First of all, great work on this! I just tried to install it, and everything is fine up to the above item. I believe that portion of the process is optional, so perhaps if that method can't be found, the install should continue rather than exit?
Install log below:
EDIT: It could also just be an error with the sed command, upon reviewing the above output...
EDIT 2: Seems like the sed command reporting the error is from line 158 inMETA-INF/com/google/android/magisk/customize.sh
, which uses the "name_regex" variable from line 157. That's the one that seems to be causing the error.EDIT 3: Okay, I did some actual Debugging by adding a few echo commands to the code to see where that sed error is coming from. This is what I added:
And this is the corresponding log output:
So I guess the issue is the apm_method_code variable? Something in that command is causing a sed error, and making that variable end up blank.
The text was updated successfully, but these errors were encountered: