Neo-Backup icon indicating copy to clipboard operation
Neo-Backup copied to clipboard

[Bug] Error trying to restore fingerprint data

Open furopi opened this issue 2 years ago • 4 comments

I'm trying to restore my fingerprint backup, everytime I'm getting the error below. Or am I doing something wrong? Help much appreciated 💗

Screenshot_20230403-190441

furopi avatar Apr 03 '23 17:04 furopi

what about more info?

which version of NB?

e.g. backup vs restore: is it the same device? (and which?) the same ROM? (and which?)

also when files are mentioned in the error message, it's obvious, that you have a look, if they exist...

hg42 avatar Apr 03 '23 18:04 hg42

as far as I interpret the code, the "needed" files (or their names) represent the files in the system. They need to be a subset of the files in the backup.

Then this seems to be wrong:

if (filesInBackup != null
    && (filesInBackup.size != expectedFiles.size
    || !areBasefilesSubsetOf(expectedFiles, filesInBackup))
) { ... }

subset usually means, the set can be smaller than the other set. If that is the case, comparing the size doesn't make sense.

Though it is questional if that's the intended meaning.

In your case user.db is in the backup but not in the system.

I guess, it will be created, if you teach a fingerprint (assuming you did not do that before). Can you check that? The special backups are a bit simplistic.

I guess it should have

  • a set of files that are mandatory (exist on all systems),
  • subsets that can have an alternative subset (for different variants, like manufacturers, android versions),
  • files that must exist in the system on restore (to detect if the backup matches the target system), etc. Probably lots of possibilities. At the end it's probably better to have a script, that describes the complicated dependencies and may also look at variables like Android version, manufacturer, etc.

hg42 avatar Apr 03 '23 19:04 hg42

I tried adding 1 finger and restored after, but same error. Un the end I set up everything manually. I thought this function could have been a nice feature, does it work on other devices?

I'm using a Poco F3 with A13 SuperiorOS

furopi avatar Apr 17 '23 09:04 furopi

I added it some time ago based on my device (Realme X2, rmx1993).

We never got enough feedback to go a step further...

We would need users that analyze their devices. Which files need to be saved and restored?

generally fp data is vendor and model specific. Even if it works for changing ROMs, it will usually not work when changing device models.

additionally the special packages framework isn't flexible enough to support different devices without coding.

I think, we should first add a scriptable plugin system. I have started experiments on that topic, but it will be a long way...

hg42 avatar Apr 17 '23 14:04 hg42