Home
last modified time | relevance | path

Searched refs:partition (Results 1 – 25 of 185) sorted by relevance

12345678

/system/update_engine/payload_consumer/
Dfilesystem_verifier_action.cc110 const InstallPlan::Partition& partition = in StartPartitionHashing() local
116 part_path = partition.source_path; in StartPartitionHashing()
117 partition_size_ = partition.source_size; in StartPartitionHashing()
120 part_path = partition.target_path; in StartPartitionHashing()
121 partition_size_ = partition.target_size; in StartPartitionHashing()
128 << partition.name << ") because size is 0."; in StartPartitionHashing()
134 << partition.name in StartPartitionHashing()
141 << partition.name << ") on device " << part_path; in StartPartitionHashing()
162 if (!verity_writer_->Init(partition)) { in StartPartitionHashing()
173 const InstallPlan::Partition& partition = in ScheduleRead() local
[all …]
Dinstall_plan.cc62 for (const auto& partition : partitions) { in Dump() local
66 partition.name.c_str(), in Dump()
67 partition.source_size, in Dump()
68 partition.target_size, in Dump()
69 utils::ToString(partition.run_postinstall).c_str()); in Dump()
114 for (Partition& partition : partitions) { in LoadPartitionsFromSlots()
116 partition.source_size > 0) { in LoadPartitionsFromSlots()
118 partition.name, source_slot, &partition.source_path) && in LoadPartitionsFromSlots()
121 partition.source_path.clear(); in LoadPartitionsFromSlots()
125 partition.target_size > 0) { in LoadPartitionsFromSlots()
[all …]
Dpostinstall_runner_action.cc79 auto& partition = install_plan_.partitions[i]; in PerformAction() local
80 if (!install_plan_.run_post_install && partition.postinstall_optional) { in PerformAction()
81 partition.run_postinstall = false; in PerformAction()
83 << partition.name << " according to install plan."; in PerformAction()
89 partition_weight_[i] = partition.run_postinstall; in PerformAction()
114 const InstallPlan::Partition& partition = in PerformPartitionPostinstall() local
117 const string mountable_device = partition.target_path; in PerformPartitionPostinstall()
119 LOG(ERROR) << "Cannot make mountable device from " << partition.target_path; in PerformPartitionPostinstall()
141 base::FilePath postinstall_path(partition.postinstall_path); in PerformPartitionPostinstall()
145 << partition.postinstall_path; in PerformPartitionPostinstall()
[all …]
Dverity_writer_stub.cc29 bool VerityWriterStub::Init(const InstallPlan::Partition& partition) { in Init() argument
30 return partition.hash_tree_size == 0 && partition.fec_size == 0; in Init()
Ddelta_performer.cc316 const PartitionUpdate& partition = partitions_[current_partition_]; in OpenCurrentPartition() local
334 << partition.partition_name() << " on slot " in OpenCurrentPartition()
354 << partition.partition_name() << " on slot " in OpenCurrentPartition()
360 LOG(INFO) << "Applying " << partition.operations().size() in OpenCurrentPartition()
361 << " operations to partition \"" << partition.partition_name() in OpenCurrentPartition()
385 const PartitionUpdate& partition = partitions_[current_partition_]; in OpenCurrentECCPartition() local
394 << partition.partition_name() << " on slot " in OpenCurrentECCPartition()
418 for (const PartitionUpdate& partition : partitions) { in LogPartitionInfo() local
419 if (partition.has_old_partition_info()) { in LogPartitionInfo()
420 LogPartitionInfoHash(partition.old_partition_info(), in LogPartitionInfo()
[all …]
/system/core/fs_mgr/
Dfs_mgr_dm_linear.cpp96 for (size_t i = 0; i < params.partition->num_extents; i++) { in CreateDmTableInternal()
97 const auto& extent = params.metadata->extents[params.partition->first_extent_index + i]; in CreateDmTableInternal()
124 if (params.partition->attributes & LP_PARTITION_ATTR_READONLY) { in CreateDmTableInternal()
159 for (const auto& partition : metadata.partitions) { in CreateLogicalPartitions() local
160 if (!partition.num_extents) { in CreateLogicalPartitions()
161 LINFO << "Skipping zero-length logical partition: " << GetPartitionName(partition); in CreateLogicalPartitions()
164 if (partition.attributes & LP_PARTITION_ATTR_DISABLED) { in CreateLogicalPartitions()
165 LINFO << "Skipping disabled partition: " << GetPartitionName(partition); in CreateLogicalPartitions()
169 params.partition = &partition; in CreateLogicalPartitions()
173 LERROR << "Could not create logical partition: " << GetPartitionName(partition); in CreateLogicalPartitions()
[all …]
/system/core/fs_mgr/liblp/
Dutility.cpp145 for (const auto& partition : metadata.partitions) { in FindPartition() local
146 if (GetPartitionName(partition) == name) { in FindPartition()
147 return &partition; in FindPartition()
153 uint64_t GetPartitionSize(const LpMetadata& metadata, const LpMetadataPartition& partition) { in GetPartitionSize() argument
155 for (uint32_t i = 0; i < partition.num_extents; i++) { in GetPartitionSize()
156 const auto& extent = metadata.extents[partition.first_extent_index + i]; in GetPartitionSize()
191 bool UpdatePartitionName(LpMetadataPartition* partition, const std::string& name) { in UpdatePartitionName() argument
192 if (name.size() > sizeof(partition->name)) { in UpdatePartitionName()
195 strncpy(partition->name, name.c_str(), sizeof(partition->name)); in UpdatePartitionName()
250 for (auto& partition : metadata->partitions) { in UpdateMetadataForInPlaceSnapshot() local
[all …]
Dbuilder.cpp333 for (const auto& partition : metadata.partitions) { in Init() local
334 std::string group_name = GetPartitionGroupName(metadata.groups[partition.group_index]); in Init()
336 AddPartition(GetPartitionName(partition), group_name, partition.attributes); in Init()
340 ImportExtents(builder, metadata, partition); in Init()
553 for (const auto& partition : partitions_) { in FindPartition() local
554 if (partition->name() == name) { in FindPartition()
555 return partition.get(); in FindPartition()
572 for (const auto& partition : partitions_) { in TotalSizeOfGroup() local
573 if (partition->group_name() != group->name()) { in TotalSizeOfGroup()
576 total += partition->BytesOnDisk(); in TotalSizeOfGroup()
[all …]
Dreader.cpp292 LpMetadataPartition partition; in ParseMetadata() local
293 memcpy(&partition, cursor, sizeof(partition)); in ParseMetadata()
296 if (partition.attributes & ~valid_attributes) { in ParseMetadata()
300 if (partition.first_extent_index + partition.num_extents < partition.first_extent_index) { in ParseMetadata()
304 if (partition.first_extent_index + partition.num_extents > header.extents.num_entries) { in ParseMetadata()
308 if (partition.group_index >= header.groups.num_entries) { in ParseMetadata()
313 metadata->partitions.push_back(partition); in ParseMetadata()
400 for (auto& partition : metadata->partitions) { in AdjustMetadataForSlot() local
401 if (!(partition.attributes & LP_PARTITION_ATTR_SLOT_SUFFIXED)) { in AdjustMetadataForSlot()
404 std::string partition_name = GetPartitionName(partition) + slot_suffix; in AdjustMetadataForSlot()
[all …]
Dbuilder_test.cpp51 Partition* partition = builder->AddPartition("system", LP_PARTITION_ATTR_READONLY); in TEST_F() local
52 ASSERT_NE(partition, nullptr); in TEST_F()
53 EXPECT_EQ(partition->name(), "system"); in TEST_F()
54 EXPECT_EQ(partition->attributes(), LP_PARTITION_ATTR_READONLY); in TEST_F()
55 EXPECT_EQ(partition->size(), 0); in TEST_F()
56 EXPECT_EQ(builder->FindPartition("system"), partition); in TEST_F()
304 Partition* partition = builder->AddPartition("system", LP_PARTITION_ATTR_READONLY); in TEST_F() local
305 ASSERT_NE(partition, nullptr); in TEST_F()
308 partition = builder->AddPartition("system", LP_PARTITION_ATTR_READONLY); in TEST_F()
309 EXPECT_EQ(partition, nullptr); in TEST_F()
[all …]
Dimages.cpp285 for (const auto& partition : metadata_.partitions) { in Build() local
286 auto iter = images_.find(GetPartitionName(partition)); in Build()
290 if (!AddPartitionImage(partition, iter->second)) { in Build()
313 bool ImageBuilder::AddPartitionImage(const LpMetadataPartition& partition, in AddPartitionImage() argument
316 uint32_t extent_index = partition.first_extent_index; in AddPartitionImage()
320 LERROR << "Partition should only have linear extents: " << GetPartitionName(partition); in AddPartitionImage()
326 LERROR << "Could not open image for partition: " << GetPartitionName(partition); in AddPartitionImage()
336 uint64_t partition_size = ComputePartitionSize(partition); in AddPartitionImage()
338 LERROR << "Image for partition '" << GetPartitionName(partition) in AddPartitionImage()
368 if (extent_index >= partition.first_extent_index + partition.num_extents) { in AddPartitionImage()
[all …]
/system/linkerconfig/generator/
Dvariableloader.cc93 std::string partition) { in LoadVariableFromPartitionPath() argument
94 auto real_path = GetRealPath(root + partition); in LoadVariableFromPartitionPath()
100 Variables::AddValue(variable_name, partition); in LoadVariableFromPartitionPath()
112 const std::string& partition) { in LoadVndkLibraryListVariables() argument
132 Variables::AddValue("LLNDK_LIBRARIES_" + partition, in LoadVndkLibraryListVariables()
136 Variables::AddValue("PRIVATE_LLNDK_LIBRARIES_" + partition, in LoadVndkLibraryListVariables()
140 Variables::AddValue("VNDK_SAMEPROCESS_LIBRARIES_" + partition, in LoadVndkLibraryListVariables()
144 Variables::AddValue("VNDK_CORE_LIBRARIES_" + partition, in LoadVndkLibraryListVariables()
148 Variables::AddValue("SANITIZER_DEFAULT_" + partition, in LoadVndkLibraryListVariables()
152 if (partition == "VENDOR") { in LoadVndkLibraryListVariables()
/system/linkerconfig/contents/tests/backward_compatibility/
Dtestbase.h23 inline void MockVndkVariables(std::string partition, std::string vndk_ver) { in MockVndkVariables() argument
26 Variables::AddValue(partition + "_VNDK_VERSION", vndk_ver); in MockVndkVariables()
27 Variables::AddValue("LLNDK_LIBRARIES_" + partition, "llndk_libraries"); in MockVndkVariables()
28 Variables::AddValue("PRIVATE_LLNDK_LIBRARIES_" + partition, in MockVndkVariables()
30 Variables::AddValue("VNDK_SAMEPROCESS_LIBRARIES_" + partition, in MockVndkVariables()
32 Variables::AddValue("VNDK_CORE_LIBRARIES_" + partition, "vndk_core_libraries"); in MockVndkVariables()
33 Variables::AddValue("SANITIZER_DEFAULT_" + partition, in MockVndkVariables()
/system/core/fs_mgr/libfiemap/
Dmetadata.cpp129 bool FillPartitionExtents(MetadataBuilder* builder, Partition* partition, SplitFiemap* file, in FillPartitionExtents() argument
154 if (!builder->AddLinearExtent(partition, block_device, num_sectors, physical_sector)) { in FillPartitionExtents()
188 auto partition = builder->FindPartition(partition_name); in UpdateMetadata() local
189 if (!partition) { in UpdateMetadata()
193 if ((partition = builder->AddPartition(partition_name, attrs)) == nullptr) { in UpdateMetadata()
198 partition->RemoveExtents(); in UpdateMetadata()
200 if (!FillPartitionExtents(builder.get(), partition, file, partition_size)) { in UpdateMetadata()
216 auto partition = builder->FindPartition(partition_name); in AddAttributes() local
217 if (!partition) { in AddAttributes()
220 partition->set_attributes(partition->attributes() | attributes); in AddAttributes()
/system/extras/partition_tools/
DREADME.md5 lpmake is a command-line tool for generating a "super" partition image. It can currently generate t…
11 * `-d,--device-size` - The size of the "super" partition on the device. It must match exactly, and …
12 * `-m,--metadata-size` - The maximum size that partition metadata may consume. A partition entry us…
14 * `-p,--partition=DATA` - Add a partition to the metadata. At least one partition must be defined. …
19 …is useful for devices with a minimum I/O request size where mis-aligned partition boundaries could…
20 * `--alignment-offset=N` - In some cases, the "super" partition is misaligned within its parent blo…
23 …or the partition named NAME. The file can be a normal file or a sparse image, but the destination …
25 Example usage. This specifies a 10GB super partition for an A/B device, with a single 64MiB "cache"…
38 lpdump displays pretty-printed partition metadata. It accepts a single argument, which can be:
49 lpadd is a command-line tool for adding images to a super.img file, or a partition to a super\_empt…
[all …]
Dlpdump.cc152 for (auto partition : builder->ListPartitionsInGroup(group_name)) { in MergeMetadata() local
153 auto partition_name = partition->name(); in MergeMetadata()
158 partition_proto->set_size(partition->size()); in MergeMetadata()
181 DynamicPartitionsDeviceInfoProto* proto, const std::string& partition) { in FindPartition() argument
183 if (p.name() == partition) { in FindPartition()
197 std::string partition = match[1]; in GetReadonlyPartitionName() local
198 return partition.empty() ? "system" : partition; in GetReadonlyPartitionName()
211 auto partition = GetReadonlyPartitionName(entry); in MergeFsUsage() local
212 if (!partition) { in MergeFsUsage()
225 auto partition_proto = FindPartition(proto, *partition); in MergeFsUsage()
[all …]
Dlpunpack.cc48 bool ExtractPartition(const LpMetadataPartition* partition);
199 for (const auto& partition : metadata_->partitions) { in BuildPartitionList() local
200 auto name = GetPartitionName(partition); in BuildPartitionList()
202 partition_map_[name] = &partition; in BuildPartitionList()
214 bool ImageExtractor::ExtractPartition(const LpMetadataPartition* partition) { in ExtractPartition() argument
217 for (uint32_t i = 0; i < partition->num_extents; i++) { in ExtractPartition()
218 uint32_t index = partition->first_extent_index + i; in ExtractPartition()
233 std::string output_path = output_dir_ + "/" + GetPartitionName(*partition) + ".img"; in ExtractPartition()
243 for (uint32_t i = 0; i < partition->num_extents; i++) { in ExtractPartition()
244 uint32_t index = partition->first_extent_index + i; in ExtractPartition()
/system/update_engine/payload_generator/
Dpayload_file.cc133 PartitionUpdate* partition = manifest_.add_partitions(); in WritePayload() local
134 partition->set_partition_name(part.name); in WritePayload()
136 partition->set_run_postinstall(true); in WritePayload()
138 partition->set_postinstall_path(part.postinstall.path); in WritePayload()
140 partition->set_filesystem_type(part.postinstall.filesystem_type); in WritePayload()
141 partition->set_postinstall_optional(part.postinstall.optional); in WritePayload()
145 *partition->mutable_hash_tree_data_extent() = in WritePayload()
147 *partition->mutable_hash_tree_extent() = part.verity.hash_tree_extent; in WritePayload()
148 partition->set_hash_tree_algorithm(part.verity.hash_tree_algorithm); in WritePayload()
150 partition->set_hash_tree_salt(part.verity.hash_tree_salt.data(), in WritePayload()
[all …]
/system/update_engine/scripts/
Dpayload_info.py74 for partition in manifest.partitions:
75 DisplayValue(' Number of "%s" ops' % partition.partition_name,
76 len(partition.operations))
170 for partition in manifest.partitions:
172 for curr_op in partition.operations:
183 read_blocks += partition.old_partition_info.size // manifest.block_size
184 read_blocks += partition.new_partition_info.size // manifest.block_size
209 for partition in self.payload.manifest.partitions:
210 self._DisplayOps('%s install operations' % partition.partition_name,
211 partition.operations)
/system/core/fastboot/
Dfastboot_driver.cpp76 RetCode FastBootDriver::CreatePartition(const std::string& partition, const std::string& size) { in CreatePartition() argument
77 return RawCommand(FB_CMD_CREATE_PARTITION ":" + partition + ":" + size, in CreatePartition()
78 "Creating '" + partition + "'"); in CreatePartition()
81 RetCode FastBootDriver::DeletePartition(const std::string& partition) { in DeletePartition() argument
82 return RawCommand(FB_CMD_DELETE_PARTITION ":" + partition, "Deleting '" + partition + "'"); in DeletePartition()
85 RetCode FastBootDriver::Erase(const std::string& partition, std::string* response, in Erase() argument
87 return RawCommand(FB_CMD_ERASE ":" + partition, "Erasing '" + partition + "'", response, info); in Erase()
90 RetCode FastBootDriver::Flash(const std::string& partition, std::string* response, in Flash() argument
92 return RawCommand(FB_CMD_FLASH ":" + partition, "Writing '" + partition + "'", response, info); in Flash()
114 RetCode FastBootDriver::ResizePartition(const std::string& partition, const std::string& size) { in ResizePartition() argument
[all …]
Dfastboot.cpp1009 static void copy_boot_avb_footer(const std::string& partition, struct fastboot_buffer* buf) { in copy_boot_avb_footer() argument
1015 if (fb->GetVar("partition-size:" + partition, &partition_size_str) != fastboot::SUCCESS) { in copy_boot_avb_footer()
1055 static void flash_buf(const std::string& partition, struct fastboot_buffer *buf) in flash_buf() argument
1059 if (partition == "boot" || partition == "boot_a" || partition == "boot_b") { in flash_buf()
1060 copy_boot_avb_footer(partition, buf); in flash_buf()
1065 if (partition == "vbmeta" || partition == "vbmeta_a" || partition == "vbmeta_b") { in flash_buf()
1068 (partition == "boot" || partition == "boot_a" || partition == "boot_b")) { in flash_buf()
1085 fb->FlashPartition(partition, pair.first, pair.second, i + 1, sparse_files.size()); in flash_buf()
1090 fb->FlashPartition(partition, buf->fd, buf->sz); in flash_buf()
1230 static bool is_logical(const std::string& partition) { in is_logical() argument
[all …]
/system/core/fs_mgr/libfs_avb/
Davb_ops.cpp49 static AvbIOResult read_from_partition(AvbOps* ops, const char* partition, int64_t offset, in read_from_partition() argument
52 partition, offset, num_bytes, buffer, out_num_read); in read_from_partition()
89 const char* partition ATTRIBUTE_UNUSED, in no_op_get_unique_guid_for_partition()
95 snprintf(guid_buf, guid_buf_size, "1234-fake-guid-for:%s", partition); in no_op_get_unique_guid_for_partition()
100 const char* partition ATTRIBUTE_UNUSED, in no_op_get_size_of_partition()
171 AvbIOResult FsManagerAvbOps::ReadFromPartition(const char* partition, int64_t offset, in ReadFromPartition() argument
174 std::string path = "/dev/block/by-name/"s + partition; in ReadFromPartition()
184 path = GetLogicalPath(partition); in ReadFromPartition()
/system/update_engine/scripts/update_payload/
Dtest_utils.py186 partition = next((x for x in self.manifest.partitions
188 if partition is None:
189 partition = self.manifest.partitions.add()
190 partition.partition_name = part_name
192 part_info = (partition.new_partition_info if is_new
193 else partition.old_partition_info)
201 partition = next((x for x in self.manifest.partitions
203 if partition is None:
204 partition = self.manifest.partitions.add()
205 partition.partition_name = part_name
[all …]
/system/core/fastboot/device/
Dutility.cpp115 for (const auto& partition : metadata.partitions) { in FindLogicalPartition() local
116 if (GetPartitionName(partition) == name) { in FindLogicalPartition()
117 return &partition; in FindLogicalPartition()
135 const LpMetadataPartition* partition = FindLogicalPartition(*metadata.get(), name); in LogicalPartitionExists() local
136 if (!partition) { in LogicalPartitionExists()
140 *is_zero_length = (partition->num_extents == 0); in LogicalPartitionExists()
192 for (const auto& partition : metadata->partitions) { in ListPartitions() local
193 std::string partition_name = GetPartitionName(partition); in ListPartitions()
/system/core/fs_mgr/libsnapshot/android/snapshot/
Dsnapshot.proto40 // logical partition; for example, "system_b".
55 // Size of the "COW partition". A COW partition is a special logical
56 // partition represented in the super partition metadata. This partition and
60 // blocks in the super partition, and use those before creating the COW
61 // image if the COW partition is not big enough.
63 // This value is 0 if no space in super is left for the COW partition.
69 // when the "COW partition" is not big enough to store changes to the

12345678