Force reinstall of Android app
I had a similar issue yesterday. I rolled out an updated package and every install failed after it. I then tried to uninstall the app but I could no longer uninstall it. Under applications the "Installed" status was greyed out with no option to uninstall. I tried to send uninstall scripts but they didn't work either.
In the end my only solution was to rename my app (it's still in test), and to create an entirely new package. The new install works fine. I have since made some updates and they are working too. The old app is not on the phone but does show greyed out under applications, weird !
Here's one key takeaway - I was previously updating my package wrong. Every-time I was doing an update I was removing the old package and adding a new one. Now I change the apk in the same package, increment the version number and upload it. It displays that there is a new version, which I save and assign. It performs an app update not a fresh install.
Ciaran is correct as to how to update an application version using packages. This method retains the application data and updates the application. This way the application is just updated not removed and reinstalled.
"Now I change the apk in the same package, increment the version number and upload it. It displays that there is a new version, which I save and assign. It performs an app update not a fresh install."
In your circumstances it sounds like reverting back from the current version to the previous version may have left your packages in a conflicted state, especially if the package was removed prematurely.
*Note in the MobiControl DB, packages are not removed but rather have a status assigned to them, such as installed, uninstalled, revoked etc. You cannot have 2 versions of the same application/package as installed, one needs to be inactive, otherwise it will cause the grey out effect or lack of current status being displayed. I would recommend having a Support Tech work with you to ensure their status's are correct in your DB, if this continues.
However if you test the update method as outlined in the previous post you may be able to fix this yourself in MobiControl. I would suggest trying to clearly specify which version should be installed on your test device and then performing the update to the correct version.
Hopefully this helps,
Technical Support | SOTI Inc. |1.905.624.9828 | firstname.lastname@example.org | www.soti.net |
Successful in-place app update procedure depends on the platform, app types, and options chosen in the corresponding rule/configuration. If some old devices do not need the update, extra steps might be needed to make sure their deployed old version of the app are not affected. I sometimes spend over 2 hours of training to my customers just on this topic to make sure they can perform their required update right for different scenarios. Otherwise, user data for the target app have to be removed together when the binary of the old version get uninstalled, making seamless in-place update not possible.
For Android+/Android Enterprise apk deployed with .pcg package deployment rule, As Soti support team recently gave some basic information in another thread:
I do not have to repeat similar information here. Please note that the advanced options chosen when creating your pcg's and the options configured in your profile/package-deployment rule may also affect the result.
In general, no explicit "uninstall" command should be used in pre-/post- install/uninstall script for in-place update. Also, thoroughly test the changes on some device(s) (preferably same brand/model/firmware and agent versions as the production devices) in a test device-group (say in one newly created test child-group under any of the original production device-group affected) before applying the changes to the production device groups.
You've done this and are positive it doesn't wipe user data? It would be catastrophic to do so
Make and Model: Janam XT2
Build Number: 87.10
Device Agent: 184.108.40.2068
If the package doesn't work and you are in a hurry, try a sync rule sending the APK to devices and running a script to install it after download.
In-place upgrade/downgrade of Apps on Android+ platform is possible in most cases, if the correct procedure is followed. However, some glitches may sometimes be present. depending on the MobiControl server/agent version, device brand/version, etc. By "in-place", I meant only the app itself is modified, and all the user's application data on the device remain untouched. This is usually the most desirable upgrade/downgrade option, as no IT administrator wants to receive complaints from end-users that their customization or other app specific data on the device are lost after the app executable gets updated.
Please provide more details on your implementation:
- Mobicontrol server version and build number
- Android+ device brand and Android firmware version
- Device agent version and build number
Please note that I am extremely busy these two days and may not have time to reply.
I have always included a pre-install script in my Android APK deployments that uninstalls any pre-existing versions of the app with the same Android package name (com.x.y...). This helps to account for any strange situation like the app being pre-installed when the device was enrolled or somehow manually installed through a sideload. You sending the uninstall script before the attempted retry is effectively performing the same process but has the side effect of wiping the app data as you mentioned.