fvm

  1. usage: fvm [ output_path ] [ command ] [ <flags>* ] [ <input_paths>* ]
  2. fvm performs host-side FVM and sparse file creation

Commands:

  1. create : Creates an FVM partition
  2. add : Adds a Minfs or Blobfs partition to an FVM (input path is required)
  3. extend : Extends an FVM container to the specified size (length is required)
  4. ftl-raw-nand: converts the input fvm.sparse.blk into a FTL Raw Nand Image (--sparse is required).
  5. sparse : Creates a sparse file. One or more input paths are required.
  6. pave : Creates an FVM container from a sparse file.
  7. verify : Report basic information about sparse/fvm files and run fsck on contained partitions.
  8. check : verifies that the |--sparse| image provided is valid. if |--max_disk_size| is provided check that the maximum disk size is set to such value in the sparse image.
  9. size : Prints the minimum size required in order to pave a sparse file. If the --disk flag is provided, instead checks that the paved sparse file will fit within a disk of this size. On success, no information is outputted
  10. used-data-size : Prints sum of the space, in bytes, used by data on
  11. different partitions. This does not include blocks used internally for
  12. superblock, bitmaps, inodes, or for journal,
  13. used-inodes : Prints the sum of used inodes on different partitions.
  14. used-size : Prints sum of the space, in bytes, used by data and by
  15. superblock, bitmaps, inodes, and journal different partitions. All of the
  16. reservations for non-data blocks are considered as used.
  17. decompress : Decompresses a compressed sparse/raw file. --sparse/lz4/default input path is required. If option is set to --default, the tool will attempt to detect the input format
  18. Flags (neither or both of offset/length must be specified):
  19. --slice [bytes] - specify slice size - only valid on container creation.
  20. (default: 8388608)
  21. --max-disk-size [bytes] Used for preallocating metadata. Only valid for sparse image. (defaults to 0)
  22. --offset [bytes] - offset at which container begins (fvm only)
  23. --length [bytes] - length of container within file (fvm only)
  24. --compress - specify that file should be compressed (sparse and android sparse image only)
  25. --disk [bytes] - Size of target disk (valid for size command only)
  26. --disk-type [file, mtd OR block_device] - Type of target disk (pave only)
  27. --max-bad-blocks [number] - Max bad blocks for FTL (pave on mtd only)
  28. Input options:
  29. --blob [path] [reserve options] - Add path as blob type (must be blobfs)
  30. --data [path] [reserve options] - Add path as encrypted data type (must be minfs)
  31. --data-unsafe [path] - Add path as unencrypted data type (must be minfs)
  32. --system [path] - Add path as system type (must be minfs)
  33. --default [path] - Add generic path
  34. --sparse [path] - Path to compressed sparse file
  35. --lz4 [path] - Path to lz4 compressed raw file
  36. --raw [path] - Path to raw fvm image file
  37. --resize-image-file-to-fit - When used with create/extend command, the output image file will be resized to just fit the metadata header and added partitions. Disk size specified in the header remains the same. It's useful for reducing the size of the image file for flashing
  38. --android-sparse-format - When used with create command, the image will be converted to android sparse image.
  39. --length-is-lowerbound - When used with extend command, if current disk size is already no smaller than the specified size, the command will be no-op. If the option is not specified, it will error out in this case.
  40. reserve options:
  41. These options, on success, reserve additional fvm slices for data/inodes.
  42. The number of bytes reserved may exceed the actual bytes needed due to
  43. rounding up to slice boundary.
  44. --minimum-inodes inode_count - number of inodes to reserve
  45. Blobfs inode size is 64
  46. Minfs inode size is 256
  47. --minimum-data-bytes data_bytes - number of bytes to reserve for data
  48. in the fs
  49. Blobfs block size is 8192
  50. Minfs block size is 8192
  51. --maximum-bytes bytes - Places an upper bound of <bytes> on the total
  52. number of bytes which may be used by the partition.
  53. Returns an error if more space is necessary to
  54. create the requested filesystem.
  55. --with-empty-minfs - Adds a placeholder partition that will be formatted on boot,
  56. to minfs. The partition will be the 'data' partition.
  57. --nand-page-size : Sets the hardware page size in bytes used by the targetted device.
  58. --nand-oob-size : Sets the hardware page oob size in bytes used by the targetted device.
  59. --nand-pages-per-block : Sets the number of pages per block in the device.
  60. --nand-block-count : Sets the number of blocks in the device.