topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
47.6k stars 12.09k forks source link

Magisk canary 122b4d6 will break OP7T fingerprint unlock #2803

Closed sabpprook closed 4 years ago

sabpprook commented 4 years ago

OnePlus 7T HD1900 OOS India 10.3.2.HD65AA

It only happened on https://github.com/topjohnwu/Magisk/commit/122b4d66b62db2ff6d5c6aa02933c33f121217d2, previous build https://github.com/topjohnwu/Magisk/commit/a62bdc58cb2e06128b82d332ba1f4e72f5700269 works fine. I'm not able to get logcat right now, sorry for this.

osm0sis commented 4 years ago

Can confirm on my North America 7T. More likely it's caused by https://github.com/topjohnwu/Magisk/commit/6a2e781db29a13e9fad5fead2242115d648736e4, specifically vendor.boot.verifiedbootstate, which is similar to custom kernels before this https://github.com/engstk/op7/commit/c8b1bcf78787b83a3c87a910c5713ebb9c523afd

I know it seems to be fine when set later in boot so I'll see if there's a way to fix that without just removing it entirely.

sabpprook commented 4 years ago

After some quick test, the latest canary build will lead fingerprint scan to fast that unable to detect whole fingerprint. Can not figure out why this will happen

osm0sis commented 4 years ago

Here's a workaround script for now.

/data/adb/service.d/verifiedboot-fp-fix.sh:

#!/system/bin/sh

# Magisk service.d script
resetprop vendor.boot.verifiedbootstate orange
until [ "$(getprop sys.boot_completed)" == 1 ]; do
  sleep 1
done
resetprop vendor.boot.verifiedbootstate green
sabpprook commented 4 years ago

Problem sort out

Due to this issue, maybe the codes of props fix will move to boot_complete to avoid this?

osm0sis commented 4 years ago

Just that prop needs to move later. Best to leave the others as early as possible.

Chartman123 commented 4 years ago

Seems to affect OnePlus 8, too. Can't use my fp sensor since I've installed the latest canary update.

Adding the script to the service.d directory doesn't seem to be working here :/

osm0sis commented 4 years ago

MagiskHide runs as soon as module post-fs-data scripts and system props are done, doing hide_sensitive_props(). Using service.d to flip it back to orange in my workaround unfortunately might just still be too late on the OP8, but the actual solution would likely be the same for all.

What we'll need to avoid removing resetting vendor.boot.verifiedbootstate green entirely is a separate hide_sensitive_props_late() which runs at sys.boot_completed like my script above.

Adding a new trigger for that to magiskinit/hide isn't something I'm sure how to do so hopefully @topjohnwu can take a look at it.

sabpprook commented 4 years ago

A quick fix https://github.com/sabpprook/Magisk/commit/e71bdb499c0df83477f48ccdf920805ccbffc457

osm0sis commented 4 years ago

That's pretty much what I had in mind, actually. Nice job! Open a PR?

ekka1993 commented 4 years ago

Will this fix the fingerprint error on oneplus 8 pro ? With magisk 20.4?

osm0sis commented 4 years ago

@ekka1993 This has nothing to do with 20.4, it's only broken in Canary 20411.

osm0sis commented 4 years ago

Ah, looks like @topjohnwu also took a crack at it: https://github.com/topjohnwu/Magisk/commit/97db49a57bab9fc573eee861b59bed95dfd5812a

ekka1993 commented 4 years ago

Is it solved?

osm0sis commented 4 years ago

Yep, working again on my 7T in 20412. :+1:

It stays reporting orange though due to a typo I just found and let @topjohnwu know about. That should be fixed for 20413.

bittylicious commented 4 years ago

Sadly 20412 isn't working here on my OnePlus 8.

I still get the "Fingerprint hardware not accessible" error on the lock screen. This is using the latest OnePlus release for the Europe variant, 10.5.6.IN21BA.

I'm not sure if it's related, but SafetyNet fails too even with MagiskHide on (ctsProfile fails, basicIntegrity is fine). It worked with 10.5.5.IN21BA but I can't confirm which version of Magisk Canary I was on then. I'm aware you don't generally investigate SafetyNet with canary releases though.

s12nkyp1g commented 4 years ago

Can someone help me with flashing Magisk using termux on an Android Lg stylo 5. I have accessed root using Ubuntu-andronix anyonw have instructions on this issue. I'm new to this but learn very fast. Someone help please!

On Mon, May 18, 2020, 10:06 AM Chris Renshaw notifications@github.com wrote:

Yep, working again on my 7T in 20412. 👍

It stays reporting orange though due to a typo I just found and let @topjohnwu https://github.com/topjohnwu know about. That should be fixed for 20413.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/topjohnwu/Magisk/issues/2803#issuecomment-630205266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOVHBRH5T4QTWSRIC4QJBDTRSE6FTANCNFSM4NBTF45Q .

osm0sis commented 4 years ago

@bittylicious can you clarify if 20411 was where this issue started for your 8? That's where it started on my 7T. If you didn't try 20411 then please try 20409 and let me know if it works.

bittylicious commented 4 years ago

@osm0sis It definitely was not working with 20411. I can't easily confirm whether it was the upgrade to 20411 that caused it to fail, or the Android update to 10.5.6.

I sadly don't have a build environment to prepare specific releases. Is there an easy way for me to try 20409, e.g. if you can provide me with a custom channel URL or something like that?

Ignore the SafetyNet error - disabling all modules enables SafetyNet to pass again.

osm0sis commented 4 years ago

@bittylicious all Canary releases are contained here: https://github.com/topjohnwu/magisk_files/commits/canary

Simply go back to the commit for 20409 and download the magisk-debug.zip from that commit, then flash it via Manager's Modules page "Install from storage"

bittylicious commented 4 years ago

@osm0sis Thanks for the instructions.

I'm now on 20409 but sadly the fingerprint doesn't work, so this issue is probably unrelated. Best guess is that it's the same issue @ekka1993 is experiencing with his OnePlus 8 Pro.

osm0sis commented 4 years ago

Does any previous Magisk build work on the 8 Series? Are you using custom kernels?

@Chartman123 you reported it happened with 20411 on your 8, can you update us on whether 20412 fixes it for your setup?

bittylicious commented 4 years ago

@osm0sis Yes, everything was working wonderfully before, fingerprint, SafetyNet, the lot. It was beautiful. No custom kernels.

Based on the Canary timestamps, I think it's the Android upgrade which cased things to break, not any change made in Magisk. Most likely the Android upgrade has introduced some sort of incompatibility with Magisk though.

osm0sis commented 4 years ago

@bittylicious And you aren't using my workaround script, presumably?

ekka1993 commented 4 years ago

Mine worked with 10.5.8 then i restored with brick tools then i stopp worked. I removed magisk then mine phone got soft bricked So i hade to restore it with bricked tools. Then i stopp worked.

bittylicious commented 4 years ago

@osm0sis No, I'm not using anything apart from Canary versions. No extra scripts.

osm0sis commented 4 years ago

Sounds sort of unrelated then, especially where ekka mentioned 20.4 stable and you say 20409 still doesn't work.

Try turning MagiskHide off and rebooting? That also worked on 20411 on my 7T.

Chartman123 commented 4 years ago

Does any previous Magisk build work on the 8 Series? Are you using custom kernels?

@Chartman123 you reported it happened with 20411 on your 8, can you update us on whether 20412 fixes it for your setup?

I've just installed the update and rebooted: the fp sensor is working fine again. At the moment I still have your script in the service.d directory...

Edit: tried it without the script, still working like a charm (y)

osm0sis commented 4 years ago

Alright, @Chartman123's confirmation suggests the original issue from this thread is resolved, and others must have something else going on.

Those of you still having issues will need to look into that further and open a new issue if appropriate. Be sure to include last working Magisk build, test stable and canary, and try with MagiskHide off and on, and all the logs.

sabpprook commented 4 years ago

@bittylicious How about adding fingerprint service into magiskhide list?

ekka1993 commented 4 years ago

Turn magisk hide off dosent work, same resultat. Error fp registration

bittylicious commented 4 years ago

@Chartman123 Can you confirm what version of the Android software you're using? Is it the latest OnePlus software for your OnePlus 8?

@sabpprook Sadly no different. "Fingerprint hardware not available" still.

ekka1993 commented 4 years ago

Where do i download 20412?

bittylicious commented 4 years ago

@ekka1993 Change your settings Update Channel to Canary. It's the latest Canary version.

osm0sis commented 4 years ago

If turning MagiskHide off and rebooting doesn't help then the latest Canary won't make a difference either, unfortunately.

ekka1993 commented 4 years ago

I Still have 20400 hmm

osm0sis commented 4 years ago

Yeah, so @ekka1993, when did it work last? What's your ROM version?

ekka1993 commented 4 years ago

I have 10.5.8

ekka1993 commented 4 years ago

It worked on 10.5.8 turn i bricked mine phone and i restored it then i stop to work

bittylicious commented 4 years ago

FYI, 10.5.8 is the latest update for the 8 Pro. It will include similar patches to 10.5.6, the latest version on the 8. So, me and @ekka1993 are likely experiencing the same error if it stopped working after the latest Android update for him.

If @Chartman123 can confirm he's not yet on the latest Android/OnePlus version, this puts together quite a clear picture. If he is on 10.5.6 (8) or 10.5.8 (8 Pro), then who knows!

One of the changelog entries for this update is:

System Optimized touch and interaction experience

So it could be related to this.

osm0sis commented 4 years ago

ekka was already on latest and had it working, then it broke after bricking the device and using some tools to recover it.

Sounds like they were on 10.5.8 and Magisk 20.4(20400) stable both when working and broken, so, a bit less clear of a picture there.

Chartman123 commented 4 years ago

I'm on 10.5.4 European version, the latest that is offered to me in the updater

osm0sis commented 4 years ago

@bittylicious have you tried rebooting with MagiskHide off yet to rule out some further interaction there?

bittylicious commented 4 years ago

@osm0sis Yes tried that, doesn't make a difference here.

@Chartman123 Interesting. You should get 10.5.6 soon with a bit of luck. I would have suggested using the OnePlus downloads page but it doesn't appear to be on there yet, so maybe they've spotted issues with the OTA update? Let us know when it comes please.

zyonee commented 4 years ago

The latest canary has the fingerprint reader working on my OP8 Pro with OOS 10.5.8. Not sure if it matters, but it's the European version. Went directly from canary a62bdc58 to 99ef2062. I did try 122b4d66 yesterday with the fingerprint reader not working, but for me the latest canary fixed the issue. Good work!

ekka1993 commented 4 years ago

Should i use direct update ? do i need to patch it and install with adb ?

0xCCD commented 4 years ago

Mine worked with 10.5.8 then i restored with brick tools then i stopp worked. I removed magisk then mine phone got soft bricked So i hade to restore it with bricked tools. Then i stopp worked.

I had the same issue, in my case downgrade to v20.4 solved it and new canary also. But on oneplus forums they talk also about the fact that a fastboot flash will damage one partition which is related for the fingerprint

https://forums.oneplus.com/threads/enrollment-was-not-completed-fingerprint-registration-error.1218379/page-2#post-21617960

osm0sis commented 4 years ago

@sabpprook @Chartman123 @zyonee @0xCCD The original reported issue is now properly resolved in 20414 with vendor.boot.verifiedbootstate green after 3c04dab47274e9bbbfb3ddd1fcf71c929c8ed0c0. :+1:

Those of you still having issues must have something else going on, will need to look into that further and open a new issue if appropriate. Be sure to include last working Magisk build, test stable and canary, try in Safe Mode, try with MagiskHide off and on, and all the logs.

ekka1993 commented 4 years ago

Hey guys, do you have the stock boot img for oneplus 8 pro 10.5.8 Europe (IN11BA) ? Did know how to Contact you

0xCCD commented 4 years ago

Hey guys, do you have the stock boot img for oneplus 8 pro 10.5.8 Europe (IN11BA) ? Did know how to Contact you

https://send.firefox.com/download/32475d18c3fc0745/#t93WiF7h3IGEWhzTFola5w

ekka1993 commented 4 years ago

Is it patched with magisk or stock ?