Issue with DoNotUninstall flag in /packages/v2 API call

Solved
EC
Enric Correa Yusa
mercadona001

Hello,

We are creating an APK package using the /packages/v2 API and setting:

"FileFlags": "DoNotUninstall"

However, when the profile is uninstalled, the APK is also removed from the device, so the flag does not seem to be respected.

We cannot verify the package configuration after upload because packages created via the API do not show the Files or Scripts tabs (see:
https://pulse.soti.net/community/thread/c040ed8e-f711-4e4f-a90c-2f3ed380bed7).

Is DoNotUninstall supported for APK packages created via this API, or is this expected behavior?

Thanks.

23 days ago
SOTI MobiControl
ANSWERS
U
UTMOD@SOTI
18 days ago

 

Hi Enric,

Good day

Hope you are doing well

APK packages created using the /packages/v2 API are currently created as binary-only packages and do not support file-level metadata such as PackageFiles and FileFlags. As a result, flags like do not Uninstall are not stored or enforced for API-created packages, which is why the Files and Scripts tabs are not visible in the console, the GET Packages API returns empty file information, and the APK is removed from the device when the profile is uninstalled.

Incase of any further concerns, please don't hesitate to reach out.

Have a great day ahead

Kind Regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

Solution
EC

Hi @UTMOD@SOTI,

Our requirement is to be able to create an APK-type package with the DoNotUninstall option enabled. Can we use API v1?

This is a very serious issue for our production environment and for the operation of the tool. Without this, we lose all the internal automation we have developed, which means having to carry out a large number of manual actions, with the associated costs.

We need you to indicate an alternative as soon as possible.

Thank you very much.

U
UTMOD@SOTI
18 days ago

Hi Enric

Good day

Thanks for posting on SOTI Pulse.  Thanks all for responding to the post

For further troubleshooting and Checking  (support@soti.net) kindly open a case and one of our support engineer will be there to assist you.

Incase of any further concerns, please don't hesitate to reach out.

Have a great day ahead

Kind Regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

RS
Rafael Schäfer Platinum Contributor
22 days ago

What if you grab the package information via API? Then you should see it's details in the response.

EC

Hi @Rafael Schäfer,

The tests I have carried out are the following:

1.- Create the package manually (checking the Do Not Uninstall option) + retrieve information via API: OK, we can see the flags.

        "LastVersion": {
            "$type": "PackageVersion",
            "Version": "1.0",
            "BuildVersion": "1.0",
            "OSVersion": "1-99",
            "Processor": "ALL",
            "Vendor": "",
            "Comment": "",
            "Size": 2021628,
            "ExtraSize": 0,
            "InstallPrompt": false,
            "PromptMessage": "",
            "PromptMessageTimeout": 10,
            "PackageFiles": [
                {
                    "$type": "PackageGroupFile",
                    "FileFlags": "DoNotUninstall, AllowUserUninstall",
                    "Destination": "%sdcard%",
                    "FileName": "viabrowser-6.0.0(20241106).apk",
                    "Size": 3027355
                }

2.- Create the package via API (with the DoNotUninstall flag) + retrieve information via API: KO, we do not see the information (so we cannot confirm what appears):

        "LastVersion": {
            "$type": "PackageVersion",
            "Version": "1.424",
            "BuildVersion": "1.0",
            "OSVersion": "2-20",
            "Processor": "ALL",
            "Vendor": "",
            "Comment": "",
            "Size": 47296097,
            "ExtraSize": 0,
            "InstallPrompt": false,
            "PromptMessage": "",
            "PromptMessageTimeout": 0,
            "PackageFiles": [],
            "ScriptFiles": [],
            "UploadDate": "2025-12-18T14:42:53.5Z",
            "UploadedBy": "svc_admin_api_soti",
            "Status": "Published",
            "MetaDataType": null
        }

It seems that the packages/v2 API has some visibility issues, both in the console (the Files and Script tabs do not appear, as I initially mentioned) and it also does not allow the GET packages API to list its contents.

Any idea?

Not really but vers younds like something to investigate with Soti support (including the creation of the package)

U
UTMOD@SOTI
20 days ago

Hi Enric,

Good day

Thanks for posting on SOTI Pulse . Can you kindly confirm if you had a chance to check the input shared by Rafael

Incase of any further concerns, please don't hesitate to reach out.

Have a great day ahead

Kind Regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |