Advertisement
Guest User

AppleIntelSNBGraphicsFB

a guest
Sep 15th, 2013
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.41 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function main()
  4. {
  5.   echo "Patching AppleIntelSNBGraphicsFB ..."
  6.   perl -pi -e 's|\x01\x02\x04\x00\x10\x07\x00\x00\x10\x07\x00\x00\x05\x03\x00\x00\x02\x00\x00\x00\x30\x00\x00\x00\x02\x05\x00\x00\x00\x04\x00\x00\x07\x00\x00\x00|\x01\x02\x02\x00\x10\x07\x00\x00\x10\x07\x00\x00\x05\x03\x00\x00\x02\x00\x00\x00\x30\x00\x00\x00\x06\x02\x00\x00\x00\x04\x00\x00\x07\x00\x00\x00|g' /System/Library/Extensions/AppleIntelSNBGraphicsFB.kext/Contents/MacOS/AppleIntelSNBGraphicsFB
  7.  
  8.   echo "Fixing Permissions ..."
  9.   chown -R 0:0 /System/Library/Extensions/AppleIntelSNBGraphicsFB.kext
  10.   chmod -R 755 /System/Library/Extensions/AppleIntelSNBGraphicsFB.kext
  11.  
  12.   echo "Rebuilding cache..."
  13.   rm -fr /System/Library/Caches/*
  14.   touch /System/Library/Extensions
  15.  
  16.   echo "Done! You can now reboot the computer, cold boot is recommended...!"
  17. }
  18.  
  19. #--------------------------------------------------------------------------------
  20. #
  21. # Only administrators (root) are allowed to run this script.
  22. #
  23. #--------------------------------------------------------------------------------
  24.  
  25. function _isRoot()
  26. {
  27.   if [ $(id -u) != 0 ]; then
  28.       echo "This script must be run as root" 1>&2
  29.       exit 1
  30.   fi
  31.  
  32.   echo 1
  33. }
  34.  
  35. #==================================== START =====================================
  36.  
  37. if [ $(_isRoot) ]; then
  38.   main
  39. fi
  40.  
  41. #================================================================================
  42.  
  43. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement