Home
last modified time | relevance | path

Searched refs:content (Results 1 – 25 of 44) sorted by relevance

12

/bootable/recovery/tests/unit/
Dfuse_provider_test.cpp52 std::string content; in TEST() local
53 content.reserve(40960); in TEST()
55 content += std::string(4096, c); in TEST()
58 ASSERT_TRUE(android::base::WriteStringToFile(content, fake_block_device.path)); in TEST()
72 ASSERT_EQ(std::vector<uint8_t>(content.begin() + 4096, content.begin() + 6096), result); in TEST()
76 ASSERT_EQ(std::vector<uint8_t>(content.begin(), content.begin() + 20000), result); in TEST()
80 std::string content; in TEST() local
82 content += std::string(4096, c); in TEST()
86 ASSERT_TRUE(android::base::WriteStringToFile(content, temp_file.path)); in TEST()
102 std::string expected = content.substr(16384, 4096) + content.substr(24576, 15904); in TEST()
Dsysutil_test.cpp34 std::vector<std::string> content = { in TEST() local
39 ASSERT_TRUE(android::base::WriteStringToFile(android::base::Join(content, '\n'), temp_file.path)); in TEST()
54 std::vector<std::string> content = { in TEST() local
59 ASSERT_TRUE(android::base::WriteStringToFile(android::base::Join(content, '\n'), temp_file.path)); in TEST()
66 std::vector<std::string> content = { in TEST() local
74 ASSERT_TRUE(android::base::WriteStringToFile(android::base::Join(content, '\n'), temp_file.path)); in TEST()
81 content[1] = "42949672950 4294967296"; in TEST()
82 ASSERT_TRUE(android::base::WriteStringToFile(android::base::Join(content, '\n'), temp_file.path)); in TEST()
86 content[1] = "4294967296 1"; in TEST()
87 ASSERT_TRUE(android::base::WriteStringToFile(android::base::Join(content, '\n'), temp_file.path)); in TEST()
[all …]
Dverifier_test.cpp51 static void VerifyFile(const std::string& content, const std::vector<Certificate>& keys, in VerifyFile() argument
54 Package::CreateMemoryPackage(std::vector<uint8_t>(content.begin(), content.end()), nullptr); in VerifyFile()
80 std::string content; in BuildCertificateArchive() local
81 ASSERT_TRUE(android::base::ReadFileToString(name, &content)); in BuildCertificateArchive()
89 ASSERT_EQ(0, zip_writer.WriteBytes(content.data(), content.size())); in BuildCertificateArchive()
219 std::string content; in TEST() local
220 ASSERT_TRUE(android::base::ReadFileToString(from_testdata_base("testkey_v1.x509.pem"), &content)); in TEST()
221 content = "random-contents" + content; in TEST()
222 ASSERT_TRUE(android::base::WriteStringToFd(content, corrupted_key.release())); in TEST()
Dfuse_sideload_test.cpp68 const std::string content = android::base::Join(blocks, ""); in TEST() local
69 ASSERT_EQ(16384U, content.size()); in TEST()
72 ASSERT_TRUE(android::base::WriteStringToFile(content, temp_file.path)); in TEST()
103 ASSERT_EQ(content, content_via_fuse); in TEST()
Dinstall_test.cpp44 for (const auto& [name, content] : file_map) { in BuildZipArchive()
46 ASSERT_EQ(0, writer.WriteBytes(content.data(), content.size())); in BuildZipArchive()
55 const std::string content("abc=defg"); in TEST() local
56 BuildZipArchive({ { "META-INF/com/android/metadata", content } }, temp_file.release(), in TEST()
67 BuildZipArchive({ { "META-INF/com/android/metadata", content } }, temp_file2.release(), in TEST()
/bootable/recovery/recovery_utils/
Dthermalutil.cpp65 std::string content; in GetMaxValueFromThermalZone() local
66 if (!android::base::ReadFileToString(path, &content)) { in GetMaxValueFromThermalZone()
72 if (!android::base::ParseInt(android::base::Trim(content), &temperature)) { in GetMaxValueFromThermalZone()
73 LOG(WARNING) << "Failed to parse integer in " << content; in GetMaxValueFromThermalZone()
Dparse_install_logs.cpp93 std::string content; in ParseLastInstall() local
94 if (!android::base::ReadFileToString(file_name, &content)) { in ParseLastInstall()
99 if (content.empty()) { in ParseLastInstall()
104 std::vector<std::string> lines = android::base::Split(content, "\n"); in ParseLastInstall()
/bootable/recovery/updater/
Dtarget_files.cpp122 bool TargetFile::ReadEntryToString(const std::string_view name, std::string* content) const { in ReadEntryToString()
125 return android::base::ReadFileToString(entry_path, content); in ReadEntryToString()
136 content->clear(); in ReadEntryToString()
140 content->resize(entry.uncompressed_length); in ReadEntryToString()
142 handle_, &entry, reinterpret_cast<uint8_t*>(&content->at(0)), entry.uncompressed_length); in ReadEntryToString()
270 if (std::string content; ReadEntryToString(name, &content)) { in ParseFstabInfo() local
271 fstab_content = std::move(content); in ParseFstabInfo()
Dsimulator_runtime.cpp90 std::string* content) const { in ReadFileToString()
92 return android::base::ReadFileToString(source_->GetOemSettings(), content); in ReadFileToString()
99 bool SimulatorRuntime::WriteStringToFile(const std::string_view content, in WriteStringToFile() argument
101 LOG(INFO) << "SKip writing " << content.size() << " bytes to file " << filename; in WriteStringToFile()
Dupdater_runtime.cpp141 bool UpdaterRuntime::ReadFileToString(const std::string_view filename, std::string* content) const { in ReadFileToString()
142 return android::base::ReadFileToString(std::string(filename), content); in ReadFileToString()
145 bool UpdaterRuntime::WriteStringToFile(const std::string_view content, in WriteStringToFile() argument
147 return android::base::WriteStringToFile(std::string(content), std::string(filename)); in WriteStringToFile()
Dupdate_simulator_main.cpp115 std::string content; in main() local
116 if (!android::base::ReadFileToString(skip_function_file, &content)) { in main()
121 auto lines = android::base::Split(content, "\n"); in main()
Dupdater.cpp165 std::string* content) { in ReadEntryToString() argument
174 content->resize(entry.uncompressed_length); in ReadEntryToString()
175 int extract_err = ExtractToMemory(za, &entry, reinterpret_cast<uint8_t*>(&content->at(0)), in ReadEntryToString()
/bootable/recovery/update_verifier/
Dcare_map_generator.py115 content = input_care_map.read()
118 result = ParseProtoMessage(content, args.fingerprint_enabled)
121 content.rstrip().splitlines(), args.fingerprint_enabled)
/bootable/recovery/
Drecovery-persist.cpp95 std::string content; in logsave() local
96 android::base::ReadFileToString(destination, &content); in logsave()
98 if (buffer.compare(content) == 0) { in logsave()
Drecovery_main.cpp141 std::string content; in get_args() local
143 android::base::ReadFileToString(COMMAND_FILE, &content)) { in get_args()
144 std::vector<std::string> tokens = android::base::Split(content, "\n"); in get_args()
180 std::string content; in load_locale_from_cache() local
181 if (!android::base::ReadFileToString(LOCALE_FILE, &content)) { in load_locale_from_cache()
186 return android::base::Trim(content); in load_locale_from_cache()
/bootable/recovery/install/
Dpackage.cpp39 MemoryPackage(std::vector<uint8_t> content, const std::function<void(float)>& set_progress);
149 std::vector<uint8_t> content, const std::function<void(float)>& set_progress) { in CreateMemoryPackage() argument
150 return std::make_unique<MemoryPackage>(std::move(content), set_progress); in CreateMemoryPackage()
161 MemoryPackage::MemoryPackage(std::vector<uint8_t> content, in MemoryPackage() argument
163 : package_content_(std::move(content)), zip_handle_(nullptr) { in MemoryPackage()
/bootable/recovery/tools/recovery_l10n/src/com/android/recovery_l10n/
DMain.java20 import android.content.Context;
21 import android.content.Intent;
22 import android.content.res.AssetManager;
23 import android.content.res.Configuration;
24 import android.content.res.Resources;
/bootable/recovery/edify/include/edify/
Dupdater_runtime_interface.h55 virtual bool ReadFileToString(const std::string_view filename, std::string* content) const = 0;
58 virtual bool WriteStringToFile(const std::string_view content,
/bootable/recovery/updater/include/updater/
Dupdater_runtime.h48 bool ReadFileToString(const std::string_view filename, std::string* content) const override;
49 bool WriteStringToFile(const std::string_view content,
Dsimulator_runtime.h45 bool ReadFileToString(const std::string_view filename, std::string* content) const override;
46 bool WriteStringToFile(const std::string_view content,
/bootable/recovery/minadbd/
Dminadbd_services_test.cpp164 std::vector<uint8_t> content(4096, 'a'); in TEST_F() local
182 if (content_from_fuse != content) { in TEST_F()
197 ASSERT_TRUE(android::base::WriteFully(fd, content.data(), 4096)); in TEST_F()
/bootable/recovery/tests/unit/host/
Dimgdiff_test.cpp685 const std::string content(std::get<1>(t) * 4096, std::get<2>(t)); in construct_store_entry() local
686 ASSERT_EQ(0, writer->WriteBytes(content.data(), content.size())); in construct_store_entry()
729 const std::vector<uint8_t>& content, const std::vector<std::tuple<std::string, size_t>>& info) { in ConstructImageChunks() argument
734 chunks.emplace_back(CHUNK_NORMAL, start, &content, length, std::get<0>(t)); in ConstructImageChunks()
742 std::vector<uint8_t> content; in TEST() local
743 content.reserve(4096 * 50); in TEST()
745 generate_n(back_inserter(content), 4096 * 50, [&n]() { return n++ / 4096; }); in TEST()
748 std::vector<ImageChunk> tgt_chunks = ConstructImageChunks(content, { { "a", 100 }, in TEST()
756 std::vector<uint8_t>(content.begin(), content.begin() + 82520)); in TEST()
761 std::vector<ImageChunk> src_chunks = ConstructImageChunks(content, { { "b", 4096 * 3 }, in TEST()
[all …]
/bootable/recovery/uncrypt/
Duncrypt.cpp577 std::string content; in setup_bcb() local
578 content.resize(length); in setup_bcb()
579 if (!android::base::ReadFully(socket, &content[0], length)) { in setup_bcb()
583 LOG(INFO) << " received command: [" << content << "] (" << content.size() << ")"; in setup_bcb()
584 std::vector<std::string> options = android::base::Split(content, "\n"); in setup_bcb()
/bootable/recovery/otautil/
Dsysutil.cpp39 std::string content; in ParseBlockMapFile() local
40 if (!android::base::ReadFileToString(block_map_path, &content)) { in ParseBlockMapFile()
45 std::vector<std::string> lines = android::base::Split(android::base::Trim(content), "\n"); in ParseBlockMapFile()
/bootable/recovery/recovery_ui/
Dui.cpp117 std::string content; in InitScreensaver() local
118 if (!android::base::ReadFileToString(max_brightness_file_, &content)) { in InitScreensaver()
124 if (!android::base::ParseUint(android::base::Trim(content), &max_value)) { in InitScreensaver()
125 LOG(WARNING) << "Failed to parse max brightness: " << content; in InitScreensaver()

12