MCPcopy Create free account
hub / github.com/ALEX5402/NewBlackbox / setFileReadonly

Method setFileReadonly

Bcore/src/main/cpp/Hook/DexFileHook.cpp:32–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void DexFileHook::setFileReadonly(const char* filePath) {
33 struct stat fileStat;
34
35
36 if (stat(filePath, &fileStat) != 0) {
37 ALOGD("DexFileHook::setFileReadonly: %s 不存在",filePath);
38 return;
39 }
40
41
42
43 if (chmod(filePath, S_IRUSR) != 0) {
44 ALOGD("DexFileHook::setFileReadonly: 设置文件 %s 为只读时出错",filePath);
45 } else {
46 ALOGD("DexFileHook::setFileReadonly: 设置文件 %s 为只读成功",filePath);
47 }
48}

Callers

nothing calls this directly

Calls 1

statClass · 0.70

Tested by

no test coverage detected