╰─$ sudo validity-sensors-tools -t initializer --simulate-virtualbox 1 ↵
Found device <DEVICE ID 138a:0090 on Bus 001 Address 004>
Downloading https://download.lenovo.com/pccbbs/mobiles/n1cgn08w.exe to extract 6_07f_Lenovo.xpfwext
Extracting "Synaptics Metallica MOH Touch Fingerprint Reader Driver" - setup data version 5.5.7
- "app/WBF_Drivers/6_07f_Lenovo.xpfwext"
Done.
Found firmware at /tmp/tmptks13eq7/app/WBF_Drivers/6_07f_Lenovo.xpfwext
The device will be now reset to factory and associated to the current laptop.
Press Enter to continue (or Ctrl+C to cancel)...
Opening device 0x90
Factory reset...
Sleeping...
Pairing the sensor with device VirtualBox
Opening device 0x90
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Try 1 failed with error: a bytes-like object is required, not 'str'
Opening device 0x90
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Try 2 failed with error: Flash is already partitioned
Opening device 0x90
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Try 3 failed with error: Flash is already partitioned
Opening device 0x90
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Try 4 failed with error: Flash is already partitioned
Opening device 0x90
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Try 5 failed with error: Flash is already partitioned
Device didn't reply in time...
Traceback (most recent call last):
File "/usr/bin/validity-sensors-tools", line 338, in <module>
vfs_tools.initialize(fwpath, args.calibration_data)
File "/usr/bin/validity-sensors-tools", line 249, in initialize
self.pair(fwpath, calib_data)
File "/usr/bin/validity-sensors-tools", line 220, in pair
self.retry_command(init_flash_command, max_retries=5)
File "/usr/bin/validity-sensors-tools", line 112, in retry_command
raise(err)
File "/usr/bin/validity-sensors-tools", line 103, in retry_command
command()
File "/usr/bin/validity-sensors-tools", line 219, in init_flash_command
init_flash()
File "/usr/lib/python3.8/site-packages/proto9x/init_flash.py", line 97, in init_flash
partition_flash(flash_layout_hardcoded, client_public)
File "/usr/lib/python3.8/site-packages/proto9x/init_flash.py", line 75, in partition_flash
raise Exception('Flash is already partitioned')
Exception: Flash is already partitioned
where did you compiled that?
I did the following to install the drivers:
# Initialize the device
sudo snap install validity-sensors-tools
sudo snap connect validity-sensors-tools:raw-usb
sudo validity-sensors-tools.initializer
# Add the repository and install the tod package (supports both chips)
sudo add-apt-repository -u ppa:3v1n0/libfprint-vfs0090
sudo apt install libfprint-2-tod-vfs0090
But I can really seem to find the file
meson libfprint libfprint/_build && sudo ninja -C libfprint/_build install
?
Jun 20 11:59:58 aditya-notebook systemd[1]: Starting Fingerprint Authentication Daemon...
Jun 20 11:59:59 aditya-notebook systemd[1]: Started Fingerprint Authentication Daemon.
Jun 20 12:00:00 aditya-notebook fprintd[32347]: Reply mismatch, expected at char 6 (actual 0xd, expected 0x2)
Jun 20 12:00:00 aditya-notebook fprintd[32347]: Reply mismatch, expected at char 6 (actual 0xd, expected 0x2)
Jun 20 12:00:00 aditya-notebook fprintd[32347]: Reply mismatch, expected at char 6 (actual 0xd, expected 0x2)
Jun 20 12:00:00 aditya-notebook fprintd[32347]: Expected len: 84, but got 108
Jun 20 12:00:00 aditya-notebook fprintd[32347]: 0000 00 00 01 00 01 00 08 00 dd a6 4e 57 01 00 34 46 | ..........NW..4F
Jun 20 12:00:00 aditya-notebook fprintd[32347]: 0010 02 00 07 00 60 39 00 00 01 00 84 08 01 00 07 00 | ....`9..........
Jun 20 12:00:00 aditya-notebook fprintd[32347]: 0020 00 04 00 00 02 00 84 28 03 00 12 00 e0 10 00 00 | .......(........
Jun 20 12:00:00 aditya-notebook fprintd[32347]: 0030 02 00 76 36 01 00 0c 00 10 0a 00 00 01 00 86 47 | ..v6...........G
Jun 20 12:00:00 aditya-notebook fprintd[32347]: 0040 00 00 01 00 50 5a 00 00 02 00 23 77 00 00 01 00 | ....PZ....#w....
Jun 20 12:00:00 aditya-notebook fprintd[32347]: 0050 80 2f 00 00 02 00 66 37 01 00 0c 00 f0 22 02 00 | ./....f7....."..
Jun 20 12:00:00 aditya-notebook fprintd[32347]: Data exchange failed at state 8, usb error: The driver encountered a protocol error with the device.
Jun 20 12:00:00 aditya-notebook fprintd[32347]: Activation failed failed at state 8, unexpected device reply during activation
06cb:0081
or 06cb:009a
I've extended the patch to be:
--- a/vfs0090.h
+++ b/vfs0090.h
@@ -343,10 +343,11 @@ static const VfsDataExchange INIT_SEQUENCES[] = {
.rsp_length = 68,
},
{
+ .weak_match = TRUE,
.msg = INIT_SEQUENCE_MSG3,
.msg_length = G_N_ELEMENTS (INIT_SEQUENCE_MSG3),
.rsp = NULL,
- .rsp_length = 84,
+ .rsp_length = 108 /* or 108 */,
},
{
.msg = INIT_SEQUENCE_MSG4,
@@ -737,16 +738,18 @@ static const VfsDataExchange ACTIVATE_SEQUENCES[] = {
.rsp_length = G_N_ELEMENTS (ACTIVATE_SEQUENCE_RSP345),
},
{
+ .weak_match = TRUE,
.msg = ACTIVATE_SEQUENCE_MSG67,
.msg_length = G_N_ELEMENTS (ACTIVATE_SEQUENCE_MSG67),
.rsp = NULL,
- .rsp_length = 84,
+ .rsp_length = 108,
},
{
+ .weak_match = TRUE,
.msg = ACTIVATE_SEQUENCE_MSG67,
.msg_length = G_N_ELEMENTS (ACTIVATE_SEQUENCE_MSG67),
.rsp = NULL,
- .rsp_length = 84,
+ .rsp_length = 108,
},
{
.msg = SCAN_MATRIX,
recompiled and now it works with my device. :)
Found device <DEVICE ID 138a:0097 on Bus 001 Address 019>
Downloading https://download.lenovo.com/pccbbs/mobiles/n1mgf03w.exe to extract 6_07f_lenovo_mis.xpfwext
Extracting "Synaptics Metallica MOC Touch Fingerprint Reader Driver for Windows 8.1 64-bit" - setup data version 5.5.0
- "app/WBF_Drivers/6_07f_lenovo_mis.xpfwext"
Done.
Found firmware at /tmp/tmpze4git8b/app/WBF_Drivers/6_07f_lenovo_mis.xpfwext
The device will be now reset to factory and associated to the current laptop.
Press Enter to continue (or Ctrl+C to cancel)...
Opening device 0x97
Factory reset...
Sleeping...
Pairing the sensor with device 20JMS0Q400
Opening device 0x97
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Try 1 failed with error: Failed: 04af
Opening device 0x97
Initializing flash...
Sleeping...
Try 2 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 3 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 4 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 5 failed with error: Unexpected TLS version 4 0
Device didn't reply in time...
Traceback (most recent call last):
File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 339, in <module>
vfs_tools.initialize(fwpath, args.calibration_data)
File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 249, in initialize
self.pair(fwpath, calib_data)
File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 220, in pair
self.retry_command(init_flash_command, max_retries=5)
File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 112, in retry_command
raise(err)
File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 103, in retry_command
command()
File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 219, in init_flash_command
init_flash()
File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/init_flash.py", line 97, in init_flash
partition_flash(flash_layout_hardcoded, client_public)
File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/init_flash.py", line 70, in partition_flash
info = get_flash_info()
File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/flash.py", line 28, in get_flash_info
rsp=tls.cmd(unhex('3e'))
File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 104, in cmd
rsp=self.app(cmd)
File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 138, in app
return self.parse_tls_response(self.usb.cmd(self.make_app_data(b)))
File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 336, in parse_tls_response
raise Exception('Unexpected TLS version %d %d' % (mj, mn))
Exception: Unexpected TLS version 4 0
unicorn@nikki:~/Desktop/projects/Validity90/python-validity$ python3 factory-reset.py
unicorn@nikki:~/Desktop/projects/Validity90/python-validity$ python3 pair.py
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Clean slate
Uploading firmware...
Sensor: VSI 55E FM209-001
Loaded FWExt version 1.1 (Sat Feb 3 05:07:30 2018), 8 modules
Sleeping...
Calibrating...
Sensor: VSI 55E FM209-001
FWExt version 1.1 (Sat Feb 3 05:07:30 2018), 8 modules
Calibration data loaded from the file.
Init database...
Creating a new user storage object
Creating a host machine GUID record
That's it, pairing's finished
unicorn@nikki:~/Desktop/projects/Validity90/python-validity$ lsusb | grep 0097
Bus 001 Device 016: ID 138a:0097 Validity Sensors, Inc.
unicorn@nikki:~/Desktop/projects/Validity90/python-validity$
digitalec@thinkpad:~/python-validity-master$ python3 factory-reset.py
digitalec@thinkpad:~/python-validity-master$ python3 pair.py
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Traceback (most recent call last):
File "pair.py", line 26, in <module>
init_flash()
File "/home/digitalec/python-validity-master/proto9x/init_flash.py", line 130, in init_flash
write_flash(1, 0, tls.makeTlsFlash())
File "/home/digitalec/python-validity-master/proto9x/flash.py", line 111, in write_flash
assert_status(rsp)
File "/home/digitalec/python-validity-master/proto9x/util.py", line 9, in assert_status
raise Exception('Failed: %04x' % s)
Exception: Failed: 04af
digitalec@thinkpad:~/python-validity-master$ lsusb | grep 0097
Bus 001 Device 021: ID 138a:0097 Validity Sensors, Inc.
I've run this about five times and it keeps ending with this:
=====================================
SetNamedValue UpdateFirmwareFailureCount=23
VT_UINT: 1
=====================================
=====================================
GetNamedValue CalibrationData
=====================================
Loaded 0 bytes of calibration data
USB >>>>>>>>>> WinUsb_QueryPipe alt-if=0 pipe=0
USB 60b3700 >>>>>>>>>> WinUsb_WritePipe PipeID=1
blackbox: usb 1 >>> 6f000e000000000000
rc=0 send=9
USB >>>>>>>>>> WinUsb_QueryPipe alt-if=0 pipe=1
USB 60b3700 >>>>>>>>>> WinUsb_ReadPipe PipeID=129
USB >>>>>>>>>>> bulk xfer
>>>>>>>>>>> xfer Failed - LIBUSB_ERROR_NO_DEVICE
Is that expected?