Copy .apk in MCStudio

Solved
MI
Marius Iversen
Nordic Mobility

Hi

I want to copy, not install, an .apk-file with MCStudio. I've tried "Add Files" and "Add Android Apk". Both will try to install the .apk, not just copy it. I've also tried to copy it to something like %sdcard%\Download, but still the same result.

Does MCStudio support copying .apk-files, like any other file, or is this something that has been overlooked?

I could use a sync rule. But it's not the same as package deployment via profiles. 

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

It sounds like you might be trying the devrename script or the console option of Rename. Maybe try using the copy script instead to copy /sdcard/yourapp.temp to /sdcard/yourapp.apk

Solution
S
SMod@Soti
7 years ago

Hi Marius,

It is expected that MobiControl agent will detect an apk file in the package and automatically try to install it.

One way to get around it will be to rename the file's .apk extension to some other extension transfer it via package and then change it back to .apk in the post install script of the package.

Please let me know if you have any questions.

Thanks

MI
Marius Iversen
7 years ago

It would work, if the rename command was supported in scripts. You can rename in remote control, but not with script. The log only says the command is not supported...

MI
Marius Iversen
7 years ago

Thanks Matt. That worked!

I changed the extension to .zip, and then used the copy command in the post-install script.

copy %sdcard%myapp.zip %sdcard%myapp.apk

MD
Matt Dermody Diamond Contributor
7 years ago

Out of curiosity, what was your use case for just wanting to distribute the APK, without installing it? Your line of questioning has inspired me to think about at activating the installation of an APK with a script set to auto-launch at startup from the SOTI lockdown launcher so that a user could reboot a device in order to trigger an upgrade to an APK version so that they're otherwise not interrupted. Is this what you had in mind?

MI
Marius Iversen
7 years ago

I needed to install SOTI surf on COSE devices. If installing the "normal" way, users would be prompted to give permission for SOTI surf to access the microphone and so on. In real life this does not work in a COSU environment. So I figured I could install SOTI surf with MX (fortunately it's Zebra devices we're talking about), which works great. No questions about permissions or anything. So therefore I needed a way to copy the .apk to the devices, which a package easily could do. Until I saw MCStudio installs .apks no matter what.