Ectool FP template not downloading correctly

  • I set the seed to aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  • I enrolled a fingerprint using fpmode enroll
  • I downloaded it using fptemplate 0
    But every time I run the last command I get a different, seemingly random template. Loading the template into the sensor does not result in a match-able template.
[rajas@nixos:~]$ sudo ectool --name=cros_fp fptemplate 0 | sha256sum 
ba18b530486c5dd0ba4fcfb36699f98a2c88df5fc957490f1c3388bfd1f6c8fc  -

[rajas@nixos:~]$ sudo ectool --name=cros_fp fptemplate 0 | sha256sum 
15c5334c3781b4be9bca63e033ef9af73d2ac4919b113d8707bd1fa0ba5e9627  -

[rajas@nixos:~]$ sudo ectool --name=cros_fp fptemplate 0 | sha256sum 
84d3f4e45919f0adadf7984ebdb07875f86c4e3fe1280c0fb0d2831da36c11f5  -

[rajas@nixos:~]$ sudo ectool --name=cros_fp fptemplate 0 | sha256sum 
84f4858650f939b193b230c517a9801f026d947e48e73c2eba06ea492599acaa  -

[rajas@nixos:~]$ sudo ectool --name=cros_fp fptemplate 0 | sha256sum 
19c378c6b9d52deb8cf94796e4f946f942d3b13096921f7acc40ce70ea351812  -

I did a EC reset and it’s still not working. I am using RW_LEGACY btw. Maybe the ChromeOS firmware is interfering or something.

@WeirdTreeThing do you know if I’m doing something wrong?

Try this linux-tools/cros-fp.py at main · chrultrabook/linux-tools · GitHub

I don’t know exactly how the fpmcu works, but this may be working as intended.

I tried it on my jinlon on full rom and whenever I try to download a template it says failed.

05:30:11 rajas@jinlon linux-tools ±|main ✗|→ sudo ectool --name=cros_fp fptemplate 0
EC result 9 (UNAVAILABLE)
EC result 16 (BUSY)
EC result 16 (BUSY)
Failed to get FP template 0

Also on jinlon sometimes it never gets enrolled and just keeps going into 0x10 and not 0x0 when putting it into enroll mode.

I believe I got those errors whenever I didn’t set a seed. However, I no longer have a chromebook with a fingerprint reader to test with.

I did set a seed so that’s weird. I’m going to stop my efforts in a fingerprint pam module for Chromebooks because of this error and lack of documentation. If someone finds a way of getting it to work or if it one day just starts working then I’ll continue.

You can do ectool --name=cros_fp console to get debug logs btw

1 Like

This is what the console shows when I try to match after loading a template from a file:

[12847.964273 Matching/2 ...]
bio_template_image_match_list - Template load failed. Result=-14
bio_template_image_match_list - Template delete failed for candidate 1. Result=-2
[12847.965903 Error: bio_template_image_match_list() failed, result=-14]
[12847.965992 Match =>-14 (finger 65535)]
[12849.625260 HC 0x0002]
[12849.627294 HC 0x0007]
[12849.628200 HC 0x000b]

After looking at @coolstar 's code at crosfingerprint/fingerprint_adapter/eccmd.cpp at 5e77307d7542218e173f24eb657b426565ed361a · coolstar/crosfingerprint · GitHub and setting the fp context to the same value before enrolling and uploading (similar to fp seed), uploading works and I can upload previously enrolled templates after reboot. It seems like it is needed for Redrix and many other chromebooks but not for my jinlon for some reason. I will try with a 2nd jinlon.