How to clear storage and cache from Google app via script

Solved Locked

Hi,

I have an issue where the built-in app Google keeps crashing on Zebra TC26 terminals running Android 10.

As far as I can figure out, the package name is: com.google.android.googlequicksearchbox

So I found out that clearing the storage and clearing the cache and then rebooting the device solves the issue.

I have a few hundred of these devices with this error, so I need to do it by script. Preferrably schedule it once every day.

Tried this command from SOTI MobiControl, but it seemed it did nothing:

wipeapplication com.google.android.googlequicksearchbox

How can I do this?

Regards 

Jarl

4 years ago
Android Scripting
ANSWERS
MD
Matt Dermody Diamond Contributor
4 years ago

wipeapplication isnt going to work as that feature isn't supported on AEDO managed Zebra devices in SOTI. You can however use Zebra MX configuration to accomplish what you're looking for. You can create a StageNow profile with the AppMgr CSP set to clear the app cache of the app in question. Then export that StageNow profile as an XML file and deliver it to your devices via Package. Then when you want to execute that action you can send the script mxconfig /sdcard/yourfile.xml and it will perform that action. The XML file will have the following sample format.

If you don't want to, or know how to, go through the StageNow process then you can just use the following XML snippet saved as an XML file and then load that onto the device via Package or File Sync. 

  <wap-provisioningdoc>
    <characteristic type="AppMgr" version="8.0" >
        <parm name="Action" value="ClearApplicationCache"/>
        <parm name="Package" value="com.google.android.googlequicksearchbox"/>
    </characteristic>
    </wap-provisioningdoc>


Or, instead of doing all of that you could also just blacklist / disable that app if you don't otherwise have a need for it.
Solution
JG
Jarl Glensholm
4 years ago

Hey Matt,

Thanks for this. 

I have created a StageNow profile with AppMgr. Selected the settings Clear Application Cache and Clear Application User Data.

Exported the profile as XML file. Then created a package in Package Studio that copies the .xml file and runs the post script mxconfig /sdcard/yourfile.xml 

Then I created a package in Mobicontrol for this and attached it to a new Mobicontrol profile.

It looks like it works so far :)

So how do I make it reboot the device after install - can it be done in the post script as well?

And how to make this Mobicontrol package run every morning at say 08.00 am ?

(About the need for this app.. our devices are used for GPS navigation via a custom app that we developed ourselves that uses Google Maps. I assume that is where the user data comes from as the devices are locked down, so Google Maps is the only google app that our users can use.)

Thanks

Jarl

MD
Matt Dermody Diamond Contributor
4 years ago

There is a Task Scheduler Profile option that you can use to run reoccuring scripts. You don't need to reinstall the package, you just need to rerun the mxconfig script since the xml file will already be present on the device. 

JG
Jarl Glensholm
4 years ago

Appologize for the late reply, just returned from holidays.

Thank you Matt, have marked as answer :)

Have a nice day.