How to "move" aka sync a file from an Android device to MobiControl Server

DS
Daniel S.
Reliance Limited Partnership

The goal here is to create a mechanism that will allow Support Team to easily retrieve an application log file so we can pass it on to our developers. 

The log file is located under %sdcard%\com.applicationame.mobile\logfile.log 

8 months ago
SOTI MobiControl
ANSWERS
RC
Raymond Chan Diamond Contributor
8 months ago

What is the Android firmware version of your devices?

Can the path of the log file for the apps be configured?

DS
Daniel S.
8 months ago

I have the following devices : Samsung S10, A53, A35. 

ZC
Zafer Cigdem
8 months ago

Hi Daniel,

If you can't directly target a file Sync Policy from device-to-server direction by using the %sdcard%... logfile path that you mentioned, you can test following for your Android devices.

Briefly, this will copy files from one location to another here is the source: Class: File | Android Agent JavaScript

and below is an example:


var source = new mobicontrol.io.File('/sdcard/Download/CopilotFiles.ini');
var destination = new mobicontrol.io.File('/sdcard/Download/Zafer/CopilotFiles.ini');
source.copyTo(destination);


I hope this helps. 

Zafer

A
ATMOD@SOTI
8 months ago

Hi Daniel S,

Thank you for posting on SOTI pulse. I would like to extend my gratitude to Raymond Chan and Zafer Cigdem for helping Daniel in this issue.

Could you please try the following work around to collect the logs.

  • Log in to MobiControl Console.

  • Go to "Rules" > "File Sync Rules".

  • Create a New File Sync Rule:

    • Source Path: %sdcard%\com.applicationame.mobile\logfile.log

    • Destination Path: A server location or an accessible folder.

  • Apply the Rule to the relevant devices.

  • Enable Auto-Sync so that logs are periodically fetched.

Kindly let us know the outcome.