5 Star 11 Fork 3

xiaozhuai / odourless

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

odourless

logo.png

English README

Odourless是一个禁止MacOS系统生成.DS_Store的工具.

支持 10.12 到 Big Sur

每次升级Odourless后,请手动重新安装daemon

当前是非稳定版, 使用需自行承担风险.

预览

preview.png

如何工作

使用 frida-core 注入 Finder.app 进程, 通过 frida-gum 来替换部分系统调用, 包括 open, openx_np, getattrlist, setattrlist.

每当 Finder 尝试调用这些方法且传入的路径是一个 .DS_Store 文件, 它将会将其替换为一个假的路径, 位于 /usr/local/var/.odourless_cage.

正如你看到的, .DS_Store 并不会被删除, 因此你的文件夹视图功能依然可以正常工作. 它只是将 .DS_Store 放到了一个你不需要关心的目录.

非常感谢 @darwin@JK3Y 的帮助!

此项目脱胎于 binaryage/asepsisJK3Y/asepsis

更多关于实现的细节, 参见 https://github.com/JK3Y/asepsis/issues/25 里的讨论内容.

如何使用

安装

从release页面下载应用.

Odourless.app 移动至 /Applications 目录以安装, 打开后点击 install 安装守护进程.

之后每次重启, odourless-daemon 将会自动启动.

关闭SIP

使用此应用, 你必须关闭SIP.

  1. 点击顶部菜单栏苹果图标
  2. 点击重启...
  3. 按住 Command-R 启动到恢复模式
  4. 点击 Utilities(实用工具).
  5. 选择 Terminal(终端).
  6. 输入 csrutil disable 并按回车. (可能需要输入密码)
  7. 重启

如何构建

对于构建Odourless, xcode 不是必要的. 但至少需要安装 Command Line Tools.

输入命令 xcode-select --install 来安装 Command Line Tools.

还需要 cmake.

输入命令 brew install cmake 来安装 cmake.

git clone --recursive https://github.com/xiaozhuai/odourless
cd odourless
./download-frida-libs.sh
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=x86_64 -B build .
cmake --build build -- install -j8
open build/dist

模块功能

Odourless.app

Odourless.app 仅仅是一个用于安装/卸载和管理 odourless-daemon 的图形界面工具.

odourless-daemon

一个用于将 libodourless-inject.dylib 注入到 Finder 进程的守护进程. 它会监听 Finder 是否重启, 并在 Finder 重启后重新注入.

odourless-ctl

和 Odourless.app 的功能相同, 命令行方式管理 odourless-daemon 的工具. 如果你更喜欢命令行的话. (暂不可用)

libodourless-inject.dylib

替换 Finder 进程中的部分系统调用.

MIT License Copyright (c) 2019 xiaozhuai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Odourless是一个禁止MacOS系统生成.DS_Store的工具 展开 收起
C++ 等 4 种语言
MIT
取消

发行版 (8)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/xiaozhuai/odourless.git
git@gitee.com:xiaozhuai/odourless.git
xiaozhuai
odourless
odourless
master

搜索帮助