Zum Inhalt springen

Execute Script Commands on Samsung Devices using SureMDM Nix

Nov 02, 2013 | 42Gears Team

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 Scripts Commands:

1.Enable KNOX:

!#suremdm
activateknox

2. Reboot Device:

!#suremdm
reboot

3. Install application:

!#suremdm
install(/sdcard/file name)

4. Uninstall application:

!#suremdm
uninstall(package name)

5. Clear App Data:

am broadcast -a com.nix.COMMUNICATOR -e command clearAppData -e packages package1,package2,…packageN  com.nix

6. Turn GPS OFF:

!#suremdm
TurnOnGPS(false)

7. RunScript to toggle lollipop screen capture

!#suremdm
LollipopScreenCapture(TRUE)

8. RunScript to set Time ,Date and Time Zone

!#suremdm
SetDateTime(DD-MM-YYYY,00:00:00AM/PM,Continent/State)

9. To deactivate nix admin on Device

!#suremdm
deactivateadmin(com.nix)

10. To enable app by package name

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

11. To disable app by package name

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

12. To edit phone number

!#suremdm
updatephonenumber(912345678)

13. To disable uninstall

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

14. To enable uninstall

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

15. Block OTA updates

!#suremdm
blockOTAUpgrade(TRUE)

16. Unblock OTA updates

!#suremdm
blockOTAUpgrade(FALSE)

17. Set screen off timeout

!#suremdm
screenofftimeout(60)

18. 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(x1,y1,x2,y2)

21. Reauthenticate SuperSu

!#suremdm
reauthenticateSuperSu(TRUE)

22. Copy To System Folder

!#suremdm
copyToSystemFolder(packageName)

23. Set Admin Removable

!#suremdm
setAdminRemovable(removable, Packagename)

24. Enable Firewall

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

25. Disable Firewall

!#suremdm
DisableFirewall

26. Firewall Whitelist App

!#suremdm
firewallwhitelistapp(pacakge1,pacakge2?pacakgen)

27. Create APN Settings

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

28. Delete APN Settings

!#suremdm
deleteApnSettings(APN_name)

29. BlockIncomingMMS

!#suremdm
BlockIncomingMMS(TRUE)

30. BlockOutgoingMMS

!#suremdm
BlockOutgoingMMS(TRUE)

31. Shutdown Device

!#suremdm
shutdown

32. Reboot after 10 Seconds

!#suremdm
reboot(sec)

33. Shutdown after 10 Seconds

!#suremdm
shutdown(sec)

34. To force stop an app

!#suremdm
StopApp(package1,package2,..,packageN)

35. Turn NFC ON/OFF

!#suremdm
NFCState(ON/OFF)

36. Set Lock Screen Wallpaper on the device screen.

!#suremdm
LockScreenWallpaper(/sdcard/DCIM/Camera/20170504_212614.jpg)

37. Reset Lock Screen Wallpaper on the device screen

!#suremdm
ResetLockScreenWallPaper

38. Disable DataRoaming on the device

!#suremdm
disableDataRoaming(TRUE)

39. Reset DataRoaming on the device

!#suremdm
disableDataRoaming(FALSE)

40. Control power saver mode android settings of the device

!#suremdm
disablePowerSavingMode(true/false)

41. Block incoming sms

!#suremdm
blockIncomingSMS(true)

42. Block outgoing sms

!#suremdm
blockOutgoingSMS(true)

43. Block specific number

!#suremdm
blockOutgoingSMS (Number1,Number2,..etc)

44. Firewall script to whitelist apps

!#suremdm
firewallwhitelistapp(pacakge1,pacakge2…pacakgen)

45. Enable Multi Window Mode

!#suremdm
allowMultiWindowMode(true)

46. Disable Multi Window Mode

!#suremdm
allowMultiWindowMode(false)

47. Remove account from Gmail App

!#suremdm
removeAccountFromDevice(account type)

48. Remove Gmail account from Email App

!#suremdm
removeAccountFromDevice(package name for Email app)

49. Change Font size based on user prefer by applying

!#suremdm
setSystemActiveFontSize(fontSizeInFloat)

50. Dump System Font Sizes in a file

!#suremdm
dumpSystemFontSizes

51. Change Lock Screen Wallpaper

!#suremdm
LockScreenWallpaper(/sdcard/DCIM/a.jpg)

52. Whitelist WiFi restriction

!#suremdm
whiteListWifiSSID(SSID1,…SSIDn)

53. Blacklist WiFi restriction

!#suremdm
blackListWifiSSID(SSID1,…SSIDn)

54. Remove WiFi restriction

!#suremdm
clearWifiRestriction

55. Disable battery optimization for any third party applications.

!#suremdm
removeAppFromBatteryOptimization(packageName1,…,packageNameN)

56. Enable battery optimization for any third party applications.

!#suremdm
addAppToBatteryOptimization (packageName1,…,packageNameN)

57. Remote screen image ignore scale down

!#suremdm
IgnoreImageScaleDown(true)

58. Set System Active Font Size

!#suremdm
setSystemActiveFontSize(fontSizeInFloat)

59. Run script to disable factory reset for Knox devices

!#suremdm
DisableFactoryReset(true/false)

60. Turn Hotspot OFF

!#suremdm
disableHotspot(true)

61. Set System Active Font Size

!#suremdm
setSystemActiveFontSize(fontSizeInFloat)

62. Allow or deny runtime permissions :

!#suremdm
allowRuntimePermissions(true/false,packagename)

63. Set shortcut image on SureLock Homescreen. :

!#suremdm
CreateAppShortcut(PackageName,ClassName,Url,Title,IconPath)

64. Set provided image as Homescreen Wallpaper. :

!#suremdm
setHomeScreenWallpaper(/sdcard/download/wallpaper2.jpg)

 

Signup for SureMDM Free Trial
 

 

Subscribe for our free newsletter

Thank you! you are successfully subscribed.
newsletter

Exclusive News and Updates on Enterprise Mobility!

* I consent to receive newsletters via email from 42Gears and its Affiliates.
Please agree
* I have reviewed and agreed to 42Gears Privacy Policy and Terms of Use prior to subscribing and understand that I may change my preference or unsubscribe at any time.
Please agree
Please verify captcha
Please enter a valid official email