Problem with an update

JS
Jesús Sanz
Offshore Tech, S.L.

I have updated a package within the same profile and when deploying it, gives me an error file i/o error in every device except in the device that have installed android 9. Could you tell me what I can do and how to fix this error.

Agent device version: 13.7.3

soti: 13.4.0.5389

6 years ago
Android
ANSWERS
C
Christophe
6 years ago (edited 6 years ago)

Hello jesus,

i'm not an expert but

- have you got update the version in the package version property ?

- when you apply the profile, are you sure you select well the new version ?

- also, the new apk is it build with the same computer ?

In the past, i had this problem and for to resolve it fast, i have include in the package a pre install script who remove the last pacakge

uninstall yourApp

not sure the best way but its was the way i've found rapidly..

JS
Jesús Sanz
6 years ago

Hi christophe first of all thanks for your answer, yes i have the correct version in the package and yes i selected the correct version in the profile.

I cant do an script because the company doesnt want to loose the information of the app

C
Christophe
6 years ago

jesus , last advice, be sure the build apk is make with the same computer

otherwise, no idea sorry 

SW
Shawn, Wilkerson
6 years ago

To reiterate what others have said plus additional suggestions (these are relevant if you are updating an app that is already installed)

1. Ensure the correct OS, OS version, and App version are <selected> in McStudio before compiling

2. If compiling to a code repository (strongly recommended) vs a local computer ensure dependency files (pre/post cmd files, apks, etc) are copied to repository before compiling. I generally setup the project folder before creating the McStudio project to ensure the naming conventions are exact.

2. Set the apk to NOT "Automatically Execute"

3. Pre-script: Kill the app process and uninstall the previous version

   a. Kill the app process so it does not interfere with upgrade: kill_application com.appname.droid

   b. Uninstall the previous app: uninstall com.appname.droid

4. Post-script:  Not generally necessary if you are not "communicating" to the end user that a new version has been installed (if devices are continually in use I find it a common courtesy to inform the user)

***Note: if devices are in continual use I recommend finding a "maintenance window" as item 3(b) could have serious consequences to device functionality (i.e. could lose data dependent on how the dev team wrote the code in respect to app cache).

MD
Matt Dermody Diamond Contributor
6 years ago

I would be cautious about using the Uninstall script unless your application is completely stateless and doesn't leverage any app permissions or app cache /data. The uninstall option will clear the app cache and will reset the app permissions which would then potentially have to be re-granted. If your app has any local storage needs that too would be wiped out by the process. If you properly increment your app version when recompiling, build and sign it the same way, and modify and increment your package version you should be able to perform a direct app upgrade via package in SOTI without requiring the invasive uninstall script. 

In MobiControl 15 you can also take it a step further by leveraging scripting that can check to see if the existing version of the app is in use before installing the new version. I honestly wish that functionality was just native to the package installation process but it is at least more control than we had before.