Command to reinstall profile-deployed APK only

Z
Zach
Whole Foods Market, Inc.

We deploy a homegrown APK along with a few configuration files in a profile created using MC Studio. In order for the device to be set up for first use, a series of events takes place within the app that updates a configuration file. Our development team is wanting to know if we can simply reinstall an APK while leaving the stored files untouched.

I have found it possible using ADB: https://developer.android.com/studio/command-line/adb#pm

Does SOTI support ADB commands or is there a way to accomplish this?

I tried searching the forum for an answer but wasn't able to find anything substantial.

SOTI v14.2

Android Plus devices

6 years ago
Android
ANSWERS
MD
Matt Dermody Diamond Contributor
6 years ago

Is the configuration file an external file that the App creates and/or references or are the configurations internal to the app and stored in App Cache? In most cases you can use a SOTI package to upgrade a version of a previously installed app leaving any App Cache and granted permissions in place provided that you use the same MCP to build a new Package and update the Profile containing the old Package with the new package version. The developer also has to properly increment the app version number at compile time and use the same build machine and signing process in order for SOTI (or any EMM) to perform an app upgrade. 

RC
Raymond Chan Diamond Contributor
6 years ago

As far as I know, there is no support for ADB commands within MobiControl

To be able to achieve what you want, one possible workaround is as follows:

- Make sure the app saves its configuration file (or at least automatically export a spare copy frequently) to a public directory (say Download/abc ) 

- Modify your app to check the public directory (i.e. Download/abc) for any valid configuration file and use its content to reconfigure the app.  

- If you need to re-install,  revoke the profile and re-assign it to get the application uninstalled then re-installed.  In the case if you want to really re-install from scratch, you should use script command to delete the configuration file in Download/abc after un-installation but before re-installation.

EG
Edgar Gomez
6 years ago

I would suggest to have 2 packages: one for the apk and the other for config files. Then, you just have to reinstall apk package,either through webconsole or using a script:

installpackage /data/data/MOBICONTROLPACKAGEID/app_pkg/PACKAGENAME