/bootable/recovery/tests/unit/ |
D | asn1_decoder_test.cpp | 55 uint8_t data[] = { 0xA5, 0x02, 0x06, 0x01, 0x01 }; in TEST() local 56 asn1_context ctx(data, sizeof(data)); in TEST() 66 uint8_t data[] = { 0xA5, 0x03, 0x06, 0x01, 0x01 }; in TEST() local 67 asn1_context ctx(data, sizeof(data)); in TEST() 85 uint8_t data[] = { 0xA0, 0x03, 0x02, 0x01, 0x01, 0xA1, 0x03, 0x02, 0x01, 0x01, 0x06, 0x01, 0xA5 }; in TEST() local 86 asn1_context ctx(data, sizeof(data)); in TEST() 102 uint8_t data[] = { 0x30, 0x02, 0x06, 0x01, 0x01 }; in TEST() local 103 asn1_context ctx(data, sizeof(data)); in TEST() 112 uint8_t data[] = { 0x30, 0x03, 0x06, 0x01, 0x01 }; in TEST() local 113 asn1_context ctx(data, sizeof(data)); in TEST() [all …]
|
D | minui_test.cpp | 30 ASSERT_EQ(0, reinterpret_cast<uintptr_t>(surface->data()) % GRSurface::kSurfaceDataAlignment); in TEST() 48 image->data()[i] = rand() % 128; in TEST() 52 ASSERT_EQ(std::vector(image->data(), image->data() + image->data_size()), in TEST() 53 std::vector(image_copy->data(), image_copy->data() + image->data_size())); in TEST()
|
D | package_test.cpp | 67 ASSERT_TRUE(package->ReadFullyAtOffset(buffer.data(), file_content_.size(), 0)); in TEST_F() 70 ASSERT_TRUE(package->ReadFullyAtOffset(buffer.data(), file_content_.size() - 10, 10)); in TEST_F() 79 ASSERT_FALSE(package->ReadFullyAtOffset(buffer.data(), file_content_.size(), 10)); in TEST_F() 87 SHA1(reinterpret_cast<uint8_t*>(file_content_.data()), hash_size, expected_sha.data()); in TEST_F() 97 SHA1_Final(calculated_sha.data(), &ctx); in TEST_F() 113 ASSERT_EQ(0, ExtractToMemory(zip, &entry, extracted.data(), extracted.size())); in TEST_F()
|
D | fuse_provider_test.cpp | 71 ASSERT_TRUE(block_map_data->ReadBlockAlignedData(result.data(), 2000, 1)); in TEST() 75 ASSERT_TRUE(block_map_data->ReadBlockAlignedData(result.data(), 20000, 0)); in TEST() 99 ASSERT_FALSE(block_map_data->ReadBlockAlignedData(result.data(), 20000, 2)); in TEST() 100 ASSERT_TRUE(block_map_data->ReadBlockAlignedData(result.data(), 20000, 1)); in TEST()
|
/bootable/deprecated-ota/applypatch/ |
D | applypatch.cpp | 58 std::string data; in LoadFileContents() local 59 if (!android::base::ReadFileToString(filename, &data)) { in LoadFileContents() 64 file->data = std::vector<unsigned char>(data.begin(), data.end()); in LoadFileContents() 65 SHA1(file->data.data(), file->data.size(), file->sha1); in LoadFileContents() 83 if (!android::base::ReadFully(dev, buffer.data(), buffer.size())) { in ReadPartitionToBuffer() 87 SHA1(buffer.data(), buffer.size(), out->sha1); in ReadPartitionToBuffer() 89 out->data = std::move(buffer); in ReadPartitionToBuffer() 117 if (!android::base::WriteFully(fd, file->data.data(), file->data.size())) { in SaveFileContents() 118 PLOG(ERROR) << "Failed to write " << file->data.size() << " bytes of data to " << filename; in SaveFileContents() 137 const unsigned char* data = file_contents.data.data(); in WriteBufferToPartition() local [all …]
|
D | imgpatch.cpp | 82 &ret, &sink](const uint8_t* data, size_t len) -> size_t { in ApplyBSDiffPatchAndStreamOutput() argument 85 strm.next_in = data; in ApplyBSDiffPatchAndStreamOutput() 89 strm.next_out = buffer.data(); in ApplyBSDiffPatchAndStreamOutput() 103 if (sink(buffer.data(), have) != have) { in ApplyBSDiffPatchAndStreamOutput() 144 if (patch.data.size() < 12) { in ApplyImagePatch() 151 const char* const patch_header = patch.data.data(); in ApplyImagePatch() 161 if (pos + 4 > patch.data.size()) { in ApplyImagePatch() 171 if (pos > patch.data.size()) { in ApplyImagePatch() 193 if (pos > patch.data.size()) { in ApplyImagePatch() 200 if (pos + data_len > patch.data.size()) { in ApplyImagePatch() [all …]
|
D | bspatch.cpp | 70 CHECK_LE(patch_offset, patch.data.size()); in ApplyBSDiffPatch() 73 reinterpret_cast<const uint8_t*>(&patch.data[patch_offset]), in ApplyBSDiffPatch() 74 patch.data.size() - patch_offset, sink); in ApplyBSDiffPatch() 80 SHA1(reinterpret_cast<const uint8_t*>(patch.data.data() + patch_offset), in ApplyBSDiffPatch() 81 patch.data.size() - patch_offset, digest); in ApplyBSDiffPatch()
|
/bootable/libbootloader/gbl/libgbl/src/slots/ |
D | partition.rs | 69 data: MB, field 85 &mut self.data in get_mut_data() 90 &self.data in get_data() 119 let (data, cache_status) = match MB::validate(buffer) { in deserialize() 120 Ok(data) => (*data, CacheStatus::Clean), in deserialize() 124 SlotBlock { cache_status, boot_token: Some(boot_token), data, partition, partition_offset } in deserialize() 138 self.data.prepare_for_sync(); in sync_to_disk() 161 data: Default::default(), in default()
|
/bootable/libbootloader/gbl/libstorage/src/ |
D | lib.rs | 248 data: &mut [u8], in write_blocks() 386 fn write(&mut self, offset: u64, data: &mut [u8]) -> Result<()> { in write() 388 write_bytes_mut(io, offset, data, alignment_scratch) in write() 467 fn write_gpt_partition(&mut self, part_name: &str, offset: u64, data: &mut [u8]) -> Result<()> { in write_gpt_partition() 469 check_gpt_rw_params(gpt_buffer, part_name, offset, data.len()) in write_gpt_partition() 471 self.write(offset, data) in write_gpt_partition() 742 data: &mut [u8], in write_aligned_all() 744 let blk_offset = check_range(blk_io, offset, data)?; in write_aligned_all() 745 Ok(blk_io.write_blocks(blk_offset.try_into()?, data)?) in write_aligned_all() 754 data: &mut [u8], in write_aligned_offset_and_buffer() [all …]
|
D | testlib.rs | 89 pub fn new(block_size: u64, alignment: u64, data: Vec<u8>) -> Self { in new() 90 Self { block_size, alignment, storage: data, num_writes: 0, num_reads: 0, io: None } in new() 109 fn write_blocks(&mut self, blk_offset: u64, data: &mut [u8]) -> Result<(), BlockIoError> { in write_blocks() 110 BlockIo::write_blocks(&mut (self as &mut dyn NonBlockingBlockIo), blk_offset, data) in write_blocks() 224 fn from(data: &[u8]) -> Self { in from() 225 TestBlockDeviceBuilder::new().set_data(data).build() in from() 349 pub fn set_data(mut self, data: &'a [u8]) -> Self { in set_data() 350 self.disk_description = DiskDescription::Disk(BackingStore::Data(data)); in set_data() 415 let mut data = [0; GPT_NAME_LEN_U16]; localVariable 417 for (d, t) in std::iter::zip(data.iter_mut(), tmp) { [all …]
|
/bootable/libbootloader/gbl/libelf/ |
D | elf_static_relocation_checker.cpp | 37 elf_file.read(reinterpret_cast<char*>(ret.data()), file_size); in ReadFile() 69 memcpy(&elf_header, elf_file.data(), sizeof(elf_header)); in main() 72 const uint8_t* program_hdr_start = elf_file.data() + elf_header.e_phoff; in main() 77 ASSERT(static_cast<size_t>(header_start + sizeof(elf_program_header) - elf_file.data()) <= in main() 95 return ApplyRelocation(reinterpret_cast<uintptr_t>(bin_file.data()), in main() 96 reinterpret_cast<uintptr_t>(bin_file.data() + *dynamic_section_offset)) in main()
|
/bootable/recovery/fuse_sideload/ |
D | fuse_sideload.cpp | 98 static void fuse_reply(const fuse_data* fd, uint64_t unique, const void* data, size_t len) { in fuse_reply() argument 107 vec[1].iov_base = const_cast<void*>(data); in fuse_reply() 116 static int handle_init(void* data, fuse_data* fd, const fuse_in_header* hdr) { in handle_init() argument 117 const fuse_init_in* req = static_cast<const fuse_init_in*>(data); in handle_init() 184 static int handle_lookup(void* data, const fuse_data* fd, const fuse_in_header* hdr) { in handle_lookup() argument 185 if (data == nullptr) return -ENOENT; in handle_lookup() 191 std::string filename(static_cast<const char*>(data)); in handle_lookup() 261 SHA256(fd->block_data, fd->block_size, hash.data()); in fetch_block() 279 static int handle_read(void* data, fuse_data* fd, const fuse_in_header* hdr) { in handle_read() argument 282 const fuse_read_in* req = static_cast<const fuse_read_in*>(data); in handle_read() [all …]
|
/bootable/recovery/minadbd/ |
D | minadbd_services_test.cpp | 67 ASSERT_TRUE(android::base::ReadFully(fd, received.data(), kMinadbdMessageSize)); in ReadAndCheckCommandMessage() 70 memcpy(expected.data(), kMinadbdCommandPrefix, strlen(kMinadbdCommandPrefix)); in ReadAndCheckCommandMessage() 71 memcpy(expected.data() + strlen(kMinadbdCommandPrefix), &expected_command, in ReadAndCheckCommandMessage() 103 memcpy(status_message.data(), kMinadbdStatusPrefix, strlen(kMinadbdStatusPrefix)); in WriteMinadbdCommandStatus() 104 memcpy(status_message.data() + strlen(kMinadbdStatusPrefix), &status, sizeof(status)); in WriteMinadbdCommandStatus() 106 android::base::WriteFully(recovery_socket_, status_message.data(), kMinadbdMessageSize)); in WriteMinadbdCommandStatus() 178 if (!android::base::ReadFully(fd, content_from_fuse.data(), 4096)) { in TEST_F() 195 ASSERT_TRUE(android::base::ReadFully(fd, adb_message.data(), 8)); in TEST_F() 197 ASSERT_TRUE(android::base::WriteFully(fd, content.data(), 4096)); in TEST_F()
|
D | fuse_adb_provider_test.cpp | 35 FuseAdbDataProvider data(std::move(device_socket), 0, 0); in TEST() local 49 ASSERT_TRUE(data.ReadBlockAlignedData(reinterpret_cast<uint8_t*>(block_data), in TEST() 75 FuseAdbDataProvider data(std::move(device_socket), 0, 0); in TEST() local 84 ASSERT_FALSE(data.ReadBlockAlignedData(reinterpret_cast<uint8_t*>(buf), 1, 0)); in TEST()
|
/bootable/deprecated-ota/tests/unit/ |
D | applypatch_modes_test.cpp | 41 std::string data; in GetEmmcTargetString() local 42 if (!android::base::ReadFileToString(filename, &data)) { in GetEmmcTargetString() 48 SHA1(reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), digest); in GetEmmcTargetString() 51 std::to_string(data.size()) + ":" + print_sha1(digest); in GetEmmcTargetString() 82 return applypatch_modes(args_to_call.size() - 1, args_to_call.data()); in InvokeApplyPatchModes() 143 bsdiff::bsdiff(reinterpret_cast<const uint8_t*>(src_content.data()), src_content.size(), in TEST_F() 144 reinterpret_cast<const uint8_t*>(tgt_content.data()), tgt_content.size(), in TEST_F()
|
D | updater_test.cpp | 100 ASSERT_EQ(0, zip_writer.WriteBytes(entry.second.data(), entry.second.size())); in BuildUpdatePackage() 111 SHA1(reinterpret_cast<const uint8_t*>(content.data()), content.size(), digest); in GetSha1() 190 ASSERT_TRUE(android::base::ParseInt(line.data(), &received_cause_code)); in RunBlockImageUpdate() 361 std::string data; in TEST_F() local 362 ASSERT_TRUE(android::base::ReadFileToString(temp_file1.path, &data)); in TEST_F() 363 ASSERT_EQ(kATxtContents, data); in TEST_F() 369 ASSERT_TRUE(android::base::ReadFileToString(temp_file1.path, &data)); in TEST_F() 370 ASSERT_EQ(kBTxtContents, data); in TEST_F() 415 std::string data; in TEST_F() local 417 data += std::string(4096, i); in TEST_F() [all …]
|
D | applypatch_test.cpp | 52 source_size = boot_fc.data.size(); in SetUp() 58 target_size = recovery_fc.data.size(); in SetUp() 138 Value patch(Value::Type::BLOB, std::string(patch_fc.data.cbegin(), patch_fc.data.cend())); in TEST_F() 142 Value bonus(Value::Type::BLOB, std::string(bonus_fc.data.cbegin(), bonus_fc.data.cend())); in TEST_F() 152 Value patch(Value::Type::BLOB, std::string(patch_fc.data.cbegin(), patch_fc.data.cend())); in TEST_F()
|
/bootable/deprecated-ota/tests/unit/host/ |
D | imgdiff_test.cpp | 41 const char* data = patch.data(); in verify_patch_header() local 44 ASSERT_EQ("IMGDIFF2", std::string(data, 8)); in verify_patch_header() 46 const int num_chunks = get_unaligned<int32_t>(data + 8); in verify_patch_header() 56 int type = get_unaligned<int32_t>(data + pos); in verify_patch_header() 64 ssize_t data_len = get_unaligned<int32_t>(data + pos); in verify_patch_header() 85 ASSERT_EQ(0, ApplyImagePatch(reinterpret_cast<const unsigned char*>(src.data()), src.size(), in GenerateTarget() 86 reinterpret_cast<const unsigned char*>(patch.data()), patch.size(), in GenerateTarget() 87 [&](const unsigned char* data, size_t len) { in GenerateTarget() argument 88 patched->append(reinterpret_cast<const char*>(data), len); in GenerateTarget() 130 ASSERT_EQ(0, imgdiff(args.size(), args.data())); in TEST() [all …]
|
/bootable/recovery/minui/ |
D | resources.cpp | 62 memcpy(result->data(), data(), data_size_); in Clone() 235 png_read_row(png_ptr, p_row.data(), nullptr); in res_create_display_surface() 236 TransformRgbToDraw(p_row.data(), surface->data() + y * surface->row_bytes, in res_create_display_surface() 309 png_read_row(png_ptr, p_row.data(), nullptr); in res_create_multi_display_surface() 311 uint8_t* out_row = surface[frame]->data() + (y / *frames) * surface[frame]->row_bytes; in res_create_multi_display_surface() 312 TransformRgbToDraw(p_row.data(), out_row, png_handler.channels(), width); in res_create_multi_display_surface() 349 uint8_t* p_row = surface->data() + y * surface->row_bytes; in res_create_alpha_surface() 404 png_read_row(png_handler.png_ptr(), row.data(), nullptr); in get_locales_in_png() 411 png_read_row(png_handler.png_ptr(), row.data(), nullptr); in get_locales_in_png() 439 png_read_row(png_ptr, row.data(), nullptr); in res_create_localized_alpha_surface() [all …]
|
/bootable/libbootloader/gbl/efi/arch/riscv64/ |
D | riscv64_efi.lds | 35 .data.rel.ro : { *(.data.rel.ro*) } 46 .data : { 48 *(.data*) 52 Tranditionally bss section are stuffed into .data section becase
|
/bootable/libbootloader/gbl/libefi/src/protocol/ |
D | android_boot.rs | 77 pub fn fastboot_usb_send(&self, data: &[u8], out_size: &mut usize) -> EfiResult<()> { in fastboot_usb_send() 78 *out_size = data.len(); in fastboot_usb_send() 89 data.as_ptr() as _, in fastboot_usb_send()
|
/bootable/recovery/minui/include/minui/ |
D | minui.h | 51 virtual uint8_t* data() { in data() function 55 const uint8_t* data() const { in data() function 56 return const_cast<const uint8_t*>(const_cast<GRSurface*>(this)->data()); in data() 75 void operator()(uint8_t* data) { in operator() 76 free(data); in operator()
|
/bootable/deprecated-ota/updater/ |
D | blockimg.cpp | 253 size_t Write(const uint8_t* data, size_t size) { in Write() argument 271 if (!android::base::WriteFully(fd_, data, write_now)) { in Write() 277 data += write_now; in Write() 362 static bool receive_new_data(const uint8_t* data, size_t size, void* cookie) { in receive_new_data() argument 381 if (nti->writer->Write(data, write_now) != write_now) { in receive_new_data() 386 data += write_now; in receive_new_data() 402 static bool receive_brotli_new_data(const uint8_t* data, size_t size, void* cookie) { in receive_brotli_new_data() argument 433 nti->brotli_decoder_state, &available_in, &data, &available_out, &next_out, nullptr); in receive_brotli_new_data() 490 if (!android::base::ReadFully(fd, buffer->data() + p, size)) { in ReadBlocks() 515 if (!android::base::WriteFully(fd, buffer.data() + written, size)) { in WriteBlocks() [all …]
|
/bootable/recovery/ |
D | recovery-persist.rc | 1 on post-fs-data 2 mkdir /data/misc/recovery 0770 system log
|
/bootable/recovery/updater_sample/src/com/example/android/systemupdatersample/util/ |
D | FileDownloader.java | 73 byte[] data = new byte[4096]; in download() 77 int count = input.read(data, 0, needToRead); in download() 81 output.write(data, 0, count); in download()
|