/frameworks/base/cmds/idmap/ |
D | idmap.cpp | 127 int maybe_create_fd(const char *target_apk_path, const char *overlay_apk_path, in maybe_create_fd() argument 140 if (!verify_file_readable(target_apk_path)) { in maybe_create_fd() 141 ALOGD("error: failed to read apk %s: %s\n", target_apk_path, strerror(errno)); in maybe_create_fd() 150 return idmap_create_fd(target_apk_path, overlay_apk_path, idmap_fd); in maybe_create_fd() 153 int maybe_create_path(const char *target_apk_path, const char *overlay_apk_path, in maybe_create_path() argument 161 if (!verify_file_readable(target_apk_path)) { in maybe_create_path() 162 ALOGD("error: failed to read apk %s: %s\n", target_apk_path, strerror(errno)); in maybe_create_path() 171 return idmap_create_path(target_apk_path, overlay_apk_path, idmap_path); in maybe_create_path() 174 int maybe_verify_fd(const char *target_apk_path, const char *overlay_apk_path, in maybe_verify_fd() argument 184 if (!verify_file_readable(target_apk_path)) { in maybe_verify_fd() [all …]
|
D | create.cpp | 75 bool is_idmap_stale_fd(const char *target_apk_path, const char *overlay_apk_path, int idmap_fd) in is_idmap_stale_fd() argument 118 if (cached_target_path != target_apk_path) { in is_idmap_stale_fd() 126 if (get_zip_entry_crc(target_apk_path, AssetManager::RESOURCES_FILENAME, in is_idmap_stale_fd() 138 bool is_idmap_stale_path(const char *target_apk_path, const char *overlay_apk_path, in is_idmap_stale_path() argument 151 bool is_stale = is_idmap_stale_fd(target_apk_path, overlay_apk_path, idmap_fd); in is_idmap_stale_path() 156 int create_idmap(const char *target_apk_path, const char *overlay_apk_path, in create_idmap() argument 160 if (get_zip_entry_crc(target_apk_path, AssetManager::RESOURCES_FILENAME, in create_idmap() 170 bool b = am.createIdmap(target_apk_path, overlay_apk_path, target_crc, overlay_crc, in create_idmap() 175 int create_and_write_idmap(const char *target_apk_path, const char *overlay_apk_path, in create_and_write_idmap() argument 179 if (!is_idmap_stale_fd(target_apk_path, overlay_apk_path, fd)) { in create_and_write_idmap() [all …]
|
D | idmap.h | 23 int idmap_create_path(const char *target_apk_path, const char *overlay_apk_path, 26 int idmap_create_fd(const char *target_apk_path, const char *overlay_apk_path, int fd); 28 int idmap_verify_fd(const char *target_apk_path, const char *overlay_apk_path, int fd); 33 int idmap_scan(const char *target_package_name, const char *target_apk_path,
|
D | scan.cpp | 233 int idmap_scan(const char *target_package_name, const char *target_apk_path, in idmap_scan() argument 269 if (idmap_create_path(target_apk_path, overlay_apk_path, idmap_path.string()) != 0) { in idmap_scan() 271 target_apk_path, overlay_apk_path, idmap_path.string()); in idmap_scan()
|
/frameworks/base/cmds/idmap2/tests/ |
D | IdmapTests.cpp | 172 void CreateIdmap(const StringPiece& target_apk_path, const StringPiece& overlay_apk_path, in CreateIdmap() argument 175 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path.to_string()); in CreateIdmap() 182 Idmap::FromApkAssets(target_apk_path.to_string(), *target_apk, overlay_apk_path.to_string(), in CreateIdmap() 189 std::string target_apk_path = GetTestDataPath() + "/target/target.apk"; in TEST() local 191 CreateIdmap(target_apk_path, overlay_apk_path, PolicyFlags::POLICY_PUBLIC, in TEST() 199 ASSERT_EQ(idmap->GetHeader()->GetTargetPath().to_string(), target_apk_path); in TEST() 233 std::string target_apk_path = GetTestDataPath() + "/target/target.apk"; in TEST() local 235 CreateIdmap(target_apk_path, overlay_apk_path, in TEST() 263 std::string target_apk_path = GetTestDataPath() + "/target/target.apk"; in TEST() local 265 CreateIdmap(target_apk_path, overlay_apk_path, in TEST() [all …]
|
D | PrettyPrintVisitorTests.cpp | 38 const std::string target_apk_path(GetTestDataPath() + "/target/target.apk"); in TEST() local 39 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TEST() 47 Idmap::FromApkAssets(target_apk_path, *target_apk, overlay_apk_path, *overlay_apk, in TEST()
|
D | RawPrintVisitorTests.cpp | 33 const std::string target_apk_path(GetTestDataPath() + "/target/target.apk"); in TEST() local 34 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TEST() 42 Idmap::FromApkAssets(target_apk_path, *target_apk, overlay_apk_path, *overlay_apk, in TEST()
|
D | BinaryStreamVisitorTests.cpp | 70 const std::string target_apk_path(GetTestDataPath() + "/target/target.apk"); in TEST() local 71 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TEST() 79 Idmap::FromApkAssets(target_apk_path, *target_apk, overlay_apk_path, *overlay_apk, in TEST()
|
D | Idmap2BinaryTests.cpp | 54 void AssertIdmap(const Idmap& idmap, const std::string& target_apk_path, in AssertIdmap() argument 60 ASSERT_EQ(idmap.GetHeader()->GetTargetPath(), target_apk_path); in AssertIdmap() 65 #define ASSERT_IDMAP(idmap_ref, target_apk_path, overlay_apk_path) \ argument 67 ASSERT_NO_FATAL_FAILURE(AssertIdmap(idmap_ref, target_apk_path, overlay_apk_path)); \
|
/frameworks/base/cmds/idmap2/idmap2/ |
D | Create.cpp | 49 std::string target_apk_path; in Create() local 59 &target_apk_path) in Create() 92 const std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in Create() 94 return Error("failed to load apk %s", target_apk_path.c_str()); in Create() 102 const auto idmap = Idmap::FromApkAssets(target_apk_path, *target_apk, overlay_apk_path, in Create()
|
D | Scan.cpp | 126 std::string target_apk_path; in Scan() local 138 .MandatoryOption("--target-apk-path", "path to target apk", &target_apk_path) in Scan() 207 std::vector<std::string> create_args = {"--target-apk-path", target_apk_path, in Scan()
|
/frameworks/base/cmds/idmap2/idmap2d/ |
D | Idmap2Service.cpp | 113 Status Idmap2Service::createIdmap(const std::string& target_apk_path, in createIdmap() argument 118 SYSTRACE << "Idmap2Service::createIdmap " << target_apk_path << " " << overlay_apk_path; in createIdmap() 130 const std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in createIdmap() 132 return error("failed to load apk " + target_apk_path); in createIdmap() 140 const auto idmap = Idmap::FromApkAssets(target_apk_path, *target_apk, overlay_apk_path, in createIdmap()
|
D | Idmap2Service.h | 45 binder::Status createIdmap(const std::string& target_apk_path,
|
/frameworks/base/cmds/idmap2/libidmap2/ |
D | Idmap.cpp | 322 Result<std::unique_ptr<const Idmap>> Idmap::FromApkAssets(const std::string& target_apk_path, in FromApkAssets() argument 359 const std::unique_ptr<const ZipFile> target_zip = ZipFile::Open(target_apk_path); in FromApkAssets() 390 if (target_apk_path.size() > sizeof(header->target_path_)) { in FromApkAssets() 391 return Error("target apk path \"%s\" longer than maximum size %zu", target_apk_path.c_str(), in FromApkAssets() 395 memcpy(header->target_path_, target_apk_path.data(), target_apk_path.size()); in FromApkAssets() 398 return Error("overlay apk path \"%s\" longer than maximum size %zu", target_apk_path.c_str(), in FromApkAssets()
|
/frameworks/base/cmds/idmap2/include/idmap2/ |
D | Idmap.h | 235 static Result<std::unique_ptr<const Idmap>> FromApkAssets(const std::string& target_apk_path,
|