Execute Script Commands on Samsung Devices using SureMDM Nix

Applies to:
Product SureMDM/Samsung Nix
Platform Android

 

With SureMDM, you can create jobs (read more) and deploy it to your devices remotely. One of the jobs listed for Android devices is Run Script. With Run Script, you can create a Job to remotely execute script commands on the devices.

suremdm-select-run-script

List of script commands

1.Enable KNOX:

 !#suremdm
 activateknox

2. Reboot Device:

     !#suremdm
     reboot

3. Shutdown Device:

     !#suremdm
     shutdown

4. Reboot after 10 Seconds:

     !#suremdm
     reboot(10) //secs

5. Shutdown after 10 Seconds:

     !#suremdm
     shutdown(10) //secs

6. Silent Uninstall of Applications:

     !#suremdm
     uninstall(package name)

e.g. Package name for Adobe Reader: com.adobe.reader

7. Silent Install of Applications:

     !#suremdm
     install(/sdcard/file name)

8. Launch Applications:

     !#suremdm
     launch(com.example.test)

9. To activate admin of SureMDM Nix Samsung Verison on Device:

     !#suremdm
     activateadmin(com.gears42.nixsam)

10. To deactivate admin of SureMDM Nix Samsung Verison on Device:

     !#suremdm
     deactivateadmin(com.gears42.nixsam)

Note!#suremdm tag is required for identifying SureMDM Run Scripts.

11. To enable app by package name

     !#suremdm
     enable(pkg1,pkg2..pkN)

Note: This feature is only implemented for Knox and Rooted devices

12. To disable app by package name

     !#suremdm
     disable(pkg1,pkg2..pkN)

Note: This feature is only implemented for Knox and Rooted devices

13. To edit phone number

     !#suremdm
     updatephonenumber(1535635655)

Note: The changed phone number will be reflected under ‘Show Phone Number’ column of Asset tracking report on SureMDM.

14. To disable uninstall

     !#suremdm
     blockUninstall(pkg1,pk2,..,pkgN)

15. To enable uninstall 

     !#suremdm
     allowUninstall(pkg1,pk2,..,pkgN)

16. Block OTA updates: (works only with SureMDM Nix Agent version 7.82 and onwards)

     !#suremdm
     blockOTAUpgrade(true)

17. Unblock OTA updates: (works only with SureMDM Nix Agent version 7.82 and onwards)

     !#suremdm
     blockOTAUpgrade(false)

18. Set screen off timeout: (Please note that the time is in seconds)

     !#suremdm
     screenofftimeout(60)

19. Configure Email: 

     !#suremdm
configureEmail(action, userName, password, serverType, incomingServerAddress, outgoingServerAddress, securityType_Incoming, securityType_Outgoing, incomingPort, outgoingPort, signature)

19. Screen Capture: 

     !#suremdm
     screencap

20. Swipe

     !#suremdm
     swipe(240, 240, 360, 360) //240-x1, 240-y1, 360-x2, 360-y2

21. Reauthenticate SuperSu

     !#suremdm
     reauthenticateSuperSu(true)

22. Copy To System Folder

     !#suremdm
     copyToSystemFolder(packageName)

23. Remove To System Folder

     !#suremdm
     removeFromSystemFolder(packageName)

24. Set Admin Removable

     !#suremdm
     setAdminRemovable(removable,<Packagename>) // removable true

25. EnableFirewall

     !#suremdm
     EnableFirewall(Whitelist IP,Blacklist IP,Whitelist Domain,Blacklist Domain)

 

26. DisableFirewall

     !#suremdm
     DisableFirewall

27. Firewall Whitelist App

     !#suremdm
     firewallwhitelistapp(pacakge1,pacakge2…pacakgen)

28. Create APN Settings

     !#suremdm
createApnSettings(apnname,user,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,type,name, setdefaultValue)

29. Delete APN Settings

     !#suremdm
     deleteApnSettings(APN_name)

30. BlockIncomingMMS

     !#suremdm
     BlockIncomingMMS(true)

31. BlockOutgoingMMS

     !#suremdm
     BlockOutgoingMMS(true)

32. KeepCPUOn

     !#suremdm
     KeepCPUOn(true)

33. Turn NFC ON/OFF

     !#suremdm
     NFCState(value)
     value = 0, 1, 2
     0 = don’t care
    1 = always on
    2 = always off

34. Reset Lock Screen Wallpaper

     !#suremdm
    ResetLockScreenWallPaper

35. Disable Data Roaming

     !#suremdm
    disableDataRoaming(false)

 

Signup for SureMDM Free Trial
 

 

Leave a Comment