Home | History | Annotate | Download | only in fastboot

Lines Matching defs:partition

155     fprintf(stderr, "unknown partition '%s'\n", item.c_str());
342 " flash <partition> [ <filename> ] Write a file to a flash partition.\n"
345 " any partition except\n"
358 " erase <partition> Erase a flash partition.\n"
359 " format[:[<fs type>][:[<size>]] <partition>\n"
360 " Format a flash partition. Can\n"
367 " flash:raw <bootable-partition> <kernel> [ <ramdisk> [ <second> ] ]\n"
385 " if supported by partition type).\n"
386 " -u Do not erase partition before\n"
662 // "require partition-exists=vendor"
689 // "require partition-exists=x" is a special case, added because of the trouble we had when
691 // missing out new partitions. A device with new partitions can use "partition-exists" to
693 if (!strcmp(name, "partition-exists")) {
698 die("device doesn't have required partition %s!", partition_name);
708 die("device requires partition %s which is not known to this version of fastboot",
823 static bool needs_erase(Transport* transport, const char* partition) {
825 partition-type:") + partition, &partition_type)) {
913 static void flash_buf(const std::string& partition, struct fastboot_buffer *buf)
919 (partition == "vbmeta" || partition == "vbmeta_a" || partition == "vbmeta_b")) {
935 fb_queue_flash_sparse(partition, pair.first, pair.second, i + 1, sparse_files.size());
940 fb_queue_flash_fd(partition, buf->fd, buf->sz);
1084 /* This function will find the real partition name given a base name, and a slot. If slot is NULL or
1086 * partition names. If force_slot is true, it will fail if a slot is specified, and the given
1087 * partition does not support slots.
1095 die("Could not check if partition %s has slot %s", part.c_str(), slot.c_str());
1203 auto update = [&](const std::string& partition) {
1205 if (erase_first && needs_erase(transport, partition.c_str())) {
1206 fb_queue_erase(partition);
1208 flash_buf(partition.c_str(), &buf);
1285 auto flashall = [&](const std::string &partition) {
1287 if (erase_first && needs_erase(transport, partition.c_str())) {
1288 fb_queue_erase(partition);
1290 flash_buf(partition.c_str(), &buf);
1402 const std::string& partition, int skip_if_not_supported,
1421 if (!fb_getvar(transport, "partition-type:" + partition, &partition_type)) {
1422 errMsg = "Can't determine partition type.\n";
1428 partition.c_str(), partition_type.c_str(), type_override.c_str());
1433 if (!fb_getvar(transport, "partition-size:" + partition, &partition_size)) {
1434 errMsg = "Unable to get partition size\n";
1440 partition.c_str(), partition_size.c_str(), size_override.c_str());
1460 fprintf(stderr, "Couldn't parse partition size '%s'.\n", partition_size.c_str());
1470 die("Cannot generate image for %s", partition.c_str());
1483 flash_buf(partition, &buf);
1688 std::string partition = next_arg(&args);
1689 auto erase = [&](const std::string& partition) {
1691 if (fb_getvar(transport, std::string("partition-type:") + partition,
1694 fprintf(stderr, "******** Did you mean to fastboot format this %s partition?\n",
1698 fb_queue_erase(partition);
1700 do_for_partitions(transport, partition, slot_override, erase, true);
1715 std::string partition = next_arg(&args);
1717 auto format = [&](const std::string& partition) {
1718 if (erase_first && needs_erase(transport, partition.c_str())) {
1719 fb_queue_erase(partition);
1721 fb_perform_format(transport, partition, 0, type_override, size_override, "");
1723 do_for_partitions(transport, partition.c_str(), slot_override, format, true);
1773 auto flash = [&](const std::string &partition) {
1774 if (erase_first && needs_erase(transport, partition.c_str())) {
1775 fb_queue_erase(partition);
1777 do_flash(transport, partition.c_str(), fname.c_str());
1781 std::string partition = next_arg(&args);
1789 auto flashraw = [&](const std::string& partition) {
1790 fb_queue_flash(partition, data, sz);
1792 do_for_partitions(transport, partition, slot_override, flashraw, true);
1860 for (const auto& partition : partitions) {
1862 if (!fb_getvar(transport, std::string{"partition-type:"} + partition, &partition_type)) continue;
1864 fb_queue_erase(partition);
1865 if (partition == "userdata" && set_fbe_marker) {
1868 fb_perform_format(transport, partition, 1, "", "", initial_userdata_dir);
1871 fb_perform_format(transport, partition, 1, "", "", "");