What is the replacement for shellexecute script on Android+

F
Fisch
Zebra Technologies International, LLC

I have started to notice the shellexecute script no longer works on Android Plus devices and this was a necessary script for multiple reasons. The old script that was being used was as follows:

shellexecute chmod 777 /enterprise/usr/enterprisehomescreen.xml

I have also tried the following:

shell_execute chmod 777 /enterprise/usr/enterprisehomescreen.xml

_chmod 777 /enterprise/usr/enterprisehomescreen.xml

This command is used whenever SOTI pushes a file to a device to make sure the permissions are correct. Without it other applications that read the file do not work correctly.

6 years ago
Android
ANSWERS
MD
Matt Dermody Diamond Contributor
6 years ago (edited 6 years ago)

That should not be necessary for the enterprise home screen configuration. You should be able to place the file directly into /enterprise/usr/ and it will be read automatically by EHS. I did this successfully as recently as yesterday with EHS 2.8 on Zebra TC8000 and WT6000 devices.

The chmod scripting was "needed" for the datawedge.db files if you wanted them read in automatically but that can be worked around by having the devices rebooted or the DataWedge app killed and relaunched.

I can't speak to whether or not shell_execute will be supported in the future but I can say for your particular use case you shouldn't technically need it. I deploy Zebra Android devices with SOTI constantly and I haven't ever expressly needed the shell_execute script. Scripts like mxconfig and install_system_update are a lot more important!

M
MiKe
6 years ago

Actualy I had to shellexecute  ehs config on TC8000 otherwise the config only worked after reboot but I assume it's due to "old" Android and EHS 

MD
Matt Dermody Diamond Contributor
6 years ago

I had my TC8000s on L+LG11+CFE and the EHS on 2.8 and was observing the EHS configuration changes happening automatically with each Package update. 

F
Fisch
6 years ago

I was able to figure it out. It appears that the command has been changed to the following:

__chmod <permissions> <file name/path>

There 2 (two) underscores needed not just 1.

For EHS I found that I need to do this whenever I copied the file through Remote Control but for all other apps (WFC, DataWedge, etc) I need to use this all the time.

MD
Matt Dermody Diamond Contributor
6 years ago

Thanks for sharing the solution to the script!

If you're testing updates to the EHS config file I would definitely recommend ADB over the RC based approach. With that said, if you're not in front of the device and are remotely supporting them I can understand why you'd want to use the RC File Browser approach. 

M
MiKe
6 years ago

I've used FileSync rule so maybe there are different permissions applied - if I'll have some spare time I will try package option