Delete Files Ivanti Velocity via intent

Solved

Hello all,

we have imported configurations to the device on a number of Zebra TC52x using the Velocity file Assistant app (The app will sync/copy all the velocity configuration files from /sdcard/com.wavelink.velocity folder to /sdcard/Android/data/com.wavelink.velocity/files folder after starting velocity). Unfortunately, due to a change in the profile name, we are now seeing two profiles. Due to Android 11, we cannot simply delete the files via the file browser. 

In the Ivanti community we came across the following article:
https://forums.ivanti.com/s/article/Android-11-Non-Android-enterprise-Method-to-deploy-files-from-MDM-using-Velocity-File-assistant-app?language=en_US

Here it is shown that with the following intent the files/profiles can be deleted:

Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setComponent(ComponentName.unflattenFromString("com.wavelink.velocityfileassistant/.FileUpdate"));
    intent.putExtra("com.wavelink.velocityfileassistant.extra.CLEAN", true);
    try {
        startActivity(intent);
    } catch (ActivityNotFoundException e) {
        // Velocity File Assistant was not found

Unfortunately, this does not seem to be the correct syntax for MobiControl. 

Do any of you have an idea how the intent has to look exactly so that we can delete the profiles?

We would be very grateful for any help!

Kind Regards

Keno

3 years ago
SOTI MobiControl
ANSWERS
MB

Hi Keno,

has the Application the full Permission on the Device ?

Menas the Velocity app & teh MobiControl on the Device ?

RC
Raymond Chan Diamond Contributor
3 years ago

With no hardware to do any actual test, my best educated guess based on your given information is either one of the following :

    sendintent -a "intent:#Intent;action=android.intent.action.VIEW;component=com.wavelink.velocityfileassistant/.FileUpdate;B.CLEAN=true;end"

OR

    sendintent -b "intent:#Intent;action=android.intent.action.VIEW;component=com.wavelink.velocityfileassistant/.FileUpdate;B.CLEAN=true;end"

Good luck.

Please let us know if any of the above works or not.

KV
Keno van Loo
3 years ago

Hello Raymond, 

thank you for your reply. My Colleague Martin Kren figured it out last night. 

The correct syntax for the command is as follows:
sendintent -a "intent:#Intent;action=android.intent.action.VIEW;component=com.wavelink.velocityfileassistant/.FileUpdate;B.com.wavelink.velocityfileassistant.extra.CLEAN=true;end"

In combination with kill_application and start application in a FileSync Rule Script it works perfectly. The devices get their configuration depending on the group membership and automatically restart the app with the new configuration.

kill_application com.wavelink.velocity
sendintent -a "intent:#Intent;action=android.intent.action.VIEW;component=com.wavelink.velocityfileassistant/.FileUpdate;B.com.wavelink.velocityfileassistant.extra.CLEAN=true;end"
start com.wavelink.velocity

Thanks for your efforts and kind regards
Keno

Solution
HV
Henk, van Asselt
2 years ago

For me, this still did not work.
The root cause was that the device had a lockdown screen active, and 'native mode' was used.
This will kill all activities, except the items defined in the lockdown screen.

Two workarounds for this:
1. Use 'Activity suppression' in the lockdown screen, or
2. Add 'Launch://com.wavelink.velocityfileassistant' as a hidden item to the lockdown screen.