Skip to content

Commit

Permalink
change mmap access
Browse files Browse the repository at this point in the history
  • Loading branch information
lvyitian committed Aug 20, 2023
1 parent 5268505 commit 1289259
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext {
moduleLibraryName = "yuanshenredirect"
magiskModuleId = "zygisk_yuanshenredirect"
moduleName = "YuanShenRedirect"
moduleAuthor = "Perfare"
moduleAuthor = "Perfare&Lvyitian"
moduleDescription = "Redirect file access of YuanShen"
moduleVersion = "v1.5.0"
moduleVersion = "v1.6.0"
moduleVersionCode = 1
}
2 changes: 1 addition & 1 deletion module/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class MyModule : public zygisk::ModuleBase {
struct stat sb{};
fstat(fd, &sb);
length = sb.st_size;
data = mmap(nullptr, length, PROT_READ, MAP_PRIVATE, fd, 0);
data = mmap(nullptr, length, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED, fd, 0);
close(fd);
} else {
LOGW("Unable to open arm file");
Expand Down

0 comments on commit 1289259

Please sign in to comment.