MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / Open

Method Open

Bcore/src/main/cpp/dex/dex_file_loader.cc:114–124  ·  view source on GitHub ↗

return new DexZipArchive instance on success, null on error.

Source from the content-addressed store, hash-verified

112 public:
113 // return new DexZipArchive instance on success, null on error.
114 static DexZipArchive* Open(const uint8_t* base, size_t size, std::string* error_msg) {
115 ZipArchiveHandle handle;
116 uint8_t* nonconst_base = const_cast<uint8_t*>(base);
117 const int32_t error = OpenArchiveFromMemory(nonconst_base, size, "ZipArchiveMemory", &handle);
118 if (error) {
119 *error_msg = std::string(ErrorCodeString(error));
120 CloseArchive(handle);
121 return nullptr;
122 }
123 return new DexZipArchive(handle);
124 }
125
126 DexZipEntry* Find(const char* name, std::string* error_msg) const {
127 DCHECK(name != nullptr);

Callers

nothing calls this directly

Calls 3

OpenArchiveFromMemoryFunction · 0.85
ErrorCodeStringFunction · 0.85
CloseArchiveFunction · 0.85

Tested by

no test coverage detected