FileSync Rule - Post-script copy BadLink.html file to Enterprise Browser location

Solved
MJ
Mitch Jeffcoat
Bridgestone Plants & Distribution Centers

Android 11 or 13

Models MC93 & ET60

FileSync Rule copies config.xml, badlink.html, copy_config.xml & copy_banklink.xml files to %sdcard% as expected (xml files are used in post-synchronization)

copy_config.xml

<wap-provisioningdoc>
  <characteristic version="11.3" type="FileMgr">
    <parm name="FileAction" value="1" />
    <characteristic type="file-details">
      <parm name="TargetAccessMethod" value="2" />
      <parm name="TargetPathAndFileName" value="/enterprise/device/enterprisebrowser/Config.xml" />
      <parm name="IfDuplicate" value="1" />
      <parm name="SourceAccessMethod" value="2" />
      <parm name="SourcePathAndFileName" value="/sdcard/config.xml" />
    </characteristic>
  </characteristic>
</wap-provisioningdoc>

copy_banklink.xml

<wap-provisioningdoc>
  <characteristic version="11.3" type="FileMgr">
    <parm name="FileAction" value="1" />
    <characteristic type="file-details">
      <parm name="TargetAccessMethod" value="2" />
      <parm name="TargetPathAndFileName" value="/enterprise/device/enterprisebrowser/badlink.html" />
      <parm name="IfDuplicate" value="1" />
      <parm name="SourceAccessMethod" value="2" />
      <parm name="SourcePathAndFileName" value="/sdcard/badlink.html" />
    </characteristic>
  </characteristic>
</wap-provisioningdoc>

After file synchronization has completed execute script:

mxconfig /sdcard/Copy_badlink.xml
mxconfig /sdcard/Copy_Config.xml

Always Execute is checked

Enterprise Browser utilizes the settings from our config.xml but if it has a page error it calls the badlink.html that comes with the apk and not our customized file (customized file has an exit function to get out of the Enterprise Browser application in case they lose wifi).

I cant get our customized version of the badlink.html to copy to the location where Enterprise Browser is located.

a year ago
SOTI MobiControl
ANSWERS
RC
Raymond Chan Diamond Contributor
a year ago

I am not sure if there are any typos in the filename(s) or path(s) in your post.

Latest Android versions have stricter file permission control to implement Google's evolving scoped-storage model, so it is possible that the read/write permission of some directories on the device file system have been changed.  Unfortunately, I don't have similar device models as yours to test out.   So, you have to verify yourself on your device the following :

1. if the Mobicontrol device agent do not have write access to the enterprise partition "/enterprise" 

2. if you need to update .xml file content to reference the right file in either /sdcard or /enterprise folder properly. Please note that the absolute path names may have been changed between device firmware versions, and the pathname or filename should be assumed to be case sensitive.

C
Chris
a year ago

Hello,

have you tested to make the files readable / writable or executable with an extra command:
__chmod 777 /enterprise/device/enterprisebrowser/badlink.html

* does not work, you must use the command for every file with exact name.

MFG

MD
Matt Dermody Diamond Contributor
a year ago

This is likely the key. I typically have to use __chmod 777 on config files for apps like Enterprise Browser. 

MJ
Mitch Jeffcoat
a year ago

I changed my method of copying from the XML files to the following:

copy /sdcard/Config.xml /enterprise/device/enterprisebrowser/Config.xml
__chmod 777 /enterprise/device/enterprisebrowser/
__chmod 777 /enterprise/device/enterprisebrowser/Config.xml
__chmod 777 /enterprise/device/enterprisebrowser/backup/
copy /sdcard/badlink.html /enterprise/device/enterprisebrowser/badlink.html
__chmod 777 /enterprise/device/enterprisebrowser/
__chmod 777 /enterprise/device/enterprisebrowser/badlink.html
__chmod 777 /enterprise/device/enterprisebrowser/backup/

The Config.xml file copies but the badlink.html does not.

MJ
Mitch Jeffcoat
a year ago

Turns out the badlink.html is copying as expected.

The fix was changing the Config.xml BadLinkURI value from using %INSTALLDIR% to %PERSISTCONFDIR%

Thank you guys for your help!!!

Solution
RC
Raymond Chan Diamond Contributor
a year ago

Chris's post reminded me of the __chmod command related to file permission control in  Enterprise partition of Zebra devices.  The command was previously discussed online elsewhere, e.g.

-  https://discussions.soti.net/thread/alternate-solution-to-provide-read-write-execute-to-file-in-ae

- https://supportcommunity.zebra.com/s/question/0D56S0000DJFrmxSQD/anyone-working-with-the-latest-enterprise-browser-and-android-11-seems-to-install-fine-using-soti-mdm-just-cant-seem-to-update-enterprisedeviceenterprisebrowserconfigini-with-my-config-filetried-a-file-sync-and-i-keep-getting-the-default-page

E
ENMod
a year ago


Thanks for posting on SOTI pulse. Thanks Raymond for responding to the post, your expertise and willingness to help are greatly appreciated!


Has your query been resolved? If not, or if you have any additional concerns, please don't hesitate to reach out. We are dedicated to providing assistance and support.


Also, if this post has helped you in solving your query, I would request you to mark the particular comment as "is solution", so that others may benefit from this information.

Technical Support, SOTI | Call Us | SOTI.net | Discussion Forum | Log a Case Online

Similar Discussions