You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 12, 2025. It is now read-only.
This affects compare when only the second APK is v1-signed with signflinger (see FAQ; reversing the arguments should make it work), but should not ever impact copy/patch to an unsigned APK.
We could remove it when it's presumably not supposed to be there; but I currently don't think we should do that automatically.
Maybe with a --remove-virtual-entry option?
Also, split off size/presence detection into detect_zfe()?
diff --git a/apksigcopier/__init__.py b/apksigcopier/__init__.py
index 90fc5e7..6c34427 100755
--- a/apksigcopier/__init__.py+++ b/apksigcopier/__init__.py@@ -325,6 +325,11 @@ def copy_apk(unsigned_apk: str, output_apk: str, *, zfe_size: Optional[int] = No
if fhi.read(zfe_size) != zfe:
fho.write(zfe)
fhi.seek(0)
+ else:+ if fhi.read(28) == zipflinger_virtual_entry(30)[:28]:+ fhi.read(int.from_bytes(fhi.read(2), "little"))+ else:+ fhi.seek(0)
for info in sorted(infos, key=lambda info: info.header_offset):
off_i = fhi.tell()
if info.header_offset > off_i:
This affects
comparewhen only the second APK is v1-signed withsignflinger(see FAQ; reversing the arguments should make it work), but should not ever impactcopy/patchto an unsigned APK.We could remove it when it's presumably not supposed to be there; but I currently don't think we should do that automatically.
Maybe with a
--remove-virtual-entryoption?Also, split off size/presence detection into
detect_zfe()?