/bootable/recovery/tools/ota/ |
H A D | convert-to-bmp.py | 25 "L" # file size 31 "L" # size of this struct 37 "L" # size of image data (0 if uncompressed) 50 im.size[0] * im.size[1] * 4), 56 im.size[0], 57 im.size[1], 71 for j in range(im.size[1]-1, -1, -1): # rows bottom-to-top 72 for i in range(j*im.size[0]*4, (j+1)*im.size[ [all...] |
/bootable/recovery/updater/ |
H A D | blockimg.c | 53 int size; member in struct:__anon30 69 out->size = 0; 74 out->size += out->pos[i]; 76 out->size -= out->pos[i]; 83 static void readblock(int fd, uint8_t* data, size_t size) { argument 85 while (so_far < size) { 86 ssize_t r = read(fd, data+so_far, size-so_far); 96 static void writeblock(int fd, const uint8_t* data, size_t size) { argument 98 while (written < size) { 99 ssize_t w = write(fd, data+written, size 123 allocate(size_t size, uint8_t** buffer, size_t* buffer_alloc) argument 144 RangeSinkWrite(const uint8_t* data, ssize_t size, void* token) argument 211 receive_new_data(const unsigned char* data, int size, void* cookie) argument [all...] |
H A D | install.c | 271 // if fs_size > 0, that is the size to use 556 v->size = -1; 568 v->size = mzGetZipEntryUncompLen(entry); 569 v->data = malloc(v->size); 572 name, (long)v->size, zip_path); 584 v->size = -1; 1104 ssize_t wrote = mtd_write_data(ctx, contents->data, contents->size); 1105 success = (wrote == contents->size); 1150 // apply_patch(file, size, init_sha1, tgt_sha1, patch) 1256 int size local [all...] |
/bootable/recovery/ |
H A D | bootloader.cpp | 87 const ssize_t size = write_size * MISC_PAGES; local 88 char data[size]; 89 ssize_t r = mtd_read_data(read, data, size); 90 if (r != size) LOGE("Can't read %s\n(%s)\n", v->blk_device, strerror(errno)); 92 if (r != size) return -1; 113 ssize_t size = write_size * MISC_PAGES; local 114 char data[size]; 115 ssize_t r = mtd_read_data(read, data, size); 116 if (r != size) LOGE("Can't read %s\n(%s)\n", v->blk_device, strerror(errno)); 118 if (r != size) retur [all...] |
H A D | interlace-frames.py | 32 sizes.add(fr.size) 34 assert len(sizes) == 1, "All input images must have the same size."
|
H A D | fuse_sideload.c | 80 uint32_t block_size; // block size that the adb host is using to send the file to us 81 uint32_t file_blocks; // file size in block_size blocks 134 uint64_t nodeid, uint64_t size, uint32_t mode) { 142 attr->size = size; 143 attr->blocks = (size == 0) ? 0 : (((size-1) / attr->blksize) + 1); 278 uint32_t size = req->size; local 291 outhdr.len = sizeof(outhdr) + size; 133 fill_attr(struct fuse_attr* attr, struct fuse_data* fd, uint64_t nodeid, uint64_t size, uint32_t mode) argument [all...] |
H A D | verifier.cpp | 120 // (2-byte signature start) $ff $ff (2-byte comment size) 210 size_t size = signed_len - so_far; local 211 if (size > BUFFER_SIZE) size = BUFFER_SIZE; 213 if (need_sha1) SHA_update(&sha1_ctx, addr + so_far, size); 214 if (need_sha256) SHA256_update(&sha256_ctx, addr + so_far, size); 215 so_far += size; 218 if (f > frac + 0.02 || size == so_far) { 393 LOGE("key length (%d) does not match expected size\n", key->len); 414 LOGE("Key length (%d) does not match expected size [all...] |
H A D | roots.cpp | 277 uint64_t size = get_file_size(fd); local 278 if (size == 0) { 279 LOGE("failed to stat size of /persistent\n"); 285 lseek(fd, size - 1, SEEK_SET); 289 if (wipe_block_device(fd, size)) { 295 lseek(fd, size - 1, SEEK_SET);
|
/bootable/recovery/applypatch/ |
H A D | freecache.c | 77 int size = 32; local 79 *names = malloc(size * sizeof(char*)); 108 if (*entries >= size) { 109 size *= 2; 110 *names = realloc(*names, size * sizeof(char*));
|
H A D | applypatch.c | 67 file->size = file->st.st_size; 68 file->data = malloc(file->size); 78 ssize_t bytes_read = fread(file->data, 1, file->size, f); 79 if (bytes_read != file->size) { 81 filename, (long)bytes_read, (long)file->size); 88 SHA_hash(file->data, file->size, file->sha1); 112 // sha1 hash will be loaded. It is acceptable for a size value to be 153 int pairs = (colons-1)/2; // # of (size,sha1) pairs in filename 155 size_t* size = malloc(pairs * sizeof(size_t)); local 160 size[ 640 ssize_t size; member in struct:__anon1 [all...] |
H A D | imgpatch.c | 45 if (patch->size < 12) { 63 if (pos + 4 > patch->size) { 73 if (pos > patch->size) { 87 if (pos > patch->size) { 94 if (pos + data_len > patch->size) { 109 if (pos > patch->size) { 128 // Note: expanded_len will include the bonus data size if 132 size_t bonus_size = (i == 1 && bonus_data != NULL) ? bonus_data->size : 0;
|
H A D | main.c | 82 (*patches)[i]->size = fc.size; 112 bonus->size = fc.size; 185 "usage: %s [-b <bonus-file>] <src-file> <tgt-file> <tgt-sha1> <tgt-size> "
|
H A D | bspatch.c | 84 int FillBuffer(unsigned char* buffer, int size, bz_stream* stream) { argument 86 stream->avail_out = size; 176 estream.avail_in = patch->size - (patch_offset + 32 + ctrl_len + data_len);
|
H A D | imgdiff_test.sh | 60 size() { function 88 echo "patch for $fn is $(size $tmpdir/patch) [of $(size $tmpdir/target)] ($(size $tmpdir/patch.bs) with bsdiff)" 89 echo "$fn $(size $tmpdir/patch) of $(size $tmpdir/target) bsdiff $(size $tmpdir/patch.bs)" >> /tmp/stats.txt 94 /data/local/tmp/target $(sha1 $tmpdir/target) $(size $tmpdir/target) \
|
H A D | applypatch.h | 32 ssize_t size; member in struct:_FileContents
|
H A D | imgdiff.c | 76 * source expanded len (8) [size of uncompressed source] 77 * target expected len (8) [size of uncompressed target] 90 * source expanded len (8) [size of uncompressed source] 91 * target expected len (8) [size of uncompressed target] 104 * expanded len" is the size of the uncompressed source data. "target 105 * expected len" is the size of the uncompressed data after applying 119 * patch. This is used to reduce the size of recovery-from-boot 481 // The footer (that we just skipped over) contains the size of 483 // matches the size of the data we got when we actually did 487 printf("Error: footer size 607 MakePatch(ImageChunk* src, ImageChunk* tgt, size_t* size) argument [all...] |
/bootable/recovery/mtdutils/ |
H A D | mtdutils.c | 33 unsigned int size; member in struct:MtdPartition 121 * dev: size erasesize name 145 p->size = mtdsize; 251 if (total_size != NULL) *total_size = mtd_info.size; 298 ssize_t size = partition->erase_size; local 301 while (pos + size <= (int) partition->size) { 302 if (lseek64(fd, pos, SEEK_SET) != pos || read(fd, data, size) != size) { 415 ssize_t size [all...] |
/bootable/recovery/uncrypt/ |
H A D | uncrypt.c | 30 // 49652 4096 # file size in bytes, block size 63 static int write_at_offset(unsigned char* buffer, size_t size, argument 68 while (written < size) { 69 ssize_t wrote = write(wfd, buffer + written, size - written); 201 ALOGI(" block size: %ld bytes\n", (long)sb.st_blksize); 204 ALOGI(" file size: %lld bytes, %d blocks\n", (long long)sb.st_size, blocks); 326 size_t size = sizeof(zeroes); local 327 while (written < size) { 328 ssize_t w = write(fd, zeroes, size [all...] |
/bootable/recovery/minadbd/ |
H A D | transport_usb.c | 80 unsigned size = p->msg.data_length; local 89 if(usb_write(t->usb, &p->data, size)) {
|
/bootable/recovery/minzip/ |
H A D | SysUtil.c | 53 * segment. The file offset must be a multiple of the page size. 89 size_t size; local 106 if (fscanf(mapf, "%zu %u\n%u\n", &size, &blksize, &range_count) != 3) { 111 blocks = ((size-1) / blksize) + 1; 154 pMap->length = size;
|
H A D | Hash.h | 72 * table size may be adjusted upward.) If you know exactly how many 80 * Compute the capacity needed for a table to hold "size" elements. Use 85 size_t mzHashSize(size_t size); 105 * Get total size of hash table (for memory usage calculations).
|
H A D | Hash.c | 24 * Compute the capacity needed for a table to hold "size" elements. 26 size_t mzHashSize(size_t size) { argument 27 return (size * LOAD_DENOM) / LOAD_NUMER +1; 129 * size of the table beyond its comfy limit.
|
/bootable/recovery/edify/ |
H A D | main.c | 188 int size = fread(buffer, 1, 8191, f); local 190 buffer[size] = '\0';
|
H A D | expr.h | 48 #define VAL_STRING 1 // data will be NULL-terminated; size doesn't count null 53 ssize_t size; member in struct:__anon5
|
H A D | expr.c | 56 v->size = strlen(str);
|