What is Run Local Scripts used for?
You can use the Run Local Scripts Action to execute any bash script that is located in the MokiMDM folder on the device. This includes being able to run a script to pull device logs.
Using Run Local Scripts for Any Script File:
- Perform a Send File Action to the device, sending the desired bash script file to the device. You must send the file to the MokiMDM file on the device. You can use file path /sdcard/MokiMDM/
- Using the Action dropdown, select Run Local Scripts. Any bash script files located in the MokiMDM folder will be executed
Using Run Local Scripts to Pull Device Logs Remotely:
- Perform a Send File Action to the device, sending this script file to the device. Use the file path /sdcard/MokiMDM/
- Using the Action dropdown, select Run Local Scripts
- Perform the Pull File action. Use file path: /sdcard/MokiMDM/logcat.txt (if this file path does not work, you can try, /storage/emulated/0/logcat.txt)
- The device log file will be pulled from the device and can be downloaded from the Action History section under the Completed Pull File action