autorun.txt

Estimated reading time: 3 minutes

文件和目录结构

您可以通过指定来启动HTML5应用程序 auidUSB: /sony/autorun.txt.

当你连接一个USB存储器,BRAVIA商用显示器总是检查 /sony/autorun.txt. 如果它找到文件和 auid, 它还检查的值auid/sony/apps/webapps/<application_name>/app/manifest.json. 如果它发现相同 auid/sony/autorun.txt,它启动应用程序。

USB: /sony/
          +--- autorun.txt // auid
          +--- apps/webapps/
                           +--- <application_1>/app/manifest.json // auid_1
                           +--- <application_2>/app/manifest.json // auid_2
                           +--- :

键值结构

autorun.txt 基于JSON键/值格式。 所有数据类型都是字符串。 “auid”是强制的,其他的是可选的。

下面是一个用默认值描述所有参数的示例。

{
  "action": "auid",
  "auid": null, // Mandatory // "<auid>"
  "copyapp": {
    "app": null,            // "<auid>" or ["<auid_1>", "<auid_2>", ...]
    "media": "nocopy",
    "mode": "confirm",
    "startup_uri": null,    // "<auid>"
    "home_menu_app": "false"
  },
  "removeapp": {
    "app": null,            // "<auid>"
    "media": "keep",
    "mode": "confirm"
  }
}

下面是每个参数的详细信息。

Property Mandatory/
Optional
Default Value Description
action Optional auid Configure the behavior when an USB storage is connected.
  • auid : Launch an application identified by this property.
  • copyapp : Install an application to BRAVIA Professional Display.
  • removeapp : Uninstall an application from BRAVIA Professional Display.
auid Mandatory Identify auid (HTML5 Application Unique ID).
copyapp app Optional Define an auid or a list of auids to be installed.
media Optional nocopy The installation behavior on the USB /media directory.
  • copy : Copy contents from USB /media. If the same filename is found on BRAVIA Professional Display, they are overwritten with the one of USB /media.
  • sync : Sync between installed contents and USB /media contents. If the same filename is not found in USB /media, installed contents are removed.
  • nocopy : do nothing for USB /media.
mode Optional confirm Define UI behavior of an installation flow.
  • confirm : Show a dialog in the flow.
  • auto: Not to show a dialog in the flow.
  • dryrun: Not install an application, but launch an application defined in "startup_uri".
startup_uri Optional Identify auid for startup_uri
home_menu_app Optional false Enable the icon in Home Menu (Leanback Launcher).
  • If auid or uri is set to this property, the icon to launch it is enabled in Home Menu.
  • If false or empty string is set to this property, the icon is disabled.
removeapp app Optional Define an application information to be removed.
media Optional keep Define behavior of USB /media contents uninstallation.
  • keep : Not to uninstall media contents.
  • remove : Uninstall media contents.
mode Optional confirm Define UI behavior of uninstallation.
  • confirm : Show a dialog in an uninstalling flow.
  • auto: Not showing a dialog in an uninstalling flow.
  • purge: Uninstall all installed applications and media contents. And show dialog in an uninstalling flow.
Last modified: 25 Dec 2019