Skip to content

Commit ecc28ed

Browse files
committed
fix: not finding PDG symbols in some ROMs
This commit fixes the issue where in devices where the PDG (Protected Data Guard) has a different symbol ("__dl__ZN18ProtectedDataGuardC1Ev" instead of "__dl__ZN18ProtectedDataGuardC2Ev"), ReZygisk would be unable to hide libzygisk.so traces in SoList.
1 parent 5a50a8b commit ecc28ed

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

loader/src/injector/solist.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@ static inline void set_size(SoInfo *self, size_t size) {
5454
struct pdg ppdg = { 0 };
5555

5656
static bool pdg_setup(ElfImg *img) {
57+
/* INFO: Systems with both utilize *2, and the ones that lack *2, use *1. */
5758
ppdg.ctor = (void *(*)())getSymbAddress(img, "__dl__ZN18ProtectedDataGuardC2Ev");
59+
if (ppdg.ctor == NULL) ppdg.ctor = (void *(*)())getSymbAddress(img, "__dl__ZN18ProtectedDataGuardC1Ev");
60+
5861
ppdg.dtor = (void *(*)())getSymbAddress(img, "__dl__ZN18ProtectedDataGuardD2Ev");
62+
if (ppdg.dtor == NULL) ppdg.dtor = (void *(*)())getSymbAddress(img, "__dl__ZN18ProtectedDataGuardD1Ev");
5963

6064
return ppdg.ctor != NULL && ppdg.dtor != NULL;
6165
}

0 commit comments

Comments
 (0)