Skip to content

Commit

Permalink
Version 11
Browse files Browse the repository at this point in the history
fixed #25
  • Loading branch information
pook authored and pook committed Oct 30, 2019
1 parent 4d17e9d commit da5b829
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ It is very unstable. There are many known issues. Read [Issues](https://github.c

4. Open **Terminal** application and clone this repository by running this command: `git clone https://github.com/pookjw/SidecarPatcher`

5. Run main.swift: `sudo swift SidecarPatcher/main.swift`
5. Give excute permission: `chmod +x SidecarPatcher/main.swift`

6. Run main.swift: `sudo swift SidecarPatcher/main.swift`

- You will need to enter your macOS password.

Expand Down
8 changes: 4 additions & 4 deletions main.swift
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
SidecarPatcher - Version 10
SidecarPatcher - Version 11

Enabling Sidecar on old Mac (2015 or older)
But I don't have Sidecar-unsupported Mac so I don't know it works.
Expand Down Expand Up @@ -63,8 +63,8 @@ func checkSystem(core: String, code: [String: PatchCode]) -> [PatchCode]{
}

// Check SIP status
if !(shell("csrutil status") == ("System Integrity Protection status: disabled.\n")){
assertionFailure("System Integrity Protection is enabled")
if !(shell("csrutil status") == "System Integrity Protection status: disabled.\n") && !(shell("csrutil status").contains("Filesystem Protections: disabled")){
assertionFailure("Filesystem Protections of System Integrity Protection is enabled")
}

// Check privilege
Expand Down Expand Up @@ -150,7 +150,7 @@ var patchDictionary: [String: PatchCode] = [:]
patchDictionary["Mac"] = PatchCode(original: "694d616331332c3100694d616331332c3200694d616331332c3300694d616331342c3100694d616331342c3200694d616331342c3300694d616331342c3400694d616331352c3100694d616331362c3100694d616331362c32004d6163426f6f6b382c31004d6163426f6f6b416972352c31004d6163426f6f6b416972352c32004d6163426f6f6b416972362c31004d6163426f6f6b416972362c32004d6163426f6f6b416972372c31004d6163426f6f6b416972372c32004d6163426f6f6b50726f392c31004d6163426f6f6b50726f392c32004d6163426f6f6b50726f31302c31004d6163426f6f6b50726f31302c32004d6163426f6f6b50726f31312c31004d6163426f6f6b50726f31312c32004d6163426f6f6b50726f31312c33004d6163426f6f6b50726f31312c34004d6163426f6f6b50726f31312c35004d6163426f6f6b50726f31322c31004d61636d696e69362c31004d61636d696e69362c32004d61636d696e69372c31004d616350726f352c31004d616350726f362c31", patched: "694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c3000694d616330302c30004d6163426f6f6b302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b416972302c30004d6163426f6f6b50726f302c30004d6163426f6f6b50726f302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d6163426f6f6b50726f30302c30004d61636d696e69302c30004d61636d696e69302c30004d61636d696e69302c30004d616350726f302c30004d616350726f302c30")
patchDictionary["iPad"] = PatchCode(original: "69506164342c310069506164342c320069506164342c330069506164342c340069506164342c350069506164342c360069506164342c370069506164342c380069506164342c390069506164352c310069506164352c320069506164352c330069506164352c340069506164362c31310069506164362c3132", patched: "69506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c300069506164302c30300069506164302c3030")

print("SidecarPatcher (Version 10)")
print("SidecarPatcher (Version 11)")
print("GitHub : https://github.com/pookjw/SidecarPatcher") // don't erase this
let originalCore = importCore(path: SidecarCorePath) // get code
let patchToCode = checkSystem(core: originalCore, code: patchDictionary) // check availability and get patch code
Expand Down

0 comments on commit da5b829

Please sign in to comment.