/bootable/recovery/tests/unit/ |
D | sysutil_test.cpp | 114 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 …]
|
D | applypatch_modes_test.cpp | 39 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/updater_sample/tools/ |
D | test_gen_update_config.py | 39 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()
|
D | gen_update_config.py | 107 filename, offset, size = file.split(':') 109 'filename': filename,
|
/bootable/recovery/updater/ |
D | simulator_runtime.cpp | 84 int SimulatorRuntime::WipeBlockDevice(const std::string_view filename, size_t /* len */) const { in WipeBlockDevice() argument 85 LOG(INFO) << "SKip wiping block device " << filename; in WipeBlockDevice() 89 bool SimulatorRuntime::ReadFileToString(const std::string_view filename, in ReadFileToString() argument 91 if (android::base::EndsWith(filename, "oem.prop")) { in ReadFileToString() 95 LOG(INFO) << "SKip reading filename " << filename; in ReadFileToString() 100 const std::string_view filename) const { in WriteStringToFile() 101 LOG(INFO) << "SKip writing " << content.size() << " bytes to file " << filename; in WriteStringToFile()
|
D | install.cpp | 561 const std::string& filename = args[0]; in FileGetPropFn() local 566 if (!updater_runtime->ReadFileToString(filename, &buffer)) { in FileGetPropFn() 567 ErrorAbort(state, kFreadFailure, "%s: failed to read %s", name, filename.c_str()); in FileGetPropFn() 658 const std::string& filename = args[0]; in ReadFileFn() local 662 if (updater_runtime->ReadFileToString(filename, &contents)) { in ReadFileFn() 667 PLOG(ERROR) << name << ": Failed to read " << filename; in ReadFileFn() 685 const std::string& filename = args[1]; in WriteValueFn() local 686 if (filename.empty()) { in WriteValueFn() 692 if (!updater_runtime->WriteStringToFile(value, filename)) { in WriteValueFn() 693 PLOG(ERROR) << name << ": Failed to write to \"" << filename << "\""; in WriteValueFn() [all …]
|
D | updater_runtime.cpp | 141 bool UpdaterRuntime::ReadFileToString(const std::string_view filename, std::string* content) const { in ReadFileToString() argument 142 return android::base::ReadFileToString(std::string(filename), content); in ReadFileToString() 146 const std::string_view filename) const { in WriteStringToFile() 147 return android::base::WriteStringToFile(std::string(content), std::string(filename)); in WriteStringToFile() 150 int UpdaterRuntime::WipeBlockDevice(const std::string_view filename, size_t len) const { in WipeBlockDevice() argument 151 android::base::unique_fd fd(open(std::string(filename).c_str(), O_WRONLY)); in WipeBlockDevice() 153 PLOG(ERROR) << "Failed to open " << filename; in WipeBlockDevice()
|
/bootable/recovery/recovery_utils/ |
D | logging.cpp | 87 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()
|
/bootable/recovery/applypatch/ |
D | applypatch.cpp | 52 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()
|
D | imgdiff.cpp | 621 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 …]
|
D | freecache.cpp | 137 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()
|
/bootable/recovery/edify/include/edify/ |
D | updater_runtime_interface.h | 55 virtual bool ReadFileToString(const std::string_view filename, std::string* content) const = 0; 59 const std::string_view filename) const = 0; 62 virtual int WipeBlockDevice(const std::string_view filename, size_t len) const = 0;
|
/bootable/recovery/ |
D | recovery_main.cpp | 233 static void redirect_stdio(const char* filename) { in redirect_stdio() argument 241 freopen(filename, "a", stdout); in redirect_stdio() 243 freopen(filename, "a", stderr); in redirect_stdio() 255 freopen(filename, "a", stdout); in redirect_stdio() 257 freopen(filename, "a", stderr); in redirect_stdio() 270 FILE* log_fp = fopen(filename, "ae"); in redirect_stdio() 272 PLOG(ERROR) << "fopen \"" << filename << "\" failed"; in redirect_stdio() 279 check_and_fclose(log_fp, filename); in redirect_stdio() 301 check_and_fclose(log_fp, filename); in redirect_stdio()
|
D | interlace-frames.py | 94 filename = '%s%02d.png' % (output, k) 95 out2.save(filename) 96 print('Frame %d written to %s.' % (k, filename))
|
D | recovery-persist.cpp | 85 const char *filename, in logsave() argument 90 destination += filename; in logsave()
|
/bootable/recovery/updater/include/updater/ |
D | updater_runtime.h | 48 bool ReadFileToString(const std::string_view filename, std::string* content) const override; 50 const std::string_view filename) const override; 52 int WipeBlockDevice(const std::string_view filename, size_t len) const override;
|
D | simulator_runtime.h | 45 bool ReadFileToString(const std::string_view filename, std::string* content) const override; 47 const std::string_view filename) const override; 49 int WipeBlockDevice(const std::string_view filename, size_t len) const override;
|
/bootable/recovery/applypatch/include/applypatch/ |
D | imgdiff_image.h | 168 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;
|
D | applypatch.h | 97 bool LoadFileContents(const std::string& filename, FileContents* file); 100 bool SaveFileContents(const std::string& filename, const FileContents* file);
|
/bootable/recovery/recovery_utils/include/recovery_utils/ |
D | logging.h | 41 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,
|
/bootable/recovery/otautil/include/otautil/ |
D | sysutil.h | 84 bool MapFile(const std::string& filename); 98 bool MapBlockFile(const std::string& filename);
|
/bootable/recovery/tests/manual/ |
D | recovery_test.cpp | 38 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/ |
D | UpdateConfigs.java | 91 final String filename, in getPropertyFile() argument 95 .filter(file -> filename.equals(file.getFilename())) in getPropertyFile()
|
/bootable/recovery/recovery_ui/ |
D | screen_ui.cpp | 816 std::unique_ptr<GRSurface> ScreenRecoveryUI::LoadBitmap(const std::string& filename) { in LoadBitmap() argument 818 if (auto result = res_create_display_surface(filename.c_str(), &surface); result < 0) { in LoadBitmap() 819 LOG(ERROR) << "Failed to load bitmap " << filename << " (error " << result << ")"; in LoadBitmap() 825 std::unique_ptr<GRSurface> ScreenRecoveryUI::LoadLocalizedBitmap(const std::string& filename) { in LoadLocalizedBitmap() argument 827 auto result = res_create_localized_alpha_surface(filename.c_str(), locale_.c_str(), &surface); in LoadLocalizedBitmap() 832 LOG(WARNING) << "Failed to load bitmap " << filename << " for locale " << locale_ << " (error " in LoadLocalizedBitmap() 835 result = res_create_localized_alpha_surface(filename.c_str(), DEFAULT_LOCALE, &surface); in LoadLocalizedBitmap() 840 LOG(ERROR) << "Failed to load bitmap " << filename << " for locale " << DEFAULT_LOCALE in LoadLocalizedBitmap() 1156 void ScreenRecoveryUI::ShowFile(const std::string& filename) { in ShowFile() argument 1157 std::unique_ptr<FILE, decltype(&fclose)> fp(fopen(filename.c_str(), "re"), fclose); in ShowFile() [all …]
|
/bootable/recovery/updater_sample/src/com/example/android/systemupdatersample/ |
D | UpdateConfig.java | 198 public PackageFile(String filename, long offset, long size) { in PackageFile() argument 199 this.mFilename = filename; in PackageFile()
|