/frameworks/base/cmds/idmap/ |
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 121 if (cached_overlay_path != overlay_apk_path) { in is_idmap_stale_fd() 130 if (get_zip_entry_crc(overlay_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 164 if (get_zip_entry_crc(overlay_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.cpp | 127 int maybe_create_fd(const char *target_apk_path, const char *overlay_apk_path, in maybe_create_fd() argument 145 if (!verify_file_readable(overlay_apk_path)) { in maybe_create_fd() 146 ALOGD("error: failed to read apk %s: %s\n", overlay_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 166 if (!verify_file_readable(overlay_apk_path)) { in maybe_create_path() 167 ALOGD("error: failed to read apk %s: %s\n", overlay_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 189 if (!verify_file_readable(overlay_apk_path)) { in maybe_verify_fd() [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);
|
D | scan.cpp | 251 char overlay_apk_path[PATH_MAX + 1]; in idmap_scan() local 252 snprintf(overlay_apk_path, PATH_MAX, "%s/%s", overlay_dir, dirent->d_name); in idmap_scan() 253 if (stat(overlay_apk_path, &st) < 0) { in idmap_scan() 260 int priority = parse_apk(overlay_apk_path, target_package_name); in idmap_scan() 266 idmap_path.appendPath(flatten_path(overlay_apk_path + 1)); in idmap_scan() 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() 275 Overlay overlay(String8(overlay_apk_path), idmap_path, priority); in idmap_scan()
|
/frameworks/base/cmds/idmap2/idmap2d/ |
D | Idmap2Service.cpp | 69 Status Idmap2Service::getIdmapPath(const std::string& overlay_apk_path, in getIdmapPath() argument 72 SYSTRACE << "Idmap2Service::getIdmapPath " << overlay_apk_path; in getIdmapPath() 73 *_aidl_return = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_apk_path); in getIdmapPath() 77 Status Idmap2Service::removeIdmap(const std::string& overlay_apk_path, in removeIdmap() argument 80 SYSTRACE << "Idmap2Service::removeIdmap " << overlay_apk_path; in removeIdmap() 82 const std::string idmap_path = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_apk_path); in removeIdmap() 96 Status Idmap2Service::verifyIdmap(const std::string& overlay_apk_path, in verifyIdmap() argument 100 SYSTRACE << "Idmap2Service::verifyIdmap " << overlay_apk_path; in verifyIdmap() 102 const std::string idmap_path = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_apk_path); in verifyIdmap() 114 const std::string& overlay_apk_path, int32_t fulfilled_policies, in createIdmap() argument [all …]
|
D | Idmap2Service.h | 36 binder::Status getIdmapPath(const std::string& overlay_apk_path, int32_t user_id, 39 binder::Status removeIdmap(const std::string& overlay_apk_path, int32_t user_id, 42 binder::Status verifyIdmap(const std::string& overlay_apk_path, int32_t fulfilled_policies, 46 const std::string& overlay_apk_path, int32_t fulfilled_policies,
|
/frameworks/base/cmds/idmap2/tests/ |
D | IdmapTests.cpp | 172 void CreateIdmap(const StringPiece& target_apk_path, const StringPiece& overlay_apk_path, in CreateIdmap() argument 178 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path.to_string()); in CreateIdmap() 182 Idmap::FromApkAssets(target_apk_path.to_string(), *target_apk, overlay_apk_path.to_string(), in CreateIdmap() 190 std::string overlay_apk_path = GetTestDataPath() + "/overlay/overlay.apk"; in TEST() local 191 CreateIdmap(target_apk_path, overlay_apk_path, PolicyFlags::POLICY_PUBLIC, in TEST() 200 ASSERT_EQ(idmap->GetHeader()->GetOverlayPath(), overlay_apk_path); in TEST() 201 ASSERT_EQ(idmap->GetHeader()->GetOverlayPath(), overlay_apk_path); in TEST() 234 std::string overlay_apk_path = GetTestDataPath() + "/system-overlay/system-overlay.apk"; in TEST() local 235 CreateIdmap(target_apk_path, overlay_apk_path, in TEST() 264 std::string overlay_apk_path = GetTestDataPath() + "/signature-overlay/signature-overlay.apk"; in TEST() local [all …]
|
D | PrettyPrintVisitorTests.cpp | 42 const std::string overlay_apk_path(GetTestDataPath() + "/overlay/overlay.apk"); in TEST() local 43 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TEST() 47 Idmap::FromApkAssets(target_apk_path, *target_apk, overlay_apk_path, *overlay_apk, in TEST()
|
D | RawPrintVisitorTests.cpp | 37 const std::string overlay_apk_path(GetTestDataPath() + "/overlay/overlay.apk"); in TEST() local 38 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TEST() 42 Idmap::FromApkAssets(target_apk_path, *target_apk, overlay_apk_path, *overlay_apk, in TEST()
|
D | BinaryStreamVisitorTests.cpp | 74 const std::string overlay_apk_path(GetTestDataPath() + "/overlay/overlay.apk"); in TEST() local 75 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TEST() 79 Idmap::FromApkAssets(target_apk_path, *target_apk, overlay_apk_path, *overlay_apk, in TEST()
|
D | Idmap2BinaryTests.cpp | 55 const std::string& overlay_apk_path) { in AssertIdmap() argument 61 ASSERT_EQ(idmap.GetHeader()->GetOverlayPath(), overlay_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 | 50 std::string overlay_apk_path; in Create() local 62 &overlay_apk_path) in Create() 97 const std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in Create() 99 return Error("failed to load apk %s", overlay_apk_path.c_str()); in Create() 102 const auto idmap = Idmap::FromApkAssets(target_apk_path, *target_apk, overlay_apk_path, in Create()
|
/frameworks/base/cmds/idmap2/libidmap2/ |
D | Idmap.cpp | 324 const std::string& overlay_apk_path, in FromApkAssets() argument 364 const std::unique_ptr<const ZipFile> overlay_zip = ZipFile::Open(overlay_apk_path); in FromApkAssets() 369 auto overlay_info = utils::ExtractOverlayManifestInfo(overlay_apk_path); in FromApkAssets() 397 if (overlay_apk_path.size() > sizeof(header->overlay_path_)) { in FromApkAssets() 402 memcpy(header->overlay_path_, overlay_apk_path.data(), overlay_apk_path.size()); in FromApkAssets() 428 LOG(WARNING) << "overlay \"" << overlay_apk_path in FromApkAssets() 440 overlay_apk_path.c_str()); in FromApkAssets()
|
/frameworks/base/cmds/idmap2/include/idmap2/ |
D | Idmap.h | 237 const std::string& overlay_apk_path,
|