Skip to content

Commit

Permalink
[Normal] Support android
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdWindScholar committed Feb 19, 2024
1 parent 0ff4d79 commit 10b2689
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contextpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bin/e2fsck": "u:object_r:fsck_exec:s0",
"bin/logcat": "u:object_r:logcat_exec:s0",
"system/bin": "u:object_r:system_file:s0",
"/system/bin/init": "u:object_r:init_exec:s0",
"/system/bin/init": "u:object_r:init_exec:s0",
r"/lost\+found": "u:object_r:rootfs:s0"
}

Expand Down Expand Up @@ -41,7 +41,7 @@ def scan_dir(folder) -> list: # 读取解包的目录,返回一个字典


def str_to_selinux(string: str):
return escape(string).replace('\\-', '-')
return escape(string).replace('\\-', '-').replace(r'\@', '@').replace('@', r'\@')


def context_patch(fs_file, dir_path) -> tuple: # 接收两个字典对比
Expand Down

0 comments on commit 10b2689

Please sign in to comment.