Reference HTTPS model repository consumed by model_manager_service when it
uses the built-in cloud configuration manager and HTTPS downloader.
This document is the server-side contract: it defines the on-device server descriptor, the repository layout, every configuration field, and the rules a model server must follow.
The device keeps the server base URL in a read-only file shipped in the image:
/system/etc/cloud_config/mms_cloud_server.jsonetc/cloud_config/mms_cloud_server.json{
"serverBaseUrl": "https://gitcode.com/api/v5/repos/krzngon/model_repository_demo/raw/"
}| Field | Type | Required | Description |
|---|---|---|---|
serverBaseUrl | string | yes | Base URL all resources are joined onto. A trailing / is optional and is normalized on the device. |
The client derives every URL by simple path joining (exactly one separating
/), with no branch/query segment in the base:
<serverBaseUrl>support_models.json
<serverBaseUrl>models/<modelName>/v<major>/version.json
<serverBaseUrl>models/<modelName>/v<major>/<modelName>.zipFor this demo the base is the gitcode raw API and the repository's default
branch is served (no ?ref= is appended).
200 and the exact file bytes
(Content-Type is not relied upon). Redirects are followed (up to 5 hops).serverBaseUrl or version.json.support_models.json # support list (one file at the root)
README.md
models/
└── <modelName>/
└── v<major>/
├── <modelName>.zip # model package
└── version.json # descriptor of the published build<modelName> must be identical everywhere: directory name, ZIP file name,
the single member inside the ZIP, and modelName in both JSON files.v1, v2, ...). Each major
directory publishes only the latest version of that major. There is no
per-minor/patch directory and no history retention requirement on the server.models/ml_face_isface/v1/ carries the latest version of major 1
(v1.2.0); models/ml_face_isface/v2/ carries v2.0.0.support_models.jsonPulled synchronously whenever an update check is triggered, at most once per
24 hours (see §7). Served at <serverBaseUrl>support_models.json.
{
"modellist": [
{
"modelName": "ml_face_isface",
"enable": true,
"supportVersions": ["v1.2.0", "v2.0.0"],
"updateType": "HTTPS"
},
{
"modelName": "ml_face_gesture",
"enable": false,
"supportVersions": ["v1.0.0"],
"updateType": "HTTPS"
}
]
}Top-level object:
| Field | Type | Required | Description |
|---|---|---|---|
modellist | array | yes | Supported model entries. |
Each entry contains exactly these four fields; no other field is required or consumed:
| Field | Type | Required | Description |
|---|---|---|---|
modelName | string | yes | Unique model identifier. Non-empty; used for all paths. Entries with an invalid/missing name are skipped. |
enable | bool | yes | true = the model is available and downloadable. false = the model is unavailable and cannot be downloaded. |
supportVersions | string[] | yes | Every publishable version as canonical v<major>.<minor>.<patch>. List one latest version per major (e.g. v1.2.0, not v1.0.0/v1.1.0). Malformed version strings are ignored. |
updateType | string | yes | Must be "HTTPS". Entries with any other value are ignored by the cloud manager. |
version.jsonOne descriptor per major directory at
<serverBaseUrl>models/<modelName>/v<major>/version.json. It describes the
exact build published in that directory.
{
"modelType": "MSL",
"versionCode": "v1.2.0",
"checksum": "173acbe4d2923beb485adda152ea097df7e863b60ff75360e60e0973941128d6",
"packageSize": 152
}| Field | Type | Required | Description |
|---|---|---|---|
modelType | string | yes | Model package type. Currently only "MSL" is accepted; any other value is rejected. |
versionCode | string | yes | Exact version of the package, canonical v<major>.<minor>.<patch> (lowercase v, dot-separated decimal numbers). |
checksum | string | recommended | Whole-ZIP SHA-256 as a lowercase hex string. The device verifies the downloaded bytes against it; when absent/empty verification is skipped. |
packageSize | number | recommended | ZIP size in bytes (non-negative integer). |
packageUrl | string | no | Absolute download URL of the package. When absent or empty the device downloads <serverBaseUrl>models/<modelName>/v<major>/<modelName>.zip. Use this only for a stable, anonymous, long-lived URL (never an expiring signature). |
Because each major directory holds its latest version, versionCode is the
authoritative exact minor/patch (the device re-targets to it at download time).
<modelName>.zip)<modelName> with no
extension (e.g. ml_face_isface, not ml_face_isface.ms).versionInfo.xml and no XML of any kind; the HTTPS install path does
not parse XML.models/<modelName>/v<major>_<minor>_<patch>/ (dots in the version are
replaced with underscores). The staging ZIP is removed afterwards.v<major>.<minor>.<patch> (e.g. v1.2.0). The shorter
two-segment spelling v<major>.<minor> is also accepted, with the patch
treated as 0. This scheme is entirely separate from any legacy numeric
(10-digit) version scheme.v0.0.0.supportVersions:
v0.0.0): choose the overall latest version — greatest
major, then greatest minor, then greatest patch. Downloading a higher major
is allowed.install_models.json in its
sandbox from the merged support list. This file is produced on the device;
the server only ever serves support_models.json.enable=false means the model is unavailable and cannot be downloaded (see
§3).packageUrl instead.checksum (whole-ZIP SHA-256) so integrity can be
verified regardless of the transport.Note for this demo: the ZIPs are tiny and are committed as regular Git objects (not LFS) on purpose, so the gitcode raw API (
.../raw/<path>, default branch) serves them anonymously and stably.
| Model | Enabled | Published versions | Package contents |
|---|---|---|---|
ml_face_isface | true | v1.2.0 (models/.../v1), v2.0.0 (models/.../v2) | single file ml_face_isface |
ml_face_gesture | false | v1.0.0 (models/.../v1) | single file ml_face_gesture |
This set exercises same-major minor/patch updates (v1.0.0 → v1.2.0),
cross-major availability (v2.0.0), and the disabled/unavailable model case
(ml_face_gesture).