Is there a way to send 1 script to a specific profile to hit all the devices assigned to the profile?

DP
Daniel P
Abetech - Managed Services

Good morning, 

I am needing to send an uninstall app script to about 500 devices who have the same profile assigned. This profile has an app apk package that I would like to uninstall using an uninstall script. Is there a way to send the script to the entire profile instead of selecting multiple devices and sending the devices the script? 

I do not want to get rid of the package itself, I want to uninstall the app from the devices and then assign a new version of the app via a package. 

I tried to package up and do a new version string, but the install is failing on my test devices saying "failed to install i/o error". so far the only way I can resolve this is by uninstalling the app first then pushing it out again. 

3 years ago
SOTI MobiControl
ANSWERS
MD
Matt Dermody Diamond Contributor
3 years ago

Is the new version of the app also compiled with a new underlying version? Meaning if you have app v1.0 installed today, you'll need to have at least app v1.1 in order for a direct upgrade to be possible. If the app has not been properly incremented to a new version then you need to have the developers recompile it with an updated version number. Some app developers don't understand the importance of the versioning relative to EMM deployments and app upgrades. 

If your app does have a properly incremented version number and the new version is > than the existing version then was your app signed using the same signing certificate and machine as your original app version? The Android OS will verify the new version of the app to see if it was signed in the same way as the original version and if it was not signed using the same signature and machine then the OS will reject the install, even if it is named and versioned correctly. 

If you are still having issues, then I would recommend that you include a pre-install script in your new app version Package that is the uninstall of the prior app version. 

MB

Hi Daniel,

are you Having Android 11 Devices?

When MobiControl has under A11 not the permissions. 

I had seen this error to on Scanners.

May you can Provide us more information about your Installation & your Used Devices ?

OA
Ozan Acikalin
3 years ago

You can handle that in many ways.

You can use the search bar on the web console to filter all your devices and list all devices who have the profile assigned.

Then you can just mark all the devices and send the script command to all the listed devices.

Or you can build a package which contains only the script command to uninstall the app.

Alternatively like Matt mentioned you can add the uninstall script as a pre install script and then
add your app.

RC
Raymond Chan Diamond Contributor
3 years ago

Hi Daniel,

On top of my answers to your related questions asked in an earlier personal post to me, I would like to add something here.  I am actually a bit confused about what is the actual problem you are facing, especially after reading what others replied to you in their posts.

If you have devices of different brand/model/firmware versions targeted by the same profile in the same device-group, and there are  "failed to install i/o error"  for ALL  devices, then the new version of the app is likely problematic and what Matt mentioned are likely the direction you should further investigate.

If the problem is found in  only some devices, but is consistent across ALL such devices of the SAME brand/model/firnware-version, then you have to check if it is the compatibility of firmware/device-agent that cause the problem.  However, if only SOME devices of the SAME brand/model/firnware-version, the the problem can be related to settings (e.g. app permissions) of some apps installled on such devices, or insufficient memory space for installation/upgrade, etc.

Ozan did give good suggestion on how you can use filter to smartly target your script to multiple devices based on some known pattern(s) or selection criteria.

Under normal circumstances when there is no problem with the new app itself or any compatibility/runtime issues mentioned above, the preferred way to upgrade managed app is in-place upgrade (i.e. without causing any loss of user's app-data inherited from the old version of the app) by simply reconfiguring the exisitng profile to use the newer .pcg  package uploaded onto the server.  Sending any script to perform uninstallation of the old version followed by installation of the new version results in a non-in-place app upgrade that likely involve loss of user's app data (e.g. preference, history, shortcut, etc.), and is thus not normally recommended.

N
NTMOD@SOTI
3 years ago

Hi Daniel,

Thank you for posting on SOTI Central.

Have you tried the suggestions that Matt Dermody and Ozan Acikalin suggested? Did it work for you? 

Please kindly note Raymond Chan's suggestion that "sending any script to perform uninstallation of the old version followed by installation of the new version results in a non-in-place app upgrade that likely involves loss of user's app data (e.g. preference, history, shortcut, etc.), and is thus not normally recommended."

Kind Regards.

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |