Home
last modified time | relevance | path

Searched refs:idmap_path (Results 1 – 14 of 14) sorted by relevance

/frameworks/base/cmds/idmap2/idmap2d/
DIdmap2Service.cpp82 const std::string idmap_path = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_apk_path); in removeIdmap() local
83 if (!UidHasWriteAccessToPath(uid, idmap_path)) { in removeIdmap()
86 idmap_path.c_str(), uid)); in removeIdmap()
88 if (unlink(idmap_path.c_str()) != 0) { in removeIdmap()
90 return error("failed to unlink " + idmap_path + ": " + strerror(errno)); in removeIdmap()
102 const std::string idmap_path = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_apk_path); in verifyIdmap() local
103 std::ifstream fin(idmap_path); in verifyIdmap()
123 const std::string idmap_path = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_apk_path); in createIdmap() local
125 if (!UidHasWriteAccessToPath(uid, idmap_path)) { in createIdmap()
127 idmap_path.c_str(), uid)); in createIdmap()
[all …]
/frameworks/base/cmds/idmap2/idmap2/
DCreate.cpp51 std::string idmap_path; in Create() local
63 .MandatoryOption("--idmap-path", "output: path to where to write idmap file", &idmap_path) in Create()
76 if (!UidHasWriteAccessToPath(uid, idmap_path)) { in Create()
77 return Error("uid %d does not have write access to %s", uid, idmap_path.c_str()); in Create()
109 std::ofstream fout(idmap_path); in Create()
111 return Error("failed to open idmap path %s", idmap_path.c_str()); in Create()
117 return Error("failed to write to idmap path %s", idmap_path.c_str()); in Create()
DVerify.cpp35 std::string idmap_path; in Verify() local
39 .MandatoryOption("--idmap-path", "input: path to idmap file to verify", &idmap_path); in Verify()
46 std::ifstream fin(idmap_path); in Verify()
DDump.cpp41 std::string idmap_path; in Dump() local
46 .MandatoryOption("--idmap-path", "input: path to idmap file to pretty-print", &idmap_path) in Dump()
52 std::ifstream fin(idmap_path); in Dump()
DScan.cpp64 std::string idmap_path; // NOLINT(misc-non-private-member-variables-in-classes) member
207 std::string idmap_path = Idmap::CanonicalIdmapPathFor(output_directory, path); in Scan() local
210 InputOverlay input{path, idmap_path, overlay_info->priority, fulfilled_policies, in Scan()
218 if (!Verify(std::vector<std::string>({"--idmap-path", overlay.idmap_path}))) { in Scan()
221 "--idmap-path", overlay.idmap_path}; in Scan()
239 stream << overlay.idmap_path << std::endl; in Scan()
DLookup.cpp189 const auto& idmap_path = idmap_paths[i]; in Lookup() local
190 std::fstream fin(idmap_path); in Lookup()
194 return Error("failed to read idmap from %s", idmap_path.c_str()); in Lookup()
213 target_path.c_str(), idmap_path.c_str(), in Lookup()
217 auto overlay_apk = ApkAssets::LoadOverlay(idmap_path); in Lookup()
/frameworks/base/cmds/idmap/
Dscan.cpp26 apk_path(a), idmap_path(i), priority(p) {} in Overlay()
34 String8 idmap_path; member
60 fprintf(fout, "%s %s\n", overlay.apk_path.string(), overlay.idmap_path.string()); in writePackagesList()
258 String8 idmap_path(idmap_dir); in idmap_scan() local
259 idmap_path.appendPath(flatten_path(overlay_apk_path + 1)); in idmap_scan()
260 idmap_path.append("@idmap"); in idmap_scan()
262 if (idmap_create_path(target_apk_path, overlay_apk_path, idmap_path.string()) != 0) { in idmap_scan()
264 target_apk_path, overlay_apk_path, idmap_path.string()); in idmap_scan()
268 Overlay overlay(String8(overlay_apk_path), idmap_path, priority); in idmap_scan()
Didmap.cpp154 const char *idmap_path) in maybe_create_path() argument
171 return idmap_create_path(target_apk_path, overlay_apk_path, idmap_path); in maybe_create_path()
227 int maybe_inspect(const char *idmap_path) in maybe_inspect() argument
230 if (!verify_file_readable(idmap_path)) { in maybe_inspect()
231 ALOGD("error: failed to read idmap %s: %s\n", idmap_path, strerror(errno)); in maybe_inspect()
234 return idmap_inspect(idmap_path); in maybe_inspect()
Dcreate.cpp139 const char *idmap_path) in is_idmap_stale_path() argument
142 if (stat(idmap_path, &st) == -1) { in is_idmap_stale_path()
147 int idmap_fd = TEMP_FAILURE_RETRY(open(idmap_path, O_RDONLY)); in is_idmap_stale_path()
203 const char *idmap_path) in idmap_create_path() argument
205 if (!is_idmap_stale_path(target_apk_path, overlay_apk_path, idmap_path)) { in idmap_create_path()
210 int fd = open_idmap(idmap_path); in idmap_create_path()
218 unlink(idmap_path); in idmap_create_path()
Dinspect.cpp34 status_t init(const char *idmap_path) { in init() argument
38 if (stat(idmap_path, &st) < 0) { in init()
39 printe("failed to stat idmap '%s': %s\n", idmap_path, strerror(errno)); in init()
43 if ((fd = TEMP_FAILURE_RETRY(open(idmap_path, O_RDONLY))) < 0) { in init()
44 printe("failed to open idmap '%s': %s\n", idmap_path, strerror(errno)); in init()
297 int idmap_inspect(const char *idmap_path) { in idmap_inspect() argument
299 if (buf.init(idmap_path) < 0) { in idmap_inspect()
Didmap.h24 const char *idmap_path);
36 int idmap_inspect(const char *idmap_path);
/frameworks/native/cmds/installd/
DInstalldNativeService.cpp2441 const char* idmap_path, int32_t uid) { in delete_stale_idmap() argument
2442 int idmap_fd = open(idmap_path, O_RDWR); in delete_stale_idmap()
2444 PLOG(ERROR) << "idmap open failed: " << idmap_path; in delete_stale_idmap()
2445 unlink(idmap_path); in delete_stale_idmap()
2462 PLOG(ERROR) << "flock(" << idmap_path << ") failed during idmap"; in delete_stale_idmap()
2474 LOG(DEBUG) << "delete stale idmap: " << idmap_path; in delete_stale_idmap()
2475 unlink(idmap_path); in delete_stale_idmap()
2485 const char *overlay_path, char *idmap_path, size_t N) in flatten_path() argument
2487 if (overlay_path == nullptr || idmap_path == nullptr) { in flatten_path()
2505 memset(idmap_path, 0, N); in flatten_path()
[all …]
/frameworks/base/libs/androidfw/
DApkAssets.cpp58 std::unique_ptr<const ApkAssets> ApkAssets::LoadOverlay(const std::string& idmap_path, in LoadOverlay() argument
60 std::unique_ptr<Asset> idmap_asset = CreateAssetFromFile(idmap_path); in LoadOverlay()
70 LOG(ERROR) << "failed to load IDMAP " << idmap_path; in LoadOverlay()
/frameworks/base/libs/androidfw/include/androidfw/
DApkAssets.h55 static std::unique_ptr<const ApkAssets> LoadOverlay(const std::string& idmap_path,