快捷导航

.

.

 找回密码
 免费注册
Safari 10.0.2 MacOS 10.12.2
可能是因为安全原因, macOS 10.12.2 中将一些Thunderbolt 3 雷电3 的设备屏蔽. 或者说Thunderbolt 3 链接上有个白名单, 就是苹果认为哪些设备安全就允许链接, 而一些比较新的设备没有通过苹果认证或者允许当你链接 Thunderbolt 3 的时候就会显示不支持状态, Unsupported .

pic 2016-12-31 上午12.33.49.png


如下是个牛人开发的补丁可以取消这个限制.


10.13.0
tb3-enabler-master-10-13.zip (5.1 KB, 下载次数: 320)

---

10.12.6 版本
tb3-enabler-master-10-12-6.zip (5.22 KB, 下载次数: 244)


tb3-enabler-master.zip (4.85 KB, 下载次数: 419)

---




10.12.4 版本
tb3-enabler-master 2.zip (6.62 KB, 下载次数: 347)


10.12.5 版本
tb3-enabler-master-10-12-5.zip (4.79 KB, 下载次数: 407)

下载后会在个人目录 - 下载目录里 获得一个
tb3-enabler-master 文件夹.

首先你需要先关闭 SIP . 教程这里走

随后打开终端输入

cd ~/Downloads/tb3-enabler-master

回车

然后输入

sudo ./tb3-enabler.py apply


pic 2016-12-30 下午10.14.52.png


反正会执行一大堆东西不要管.

随后输入 reboot 重启电脑.
重启后, 第三方不兼容的 Thunderbolt3 雷电3设备就可以链接使用了.

如下命令可以显示是否补丁成功

./tb3-enabler.py status

target: patched, 10.12.2 (16C67)

backup: original, 10.12.2 (16C67)



这里 Target 就是 patched 已经打了补丁了.

如果要恢复之前的状态的话只要在终端内输入
./tb3-enabler.py restore

目前补丁支持10.12.1 与 10.12.2 .

可能在后续的macOS更新中会更新支持更多的Thunderbolt3 设备, 或许日后就不需要手动补丁了. 这个是个临时的解决方案.




tb3-enabler-master.zip

4.66 KB, 下载次数: 389

已有 1 人评分苹果 收起 理由
企聘战士 + 2

总评分: 苹果 + 2   查看全部评分

分享 17-9-27 22:58:30
cydsss ( ) ( 赞 1 )

Firefox 55.0 macOS 10.12
  1. #!/usr/bin/env python

  2. # Modified based on Loic Nageleisen's trim_patcher
  3. # https://github.com/lloeki/trim_patcher/

  4. from __future__ import print_function
  5. import os
  6. import sys
  7. import re
  8. import hashlib
  9. import shutil
  10. from subprocess import Popen, PIPE
  11. import shlex

  12. ORIGINAL = 'original'
  13. PATCHED = 'patched'

  14. target = ("/System/Library/Extensions/IOThunderboltFamily.kext/"
  15.           "Contents/MacOS/IOThunderboltFamily")
  16. backup = "%s.original" % target

  17. md5_version = {
  18.     "00e2f0eb5db157462a83e4de50583e33": ["10.12.1 (16B2659)"],
  19.     "ebde660af1f51dc7482551e8d07c62fd": ["10.12.2 (16C67)"],
  20.     "7fbc510cf91676739d638e1319d44e0e": ["10.12.3 (16D32)"],
  21.     "33ff6f5326eba100d4e7c490f9bbf91e": ["10.12.4 (16E195)"],
  22.     "58703942f8d4e5d499673c42cab0c923": ["10.12.5 (16F73)"],
  23.     "8ef3cf6dd8528976717e239aa8b20129": ["10.12.6 (16G29)"],
  24.     "b58ba765f901b3b6f2fac39c2040e523": ["10.13.0 (17A365)"]
  25. }
  26. md5_patch = {
  27.     "00e2f0eb5db157462a83e4de50583e33": "a6c2143c2f085c2c104369d7a1adfe03",
  28.     "ebde660af1f51dc7482551e8d07c62fd": "2ebb68137da4a1cb0dfc6e6f05be3db2",
  29.     "7fbc510cf91676739d638e1319d44e0e": "0af475c26cdf5e26f8fd7e4341dadea5",
  30.     "33ff6f5326eba100d4e7c490f9bbf91e": "9237f013ab92f7eb5913bd142abf5fae",
  31.     "58703942f8d4e5d499673c42cab0c923": "86c40c5b6cadcfe56f7a7a1e1d554dc9",
  32.     "8ef3cf6dd8528976717e239aa8b20129": "bc84c36d884178d6e743cd11a8a22e93",
  33.     "b58ba765f901b3b6f2fac39c2040e523": "06a1a1fedc294b1bb78bc92625e412e1"
  34. }
  35. md5_patch_r = dict((v, k) for k, v in md5_patch.items())

  36. re_index = [
  37.     {
  38.         'search': "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x81\xEC\x38\x01",
  39.         'replace': "\x55\x48\x89\xE5\x31\xC0\x5D\xC3\x41\x55\x41\x54\x53\x48\x81\xEC\x38\x01"
  40.     },
  41.     {
  42.         'search': "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x81\xEC\x28\x01",
  43.         'replace': "\x55\x48\x89\xE5\x31\xC0\x5D\xC3\x41\x55\x41\x54\x53\x48\x81\xEC\x28\x01"
  44.     }
  45. ]
  46. re_md5 = {
  47.     0: [
  48.         "00e2f0eb5db157462a83e4de50583e33",
  49.         "ebde660af1f51dc7482551e8d07c62fd",
  50.         "7fbc510cf91676739d638e1319d44e0e",
  51.         "33ff6f5326eba100d4e7c490f9bbf91e",
  52.         "58703942f8d4e5d499673c42cab0c923",
  53.         "8ef3cf6dd8528976717e239aa8b20129"
  54.         ],
  55.     1: [
  56.         "b58ba765f901b3b6f2fac39c2040e523",
  57.         ]
  58. }
  59. md5_re = dict((v, re_index[k]) for k, l in re_md5.items() for v in l)


  60. def md5(filename):
  61.     h = hashlib.md5()
  62.     with open(filename, 'rb') as f:
  63.         for chunk in iter(lambda: f.read(8192), ''):
  64.             h.update(chunk)
  65.     return h.hexdigest()


  66. def backquote(command):
  67.     return Popen(shlex.split(command), stdout=PIPE).communicate()[0]

  68. def check_SIP():
  69.     sip_info = backquote("nvram csr-active-config")
  70.     if sip_info.find("w%00%00%00") == -1:
  71.         print("you must disable System Integrity Protection",file=sys.stderr)
  72.         sys.exit(1)

  73. def check_rootness():
  74.     if os.geteuid() != 0:
  75.         print("you must be root",file=sys.stderr)
  76.         sys.exit(1)


  77. def clear_kext_cache():
  78.     print( "clearing kext cache...",end="")
  79.     backquote("kextcache -system-prelinked-kernel")
  80.     backquote("kextcache -system-caches")
  81.     print("done")


  82. class UnknownFile(Exception):
  83.     def __init__(self, md5=None):
  84.         self.md5 = md5


  85. class NoBackup(Exception):
  86.     pass


  87. def target_status():
  88.     h = md5(target)
  89.     try:
  90.         return (ORIGINAL, md5_version[h])
  91.     except KeyError:
  92.         pass
  93.     try:
  94.         return (PATCHED, md5_version[md5_patch_r[h]])
  95.     except KeyError:
  96.         pass
  97.     raise UnknownFile(h)


  98. def backup_status():
  99.     if not os.path.exists(backup):
  100.         raise NoBackup
  101.     h = md5(backup)
  102.     try:
  103.         return (ORIGINAL, md5_version[h])
  104.     except KeyError:
  105.         pass
  106.     try:
  107.         return (PATCHED, md5_version[md5_patch_r[h]])
  108.     except KeyError:
  109.         pass
  110.     raise UnknownFile(h)


  111. def apply_patch():
  112.     h = md5(target)
  113.     search_re = md5_re[h]['search']
  114.     replace_re = md5_re[h]['replace']
  115.     with open(target, 'rb') as f:
  116.         source_data = f.read()
  117.     patched_data = source_data.replace(search_re, replace_re)
  118.     with open(target, 'wb') as out:
  119.         out.write(patched_data)


  120. def perform_backup():
  121.     shutil.copyfile(target, backup)

  122. def do_backup():
  123.     check_rootness()
  124.     check_SIP()
  125.     try:
  126.         s, t = target_status()
  127.         if s == PATCHED:
  128.             print("already patched, won't backup")
  129.             sys.exit(1)
  130.         else:
  131.             try:
  132.                 _, v = backup_status()
  133.             except NoBackup:
  134.                 print( "backing up...",end="")
  135.                 perform_backup()
  136.                 print( "done")
  137.             else:
  138.                 if v == t:
  139.                     print("backup found")
  140.                 else:
  141.                     print("backing up...",end="")
  142.                     perform_backup()
  143.                     print("done")
  144.     except UnknownFile as e:
  145.         print( "unknown file, won't backup (md5=%s)" % e.md5)
  146.         sys.exit(1)


  147. def do_restore():
  148.     check_rootness()
  149.     check_SIP()
  150.     print("restoring...",end="")
  151.     backup_status()
  152.     shutil.copyfile(backup, target)
  153.     print("done")
  154.     clear_kext_cache()


  155. def do_apply():
  156.     check_rootness()
  157.     check_SIP()
  158.     do_backup()
  159.     try:
  160.         s, v = target_status()
  161.         if s == PATCHED:
  162.             print("already patched")
  163.             sys.exit()
  164.     except UnknownFile as e:
  165.         print("unknown file: won't patch (md5=%s)" % e.md5)
  166.         sys.exit(1)

  167.     print("patching...",end="")
  168.     apply_patch()

  169.     try:
  170.         s, v = target_status()
  171.         if s != PATCHED:
  172.             print("no change made")
  173.         else:
  174.             print("done")
  175.             clear_kext_cache()
  176.     except UnknownFile as e:
  177.         print("failed (md5=%s), " % e.md5,end="")
  178.         do_restore()

  179. def do_force_apply():
  180.     check_rootness()
  181.     check_SIP()
  182.     if os.path.exists(backup):
  183.         print("backup already exists. won't patch. Please remove the backup from %s and try again." % backup, end="")
  184.         sys.exit(1)
  185.     h = md5(target)
  186.     print("original md5=%s " % h, end="")
  187.     perform_backup()
  188.     with open(target, 'rb') as f:
  189.         source_data = f.read()

  190.     search_re1012 =  "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x81\xEC\x38\x01"
  191.     replace_re1012 = "\x55\x48\x89\xE5\x31\xC0\x5D\xC3\x41\x55\x41\x54\x53\x48\x81\xEC\x38\x01"

  192.     search_re1013 =  "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x55\x41\x54\x53\x48\x81\xEC\x28\x01"
  193.     replace_re1013 = "\x55\x48\x89\xE5\x31\xC0\x5D\xC3\x41\x55\x41\x54\x53\x48\x81\xEC\x28\x01"

  194.     for replace in [replace_re1012, replace_re1013]:
  195.         if (source_data.find(replace) != -1):
  196.             print ("Looks like file is already patched, aborting")
  197.             sys.exit(1)

  198.     if (source_data.find(search_re1012) != -1):
  199.         patched_data = source_data.replace(search_re1012, replace_re1012)
  200.     else:
  201.         print ("Could not location to  patch for 10.12, trying for 10.13")
  202.         if (source_data.find(search_re1013) != -1):
  203.             patched_data = source_data.replace(search_re1013, replace_re1013)
  204.         else:
  205.             print ("10.13 also not found, exiting")
  206.             sys.exit(1)

  207.     with open(target, 'wb') as out:
  208.         out.write(patched_data)
  209.     h = md5(target)
  210.     print("done, patched md5=%s" % h, end="")
  211.     clear_kext_cache()

  212. def do_status():
  213.     try:
  214.         print("target:",end="")
  215.         s, v = target_status()
  216.         print( s+',', ' or '.join(v))
  217.     except UnknownFile as e:
  218.         print( "unknown (md5=%s)" % e.md5)

  219.     try:
  220.         print("backup:",end="")
  221.         s, v = backup_status()
  222.         print( s+',', ' or '.join(v))
  223.     except NoBackup:
  224.         print( "none")
  225.     except UnknownFile as e:
  226.         print( "unknown (md5=%s)" % e.md5)


  227. def do_diff():
  228.     try:
  229.         backup_status()
  230.     except NoBackup:
  231.         print("no backup")
  232.     else:
  233.         command = ("bash -c "
  234.                    "'diff <(xxd \"%s\") <(xxd \"%s\")'" % (backup, target))
  235.         print(os.system(command))


  236. commands = {
  237.     'status': do_status,
  238.     'backup': do_backup,
  239.     'apply': do_apply,
  240.     'restore': do_restore,
  241.     'diff': do_diff,
  242.     'forceApply': do_force_apply,
  243. }

  244. try:
  245.     function = commands[sys.argv[1]]
  246.     function()
  247. except IndexError:
  248.     print("no command provided",file=sys.stderr)
  249.     print("list of commands: %s" % ', '.join(commands.keys()),file=sys.stderr)
  250.     sys.exit(1)
  251. except KeyError:
  252.     print ("unknown command",file=sys.stderr)
  253.     sys.exit(1)
复制代码
分享一个10.3 可用的代码
分享 16-12-31 01:40:11

Chrome 55.0.2883.95 MacOS 10.12.2
长知识了。多谢分享。
分享 16-12-31 07:40:09
arthur_586 ( ☆☆☆ )

Safari 10.0.2 MacOS 10.12.2
多谢分享。
分享 16-12-31 07:54:51

Chrome 49.0.2623.75 Windows 7
涨姿势了~多谢大妈分享~{:4_99:}
分享 16-12-31 08:24:38
jzm713 ( ☆☆☆ )

Chrome 49.0.2623.75 Windows 7
谢谢分享。
分享 16-12-31 11:47:01
嗑瓜子儿 ( ☆☆☆ ) ( 赞 2 )

Firefox 50.0 MacOS 10.11
还是大妈有办法
分享 16-12-31 11:47:26
嗑瓜子儿 ( ☆☆☆ ) ( 赞 2 )

Firefox 50.0 MacOS 10.11
还是大妈有办法
分享 17-2-11 18:28:37
pjq51644544 ( ☆☆☆ )

Safari 10.0.3 MacOS 10.12.3
长知识了。多谢分享{:4_95:}
分享 17-2-14 16:30:18
cydsss ( ) ( 赞 1 )

Firefox 51.0 MacOS 10.12
你好的的系统啊10.12.3,sip也关了 执行第二个命令的时候报错:
cuiyoudedeMacBook-Pro:~ ws-vision$ cd ~/Downloads/tb3-enabler-master
cuiyoudedeMacBook-Pro:tb3-enabler-master ws-vision$ sudo ./tb3-enabler.py apply
Password:
unknown file, won't backup (md5=7fbc510cf91676739d638e1319d44e0e)
cuiyoudedeMacBook-Pro:tb3-enabler-master ws-vision$
最终还是步支持设备 请问怎么解决

 

您需要登录后才可以回帖 登录 | 免费注册

联系我们|急聘英才|移动版|站点地图|iPhone 客户端|保修查询|排行榜|Mac软件宝箱|MacX 麦克叉 ( 京ICP证110625号,京ICP备11029045号-1 )

Since Feb-16-2005

回顶部