Community - SOTI MobiControl

Community - SOTI MobiControl

There's a new home for Articles. Find Articles on Our Product Support Page.

Android Scripting Discussions


  • 0 votes 3 answers

    How to execute package that status downloaded

    Hi SOTI Team  I have issue that I assign Profile and Package application into device status profile is Pending install  Package Status is Downloaded But some time, It slow to installed . So, i want to send script to execute install package, dont want to wait device install automatcally,  How to to, or what script to do that

    Android Scripting
    2 years ago
  • 0 votes 3 answers

    Script to process XML file that is already synced to device for Honeywell devices: MXconfig is not working for this brand Solved

    I am trying to process an XML script that will install the wifi and configure the frequency band for 5ghz. I have been able to do this successfully scanning the barcode but our devices are in the field so i am trying to do it programmatically. I exported the barcode config and saved it as a xml and synced it to the device but I am unsure of the command that will execute it. Mxconfig is what i normally use for the zebra devices but i am getting the error that command is not supported for my honeywell  devices.  What command do i need to execute this script?

    Android Scripting
    2 years ago
  • 0 votes 1 answer

    Samsung A14 - Script to set auto lock

    Hi All,I have roughly 700 Samsung A14 devices running on Android 13 TP1A.220624.014.A146PXXS5BWK1Mobi Version: 15.6.6.1010We need to turn off "Lock instantly with side key" on our devices.  Does anyone have a script that would do this?Cheers 

    Android Scripting
    2 years ago
  • 0 votes 4 answers

    Disable on screen/virtual keyboard via script vs one-by-one

    Hi, I have seen there was a potential solution for Zebra, https://discussions.soti.net/thread/soti-surf-disable-on-screen-keyboard-only. But is there a script for Honeywell devices? Android version 9 and above SOTI MobiControl version 15.5.2 and above Thanks in advance.

    Android Scripting
    2 years ago
  • 0 votes 2 answers

    Custom Data or Script to get current default keyboard? Samsung

    We are using around 2k Samsung Tab Active 4 Pro's that we are setting the default keyboard to us the Simple Keyboard app vs the default Samsung Keyboard.  The Samsung keyboard has issues with SAP's ITS Mobile Application running in Soti Surf.  We pushed the default keyboard setting using Knox Service Plug in and most times it sets the keyboard.  But we would like to collect data on those devices to know which keyboard is the default keyboard in play?  Are there any script commands or Custom Data collection that we can use to report on the ones that have switched to the correct Keyboard, and which are still on the old keyboard?  

    Android Scripting
    2 years ago
  • 0 votes 8 answers

    Device rename script in task scheduler.

    Hello, I've got a script to rename devices based off Custom Data in Device groups.  We want our devices to rename themselves after being moved by device relocation rules.  My question is, can I have one profile assigned to all device groups that contain the task schedule to run this script once and if it will be run anytime a device changes groups?  Or do I need to add the scheduled task to each existing device group profile?

    Android Scripting
    2 years ago
  • 0 votes 2 answers

    I need to create custom names for Android Zebra devices.

    I would like to be able to rename Android Zebra TC devices that have been relocated to particular groups based on IP subnet rules. I need the new device name to contain 3 variables. Group name (ex. VAMAR3), the device type (this will always be RF for our organization), and the last 6 characters for the network assigned hostname. I am able to rename the devices to the complete %HOSTNAME% macro (android-6458060d3fff70bb.xxxxx.net in this case), but I have not been able to find a way to select the 6 last characters or set the rest of the variables needed. The complete name on this example would be VAMAR3RFff70bb. Again, I want to do this for each device when they get relocated based on the IP. Any assistance would be appreciated.

    Android Scripting
    2 years ago
  • 0 votes 5 answers

    Chrome - Term of Use - Automatic acceptation

    Hi the SOTI community,  We are using profile with Kiosk mode. Recently, I've created Web Application from the Managed Google Play Store. It works well on my test mobile. But I'm now block when I want to deploy those applications in Kiosk mode on new devices as the web application use Google Chrome, and it doesn't want to open until we accept the term of use which are not displayed in Kiosk mode. As I have 500 devices to deploy, I'd like to avoid to do it manually. Is there a script to automatically accept the Chrome term of use? Device : Crosscall Core X5 Thank you in advance 

    Android Scripting
    2 years ago
  • 0 votes 2 answers

    Sendintent via Javascript Solved

    Hello community, I have to implement a package script for Android devices which have to use a sendintent in relation to the OS version  of the calling device (>10 yes, otherwise not). The legacy scripting is really limited in logical branching. So I decide to use Javascript for implementation. So my question, is there a way to send an intent from Javascript on the device or to trigger a sendintent from there?  Thanks for any comment! Kind regards     Kersten

    Android Scripting
    2 years ago
  • 0 votes 5 answers

    Deleting files older than 90 days Solved

    Good day, I need assistance with a task. I want to delete files that are for example, older than 90 days. Using a "del" script, I can delete the files, but how do I specify that only files older than 90 days should be deleted? Do you have any ideas? Thank you MobiControl v2024.1.0 Android Enterprise Managed

    Android Scripting
    2 years ago
  • 0 votes 3 answers

    How to check “Myapp” running or not , and if not start it

    In Android device  I found that Android will kill application when screen off for save battery ,  but I don’t want i want to start “my app” always so how to start app always even screen off Have some script to do that. next Have javascript  to check “myapp”  start or not it stop , so start it ?

    Android Scripting
    2 years ago
  • 0 votes 12 answers

    Cannot remove a WiFi network with javascript mobicontrol.wifi.uninstall() Solved

    Hi all,Using MobiControl 2024.0.1 and a Zebra TC26 with Android 13 with agent version 2024.1.2.1105, I am trying to remove an WLAN network with Javascript, like the following example.The reason for this removal is that this is the staging network, and the device should not stick to it... var accessPoint = mobicontrol.wifi.listAccessPoints().find(ap => ap.ssid == "My_SSID");mobicontrol.wifi.uninstall(accessPoint);mobicontrol.log.info("My_SSID is removed."); This does not work, the MobiControl log shows: Custom log (WifiError: Location services are off. (UserScript#1)) My questions are: What is the relationship between removing a WLAN network and Location Services? The script works if I manually go on the device to Settings -> Location -> Advanced and enable 'Google location accuracy'.  Can this setting be enabled with SOTI MobiControl, so the removal of a WLAN network will be successfull? Thanks,Henk

    Android Scripting
    2 years ago
  • 0 votes 13 answers

    Script to automate Protect Battery Setting: enable on Samsung Devices

    can you automate this protect battery settings below on Samsung Devices:

    Android Scripting
    2 years ago
  • 0 votes 4 answers

    Is there a script (legacy or java) to relocate devices?

    HI All We are looking to stage/enroll a few thousand devices and we don't want to load all the applications etc at the staging site. Instead, rather have a button on the lockscreen that triggers a move by the user, to the live/infield folder where it will adopt the policies it needs and download the applications etc. Has anyone done this before? Is it possible? Your assistance will be much appreciated.

    Android Scripting
    2 years ago
  • 0 votes 3 answers

    Del File command on Script to Android 14 is not able to erase file

    When an Android device upgrades itself to a version it may erase special access rights to MobiControl Agent, such as ACCESS ANY File.   Prior to massive deployment, we have tested wich devices have upgrade and lost permissions.   In order to test if permissions are grant or not in Android devices we have a package that includes an apk, 2 txt file and a post install script.     The apk requests EXTERNAL_ACESS_MANAGEMENT and we do nothing with it. The only reason of its presence is to identify if MC Agent is able to install and grant such permission. After the confirmation it is installed, the post install script uninstall it. If installation has failed, the script stops on this point and the log on scripts helps to identify it.   The 2 txt files is to verify if we are able to copy/replace one by another, working as a flag if the MC Agent has rights to delete or overwrite files content. One file has 9 bytes and other 4 bytes. We know it has worked  if both stay with 9 bytes.   By the list of installation failed we are able to start a remote session to grant the proper rights.   This was so, up to Android 14.   Android 14 denies the delete, copy/replace action and we could not identify which permission is missing for it. The Log from script writes the file has been deleted and the other one copied, but the scripts hangs as failed, even after writes the log of installation success at the end.   By the way, the file sync rules are able to replace the content of the files, but legacy script copy command may not.     Below you see the package and its post install script.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Post-Install Script File ; Date Created: quarta-feira, 17 de abril de 2024 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;   log -i "ANDROID ANDROID ScanMobAUth2 installed" ;Remove File testeScan2.txt ;It fails here, because the original file is still there  del /sdcard/Download/testeScan2.txt log -i "Succes on erase testeScan2.txt " ;It is weird that the log above is registered, even after del command been failed copy /sdcard/Download/versao123.txt /sdcard/Download/testeScan2.txt ;It does not copy and is expected to happen so, when the target already exists with same name and different content log -i "Succes on copy file  testeScan2.txt by versao123" ;As before, the log above should not be executed, but is ;uninstall the package uninstall br.com.nobredelatorre.scanmobauth2 log -i "Finishing ANDROID ScanMobAUth " ;it even writes the Finishing log above finishpkg   Here comes the package content   [Fileoptions] Encrypt=1 Compress=1 Format=1 [Info] Name=ScanMob VersionStr=23.0 CommentStr= Wrap=85 Build=0 BuildDir=C:\Users\Aline\Documents\MobiControl Packages\ScanMob\checked\ WrapDir=C:\Users\Aline\Documents\MobiControl Packages\ScanMob\built\ File=ScanMob.pcg TotalFileSize=1610632 ExtraSize=0 TotalPackageSize=1314126 Processor=ALL Platform=Android ProcessorType=1 PlatformType=7 Osver=2.0-22.0 VendorName= Type=0 Prompt=0 PromptMsg=Install package 'ScanMob' now? PromptTimeout=10 [Files] File1Src=C:\Users\Aline\Downloads\app-release-21.apk File1Path=Internal Storage\app-release-21.apk File1Flags=128 File1Type=17 File1Params= File1Uninst= File2Src=scripts\posti.cmd File2Path=|\posti.cmd File2Flags=256 File2Type=12 File2Params= File2Uninst= File3Src=C:\Users\Aline\Desktop\testeScan2.txt File3Path=%sdcard%\Donwload\testeScan2.txt File3Flags=1 File3Type=0 File3Params= File3Uninst= File4Src=C:\Users\Aline\Desktop\versao123.txt File4Path=%sdcard%\Donwload\versao123.txt File4Flags=1 File4Type=0 File4Params= File4Uninst=

    Android Scripting

Top 3 Contributors of The Week

View All

Earn Contributor Badge

More info
  • Diamond
    Diamond New

    Top-tier experts who are delivering outstanding content. Should have more than 7000 points.

  • Platinum
    Platinum

    Experts who are consistent with great content. Should have more than 1000 points.

  • Gold
    Gold

    Highly experienced members with valuable inputs. Should have more than 700 points.

  • Silver
    Silver

    Beginners taking the initiative. Should have more than 500 points.

  • Bronze
    Bronze New

    New contributors starting their journey. Should have more than 250 points.