Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Enable fingerprint halo light for optical sensor on Huawei Mate 20 Pro #468

Open
deepsrd opened this issue Apr 8, 2019 · 12 comments
Open

Comments

@deepsrd
Copy link

deepsrd commented Apr 8, 2019

The mate 20 Pro has a similar optical fingerprint sensor as the Mi9.
The halo need to be enabled to it to work properly.

The fingerprint does work however, it needs the scrrrn to be on a high brightness level
I have attached the logcat from the Phh-Trable GSI build 112, this is of the fingerprint enrollment using the system app.

@deepsrd
Copy link
Author

deepsrd commented Apr 8, 2019

logcat.txt

@phhusson
Copy link
Owner

phhusson commented Apr 8, 2019

I'm not too sure what you say.
Are you saying that you enabled the halo yourself by setting the right properties, and you're now stuck after that?

@deepsrd
Copy link
Author

deepsrd commented Apr 8, 2019

Ah sorry,
I meant that the fingerprint scanner works out of the box, but with screen at high brightness.

There is no halo light as is in the stock rom. Means it does not work for unlocking the screen ..

I could not enable it at all..

@phhusson
Copy link
Owner

phhusson commented Apr 8, 2019

Ok, should be fairly easy to fix then.

Basically, you'll need (on my aosp v112) to set the following properties:
persist.vendor.sys.fp.fod.location.X_Y
persist.vendor.sys.fp.fod.size.width_height
which are the position and size of fingerprint sensor
For instance here are the values on Mi 9:
[persist.vendor.sys.fp.fod.location.X_Y]: [455,1920]
[persist.vendor.sys.fp.fod.size.width_height]: [173,173]

Once you do that, android will show you a light green circle where to put your finger, and when you press your finger there, it will make the brightness at 100% while diming the rest of the screen (so as not to blind you if you were at low brightness)

To improve this further, you should set this in a framework-res overlay:

+    <integer translatable="false" name="config_brightness_ramp_rate_fast">10000</integer>
+    <integer translatable="false" name="config_brightness_ramp_rate_slow">10000</integer>

@deepsrd
Copy link
Author

deepsrd commented Apr 8, 2019

Ah cool!!

I will test it and report back..

Thanks a million!

@deepsrd
Copy link
Author

deepsrd commented Apr 9, 2019

Amazing , it works!!

How can I port this to other roms? like Lineage?
What changes do I need to pick?

@phhusson
Copy link
Owner

phhusson commented Apr 9, 2019

Could you get me your ro.vendor.build.fingerprint and tell me what values did you use for x_y and width_height?

The patch is at phhusson/platform_frameworks_base@64b2e6d

@deepsrd
Copy link
Author

deepsrd commented Apr 9, 2019

[[ro.vendor.build.fingerprint]]: [[kirin980/kirin980/kirin980:9/PPR1.180610.011/jenkins03052134:user/release-keys]]

I havent fine tuned the location yet, I will post it here once i get the values..

@phhusson
Copy link
Owner

@deepsrd any news? :-)

@deepsrd
Copy link
Author

deepsrd commented Apr 20, 2019

So sorry, I was on holidays..
I was tinkering with it and i was building xxxhdpi build,and the values i used are 720,1540 ..
These are still a bit off, since the coordinates from the stock rom does not match up when I use it on the gsi..
Also, the screen rotation is not supported, minor issue :)

I will experiment more and update here as I get closer..

@Diazz72
Copy link

Diazz72 commented Jul 20, 2019

Are this things fixed.
If not do you require something from us ( coordinates...etc ) for a fix?

Thanks and regards, Diazz72.

@penn5
Copy link

penn5 commented Jul 20, 2019

He needs coords, size and hal

onde2rock pushed a commit to onde2rock/treble_experimentations that referenced this issue Apr 3, 2022
Add resources for OPPO A54 (CPH2239)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants