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
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:
The text was updated successfully, but these errors were encountered:
This affects
compare
when only the second APK is v1-signed withsignflinger
(see FAQ; reversing the arguments should make it work), but should not ever impactcopy
/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()
?The text was updated successfully, but these errors were encountered: