Open JustMyGithub opened 2 years ago
For what I know, the only real method to test consistency of .ab files is to convert them, just reading the headers doesn't mean the rest of the file would be fine. Do you have any problems creating tar files?
Yes, you need to read the entire file for a real test, but you do not need to write the ouput file. If conversion is the only way, abe could convert it in-RAM and immediately "forget" the output which would normally be written to disk. Archivers like 7zip an WinRAR can do such a integrity test, so I assume abe could do for ab as well.
You can already do that, set the output file to /dev/null
or write to stdout with -
then redirect to /dev/null
:
If the filename is -, then data is read from standard input or written to standard output.
In windows it's NUL
btw. You can close the issue now.
If that is already implemented like that, why not simply add a test mode, so users do not have to find this issue in order to find out about it?
Because advanced users already know the /dev/null thing. Keep in mind that this program is for power users and developers, 99.9% of normal android users won't even bother making any adb backup, not even less editing it. It's manufacturers' option to offer any backup, there isn't enough unhappy people about it and they don't care.
It would be nice to have a testing mode that does not create a .tar but only tries to parse the .ab file. In my testing random changes to .ab files lead to Exceptions in this fine tool so it would probably be a great tool to test consistency of .ab files