hmaarrfk / Validity91

Reverse engineering the Validity 138a:0091 fingerprint sensor (Dell XPS 15/13 2016-2017 9X50 and 9X60)
BSD 3-Clause "New" or "Revised" License
236 stars 16 forks source link

Can you share me part of your image packet. #11

Closed iusearch closed 6 years ago

iusearch commented 6 years ago

I got a 06cb 0078 sensor. It seems like almost all packets are in the same process, just some commands are different. I got the image packet with head "00008c1f00003800......". Does it match your packet?

hmaarrfk commented 6 years ago

My image packet is literally the raw image file:

https://github.com/hmaarrfk/Validity91/blob/master/validity91.py#L152

shows that I just concatenate the strings, and convert it to an array.

iusearch commented 6 years ago

You mean a string with a "PNG" header? You packet include this PNG header?

hmaarrfk commented 6 years ago

Is that a PNG header? what command should I return you the result for?

iusearch commented 6 years ago

I just looking at the content of variable img. Is it a bitmap? I am not sure if my packet is in the correct format.

iusearch commented 6 years ago

And how do you discover that is a 112*112 image?

hmaarrfk commented 6 years ago

right, so mine is a bitmap. no special headers.

I discovered it was a 112x112 because I reshaped the data into a square ish 2D array. Then it seemed like the data wasn't aligned correctly. So i kept removing things until I had an image.

https://github.com/hmaarrfk/Validity91/blob/master/validity91.py#L137

I guess there is a 6 byte header, but I think it was something like "total image size" and "current packet size"

iusearch commented 6 years ago

Ok. Thank you. I will keep trying.

hmaarrfk commented 6 years ago

The rest of my dump is there, I just didn't want to be getting people's fingerprints sent to me then getting in trouble for it.

iusearch commented 6 years ago

Yep. You disable logging before collect the fingerprint. Then i don't have any packet to compare with.

iusearch commented 6 years ago

Could you please tell me the size of your img packet?

hmaarrfk commented 6 years ago

See comments here: https://github.com/hmaarrfk/Validity91/blob/9224e476e7003179527f83b76d7e19ae2f7559ac/validity91.py#L346

There are 8 control column too. https://github.com/hmaarrfk/Validity91/blob/master/validity91.py#L161

So the image size is actually 112 * 120. Sent in 3 packets, I think they were all equal length.

➤ 112 * 120 / 3 + 6                                                                                                                                           
4486.0
iusearch commented 6 years ago

Thank you very much. My packet is a little bit smaller and only one. I will find the correct format.

hmaarrfk commented 6 years ago

apparently i get 3 chunks: 4806, 4806, and 3846, the rest is as described above.

iusearch commented 6 years ago

Luckily, I got my clear fingerprint image now. I need to work on libfprint as well as you.

hmaarrfk commented 6 years ago

AWESOME!!!! How big is your image? Basically, libfprint doesn't have new image matching algorithms.

Get on the gitter channel, there was a guy there working on some Neural Net to try and solve this.

hmaarrfk commented 6 years ago

Feel free to close this issue when you are happy. Glad I was able to help troubleshoot.

iusearch commented 6 years ago

It is 56(height) * 144(width). Quite small. You mean Validity 90 gitter?

hmaarrfk commented 6 years ago

The gitter for this project. Validity90 implements matching on the chip.