uunicorn / python-validity

Validity fingerprint sensor prototype
MIT License
993 stars 83 forks source link

https://download.lenovo.com/pccbbs/mobiles/n1mgf18w.exe #180

Closed ArnoldSchiller closed 1 year ago

ArnoldSchiller commented 1 year ago

Now I don't know if the above driver would not work as well. File "/usr/bin/validity-sensors-firmware", line 59, in download_and_extract_fw

raise Exception('Hash mismatch for driver download!

It would be the driver from 3/23/2023 from Lenovo and in the ppa the last update was in 2022.

But thanks for the tool - it works also with the older driver.

uunicorn commented 1 year ago

Hi Arnold, the only thing python-validity is using from the Windows driver is a firmware file. Chances are, the new driver contains the same firmware file. And even if it's not the same, it may still still work fine with python-validity. Can you check and if it does work raise a PR to change the checksum?

ArnoldSchiller commented 1 year ago

Hi Arnold, the only thing python-validity is using from the Windows driver is a firmware file. Chances are, the new driver contains the same firmware file. And even if it's not the same, it may still still work fine with python-validity. Can you check and if it does work raise a PR to change the checksum?

Ok the firmware in the update from 23.3.23 is probably a different one - I have now only commented out the hash and then comes

File "/usr/bin/validity-sensors-firmware", line 71, in download_and_extract_fw raise Exception('No {} found in the archive'.format(fwname)) Exception: No 6_07f_lenovo_mis_qm.xpfwext found in the archive In WBF-Driver is a file 6_07f_lenovo_mis.xpfwext

// Validity Sensors V4 Firmware Extension File FirmwareVersion = 6.07.0164 Encryption = 0x0002 Target = 0x0001 Product = 0x0030 StartAddress = 0x51002000 Signed = 0x0001 SignatureLength = 0x0100 Buildnum = 164 FwextType = 0x2000 FwextMajorver = 0x01 FwextMinorver = 0x01 FwextBuildnum = 0x0005 FwextBuildtime = 0x5E27A379 // By: root // On: ubuntu // Uname: Linux ubuntu 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux // Running: linux // At: Tue, 21 Jan 2020 18:54:44 +0000 (UTC) // Script: Header: /test/engineering/private/impl/micro/windsor/fwext/tools/genfwext.pl,v 1.9 2014/05/25 21:52:30 bdavis Exp // CWD: /home/ubuntu/Desktop/signtools_metallica // Command: ./genfwext.pl -firmwareversion 6.07.0164 -xmodhdr -product metallica -target rom -buildnum 164 -xpsk /usr/shamir/rsaprivkey.pem -xkey /usr/shamir/vckivkey.key ../to_sign/6_07f_lenovo_mis.elf -o ../to_sign/6_07f_lenovo_mis.xpfwext // // Hash is: ec 5c 39 a4 2f c8 b7 48 4c 7c 0b f7 99 ba 13 4b // a3 2f 4c 1e 42 81 01 96 18 0c ba ee df ac 7f 78 // Signature is: 69 2a 74 71 3f 0e 7d 1f 82 ad f6 41 c8 b6 b7 56 // 51 70 57 fb 98 d2 9c 18 50 a6 e8 31 9e 51 0b ff // 2e 0a 77 dc 0c 22 0d 0f 21 82 99 6d f5 ba 93 81 // ac 6c ed cc 01 86 b9 d5 fa 67 d9 9e 7f 1a 0b 1f // d5 9f 49 9a 1f 4b e8 c4 27 7d 56 a2 fa 00 da aa // ae ad d9 fa 68 bf bf c6 02 c4 4f 3d c6 5d 4c b5 // 68 76 b3 00 ae 7f 21 55 db d5 cf e0 8c 9f cb da // 75 e8 c9 18 50 fb f3 83 7f db 34 d4 f3 4a dc 02 // 19 53 ca c5 1f 57 67 0f 7e 33 bc 50 56 7c 67 a1 // 94 f8 47 71 b7 94 ea 73 93 0e 40 a5 b1 e3 13 90 // a0 19 76 83 70 c1 a9 bb 16 ca 80 4e c8 d4 db 25 // 38 0a db 4c 6f 18 d3 17 69 8a 2e a4 ec 57 12 1c // 15 5c b4 57 3f 42 f1 99 9d 2e 93 02 8a cf b4 d0 // 2c fc 1a d4 85 96 95 73 25 25 e4 ca b1 a1 15 76 // 64 7d 8a a5 f4 d5 42 89 19 1b fd 07 ca d4 b9 bf // 68 e2 e5 a1 dd 96 2d d8 dd 61 33 ab 07 4d 37 02 // Firmware Extension Header: // signature 0x58455746 // hash 32 bytes of 0xff // majorver 1 // minorver 1 // buildnum 5 // buildtime 0x5e27a379 (Wed, 22 Jan 2020 01:20:57 +0000 (UTC)) // romid 0x545eb0f0 (Sun, 09 Nov 2014 00:10:24 +0000 (UTC)) // fwstart 0x00000ac0 // fwsize 0x000311b0 // datasize 0x00000910 // type 8192 // nmodules 8 // Module [0]: // type 0x0001 (start) // subtype 0x4634 // majorver 2 // minorver 7 // dynsize 0

ArnoldSchiller commented 1 year ago

Ok close ticket FirmwareVersion = 6.07.0164 ist the same only the Filename changend with a new signature.

ArnoldSchiller commented 1 year ago

Thx a lot - something learned. Ticket closed.