androguard 4.1 uses a new lib called apkInspector instead of zipfile.ZipFile
so that it can handle usable but invalid ZIP files. It will also throw
ValueError on some things, for example:
Traceback (most recent call last):
File "/builds/eighthave/fdroidserver/fdroidserver-2.3a0/tests/update.TestCase", line 878, in test_scan_apk_bad_zip
fdroidserver.update.scan_apk(apkfile)
File "/builds/eighthave/fdroidserver/fdroidserver-2.3a0/fdroidserver/update.py", line 1586, in scan_apk
scan_apk_androguard(apk, apk_file)
File "/builds/eighthave/fdroidserver/fdroidserver-2.3a0/fdroidserver/update.py", line 1725, in scan_apk_androguard
apkobject = common.get_androguard_APK(apkfile)
File "/builds/eighthave/fdroidserver/fdroidserver-2.3a0/fdroidserver/common.py", line 2673, in get_androguard_APK
return APK(apkfile)
File "/usr/local/lib/python3.10/dist-packages/androguard/core/apk/__init__.py", line 273, in __init__
self.zip = ZipEntry.parse(filename, False)
File "/usr/local/lib/python3.10/dist-packages/apkInspector/headers.py", line 410, in parse
eocd = EndOfCentralDirectoryRecord.parse(apk_file)
File "/usr/local/lib/python3.10/dist-packages/apkInspector/headers.py", line 59, in parse
raise ValueError("End of central directory record (EOCD) signature not found")
ValueError: End of central directory record (EOCD) signature not found
/usr/lib/python3/dist-packages/androguard/core/bytecodes/apk.py:884: DeprecationWarning: This method is deprecated since 3.3.5.
It was added in 3.3.5. Debian/bullseye and Ubuntu/20.04/focal both include
new enough versions. Debian/buster's is too old (3.3.3).
This also makes androguard a hard requirement, which has been true for a
while anyway. So the code that handles androguard as an optional
requirement is removed. androguard from Debian/buster is new enough, so
this does not seem like it will cause any problems.
"checkupdates" is an fdroid subcommand, e.g. `fdroid checkupdates`, and it
is always spelled all lower case.
sed -i 's,CheckUpdates,checkupdates,g' fdroidserver/*.py locale/*/LC_MESSAGES/fdroidserver.po
sed -i "s/UpdateCheckMode is set but it looks likecheckupdates hasn't been run yet/UpdateCheckMode is set but it looks like checkupdates hasn't been run yet./g" locale/*/LC_MESSAGES/fdroidserver.po
Currently translated at 100.0% (552 of 552 strings)
Translated using Weblate: Romanian (ro) by Simona Iacob <s@zp1.net>
Currently translated at 99.6% (550 of 552 strings)
Translated using Weblate: Romanian (ro) by Simona Iacob <s@zp1.net>
Currently translated at 99.0% (547 of 552 strings)
Translated using Weblate: Romanian (ro) by Simona Iacob <s@zp1.net>
Currently translated at 98.5% (544 of 552 strings)
Translated using Weblate: Romanian (ro) by Simona Iacob <s@zp1.net>
Currently translated at 98.3% (543 of 552 strings)
Translated using Weblate: Romanian (ro) by Simona Iacob <s@zp1.net>
Currently translated at 97.2% (537 of 552 strings)
Co-authored-by: Simona Iacob <s@zp1.net>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ro/
Translation: F-Droid/F-Droid Server
Currently translated at 80.4% (444 of 552 strings)
Translated using Weblate: Chinese (Simplified) (zh_Hans) by linsui <linsui@inbox.lv>
Currently translated at 80.4% (444 of 552 strings)
Translated using Weblate: Chinese (Simplified) (zh_Hans) by linsui <linsui@inbox.lv>
Currently translated at 80.2% (443 of 552 strings)
Translated using Weblate: Chinese (Simplified) (zh_Hans) by linsui <linsui@inbox.lv>
Currently translated at 80.0% (442 of 552 strings)
Translated using Weblate: Chinese (Simplified) (zh_Hans) by linsui <linsui@inbox.lv>
Currently translated at 79.8% (441 of 552 strings)
Co-authored-by: linsui <linsui@inbox.lv>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/zh_Hans/
Translation: F-Droid/F-Droid Server
Currently translated at 80.4% (444 of 552 strings)
Translated using Weblate: Chinese (Simplified) (zh_Hans) by David Jiang <david.jiang2024@gmail.com>
Currently translated at 80.2% (443 of 552 strings)
Translated using Weblate: Chinese (Simplified) (zh_Hans) by David Jiang <david.jiang2024@gmail.com>
Currently translated at 80.0% (442 of 552 strings)
Translated using Weblate: Chinese (Simplified) (zh_Hans) by David Jiang <david.jiang2024@gmail.com>
Currently translated at 79.8% (441 of 552 strings)
Translated using Weblate: Chinese (Simplified) (zh_Hans) by David Jiang <david.jiang2024@gmail.com>
Currently translated at 79.7% (440 of 552 strings)
Co-authored-by: David Jiang <david.jiang2024@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/zh_Hans/
Translation: F-Droid/F-Droid Server