Home
last modified time | relevance | path

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

/frameworks/base/cmds/idmap2/idmap2d/
DIdmap2Service.cpp94 const std::string idmap_path = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_path); in removeIdmap() local
95 if (!UidHasWriteAccessToPath(uid, idmap_path)) { in removeIdmap()
98 idmap_path.c_str(), uid)); in removeIdmap()
100 if (unlink(idmap_path.c_str()) != 0) { in removeIdmap()
102 return error("failed to unlink " + idmap_path + ": " + strerror(errno)); in removeIdmap()
115 const std::string idmap_path = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_path); in verifyIdmap() local
116 std::ifstream fin(idmap_path); in verifyIdmap()
121 LOG(WARNING) << "failed to parse idmap header of '" << idmap_path << "'"; in verifyIdmap()
145 LOG(WARNING) << "idmap '" << idmap_path in verifyIdmap()
161 const std::string idmap_path = Idmap::CanonicalIdmapPathFor(kIdmapCacheDir, overlay_path); in createIdmap() local
[all …]
/frameworks/base/cmds/idmap2/idmap2/
DCreateMultiple.cpp102 const std::string idmap_path = Idmap::CanonicalIdmapPathFor(idmap_dir, overlay_apk_path); in CreateMultiple() local
104 if (!UidHasWriteAccessToPath(uid, idmap_path)) { in CreateMultiple()
105 LOG(WARNING) << "uid " << uid << "does not have write access to " << idmap_path.c_str(); in CreateMultiple()
110 if (!Verify(idmap_path, target_apk_path, overlay_apk_path, "", fulfilled_policies, in CreateMultiple()
126 std::ofstream fout(idmap_path); in CreateMultiple()
128 LOG(WARNING) << "failed to open idmap path " << idmap_path.c_str(); in CreateMultiple()
136 LOG(WARNING) << "failed to write to idmap path %s" << idmap_path.c_str(); in CreateMultiple()
141 idmap_paths.emplace_back(idmap_path); in CreateMultiple()
144 for (const std::string& idmap_path : idmap_paths) { in CreateMultiple() local
145 std::cout << idmap_path << std::endl; in CreateMultiple()
DCreate.cpp53 std::string idmap_path; in Create() local
66 .MandatoryOption("--idmap-path", "output: path to where to write idmap file", &idmap_path) in Create()
81 if (!UidHasWriteAccessToPath(uid, idmap_path)) { in Create()
82 return Error("uid %d does not have write access to %s", uid, idmap_path.c_str()); in Create()
114 std::ofstream fout(idmap_path); in Create()
116 return Error("failed to open idmap path '%s'", idmap_path.c_str()); in Create()
123 return Error("failed to write to idmap path '%s'", idmap_path.c_str()); in Create()
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()
DCommandUtils.cpp35 Result<Unit> Verify(const std::string& idmap_path, const std::string& target_path, in Verify() argument
38 SYSTRACE << "Verify " << idmap_path; in Verify()
39 std::ifstream fin(idmap_path); in Verify()
DLookup.cpp181 const auto& idmap_path = idmap_paths[i]; in Lookup() local
182 std::fstream fin(idmap_path); in Lookup()
186 return Error("failed to read idmap from %s", idmap_path.c_str()); in Lookup()
210 target_path.c_str(), idmap_path.c_str(), idmap_header->GetTargetPath().c_str()); in Lookup()
213 auto overlay_apk = ApkAssets::LoadOverlay(idmap_path); in Lookup()
DCommandUtils.h26 const std::string& idmap_path, const std::string& target_path, const std::string& overlay_path,
/frameworks/base/cmds/idmap2/
Dvalgrind.sh50 idmap_path="/tmp/a.idmap"
53 …cy public --target-apk-path $target_path --overlay-apk-path $overlay_path --idmap-path $idmap_path"
54 _eval "idmap2 dump" "$valgrind idmap2 dump --idmap-path $idmap_path"
55 _eval "idmap2 lookup" "$valgrind idmap2 lookup --idmap-path $idmap_path --config '' --resid test.ta…
/frameworks/base/libs/androidfw/
DApkAssets.cpp69 std::unique_ptr<ApkAssets> ApkAssets::LoadOverlay(const std::string& idmap_path, in LoadOverlay() argument
72 auto idmap_asset = AssetsProvider::CreateAssetFromFile(idmap_path); in LoadOverlay()
74 LOG(ERROR) << "failed to read IDMAP " << idmap_path; in LoadOverlay()
80 auto loaded_idmap = LoadedIdmap::Load(idmap_path, idmap_data); in LoadOverlay()
82 LOG(ERROR) << "failed to load IDMAP " << idmap_path; in LoadOverlay()
DIdmap.cpp235 LoadedIdmap::LoadedIdmap(std::string&& idmap_path, in LoadedIdmap() argument
250 idmap_path_(std::move(idmap_path)), in LoadedIdmap()
255 std::unique_ptr<LoadedIdmap> LoadedIdmap::Load(const StringPiece& idmap_path, in Load() argument
331 new LoadedIdmap(idmap_path.to_string(), header, data_header, target_entries, in Load()
/frameworks/base/libs/androidfw/include/androidfw/
DIdmap.h152 static std::unique_ptr<LoadedIdmap> Load(const StringPiece& idmap_path,
205 explicit LoadedIdmap(std::string&& idmap_path,
DApkAssets.h60 static std::unique_ptr<ApkAssets> LoadOverlay(const std::string& idmap_path,