Home > Develop > HTML5 Application > References

autorun.txt

Estimated reading time: 3 minutes

Files and Directories Structure

You can launch your HTML5 application by specifying auid in USB: /sony/autorun.txt.

When you connect a USB storage, BRAVIA Professional Display always checks /sony/autorun.txt. If it finds the file and auid, it also checks the value of auid in /sony/apps/webapps/<application_name>/app/manifest.json. If it finds the same auid with /sony/autorun.txt, it launches that application.

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

Key and Value Structure

autorun.txt is based on the JSON Key/Value format. The data types of all are string. “auid” is mandatory, and the others are optional.

The following is an example describing the all parameters with the default values.

{
  "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"
  }
}

The following is the detail of each parameter.

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: 26 Jul 2024