Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APK signature mismatch #523

Closed
ema-pe opened this issue Aug 29, 2018 · 8 comments
Closed

APK signature mismatch #523

ema-pe opened this issue Aug 29, 2018 · 8 comments
Milestone

Comments

@ema-pe
Copy link

ema-pe commented Aug 29, 2018

Before creating an issue

  1. Version: 0.43
  2. Similar issue: Why is there a signature mismatch on a few popular apps lately?? #494
  3. Done.

Expected behavior
WhatsApp application should be correctly updated.

Actual behavior
I can't update WhatsApp application because YalpStore says to me that the new APK's signature mismatch. I tried to install it anyway, but the system says that "There was a problem parsing the package". I tried also disabling delta updates, according do #494, but it didn't work.

Steps to reproduce
screenshot_20180829-120412
screenshot_20180829-120435
screenshot_20180829-120441

Your setup
Motorola Moto E 2015, LineageOS 14.1

@gohanko
Copy link

gohanko commented Aug 29, 2018

Reinstall WhatsApp. It can't update because the signature is not the same.

@yeriomin
Copy link
Owner

Hello.

After disabling delta updates, you could try deleting the apk and downloading it again in case there was a transmission problem.

If you did that already, try looking at your device's general logs. Android package installer (on your third screenshot) logs failure details/reasons.

How did you install WhatsApp initially? Did it come with the device?

@ema-pe
Copy link
Author

ema-pe commented Aug 30, 2018

Thanks @momo42, now WhatsApp is succesfully updated. I simply followed your istructions, disabling delta updates and deleting all apks from "Download" directory.

I also like your suggestions, I hope that @yeriomin will read them soon. This bug should be noticied to all users, because It is very common.

Anyway, I've installed WhatsApp initially with YalpStore.

Edit: deleting the old installed apk is a bad workaround, because all app's data will be lost.

@yeriomin
Copy link
Owner

@momo42 This issue is unrelated to delta updates, @ema-pe says they are disabled. Please create a new issue if you have something new to discuss.

Is there any way to delete the non-working deltas from internal memory?

Apks are deleted from internal storage automatically after some time.

Delta updates seem to be problematic.

This is why deltas are off by default.

Perhaps Yalp should automatically delete all previously downloaded apks from internal memory when switching deltas off!

Might be safer to just remove the option altogether.

The deltas problem is unlikely to be fixed any time soon, unfortunately. While the process itself works, it is impossible to know if deltas are applicable to the existing apk. Play Store has a way to know that, Yalp Store does not. It is possible to detect the signature mismatch and redownload automatically, but only after downloading and applying - there would be no point in having deltas as they are supposed to save traffic and time. The only proper way to work around this is to learn the checksum algo used by Play Store.

@gohanko
Copy link

gohanko commented Sep 1, 2018

I noticed that to, I unchecked delta updates and the apks install correctly.

@stale
Copy link

stale bot commented Oct 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 1, 2018
@yeriomin
Copy link
Owner

yeriomin commented Oct 7, 2018

@momo42 @ema-pe I solved this properly after all. There is a signature of the base apk (the one installed, the one being patched) returned with the download link. Previously I didn't know what kind of signature it was. It appears to be a sha1 signature encoded with base64 with URL and Filename Safe Alphabet with padding removed. This means it is possible to decide if delta is applicable to the installed apk before downloading anything.

The solution is in master.

@yeriomin yeriomin closed this as completed Oct 7, 2018
@yeriomin yeriomin added this to the 0.44 milestone Oct 7, 2018
@yeriomin yeriomin removed the stale label Oct 7, 2018
@ema-pe
Copy link
Author

ema-pe commented Oct 7, 2018

@yeriomin thanks for fixing this. Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants