There's a new home for Articles. Find Articles on Our Product Support Page.
I'm hoping someone can help me with this example script to be used as pre-install script in package studio to give the users a choise to click install when I update an app I want to know where I should put in the bundleID or package name. We can say that I want this to be used on soti surf (net.soti.surf). #!/usr/bin/env jsvar FIVE_MINUTES = 5 * 60 * 1000;var ONE_HOUR = 60 * 60 * 1000;var buttonLabels = ['Install now', 'Install in 5 minutes', 'Install in 1 hour']; if (isAppRunningInForeground('com.acme.importantapp')) { mobicontrol.message.createInfoDialog('Would you like to install ImportantApp?') .withButtons(buttonLabels[0], buttonLabels[1], buttonLabels[2]) .withCallback(onConfirm).show();} function onConfirm(result) { if (result.buttonIndex != null) { switch (buttonLabels[result.buttonIndex]) { case 'Install now': installImportantPcg(); break; case 'Install in 5 minutes': setTimeout(installImportantPcg, FIVE_MINUTES); break; case 'Install in 1 hour': setTimeout(installImportantPcg, ONE_HOUR); break; } }} function installImportantPcg() { // Do nothing - the normal return from the script will launch the package installation} function isAppRunningInForeground(app) { return mobicontrol.app.foregroundActivities.filter(activity => activity.packageName == app).length > 0;}
Recently we have had a number of issues installing the Omnitracs XRS application on our TC57 Android 13 devices. Back in July, we were forced to go to package-based deployment of the app due to a weird error when deploying it using the built in App Policy method (Enterprise APK upload). I have attached screenshots showcasing this issue as well as the device logs. Once we went to package-based deployment, now we are having a strange issue where the application does install properly, but randomly it will disappear on devices and need a reinstall. We have had 5 or more of these occur each week over the past few months. I am not sure if this is related to deploying the app as a package or not. I have heard some things about Google Play Protect possibly being the culprit, but no way to know as of right now. 1. Is there any way to get the App Policy to work again or is this a known issue? This doesn't seem to be an issue with Google as the device is clearly showing an error even when attempting to install it. 2. Is there any reason why deploying this app as a package would cause random uninstalls to occur?
HI SOTI Community I have use case that i want to send script (javascript) to all device as profile for end user input text to file. so, i do this 1. built pcg file with javascript file (file.js) 2. add pcg file to profile 3. assign to clients but script not working how to do or have another solution. this script #!/usr/bin/env js inputStore(); function inputStore() { mobicontrol.message.createTextPromptDialog('รหัสร้าน 5 หลักของคุณคือ?') .withCallback(onConfirm).show(); } function onConfirm(result) { var storeId = result.inputText; if (isValidStoreId(storeId)) { var stl = storeId.length; var mcsetupFile = new mobicontrol.io.File('/sdcard/Documents/mcsetup.ini'); if (mcsetupFile.exists) { var data = mcsetupFile.readText(); var keyText = "StoreID="; var ktl = keyText.length; var idx = data.indexOf(keyText); var oldStoreId = data.substring((idx + ktl), idx + ktl + stl); var offset = stl; if (!isValidStoreId(oldStoreId)) { offset = 0; } var result = data.substring(0, idx + ktl) + storeId + data.substring(idx + ktl + offset); mcsetupFile.writeText(result); } } else { mobicontrol.message.createInfoDialog('Invalid store:'+storeId).show(); inputStore(); //repeat input //mobicontrol.log.info('Invalid store:' + storeId); } } function isValidStoreId(storeId) { return ((typeof storeId === 'string' && !isNaN(storeId)) && storeId.length == 5)}; My server version Version: 15.3.3.1065
Just looking for some points of view on getting data files to devices. What are your preferences are in particular scenarios, any differences? Any watch-outs for either method etc. I understand its a large open question, so I am grateful for any points you have to add. Thank you Adam
Good Morning. I pushed a very heavy update to our profile that contains our company devices. For the most part, the installation is going well. I have about 9 devices that are showing "Partially Installed" .I'd like to identify those devices to take a look at the configuration and troubleshoot. This profile has over 500 devices, so looking through each device is not efficient. Do SOTI have a feature or script to ping the partially installed devices?
Good Morning, I am looking for a way to generate a report to see what devices are currently on and connected to SOTI. I am pushing several App packages tonight and would like to have an idea of how many devices are currently connected at the time of the updates so I can monitor and support if needed. I would also like to figure out a way to check what devices haven't connected in a while lets say 1 week or 1 month. What is the best method to achieve these two sets of data?
I'm writing a python script to automate the process of uploading our packages to SOTI. However, I am having difficulty sending the request to upload an Android APK file. here is my code for reference; file_name = 'com.aviagen.trapping.apk'encoded_file = ''with open(file_name, 'rb') as f: data = f.read() encoded_file = base64.b64encode(data)encoded_file = str(encoded_file, "utf-8")boundary = "mobicontrol_boundary"#part 1 - body parametersbody = f"--{boundary}\r\n"body = body + f"Content-Type: application/vnd.soti.mobicontrol.package.metadata+json\r\n\r\n"body = body + "{ 'DeviceFamily': 'AndroidPlus' }\r\n"#part 2 - file detailsbody = body + f"--{boundary}\r\n"body = body + f"Content-Type: application/vnd.soti.mobicontrol.package\r\n"body = body + f"Content-Type-Encoding: base64\r\n"body = body + "Content-Disposition: attachment; filename='com.aviagen.trapping.apk'\r\n"body = body + "\r\n"#part 3 - file contentbody = body + encoded_filebody = body + f"\r\n--{boundary}--\r\n"print(body)body = body.encode('utf-8')request = urllib.request.Request(f'{BASE_URL}/packages', data=body)request.add_header('Authorization', f'Bearer {token}')request.add_header('Content-Type', 'multipart/related; boundary=mobicontrol_boundary')response = urllib.request.urlopen(request)data = json.loads(response.read())response.close() This is resulting in an error - 422 (Unprocessable Entity).I have checked the file and can confirm that it is a valid signed apk which installs on my device. Is there something wrong with my request body? I saw a couple other examples of Package uploading, however they all use Powershell and I would very much like to avoid powershell at all costs.
Hi communitiy Is there any script command (Android 7, AE) to force package reinstallation ? I know this can be done via the device configuration menu but I need to do this to all devices connected in 1 command. thx steve
Hi, I am wondering if there is any way I can make my profile select the latest package by itself and run it? Meaning, I will update the newer version of the package, and I'm hoping that the profiles which had that package will change to the latest version without me manually change every profile? Thanks
Hello all, I got an interesting question from one of my customers. He has Android devices enrolled in MobiControl with Androd Enterprise as Work Managed Devices. He wants to change the host file on the device. The location is /system/etc and the file is named hosts. You are able to get this file with the following adb command: adb pull /system/etc/hosts destination-path. If I want to push the edited file back via adb, you need root on the device. If I want to push the edited file via SOTI Package, it seems that the file never get copied to the device but the profile and package is shown installed in the MobiControl console. Does anyone have experience in this topic? Am I able to push a file via SOTI Package to the system folder? Do I need root rights? Is it possible to get root for SOTI? Would you recommend it? Thank you in advance. - Felix
I created a simple package that includes a simple powershell script. I set the property on the file (in the package) as auto execute. The script is installed ok, but the script is simply "opened" with notepad. I even tried changing the app associate with the script file type from notepad to powershell but that made no difference. Any suggestions? A.
Hi Team, Facing issue when deploying a package on Honeywell 7800 devices with Windows CE. Below is the error from the device. There is no issue with the package as the same is getting installed for some devices. 2020/09/23 02:18:52.397(0x6ef4ca22): EVENT: Creating partial snapshot (ID=150)2020/09/23 02:18:52.513(0x6ef4ca22): EVENT: Cfg: Export to \IPSM\pdb.ini2020/09/23 02:18:52.043(0xaf5bfa32): ERROR: Schedule: Reload2020/09/23 02:18:52.094(0xaf5bfa32): EVENT: Schedule(Install Controller): No more schedule availablenstall Controller): No more schedule available There is also this error where in the device has ample amout of space and the package is just in kilobytes ERROR: CDOSMgr::GetDeviceFreeSpace(\PdbInfo): 0-238133248 Regards, Dheeraj
Hi! We have started seeing some problems with scheduling a package installation with the functionality of Package Install Date. If we for example assign a profile to install the package at a given time nothing will install on the majority of devices, we can remote control the devices, do checkins, but no installation. Until we do a restart of the agent. Then the installation goes through. Are there anyone else that have experienced the same?
I know this may have been answered somewhere else but from what I have seen, it doesn't answer my question 100%. I have a non-production lockdown group that I need to test by assigning a package to that group before I assign it to my lockdown production group. Whenever you update your package, you need to assign it to the lockdown group. Now, let me just say, using MobiControl is fairly new to me. There are a few things I can do but this is not one of them. I would appreciate any help with this.
Question Is it possible to install package immdiately when an user tap install button on the devices?How can we install private apps by user timing? Procedure 1.Enroll device as AE2.Apply a profile which has package as self service to a device group3.Tap Mobicontrol Agent on device lockdown screen,and open profile status4.Tap install button 5.It becomes pending status and not completed by next checkin Comment 1.We changed checkin schedule from 1/24hours to 1/30minutes temporary,but we don't want to do this treatment nexttime because it increases server load.We want to know why it isn't started to install package immediately after device manipulation untill checkin. 2.It is impossible to use App Catalog Rules for private app because our customer has not Gsuit Accoount,and,App Catalog also needs to checkin for installation and takes 2 or 3 days untill delivery apps. Alternative 1.Using FileSync for distribution app and embedding installing script on lockdown. <Server information>================================================-MC version:13.4.0.5276-server environment:SaaS================================================<Device information>================================================-Agent version: 13.6.0.1662, etc.-For Android A + or AE: AE
Top-tier experts who are delivering outstanding content. Should have more than 7000 points.
Experts who are consistent with great content. Should have more than 1000 points
Highly experienced members with valuable inputs. Should have more than 700 points
Beginners taking the initiative. Should have more than 500 points