/bootable/recovery/tests/ |
D | asn1_decoder_test.cpp | 66 uint8_t data[] = { 0xA5, 0x02, 0x06, 0x01, 0x01, }; in TEST_F() local 67 asn1_context_t* ctx = asn1_context_new(data, sizeof(data)); in TEST_F() 79 uint8_t data[] = { 0xA5, 0x03, 0x06, 0x01, 0x01, }; in TEST_F() local 80 asn1_context_t* ctx = asn1_context_new(data, sizeof(data)); in TEST_F() 101 uint8_t data[] = { 0xA0, 0x03, 0x02, 0x01, 0x01, in TEST_F() local 104 asn1_context_t* ctx = asn1_context_new(data, sizeof(data)); in TEST_F() 122 uint8_t data[] = { 0x30, 0x02, 0x06, 0x01, 0x01, }; in TEST_F() local 123 asn1_context_t* ctx = asn1_context_new(data, sizeof(data)); in TEST_F() 134 uint8_t data[] = { 0x30, 0x03, 0x06, 0x01, 0x01, }; in TEST_F() local 135 asn1_context_t* ctx = asn1_context_new(data, sizeof(data)); in TEST_F() [all …]
|
/bootable/recovery/minzip/ |
D | Hash.c | 84 if (pEnt->data == HASH_TOMBSTONE) { in mzHashTableClear() 86 pEnt->data = NULL; in mzHashTableClear() 87 } else if (pEnt->data != NULL) { in mzHashTableClear() 90 (*pHashTable->freeFunc)(pEnt->data); in mzHashTableClear() 91 pEnt->data = NULL; in mzHashTableClear() 120 if (pHashTable->pEntries[i].data == HASH_TOMBSTONE) in countTombStones() 149 void* data = pHashTable->pEntries[i].data; in resizeHash() local 150 if (data != NULL && data != HASH_TOMBSTONE) { in resizeHash() 156 while (pNewEntries[newIdx].data != NULL) in resizeHash() 160 pNewEntries[newIdx].data = data; in resizeHash() [all …]
|
D | Hash.h | 37 typedef int (*HashForeachFunc)(void* data, void* arg); 51 void* data; member 148 void* data; member 156 void* data = pIter->pHashTable->pEntries[i].data; in mzHashIterNext() local 157 if (data != NULL && data != HASH_TOMBSTONE) in mzHashIterNext() 172 return pIter->pHashTable->pEntries[pIter->idx].data; in mzHashIterData()
|
D | Zip.c | 624 static bool crcProcessFunction(const unsigned char *data, int dataLen, in crcProcessFunction() argument 627 *(unsigned long *)crc = crc32(*(unsigned long *)crc, data, dataLen); in crcProcessFunction() 636 static bool copyProcessFunction(const unsigned char *data, int dataLen, in copyProcessFunction() argument 641 memcpy(args->buf, data, dataLen); in copyProcessFunction() 669 static bool writeProcessFunction(const unsigned char *data, int dataLen, in writeProcessFunction() argument 678 ssize_t n = TEMP_FAILURE_RETRY(write(fd, data+soFar, dataLen-soFar)); in writeProcessFunction() 681 dataLen-soFar, data+soFar, strerror(errno)); in writeProcessFunction() 715 static bool bufferProcessFunction(const unsigned char *data, int dataLen, in bufferProcessFunction() argument 719 memmove(bec->buffer, data, dataLen); in bufferProcessFunction()
|
/bootable/recovery/applypatch/ |
D | applypatch.c | 35 static ssize_t FileSink(const unsigned char* data, ssize_t len, void* token); 53 file->data = NULL; in LoadFileContents() 68 file->data = malloc(file->size); in LoadFileContents() 73 free(file->data); in LoadFileContents() 74 file->data = NULL; in LoadFileContents() 78 ssize_t bytes_read = fread(file->data, 1, file->size, f); in LoadFileContents() 82 free(file->data); in LoadFileContents() 83 file->data = NULL; in LoadFileContents() 88 SHA_hash(file->data, file->size, file->sha1); in LoadFileContents() 213 file->data = malloc(size[index[pairs-1]]); in LoadPartitionContents() [all …]
|
D | imgdiff_test.sh | 15 WORK_DIR=/data/local/tmp 25 emulator -wipe-data -noaudio -no-window -port $EMULATOR_PORT & 91 run_command rm /data/local/tmp/target 93 run_command /data/local/tmp/applypatch /data/local/tmp/source \ 94 /data/local/tmp/target $(sha1 $tmpdir/target) $(size $tmpdir/target) \ 95 $(sha1 $tmpdir/source):/data/local/tmp/patch \ 97 $ADB pull /data/local/tmp/target $tmpdir/result
|
D | main.c | 83 (*patches)[i]->data = (char*)fc.data; in ParsePatchArgs() 93 free(p->data); in ParsePatchArgs() 113 bonus->data = (char*)fc.data; in PatchMode() 144 free(p->data); in PatchMode() 149 free(bonus->data); in PatchMode()
|
D | imgpatch.c | 45 char* header = patch->data; in ApplyImagePatch() 68 int type = Read4(patch->data + pos); in ApplyImagePatch() 72 char* normal_header = patch->data + pos; in ApplyImagePatch() 86 char* raw_header = patch->data + pos; in ApplyImagePatch() 99 if (ctx) SHA_update(ctx, patch->data + pos, data_len); in ApplyImagePatch() 100 if (sink((unsigned char*)patch->data + pos, in ApplyImagePatch() 108 char* deflate_header = patch->data + pos; in ApplyImagePatch() 175 bonus_data->data, bonus_size); in ApplyImagePatch()
|
D | imgdiff.c | 141 unsigned char* data; // data to be patched (uncompressed, for deflate chunks) member 294 curr->data = img; in ReadZip() 314 curr->data = malloc(curr->len); in ReadZip() 328 strm.next_out = curr->data; in ReadZip() 354 curr->data = img + pos; in ReadZip() 421 curr->data = p; in ReadImage() 438 curr->data = malloc(allocated); in ReadImage() 455 strm.next_out = curr->data + curr->len; in ReadImage() 468 curr->data = realloc(curr->data, allocated); in ReadImage() 483 curr->data = img+pos; in ReadImage() [all …]
|
D | bspatch.c | 137 unsigned char* header = (unsigned char*) patch->data + patch_offset; in ApplyBSDiffPatchMem() 156 cstream.next_in = patch->data + patch_offset + 32; in ApplyBSDiffPatchMem() 166 dstream.next_in = patch->data + patch_offset + 32 + ctrl_len; in ApplyBSDiffPatchMem() 176 estream.next_in = patch->data + patch_offset + 32 + ctrl_len + data_len; in ApplyBSDiffPatchMem()
|
/bootable/recovery/minui/ |
D | events.cpp | 39 void* data; member 56 int ev_init(ev_callback input_cb, void* data) { in ev_init() argument 89 ev.data.ptr = &ev_fdinfo[ev_count]; in ev_init() 98 ev_fdinfo[ev_count].data = data; in ev_init() 120 int ev_add_fd(int fd, ev_callback cb, void* data) { in ev_add_fd() argument 127 ev.data.ptr = (void *)&ev_fdinfo[ev_count]; in ev_add_fd() 132 ev_fdinfo[ev_count].data = data; in ev_add_fd() 159 fd_info* fdi = reinterpret_cast<fd_info*>(polledevents[n].data.ptr); in ev_dispatch() 162 cb(fdi->fd, polledevents[n].events, fdi->data); in ev_dispatch() 177 int ev_sync_key_state(ev_set_key_callback set_key_cb, void* data) { in ev_sync_key_state() argument [all …]
|
D | graphics_fbdev.cpp | 136 gr_framebuffer[0].data = reinterpret_cast<uint8_t*>(bits); in fbdev_init() 137 memset(gr_framebuffer[0].data, 0, gr_framebuffer[0].height * gr_framebuffer[0].row_bytes); in fbdev_init() 144 gr_framebuffer[1].data = gr_framebuffer[0].data + in fbdev_init() 158 gr_draw->data = (unsigned char*) malloc(gr_draw->height * gr_draw->row_bytes); in fbdev_init() 159 if (!gr_draw->data) { in fbdev_init() 165 memset(gr_draw->data, 0, gr_draw->height * gr_draw->row_bytes); in fbdev_init() 183 unsigned char* ucfb_vaddr = (unsigned char*)gr_draw->data; in fbdev_flip() 198 memcpy(gr_framebuffer[0].data, gr_draw->data, in fbdev_flip() 209 free(gr_draw->data); in fbdev_exit()
|
D | minui.h | 33 unsigned char* data; member 64 typedef int (*ev_callback)(int fd, uint32_t epevents, void* data); 65 typedef int (*ev_set_key_callback)(int code, int value, void* data); 67 int ev_init(ev_callback input_cb, void* data); 69 int ev_add_fd(int fd, ev_callback cb, void* data); 71 int ev_sync_key_state(ev_set_key_callback set_key_cb, void* data);
|
D | graphics.cpp | 125 unsigned char* src_p = font->texture->data + ((ch - ' ') * font->cwidth) + in gr_text() 127 unsigned char* dst_p = gr_draw->data + y*gr_draw->row_bytes + x*gr_draw->pixel_bytes; in gr_text() 150 unsigned char* src_p = icon->data; in gr_texticon() 151 unsigned char* dst_p = gr_draw->data + y*gr_draw->row_bytes + x*gr_draw->pixel_bytes; in gr_texticon() 176 memset(gr_draw->data, gr_current_r, gr_draw->height * gr_draw->row_bytes); in gr_clear() 178 unsigned char* px = gr_draw->data; in gr_clear() 201 unsigned char* p = gr_draw->data + y1 * gr_draw->row_bytes + x1 * gr_draw->pixel_bytes; in gr_fill() 245 unsigned char* src_p = source->data + sy*source->row_bytes + sx*source->pixel_bytes; in gr_blit() 246 unsigned char* dst_p = gr_draw->data + dy*gr_draw->row_bytes + dx*gr_draw->pixel_bytes; in gr_blit() 292 gr_font->texture->data = reinterpret_cast<unsigned char*>(bits); in gr_init_font() [all …]
|
/bootable/recovery/minadbd/ |
D | fuse_adb_provider_test.cpp | 30 adb_data data = {}; in TEST() local 34 data.sfd = sockets[0]; in TEST() 49 ASSERT_EQ(0, read_block_adb(reinterpret_cast<void*>(&data), block, in TEST() 75 adb_data data = {}; in TEST() local 79 data.sfd = sockets[0]; in TEST() 84 ASSERT_EQ(-EIO, read_block_adb(reinterpret_cast<void*>(&data), 0, in TEST()
|
D | fuse_adb_provider.cpp | 29 int read_block_adb(void* data, uint32_t block, uint8_t* buffer, uint32_t fetch_size) { in read_block_adb() argument 30 adb_data* ad = reinterpret_cast<adb_data*>(data); in read_block_adb() 45 static void close_adb(void* data) { in close_adb() argument 46 adb_data* ad = reinterpret_cast<adb_data*>(data); in close_adb()
|
D | services.cpp | 46 static void sideload_host_service(int sfd, void* data) { in sideload_host_service() argument 47 const char* args = reinterpret_cast<const char*>(data); in sideload_host_service()
|
/bootable/recovery/ |
D | fuse_sideload.c | 97 static void fuse_reply(struct fuse_data* fd, __u64 unique, const void *data, size_t len) in fuse_reply() argument 109 vec[1].iov_base = /* const_cast */(void*)(data); in fuse_reply() 118 static int handle_init(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) { in handle_init() argument 119 const struct fuse_init_in* req = data; in handle_init() 173 static int handle_getattr(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) { in handle_getattr() argument 174 const struct fuse_getattr_in* req = data; in handle_getattr() 193 static int handle_lookup(void* data, struct fuse_data* fd, in handle_lookup() argument 200 if (strncmp(FUSE_SIDELOAD_HOST_FILENAME, data, in handle_lookup() 205 } else if (strncmp(FUSE_SIDELOAD_HOST_EXIT_FLAG, data, in handle_lookup() 218 static int handle_open(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) { in handle_open() argument [all …]
|
D | bootloader.cpp | 88 char data[size]; in get_bootloader_message_mtd() local 89 ssize_t r = mtd_read_data(read, data, size); in get_bootloader_message_mtd() 94 memcpy(out, &data[write_size * MISC_COMMAND_PAGE], sizeof(*out)); in get_bootloader_message_mtd() 114 char data[size]; in set_bootloader_message_mtd() local 115 ssize_t r = mtd_read_data(read, data, size); in set_bootloader_message_mtd() 120 memcpy(&data[write_size * MISC_COMMAND_PAGE], in, sizeof(*in)); in set_bootloader_message_mtd() 127 if (mtd_write_data(write, data, size) != size) { in set_bootloader_message_mtd()
|
D | verifier_test.sh | 12 WORK_DIR=/data/local/tmp 20 emulator -wipe-data -noaudio -no-window -port $EMULATOR_PORT &
|
/bootable/recovery/tools/ota/ |
D | convert-to-bmp.py | 70 data = im.tostring() variable 73 f.write(data[i+2]) # B 74 f.write(data[i+1]) # G 75 f.write(data[i+0]) # R 76 f.write(data[i+3]) # A
|
/bootable/recovery/mtdutils/ |
D | mtdutils.h | 50 ssize_t mtd_read_data(MtdReadContext *, char *data, size_t data_len); 54 ssize_t mtd_write_data(MtdWriteContext *, const char *data, size_t data_len);
|
D | mtdutils.c | 282 static int read_block(const MtdPartition *partition, int fd, char *data) in read_block() argument 301 TEMP_FAILURE_RETRY(read(fd, data, size)) != size) { in read_block() 328 ssize_t mtd_read_data(MtdReadContext *ctx, char *data, size_t len) in mtd_read_data() argument 335 memcpy(data + read, ctx->buffer + ctx->consumed, copy); in mtd_read_data() 343 if (read_block(ctx->partition, ctx->fd, data + read)) return -1; in mtd_read_data() 406 static int write_block(MtdWriteContext *ctx, const char *data) in write_block() argument 441 TEMP_FAILURE_RETRY(write(fd, data, size)) != size) { in write_block() 453 if (memcmp(data, verify, size) != 0) { in write_block() 478 ssize_t mtd_write_data(MtdWriteContext *ctx, const char *data, size_t len) in mtd_write_data() argument 486 memcpy(ctx->buffer + ctx->stored, data + wrote, copy); in mtd_write_data() [all …]
|
/bootable/recovery/updater/ |
D | blockimg.c | 114 static int read_all(int fd, uint8_t* data, size_t size) { in read_all() argument 117 ssize_t r = TEMP_FAILURE_RETRY(read(fd, data+so_far, size-so_far)); in read_all() 127 static int write_all(int fd, const uint8_t* data, size_t size) { in write_all() argument 130 ssize_t w = TEMP_FAILURE_RETRY(write(fd, data+written, size-written)); in write_all() 176 static ssize_t RangeSinkWrite(const uint8_t* data, ssize_t size, void* token) { in RangeSinkWrite() argument 192 if (write_all(rss->fd, data, write_now) == -1) { in RangeSinkWrite() 196 data += write_now; in RangeSinkWrite() 255 static bool receive_new_data(const unsigned char* data, int size, void* cookie) { in receive_new_data() argument 269 ssize_t written = RangeSinkWrite(data, size, nti->rss); in receive_new_data() 270 data += written; in receive_new_data() [all …]
|
D | install.c | 558 v->data = NULL; in PackageExtractFileFn() 570 v->data = malloc(v->size); in PackageExtractFileFn() 571 if (v->data == NULL) { in PackageExtractFileFn() 578 (unsigned char *)v->data); in PackageExtractFileFn() 583 free(v->data); in PackageExtractFileFn() 584 v->data = NULL; in PackageExtractFileFn() 843 cap_data.data[0].permitted = (uint32_t) (parsed.capabilities & 0xffffffff); in ApplyParsedPerms() 844 cap_data.data[0].inheritable = 0; in ApplyParsedPerms() 845 cap_data.data[1].permitted = (uint32_t) (parsed.capabilities >> 32); in ApplyParsedPerms() 846 cap_data.data[1].inheritable = 0; in ApplyParsedPerms() [all …]
|