Skip to content

configkey: update.files

Tarek edited this page May 30, 2015 · 4 revisions
{
    "update": {
        "files": {
            "add": {
                "fs/data/misc/wifi/wpa_supplicant.conf": {
                    "destination": "/data/misc/wifi/wpa_supplicant.conf",
                    "gid": "1010",
                    "mode": "0660",
                    "uid": "1000"
                }
            },
            "rm": ["/system/app/app1.apk", "/system/app/app2.apk"],
            "rmdir": []
        }
    }
}

You can add any files to your update package and specify where it goes on the device. For each item under update.files.add, key is a relative path on your machine. Absolute paths are resolved with the config's "fs" directory as their root, and not the root of the machine's filesystem. If absolute path is used, inception will automatically infer the destination path. For example, a simpler version of the above config which achieves the same result:

{
    "update": {
        "files": {
            "add": {
                "/data/misc/wifi/wpa_supplicant.conf": {
                    "gid": "1010",
                    "mode": "0660",
                    "uid": "1000"
                }
            },
            "rm": ["/system/app/app1.apk", "/system/app/app2.apk"],
            "rmdir": []
        }
    }
}
  • update
    • files
      • add
        • localFilePath Path to file, relative to the declaring config. If it's an absolute path, it will be resolved with "FS" as root, and not the machine's filesystem's root.
          • destination [str]: Path on target device. Not required if localFilePath is absolute.
          • uid [str]: owner id
          • gid [str]: group id
          • mode [str]: file mode
          • mode_dirs [str]: dir mode, only in case it's a directory and should apply permissions recursively.
        • localFilePath_2
          • ...
      • rm [list]: List of file paths on the devices to remove
      • rmdir [list]: List of dir paths on the device to remove recursively