question

dimitarz avatar image
dimitarz asked madalyn commented

Can't sideload my locally built APK due to signature change?

Hello, I've built my APK following the guide here: https://docs.clover.com/clover-platform/docs/worki...

I created a sandbox account, created an app and uploaded my release signed APK. I then clicked on Preview in App Market, and installed the APK on my test merchant account (also sandbox). On my station-2018 emulator running sandbox apks, I get the App Update notification and install the app I just uploaded. SO FAR SO GOOD! Now, I make a change to the APK and try installing it (the release version):

adb: failed to install app/build/outputs/apk/release/app-release.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.test.test signatures do not match the previously installed version; ignoring!]

Turns out, the APK I uploaded is re-signed. I verified that by checking the certificates of the one I uploaded and the one that's downloaded.

My APK now has two certs (CLOVER.RSA, the new one and mine, CERT.RSA)
cert=META-INF/CLOVER.RSA META-INF/CERT.RSA
Owner: CN=Jeffrey Blattman, OU=Clover Network Inc., O=Clover Network Inc., L=Mountain View, ST=CA, C=US

How am I supposed to side-load updated versions if the cert is changed? The guide states that this shouldn't happen, so what's going on here??

The guide states:
Before you can sideload your app onto your device for testing, you must upload your APK to the Clover App Market, then download it onto your device. You will only need to do this once. Afterward, you'll be able to sideload new versions of your app onto the device directly.
SandboxEmulator
2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

madalyn avatar image madalyn commented ·

Can someone answer this? I am having the same issue.

I have two apps, both signed with the same Cert. I need to use signature-protectionLevel android permissions to communicate between the two apps. However, because the Cert gets changed, Android thinks the APK of the second app is corrupt and won't install it.

Is this a bug in Clover?

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ madalyn commented ·

This comment is unrelated to your installation issue (see my other answer)... but I highly recommend you not to define your own custom android permissions. Please read this to see why: https://docs.google.com/document/d/1ADUD6jecV85_L6v7T-zsaP9Hw7C-1__f5dsCeWYA3Tc/edit?usp=sharing

0 Likes 0 ·

1 Answer

Jacob Abrams avatar image
Jacob Abrams answered madalyn commented

The current instructions at https://docs.clover.com/clover-platform/docs/testing-apks regarding devkit sideloading seem incorrect.

This article correctly explains how to sideload an APK on sandbox: https://community.clover.com/articles/10448/how-to-sideload-an-apk-onto-clover-devices-for-dev.html

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

madalyn avatar image madalyn commented ·

Thank you so much for linking this. This explains, from the Clover developers, what is going on here.

0 Likes 0 ·

Welcome to the
Clover Developer Community