Skip to content
Fadil Fadz edited this page Oct 24, 2024 · 1 revision

Update Config

Update rules / config can help you to customize push packages behavior

you need to add json files at packages folder called rules.json

use this template for the content

{
  "RecommendedDate": "",
  "ForceFilterMode": false,
  "ForcePushAllMode": false,
  "ForcePushFeatures": false
}
  • RecommendedDate: will show the user device recommended date
  • ForceFilterMode: packages will be filtered by default (no question)
  • ForcePushAllMode: all packages will pushed by default (no question)
  • ForcePushFeatures: all attached feature will be pushed (no question)

Keep in minde that ForcePushFeatures will follow the default state for the feature.

Also ForcePushAllMode & ForceFilterMode will subject to Features state if users enable/disable options

by other mean, if you forced push all and user disabled a feature this feature will not be pushed

if your intent to push all packages with the default features then enable ForcePushFeatures too


Feature Cabs

Universal Updater allow to add feature cabs

those can help to make adding new OS features easy for the end user

the only thing you have to do after preparing your cabs is to attach info file

by default Universal Update will scan packages folder for any json file

so the name of the file is not important, but better to be relevant

Preparing Infos

You can do that with two ways:

  • Single info
  • Multiple info

Single Info

Use the following template for single info

{
  "Name": "Feature name",
  "Description": "",
  "Order": 0,
  "DescriptionColor": 8,
  "State": true,
  "ShouldPresent": false,
  "FeaturePackages": [
    {
      "PackageName": "Cab name for the feature (extention not required)",
      "ReplaceStock": false,
      "TargetStockName": null
    }
  ]
}

Multiple Info

Use the following template for multiple info

[
  {
    "Name": "Feature 1",
    "Description": "",
    "Order": 0,
    "DescriptionColor": 8,
    "State": false,
    "ShouldPresent": false,
    "FeaturePackages": [
      {
        "PackageName": "Cab name for feature 1 (extention not required)",
        "ReplaceStock": false,
        "TargetStockName": null
      }
    ]
  },
  {
    "Name": "Feature 2",
    "Description": "",
    "Order": 0,
    "DescriptionColor": 8,
    "State": true,
    "ShouldPresent": false,
    "FeaturePackages": [
      {
        "PackageName": "Cab A name for feature 2 (extention not required)",
        "ReplaceStock": false,
        "TargetStockName": null
      },
      {
        "PackageName": "Cab B name for feature 2 (extention not required)",
        "ReplaceStock": false,
        "TargetStockName": null
      }
    ]
  }
]

Structure Notes

  • DescriptionColor: (If any), check MS Docs for possible values
  • State: The default state of the feature
  • ShouldPresent: This will be decided by the app
  • If cab not presented feature will will not appear
  • Order: Default 0, Use any number, or minus value to force your feature at first
  • FeaturePackages: You can define multiple packages for each feature

Replace Stock Cab

If your cab is a replacement for stock cab, you must ensure that the original one is not pushed

to do that you will need proper configuration:

{
  "PackageName": "Cab name for the feature (extention not required)",
  "ReplaceStock": true,
  "TargetStockName": "Target stock cab (extention not required)"
}

TargetStockName will guide Univeral Updater to disable and skip the stock cab when ReplaceStock is true

Clone this wiki locally