Home
last modified time | relevance | path

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

12

/bootable/recovery/applypatch/
Dapplypatch_modes.cpp40 for (int i = 3; i < argc; i++) { in CheckMode() local
41 sha1.push_back(argv[i]); in CheckMode()
54 for (int i = 0; i < argc; ++i) { in ParsePatchArgs() local
55 std::vector<std::string> pieces = android::base::Split(argv[i], ":"); in ParsePatchArgs()
57 printf("failed to parse patch argument \"%s\"\n", argv[i]); in ParsePatchArgs()
63 printf("failed to parse sha1 \"%s\"\n", argv[i]); in ParsePatchArgs()
124 for (size_t i = 0; i < files.size(); ++i) { in PatchMode() local
126 VAL_BLOB, std::string(files[i].data.cbegin(), files[i].data.cend()))); in PatchMode()
Dimgdiff.cpp475 for (int i = zip_file.size() - 22; i >= 0; i--) { in GetZipFileSize() local
476 if (zip_file[i] == 0x50) { in GetZipFileSize()
477 if (get_unaligned<uint32_t>(&zip_file[i]) == 0x06054b50) { in GetZipFileSize()
479 CHECK_EQ(get_unaligned<uint16_t>(&zip_file[i + 4]), 0); in GetZipFileSize()
481 uint16_t comment_length = get_unaligned<uint16_t>(&zip_file[i + 20]); in GetZipFileSize()
482 size_t file_size = i + 22 + comment_length; in GetZipFileSize()
838 for (size_t i = 0; i < chunks.size(); ++i) { in FindChunkByName() local
839 if (chunks[i].GetType() == CHUNK_DEFLATE && chunks[i].GetEntryName() == name) { in FindChunkByName()
840 return &chunks[i]; in FindChunkByName()
847 for (size_t i = 0; i < chunks.size(); ++i) { in DumpChunks() local
[all …]
Dfreecache.cpp81 for (size_t i = 0; i < sizeof(dirs)/sizeof(dirs[0]); ++i) { in FindExpendableFiles() local
82 std::unique_ptr<DIR, decltype(&closedir)> d(opendir(dirs[i]), closedir); in FindExpendableFiles()
84 printf("error opening %s: %s\n", dirs[i], strerror(errno)); in FindExpendableFiles()
91 std::string path = std::string(dirs[i]) + "/" + de->d_name; in FindExpendableFiles()
Dimgpatch.cpp160 for (int i = 0; i < num_chunks; ++i) { in ApplyImagePatch() local
163 printf("failed to read chunk %d record\n", i); in ApplyImagePatch()
173 printf("failed to read chunk %d normal header data\n", i); in ApplyImagePatch()
193 printf("failed to read chunk %d raw header data\n", i); in ApplyImagePatch()
200 printf("failed to read chunk %d raw data\n", i); in ApplyImagePatch()
205 printf("failed to write chunk %d raw data\n", i); in ApplyImagePatch()
214 printf("failed to read chunk %d deflate header data\n", i); in ApplyImagePatch()
235 size_t bonus_size = (i == 1 && bonus_data != NULL) ? bonus_data->data.size() : 0; in ApplyImagePatch()
285 printf("patch chunk %d is unknown type %d\n", i, type); in ApplyImagePatch()
/bootable/recovery/
Dmounts.cpp42 for (size_t i = 0; i < g_mounts_state.size(); ++i) { in scan_mounted_volumes() local
43 delete g_mounts_state[i]; in scan_mounted_volumes()
66 for (size_t i = 0; i < g_mounts_state.size(); ++i) { in find_mounted_volume_by_mount_point() local
67 if (g_mounts_state[i]->mount_point == mount_point) return g_mounts_state[i]; in find_mounted_volume_by_mount_point()
Drotate_logs.cpp76 size_t i; in logrotate() local
77 if (!android::base::ParseUint(number, &i)) { in logrotate()
81 name = sub + "." + std::to_string(i + 1); in logrotate()
99 for (int i = KEEP_LOG_COUNT - 1; i >= 0; --i) { in rotate_logs() local
101 if (i > 0) { in rotate_logs()
102 old_log += "." + std::to_string(i); in rotate_logs()
104 std::string new_log = android::base::StringPrintf("%s.%d", last_log_file, i+1); in rotate_logs()
109 if (i > 0) { in rotate_logs()
110 old_kmsg += "." + std::to_string(i); in rotate_logs()
112 std::string new_kmsg = android::base::StringPrintf("%s.%d", last_kmsg_file, i+1); in rotate_logs()
Dverifier.cpp190 for (size_t i = 4; i < eocd_size-3; ++i) { in verify_file() local
191 if (eocd[i] == 0x50 && eocd[i+1] == 0x4b && eocd[i+2] == 0x05 && eocd[i+3] == 0x06) { in verify_file()
254 size_t i = 0; in verify_file() local
276 LOG(INFO) << "failed to verify against RSA key " << i; in verify_file()
280 LOG(INFO) << "whole-file signature verified against RSA key " << i; in verify_file()
284 LOG(INFO) << "failed to verify against EC key " << i; in verify_file()
288 LOG(INFO) << "whole-file signature verified against EC key " << i; in verify_file()
293 i++; in verify_file()
332 for (uint32_t i = 1; i < key_len_words; ++i) { in parse_rsa_key() local
333 if (fscanf(file, " , %u", &modulus[i]) != 1) { in parse_rsa_key()
[all …]
Dprint_sha1.h28 for (size_t i = 0; i < len; ++i) { in print_sha1() local
29 result.push_back(hex[(sha1[i]>>4) & 0xf]); in print_sha1()
30 result.push_back(hex[sha1[i] & 0xf]); in print_sha1()
Dscreen_ui.cpp165 for (int i = 0; i < max_stage; ++i) { in draw_background_locked() local
166 GRSurface* stage_surface = (i < stage) ? stageMarkerFill : stageMarkerEmpty; in draw_background_locked()
275 for (size_t i = 0; lines != nullptr && lines[i] != nullptr; ++i) { in DrawTextLines() local
276 offset += DrawTextLine(x, y + offset, lines[i], false); in DrawTextLines()
283 for (size_t i = 0; lines != nullptr && lines[i] != nullptr; ++i) { in DrawWrappedTextLines() local
285 std::string line(lines[i]); in DrawWrappedTextLines()
352 for (int i = 0; i < menu_items; ++i) { in draw_screen_locked() local
353 if (i == menu_sel) { in draw_screen_locked()
359 y += DrawTextLine(x, y, menu_[i].c_str(), true); in draw_screen_locked()
362 y += DrawTextLine(x, y, menu_[i].c_str(), false); in draw_screen_locked()
[all …]
Droots.cpp46 int i; in load_volume_table() local
65 for (i = 0; i < fstab->num_entries; ++i) { in load_volume_table()
66 Volume* v = &fstab->recs[i]; in load_volume_table()
67 printf(" %d %s %s %s %lld\n", i, v->mount_point, v->fs_type, in load_volume_table()
267 int i = 5; in format_volume() local
269 mke2fs_argv[i++] = block_size_str.c_str(); in format_volume()
275 mke2fs_argv[i++] = "-E"; in format_volume()
276 mke2fs_argv[i++] = ext_args.c_str(); in format_volume()
279 mke2fs_argv[i++] = v->blk_device; in format_volume()
283 mke2fs_argv[i++] = size_str.c_str(); in format_volume()
[all …]
Dwear_ui.cpp65 for (size_t i = 0; i < 5; i++) backgroundIcon[i] = NULL; in WearRecoveryUI() local
149 for (int i = menu_start; i < menu_end; ++i) { in draw_screen_locked() local
150 if (i == menu_sel) { in draw_screen_locked()
156 if (menu_[i][0]) { in draw_screen_locked()
157 gr_text(gr_sys_font(), x + 4, y, menu_[i].c_str(), 1); in draw_screen_locked()
160 } else if (menu_[i][0]) { in draw_screen_locked()
161 gr_text(gr_sys_font(), x + 4, y, menu_[i].c_str(), 0); in draw_screen_locked()
264 for (size_t i = 0; items[i] != nullptr; i++) { in StartMenu() local
265 menu_.emplace_back(std::string(items[i], strnlen(items[i], text_cols_ - 1))); in StartMenu()
Dinterlace-frames.py49 for i in range(w):
51 out.putpixel((i, j*N+fn), f.getpixel((i, j)))
86 for i in range(width):
88 out.putpixel((i, j), img.getpixel((i, j * num_frames + k)))
Dadb_install.cpp97 for (int i = 0; i < ADB_INSTALL_TIMEOUT; ++i) { in apply_from_adb() local
106 if (errno == ENOENT && i < ADB_INSTALL_TIMEOUT - 1) { in apply_from_adb()
/bootable/recovery/tools/dumpkey/
DDumpPublicKey.java135 for (int i = 0; i < nwords; ++i) { in printRSA()
139 if (i != nwords - 1) { in printRSA()
149 for (int i = 0; i < nwords; ++i) { in printRSA()
153 if (i != nwords - 1) { in printRSA()
191 for (int i = 0; i < nbytes; ++i) { in printEC()
195 if (i != nbytes - 1) { in printEC()
205 for (int i = 0; i < nbytes; ++i) { in printEC()
209 if (i != nbytes - 1) { in printEC()
238 for (int i = 0; i < args.length; i++) { in main()
239 FileInputStream input = new FileInputStream(args[i]); in main()
[all …]
/bootable/recovery/minui/
Dresources.cpp262 for (int i = 0; i < num_text; ++i) { in res_create_multi_display_surface() local
263 if (text[i].key && strcmp(text[i].key, "Frames") == 0 && text[i].text) { in res_create_multi_display_surface()
264 *frames = atoi(text[i].text); in res_create_multi_display_surface()
265 } else if (text[i].key && strcmp(text[i].key, "FPS") == 0 && text[i].text) { in res_create_multi_display_surface()
266 *fps = atoi(text[i].text); in res_create_multi_display_surface()
290 for (int i = 0; i < *frames; ++i) { in res_create_multi_display_surface() local
291 surface[i] = init_display_surface(width, height / *frames); in res_create_multi_display_surface()
292 if (surface[i] == NULL) { in res_create_multi_display_surface()
319 for (int i = 0; i < *frames; ++i) { in res_create_multi_display_surface() local
320 free(surface[i]); in res_create_multi_display_surface()
[all …]
Dgraphics_drm.cpp198 for (int i = 0; i < connector->count_encoders; i++) { in find_crtc_for_connector() local
199 encoder = drmModeGetEncoder(fd, connector->encoders[i]); in find_crtc_for_connector()
218 for (int i = 0; i < resources->count_connectors; i++) { in find_used_connector_by_type() local
219 drmModeConnector* connector = drmModeGetConnector(fd, resources->connectors[i]); in find_used_connector_by_type()
232 for (int i = 0; i < resources->count_connectors; i++) { in find_first_connected_connector() local
235 connector = drmModeGetConnector(fd, resources->connectors[i]); in find_first_connected_connector()
256 unsigned i = 0; in FindMainMonitor() local
258 main_monitor_connector = find_used_connector_by_type(fd, resources, kConnectorPriority[i]); in FindMainMonitor()
259 i++; in FindMainMonitor()
260 } while (!main_monitor_connector && i < ARRAY_SIZE(kConnectorPriority)); in FindMainMonitor()
[all …]
Devents.cpp182 for (size_t i = 0; i < ev_dev_count; ++i) { in ev_sync_key_state() local
186 if (ioctl(ev_fdinfo[i].fd, EVIOCGBIT(0, sizeof(ev_bits)), ev_bits) == -1) { in ev_sync_key_state()
192 if (ioctl(ev_fdinfo[i].fd, EVIOCGKEY(sizeof(key_bits)), key_bits) == -1) { in ev_sync_key_state()
211 for (size_t i = 0; i < ev_dev_count; ++i) { in ev_iterate_available_keys() local
216 if (ioctl(ev_fdinfo[i].fd, EVIOCGBIT(0, sizeof(ev_bits)), ev_bits) == -1) { in ev_iterate_available_keys()
223 int rc = ioctl(ev_fdinfo[i].fd, EVIOCGBIT(EV_KEY, KEY_MAX), key_bits); in ev_iterate_available_keys()
237 for (size_t i = 0; i < ev_dev_count; ++i) { in ev_iterate_touch_inputs() local
240 if (ioctl(ev_fdinfo[i].fd, EVIOCGBIT(0, sizeof(ev_bits)), ev_bits) == -1) { in ev_iterate_touch_inputs()
248 if (ioctl(ev_fdinfo[i].fd, EVIOCGBIT(EV_ABS, KEY_MAX), key_bits) == -1) { in ev_iterate_touch_inputs()
Dgraphics_adf.cpp128 for (ssize_t i = 0; i < n_dev_ids && intf_fd < 0; i++) { in Init() local
129 int err = adf_device_open(dev_ids[i], O_RDWR, &dev); in Init()
131 fprintf(stderr, "opening adf device %u failed: %s\n", dev_ids[i], strerror(-err)); in Init()
137 fprintf(stderr, "initializing adf device %u failed: %s\n", dev_ids[i], strerror(-err)); in Init()
194 for (unsigned int i = 0; i < n_surfaces; i++) { in ~MinuiBackendAdf() local
195 SurfaceDestroy(&surfaces[i]); in ~MinuiBackendAdf()
/bootable/recovery/update_verifier/
Dupdate_verifier.cpp158 for (size_t i = group_range_count * 2 * t + 1; in read_blocks() local
159 i < std::min(group_range_count * 2 * (t + 1) + 1, ranges.size()); i += 2) { in read_blocks()
161 bool parse_status = android::base::ParseUint(ranges[i], &range_start); in read_blocks()
162 parse_status = parse_status && android::base::ParseUint(ranges[i + 1], &range_end); in read_blocks()
164 LOG(ERROR) << "Invalid range pair " << ranges[i] << ", " << ranges[i + 1]; in read_blocks()
234 for (size_t i = 0; i < lines.size(); i += 2) { in verify_image() local
237 if (android::base::StartsWith(lines[i], "/dev/block/")) { in verify_image()
241 if (!read_blocks(lines[i], lines[i+1])) { in verify_image()
258 for (int i = 1; i < argc; i++) { in update_verifier() local
259 LOG(INFO) << "Started with arg " << i << ": " << argv[i]; in update_verifier()
/bootable/recovery/edify/
Dexpr.cpp81 for (size_t i = 0; i < argv.size(); ++i) { in ConcatFn() local
83 if (!Evaluate(state, argv[i], &str)) { in ConcatFn()
123 for (size_t i = 0; i < argv.size(); ++i) { in AssertFn() local
125 if (!Evaluate(state, argv[i], &result)) { in AssertFn()
129 int len = argv[i]->end - argv[i]->start; in AssertFn()
130 state->errmsg = "assert failed: " + state->script.substr(argv[i]->start, len); in AssertFn()
153 for (size_t i = 0; i < argv.size(); ++i) { in StdoutFn() local
155 if (!Evaluate(state, argv[i], &v)) { in StdoutFn()
363 for (size_t i = start; i < start + len; ++i) { in ReadArgs() local
365 if (!Evaluate(state, argv[i], &var)) { in ReadArgs()
[all …]
Dedify_parser.cpp42 for (size_t i = 0; i < n->argv.size(); ++i) { in ExprDump() local
43 ExprDump(depth+1, n->argv[i], script); in ExprDump()
/bootable/recovery/boot_control/
Dboot_control.cpp69 for (uint32_t i = 0; i < 256; ++i) { in CRC32() local
70 uint32_t crc = i; in CRC32()
75 crc_table[i] = crc; in CRC32()
80 for (size_t i = 0; i < size; ++i) { in CRC32() local
81 ret = (ret >> 8) ^ crc_table[(ret ^ buf[i]) & 0xFF]; in CRC32()
285 for (unsigned int i = 0; i < bootctrl_module->num_slots; ++i) { in BootControl_setActiveBootSlot() local
286 if (i != slot) { in BootControl_setActiveBootSlot()
287 if (bootctrl.slot_info[i].priority >= kActivePriority) in BootControl_setActiveBootSlot()
288 bootctrl.slot_info[i].priority = kActivePriority - 1; in BootControl_setActiveBootSlot()
/bootable/recovery/updater/include/updater/
Drangeset.h65 for (size_t i = 0; i < num; i += 2) { in Parse() local
67 CHECK(android::base::ParseUint(pieces[i + 1], &first, static_cast<size_t>(INT_MAX))); in Parse()
69 CHECK(android::base::ParseUint(pieces[i + 2], &second, static_cast<size_t>(INT_MAX))); in Parse()
147 const Range& operator[](size_t i) const {
148 return ranges_[i];
/bootable/recovery/otautil/
DSysUtil.cpp122 for (size_t i = 0; i < range_count; ++i) { in MapBlockFile() local
123 const std::string& line = lines[i + 3]; in MapBlockFile()
127 LOG(ERROR) << "failed to parse range " << i << ": " << line; in MapBlockFile()
141 PLOG(ERROR) << "failed to map range " << i << ": " << line; in MapBlockFile()
/bootable/recovery/updater/
Dinstall.cpp559 for (size_t i = 0; i < lines.size(); i++) { in FileGetPropFn() local
560 std::string line = android::base::Trim(lines[i]); in FileGetPropFn()
643 for (int i = 0; i < patchcount; ++i) { in ApplyPatchFn() local
644 if (arg_values[i * 2]->type != VAL_STRING) { in ApplyPatchFn()
646 i * 2); in ApplyPatchFn()
648 if (arg_values[i * 2 + 1]->type != VAL_BLOB) { in ApplyPatchFn()
650 i * 2 + 1); in ApplyPatchFn()
656 for (int i = 0; i < patchcount; ++i) { in ApplyPatchFn() local
657 patch_sha_str.push_back(arg_values[i * 2]->data); in ApplyPatchFn()
658 patches.push_back(std::move(arg_values[i * 2 + 1])); in ApplyPatchFn()
[all …]

12