diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..95c4320 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +/.build +/Packages +/*.xcodeproj +xcuserdata/ diff --git a/README.md b/README.md index 7547406..78c16e6 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/main.swift b/main.swift old mode 100644 new mode 100755 index f762956..2c277dc --- a/main.swift +++ b/main.swift @@ -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. @@ -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 @@ -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