Home
last modified time | relevance | path

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

/aosp12/frameworks/base/cmds/idmap2/idmap2d/
H A DIdmap2Service.cpp95 if (!UidHasWriteAccessToPath(uid, idmap_path)) { in removeIdmap()
100 if (unlink(idmap_path.c_str()) != 0) { in removeIdmap()
116 std::ifstream fin(idmap_path); in verifyIdmap()
145 LOG(WARNING) << "idmap '" << idmap_path in verifyIdmap()
163 if (!UidHasWriteAccessToPath(uid, idmap_path)) { in createIdmap()
172 unlink(idmap_path.c_str()); in createIdmap()
191 std::ofstream fout(idmap_path); in createIdmap()
200 unlink(idmap_path.c_str()); in createIdmap()
204 *_aidl_return = idmap_path; in createIdmap()
373 if (unlink(idmap_path.c_str()) != 0) { in deleteFabricatedOverlay()
[all …]
/aosp12/frameworks/base/cmds/idmap2/idmap2/
H A 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()
H A 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()
H A 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()
H A 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()
H A 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()
H A DCommandUtils.h26 const std::string& idmap_path, const std::string& target_path, const std::string& overlay_path,
/aosp12/frameworks/base/cmds/idmap2/
H A 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…
/aosp12/frameworks/base/libs/androidfw/
H A 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()
H A 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()
/aosp12/frameworks/base/libs/androidfw/include/androidfw/
H A DIdmap.h152 static std::unique_ptr<LoadedIdmap> Load(const StringPiece& idmap_path,
205 explicit LoadedIdmap(std::string&& idmap_path,
H A DApkAssets.h60 static std::unique_ptr<ApkAssets> LoadOverlay(const std::string& idmap_path,