Home
last modified time | relevance | path

Searched refs:data (Results 1 – 25 of 40) sorted by relevance

12

/bootable/recovery/tests/unit/
Dasn1_decoder_test.cpp55 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 …]
/bootable/recovery/applypatch/
Dbspatch.cpp70 auto sha_sink = [&sink, &ctx](const uint8_t* data, size_t len) { in ApplyBSDiffPatch() argument
71 len = sink(data, len); in ApplyBSDiffPatch()
72 if (ctx) SHA1_Update(ctx, data, len); in ApplyBSDiffPatch()
76 CHECK_LE(patch_offset, patch.data.size()); in ApplyBSDiffPatch()
79 reinterpret_cast<const uint8_t*>(&patch.data[patch_offset]), in ApplyBSDiffPatch()
80 patch.data.size() - patch_offset, sha_sink); in ApplyBSDiffPatch()
86 SHA1(reinterpret_cast<const uint8_t*>(patch.data.data() + patch_offset), in ApplyBSDiffPatch()
87 patch.data.size() - patch_offset, digest); in ApplyBSDiffPatch()
Dapplypatch.cpp47 static size_t FileSink(const unsigned char* data, size_t len, int fd);
66 std::vector<unsigned char> data(sb.st_size); in LoadFileContents() local
73 size_t bytes_read = ota_fread(data.data(), 1, data.size(), f.get()); in LoadFileContents()
74 if (bytes_read != data.size()) { in LoadFileContents()
75 printf("short read of \"%s\" (%zu bytes of %zu)\n", filename, bytes_read, data.size()); in LoadFileContents()
78 file->data = std::move(data); in LoadFileContents()
79 SHA1(file->data.data(), file->data.size(), file->sha1); in LoadFileContents()
130 unsigned char* buffer_ptr = buffer.data(); in LoadPartitionContents()
182 file->data = std::move(buffer); in LoadPartitionContents()
196 size_t bytes_written = FileSink(file->data.data(), file->data.size(), fd); in SaveFileContents()
[all …]
Dimgpatch.cpp80 &ret, &ctx, &sink](const uint8_t* data, size_t len) -> size_t { in ApplyBSDiffPatchAndStreamOutput() argument
83 strm.next_in = data; in ApplyBSDiffPatchAndStreamOutput()
87 strm.next_out = buffer.data(); in ApplyBSDiffPatchAndStreamOutput()
101 if (sink(buffer.data(), have) != have) { in ApplyBSDiffPatchAndStreamOutput()
105 if (ctx) SHA1_Update(ctx, buffer.data(), have); in ApplyBSDiffPatchAndStreamOutput()
143 if (patch.data.size() < 12) { in ApplyImagePatch()
150 const char* const patch_header = patch.data.data(); in ApplyImagePatch()
160 if (pos + 4 > patch.data.size()) { in ApplyImagePatch()
170 if (pos > patch.data.size()) { in ApplyImagePatch()
190 if (pos > patch.data.size()) { in ApplyImagePatch()
[all …]
Dapplypatch_modes.cpp92 bonus.data = std::string(bonusFc.data.cbegin(), bonusFc.data.cend()); in PatchMode()
126 VAL_BLOB, std::string(files[i].data.cbegin(), files[i].data.cend()))); in PatchMode()
Dimgdiff.cpp271 return input_file_ptr_->data() + start_; in GetRawData()
276 return uncompressed_data_.data(); in DataForPatch()
301 void ImageChunk::SetUncompressedData(std::vector<uint8_t> data) { in SetUncompressedData() argument
302 uncompressed_data_ = std::move(data); in SetUncompressedData()
369 if (!android::base::ReadFully(patch_fd, patch_data->data(), sz)) { in MakePatch()
409 strm.next_in = uncompressed_data_.data(); in TryReconstruction()
420 strm.next_out = buffer.data(); in TryReconstruction()
428 if (memcmp(buffer.data(), input_file_ptr_->data() + start_ + offset, compressed_size) != 0) { in TryReconstruction()
444 PatchChunk::PatchChunk(const ImageChunk& tgt, const ImageChunk& src, std::vector<uint8_t> data) in PatchChunk() argument
453 data_(std::move(data)) {} in PatchChunk()
[all …]
/bootable/recovery/minadbd/
Dfuse_adb_provider_test.cpp30 adb_data data = {}; in TEST() local
34 data.sfd = sockets[0]; in TEST()
49 ASSERT_EQ(0, read_block_adb(data, block, reinterpret_cast<uint8_t*>(block_data), in TEST()
74 adb_data data = {}; in TEST() local
78 data.sfd = sockets[0]; in TEST()
87 ASSERT_EQ(-EIO, read_block_adb(data, 0, reinterpret_cast<uint8_t*>(buf), 1)); in TEST()
DREADME.md7 receives a single blob of data, writes it to a fixed filename, and
/bootable/recovery/minui/
Dgraphics_fbdev.cpp103 gr_framebuffer[0].data = static_cast<uint8_t*>(bits); in Init()
104 memset(gr_framebuffer[0].data, 0, gr_framebuffer[0].height * gr_framebuffer[0].row_bytes); in Init()
111 gr_framebuffer[1].data = in Init()
112 gr_framebuffer[0].data + gr_framebuffer[0].height * gr_framebuffer[0].row_bytes; in Init()
125 gr_draw->data = static_cast<unsigned char*>(malloc(gr_draw->height * gr_draw->row_bytes)); in Init()
126 if (!gr_draw->data) { in Init()
132 memset(gr_draw->data, 0, gr_draw->height * gr_draw->row_bytes); in Init()
153 memcpy(gr_framebuffer[0].data, gr_draw->data, gr_draw->height * gr_draw->row_bytes); in Flip()
163 free(gr_draw->data); in ~MinuiBackendFbdev()
Dgraphics.cpp103 return reinterpret_cast<uint32_t*>(surf->data) + y * row_pixels + x; in pixel_at()
105 return reinterpret_cast<uint32_t*>(surf->data) + x * row_pixels + (surf->width - y); in pixel_at()
107 return reinterpret_cast<uint32_t*>(surf->data) + (surf->height - 1 - y) * row_pixels + in pixel_at()
110 return reinterpret_cast<uint32_t*>(surf->data) + (surf->height - 1 - x) * row_pixels + y; in pixel_at()
155 uint8_t* src_p = font->texture->data + ((ch - ' ') * font->char_width) + in gr_text()
180 uint8_t* src_p = icon->data; in gr_texticon()
200 memset(gr_draw->data, gr_current & 0xff, gr_draw->height * gr_draw->row_bytes); in gr_clear()
202 uint32_t* px = reinterpret_cast<uint32_t*>(gr_draw->data); in gr_clear()
253 uint32_t* src_py = reinterpret_cast<uint32_t*>(source->data) + sy * source->row_bytes / 4 + sx; in gr_blit()
267 unsigned char* src_p = source->data + sy * source->row_bytes + sx * source->pixel_bytes; in gr_blit()
[all …]
Dresources.cpp46 surface->data = temp + sizeof(GRSurface) + in malloc_surface()
260 png_read_row(png_ptr, p_row.data(), nullptr); in res_create_display_surface()
261 transform_rgb_to_draw(p_row.data(), surface->data + y * surface->row_bytes, in res_create_display_surface()
331 png_read_row(png_ptr, p_row.data(), nullptr); in res_create_multi_display_surface()
333 unsigned char* out_row = surface[frame]->data + (y / *frames) * surface[frame]->row_bytes; in res_create_multi_display_surface()
334 transform_rgb_to_draw(p_row.data(), out_row, png_handler.channels(), width); in res_create_multi_display_surface()
379 unsigned char* p_row = surface->data + y * surface->row_bytes; in res_create_alpha_surface()
426 png_read_row(png_handler.png_ptr(), row.data(), nullptr); in get_locales_in_png()
433 png_read_row(png_handler.png_ptr(), row.data(), nullptr); in get_locales_in_png()
461 png_read_row(png_ptr, row.data(), nullptr); in res_create_localized_alpha_surface()
[all …]
Dgraphics_adf.cpp48 surf->data = static_cast<uint8_t*>( in SurfaceInit()
50 if (surf->data == MAP_FAILED) { in SurfaceInit()
187 munmap(surf->data, surf->pitch * surf->height); in SurfaceDestroy()
Devents.cpp92 ev.data.ptr = &ev_fdinfo[ev_count]; in ev_init()
129 ev.data.ptr = static_cast<void*>(&ev_fdinfo[ev_count]); in ev_add_fd()
160 fd_info* fdi = static_cast<fd_info*>(polledevents[n].data.ptr); in ev_dispatch()
Dgraphics_drm.cpp70 if (surface->data) { in DrmDestroySurface()
71 munmap(surface->data, surface->row_bytes * surface->height); in DrmDestroySurface()
167 surface->data = static_cast<unsigned char*>(mmap(nullptr, surface->height * surface->row_bytes, in DrmCreateSurface()
170 if (surface->data == MAP_FAILED) { in DrmCreateSurface()
/bootable/recovery/
Drecovery-persist.rc1 on post-fs-data
2 mkdir /data/misc/recovery 0770 system log
DREADME.md21 adb sync data
24 adb shell /data/nativetest/recovery_unit_test/recovery_unit_test
25 adb shell /data/nativetest/recovery_component_test/recovery_component_test
28 adb shell /data/nativetest64/recovery_unit_test/recovery_unit_test
29 adb shell /data/nativetest64/recovery_component_test/recovery_component_test
41 contents of pmsg buffer into /data/misc/recovery/inject.txt. Test will pass if
47 1. `adb sync data` to make sure the test-dir has the images to test.
116 (because such authorization data stays in /data, which recovery doesn't mount), nor does it support
/bootable/recovery/tests/component/
Dimgdiff_test.cpp43 const char* data = patch.data(); in verify_patch_header() local
46 ASSERT_EQ("IMGDIFF2", std::string(data, 8)); in verify_patch_header()
48 const int num_chunks = get_unaligned<int32_t>(data + 8); in verify_patch_header()
58 int type = get_unaligned<int32_t>(data + pos); in verify_patch_header()
66 ssize_t data_len = get_unaligned<int32_t>(data + pos); in verify_patch_header()
87 ASSERT_EQ(0, ApplyImagePatch(reinterpret_cast<const unsigned char*>(src.data()), src.size(), in GenerateTarget()
88 reinterpret_cast<const unsigned char*>(patch.data()), patch.size(), in GenerateTarget()
89 [&](const unsigned char* data, size_t len) { in GenerateTarget() argument
90 patched->append(reinterpret_cast<const char*>(data), len); in GenerateTarget()
132 ASSERT_EQ(0, imgdiff(args.size(), args.data())); in TEST()
[all …]
Dapplypatch_test.cpp47 std::string data; in sha1sum() local
48 ASSERT_TRUE(android::base::ReadFileToString(fname, &data)); in sha1sum()
51 *fsize = data.size(); in sha1sum()
55 SHA1(reinterpret_cast<const uint8_t*>(data.c_str()), data.size(), digest); in sha1sum()
231 ASSERT_EQ(0, applypatch_modes(args.size(), args.data())); in TEST_F()
245 ASSERT_EQ(0, applypatch_modes(args2.size(), args2.data())); in TEST_F()
268 ASSERT_EQ(0, applypatch_modes(args3.size(), args3.data())); in TEST_F()
292 bsdiff::bsdiff(reinterpret_cast<const uint8_t*>(src_content.data()), src_content.size(), in TEST_F()
293 reinterpret_cast<const uint8_t*>(tgt_content.data()), tgt_content.size(), in TEST_F()
309 ASSERT_EQ(0, applypatch_modes(args.size(), args.data())); in TEST_F()
[all …]
Dinstall_test.cpp77 ASSERT_EQ(0, writer.WriteBytes(content.data(), content.size())); in TEST()
93 ASSERT_EQ(0, writer2.WriteBytes(content.data(), content.size())); in TEST()
127 ASSERT_EQ(0, compatibility_zip_writer.WriteBytes(malformed_xml.data(), malformed_xml.size())); in TEST()
140 writer.WriteBytes(compatibility_zip_content.data(), compatibility_zip_content.size())); in TEST()
171 ASSERT_EQ(0, compatibility_zip_writer.WriteBytes(system_manifest_xml_content.data(), in TEST()
185 writer.WriteBytes(compatibility_zip_content.data(), compatibility_zip_content.size())); in TEST()
211 ASSERT_EQ(0, writer.WriteBytes(properties.data(), properties.size())); in VerifyAbUpdateBinaryCommand()
226 ASSERT_EQ(0, writer.WriteBytes(metadata.data(), metadata.size())); in VerifyAbUpdateBinaryCommand()
322 ASSERT_EQ(0, writer.WriteBytes(metadata.data(), metadata.size())); in TEST()
Dupdater_test.cpp87 ASSERT_EQ(0, zip_writer.WriteBytes(entry.second.data(), entry.second.size())); in BuildUpdatePackage()
278 std::string data; in TEST_F() local
279 ASSERT_TRUE(android::base::ReadFileToString(temp_file1.path, &data)); in TEST_F()
280 ASSERT_EQ(kATxtContents, data); in TEST_F()
286 ASSERT_TRUE(android::base::ReadFileToString(temp_file1.path, &data)); in TEST_F()
287 ASSERT_EQ(kBTxtContents, data); in TEST_F()
457 ASSERT_EQ(0, bsdiff::bsdiff(reinterpret_cast<const uint8_t*>(src_content.data()),
458 src_content.size(), reinterpret_cast<const uint8_t*>(tgt_content.data()),
Dverifier_test.cpp135 verify_file(reinterpret_cast<const unsigned char*>(package.data()), package.size(), in TEST()
155 verify_file(reinterpret_cast<const unsigned char*>(altered1.data()), altered1.size(), in TEST()
161 verify_file(reinterpret_cast<const unsigned char*>(altered2.data()), altered2.size(), in TEST()
176 ASSERT_EQ(VERIFY_FAILURE, verify_file(reinterpret_cast<const unsigned char*>(package.data()), in TEST()
/bootable/recovery/edify/
DREADME.md93 file_exists("/data/system/bad") && delete("/data/system/bad")
95 file_exists("/data/system/missing") || create("/data/system/missing")
/bootable/recovery/etc/
Dinit.rc11 export ANDROID_DATA /data
22 mkdir /data
66 trigger post-fs-data
/bootable/recovery/tools/recovery_l10n/
DREADME.md24 adb root && adb pull /data/data/com.android.recovery_l10n/files/text-out.png
/bootable/recovery/applypatch/include/applypatch/
Dapplypatch.h34 std::vector<unsigned char> data; member

12