question

ondrej avatar image
ondrej asked ondrej commented

Sideloading apk to a virtual device or DevKit

Hello,

I am currently updating my application on the virtual device through the sandbox App Market. I have seen multiple mentions about possibility to sideload application directly to the device once the application is correctly installed.

When I have tried it, I get the error: Failure [INSTALLPARSEFAILEDINCONSISTENTCERTIFICATES]

I suppose that the cause is that the apk from the App Market (sandbox) is signed using my certificate and also using the Clover certificate. This is not the case when sideloading.

The same apk is installed fine when uploaded to the App Market and then updated on the device using the App Updater.

How should I sideload the apk please? I can live with the current situation, but it is a slow deployment cycle.

Thank you, Ondrej

10 |2000

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

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered ondrej commented

If you are getting the error, it means your APKs are signed differently. The APK downloaded from the Clover App Market will have an additional signature that you cannot add yourself to your local built, sideloaded APK.

Can you uninstall the Market-installed APK and reinstall your APK? (adb install -r ...).

3 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.

ondrej avatar image ondrej commented ·

Hello,

uninstalling the application using the 'App Market' application and then reinstalling it using 'adb install -r ...' has solved the problem. It seems that application rights were preserved.


UPDATE: While local permissions are not lost, the application has lost the API access rights. So it seems that it is not possible to sideload an APK if the application accesses also web API ? I am using sandbox API of course. After reinstallation from the App Market, the application works again.

Thank you @jeff

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Uninstalling the apk via the App Market removes the access token from the device. You need to keep it "installed" according to the App Market app.

You can always adb uninstall {package name} and then adb install {path to apk}. This is the same as the -r method mentioned except it also will remove any app data from the device.

0 Likes 0 ·
ondrej avatar image ondrej commented ·

Hi,

I have found the correct way to do this.

1) Create 'Quick Android App' in the sandbox environment on the web. Do NOT create a standard application. Do not forget to set the required rights. I am not sure if it is possible to change them later without breaking the sideloading. Also select the correct Merchant if you have more than one.

2) Do NOT upload any apk to the web.

3) On the device, go to the App Market application and make a synchronization, applications will appear as installed.

4) Now you are ready to sideload the apk.

Regards, Ondrej

0 Likes 0 ·

Welcome to the
Clover Developer Community