Home
last modified time | relevance | path

Searched refs:filename (Results 1 – 25 of 30) sorted by relevance

12

/bootable/recovery/tests/unit/
Dsysutil_test.cpp114 std::string filename = std::string("@") + block_map_file.path; in TEST() local
121 ASSERT_TRUE(mapping.MapFile(filename)); in TEST()
129 ASSERT_TRUE(mapping.MapFile(filename)); in TEST()
137 ASSERT_TRUE(mapping.MapFile(filename)); in TEST()
145 ASSERT_TRUE(mapping.MapFile(filename)); in TEST()
153 std::string filename = std::string("@") + temp_file.path; in TEST() local
157 ASSERT_FALSE(mapping.MapFile(filename)); in TEST()
160 ASSERT_FALSE(mapping.MapFile(filename)); in TEST()
164 ASSERT_FALSE(mapping.MapFile(filename)); in TEST()
167 ASSERT_FALSE(mapping.MapFile(filename)); in TEST()
[all …]
/bootable/recovery/updater_sample/tools/
Dtest_gen_update_config.py39 filename, offset, size = prop['filename'], prop['offset'], prop['size']
42 if filename in ['payload.bin', 'payload_metadata.bin']:
44 elif filename == 'payload_properties.txt':
46 elif filename == 'metadata':
49 expected_data = filename.replace('.', '-').upper()
Dgen_update_config.py107 filename, offset, size = file.split(':')
109 'filename': filename,
/bootable/recovery/otautil/
Dlogging.cpp87 ssize_t logbasename(log_id_t /* id */, char /* prio */, const char* filename, const char* /* buf */, in logbasename() argument
90 if (std::string(LAST_KMSG_FILTER).find(filename) != std::string::npos || in logbasename()
91 std::string(LAST_LOG_FILTER).find(filename) != std::string::npos) { in logbasename()
97 ssize_t logrotate(log_id_t id, char prio, const char* filename, const char* buf, size_t len, in logrotate() argument
101 return __android_log_pmsg_file_write(id, prio, filename, buf, len); in logrotate()
104 std::string name(filename); in logrotate()
110 return __android_log_pmsg_file_write(id, prio, filename, buf, len); in logrotate()
163 static ssize_t __pmsg_write(const std::string& filename, const std::string& buf) { in __pmsg_write() argument
164 return __android_log_pmsg_file_write(LOG_ID_SYSTEM, ANDROID_LOG_INFO, filename.c_str(), in __pmsg_write()
Dsysutil.cpp121 bool MemMapping::MapBlockFile(const std::string& filename) { in MapBlockFile() argument
122 auto block_map_data = BlockMapData::ParseBlockMapFile(filename); in MapBlockFile()
/bootable/recovery/updater/
Dinstall.cpp593 const std::string& filename = args[0]; in FileGetPropFn() local
597 if (!android::base::ReadFileToString(filename, &buffer)) { in FileGetPropFn()
598 ErrorAbort(state, kFreadFailure, "%s: failed to read %s", name, filename.c_str()); in FileGetPropFn()
706 const std::string& filename = args[0]; in ReadFileFn() local
709 if (android::base::ReadFileToString(filename, &contents)) { in ReadFileFn()
714 PLOG(ERROR) << name << ": Failed to read " << filename; in ReadFileFn()
732 const std::string& filename = args[1]; in WriteValueFn() local
733 if (filename.empty()) { in WriteValueFn()
738 if (!android::base::WriteStringToFile(value, filename)) { in WriteValueFn()
739 PLOG(ERROR) << name << ": Failed to write to \"" << filename << "\""; in WriteValueFn()
[all …]
/bootable/recovery/applypatch/
Dapplypatch.cpp52 bool LoadFileContents(const std::string& filename, FileContents* file) { in LoadFileContents() argument
54 if (android::base::StartsWith(filename, "EMMC:")) { in LoadFileContents()
59 if (!android::base::ReadFileToString(filename, &data)) { in LoadFileContents()
60 PLOG(ERROR) << "Failed to read \"" << filename << "\""; in LoadFileContents()
109 bool SaveFileContents(const std::string& filename, const FileContents* file) { in SaveFileContents() argument
111 open(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_SYNC, S_IRUSR | S_IWUSR)); in SaveFileContents()
113 PLOG(ERROR) << "Failed to open \"" << filename << "\" for write"; in SaveFileContents()
118 PLOG(ERROR) << "Failed to write " << file->data.size() << " bytes of data to " << filename; in SaveFileContents()
123 PLOG(ERROR) << "Failed to fsync \"" << filename << "\""; in SaveFileContents()
128 PLOG(ERROR) << "Failed to close \"" << filename << "\""; in SaveFileContents()
Dfreecache.cpp137 static int64_t FreeSpaceForFile(const std::string& filename) { in FreeSpaceForFile() argument
139 if (statfs(filename.c_str(), &sf) == -1) { in FreeSpaceForFile()
140 PLOG(ERROR) << "Failed to statfs " << filename; in FreeSpaceForFile()
Dimgdiff.cpp621 bool Image::ReadFile(const std::string& filename, std::vector<uint8_t>* file_content) { in ReadFile() argument
624 android::base::unique_fd fd(open(filename.c_str(), O_RDONLY)); in ReadFile()
626 PLOG(ERROR) << "Failed to open " << filename; in ReadFile()
631 PLOG(ERROR) << "Failed to stat " << filename; in ReadFile()
638 PLOG(ERROR) << "Failed to read " << filename; in ReadFile()
646 bool ZipModeImage::Initialize(const std::string& filename) { in Initialize() argument
647 if (!ReadFile(filename, &file_content_)) { in Initialize()
654 LOG(ERROR) << "Failed to parse the actual size of " << filename; in Initialize()
659 filename.c_str(), &handle); in Initialize()
661 LOG(ERROR) << "Failed to open zip file " << filename << ": " << ErrorCodeString(err); in Initialize()
[all …]
/bootable/recovery/otautil/include/otautil/
Dlogging.h41 ssize_t logbasename(log_id_t id, char prio, const char* filename, const char* buf, size_t len,
44 ssize_t logrotate(log_id_t id, char prio, const char* filename, const char* buf, size_t len,
Dsysutil.h84 bool MapFile(const std::string& filename);
98 bool MapBlockFile(const std::string& filename);
/bootable/recovery/
Dinterlace-frames.py94 filename = '%s%02d.png' % (output, k)
95 out2.save(filename)
96 print('Frame %d written to %s.' % (k, filename))
Drecovery_main.cpp227 static void redirect_stdio(const char* filename) { in redirect_stdio() argument
235 freopen(filename, "a", stdout); in redirect_stdio()
237 freopen(filename, "a", stderr); in redirect_stdio()
249 freopen(filename, "a", stdout); in redirect_stdio()
251 freopen(filename, "a", stderr); in redirect_stdio()
264 FILE* log_fp = fopen(filename, "ae"); in redirect_stdio()
266 PLOG(ERROR) << "fopen \"" << filename << "\" failed"; in redirect_stdio()
273 check_and_fclose(log_fp, filename); in redirect_stdio()
295 check_and_fclose(log_fp, filename); in redirect_stdio()
Drecovery-persist.cpp87 const char *filename, in logsave() argument
92 destination += filename; in logsave()
/bootable/recovery/tests/component/
Dapplypatch_modes_test.cpp39 static std::string GetEmmcTargetString(const std::string& filename, in GetEmmcTargetString() argument
42 if (!android::base::ReadFileToString(filename, &data)) { in GetEmmcTargetString()
43 PLOG(ERROR) << "Failed to read " << filename; in GetEmmcTargetString()
50 return "EMMC:"s + (display_name.empty() ? filename : display_name) + ":" + in GetEmmcTargetString()
/bootable/recovery/applypatch/include/applypatch/
Dimgdiff_image.h168 virtual bool Initialize(const std::string& filename) = 0;
201 bool ReadFile(const std::string& filename, std::vector<uint8_t>* file_content);
212 bool Initialize(const std::string& filename) override;
258 bool InitializeChunks(const std::string& filename, ZipArchiveHandle handle);
293 bool Initialize(const std::string& filename) override;
Dapplypatch.h96 bool LoadFileContents(const std::string& filename, FileContents* file);
99 bool SaveFileContents(const std::string& filename, const FileContents* file);
/bootable/recovery/tests/manual/
Drecovery_test.cpp38 static ssize_t __pmsg_fn(log_id_t logId, char prio, const char *filename, in __pmsg_fn() argument
42 EXPECT_NE(std::string::npos, kInjectTxtFilename.find(filename)); in __pmsg_fn()
/bootable/recovery/updater_sample/src/com/example/android/systemupdatersample/util/
DUpdateConfigs.java91 final String filename, in getPropertyFile() argument
95 .filter(file -> filename.equals(file.getFilename())) in getPropertyFile()
/bootable/recovery/minadbd/
DREADME.md7 receives a single blob of data, writes it to a fixed filename, and
/bootable/recovery/updater_sample/src/com/example/android/systemupdatersample/
DUpdateConfig.java198 public PackageFile(String filename, long offset, long size) { in PackageFile() argument
199 this.mFilename = filename; in PackageFile()
/bootable/recovery/recovery_ui/include/recovery_ui/
Dscreen_ui.h222 void ShowFile(const std::string& filename) override;
307 std::unique_ptr<GRSurface> LoadBitmap(const std::string& filename);
308 std::unique_ptr<GRSurface> LoadLocalizedBitmap(const std::string& filename);
Dui.h103 virtual void ShowFile(const std::string& filename) = 0;
/bootable/recovery/recovery_ui/
Dscreen_ui.cpp809 std::unique_ptr<GRSurface> ScreenRecoveryUI::LoadBitmap(const std::string& filename) { in LoadBitmap() argument
811 if (auto result = res_create_display_surface(filename.c_str(), &surface); result < 0) { in LoadBitmap()
812 LOG(ERROR) << "Failed to load bitmap " << filename << " (error " << result << ")"; in LoadBitmap()
818 std::unique_ptr<GRSurface> ScreenRecoveryUI::LoadLocalizedBitmap(const std::string& filename) { in LoadLocalizedBitmap() argument
820 if (auto result = res_create_localized_alpha_surface(filename.c_str(), locale_.c_str(), &surface); in LoadLocalizedBitmap()
822 LOG(ERROR) << "Failed to load bitmap " << filename << " (error " << result << ")"; in LoadLocalizedBitmap()
1121 void ScreenRecoveryUI::ShowFile(const std::string& filename) { in ShowFile() argument
1122 std::unique_ptr<FILE, decltype(&fclose)> fp(fopen(filename.c_str(), "re"), fclose); in ShowFile()
1124 Print(" Unable to open %s: %s\n", filename.c_str(), strerror(errno)); in ShowFile()
/bootable/recovery/fuse_sideload/
Dfuse_sideload.cpp191 std::string filename(static_cast<const char*>(data)); in handle_lookup()
192 if (filename == FUSE_SIDELOAD_HOST_FILENAME) { in handle_lookup()
196 } else if (filename == FUSE_SIDELOAD_HOST_EXIT_FLAG) { in handle_lookup()

12