群晖官方下载:https://archive.synology.com/download
以及https://archive.synology.cn/download
我不是矿神:https://imnks.com/
GXNAS:http://gxnas.com/
前提条件:
群晖系统必须是半洗白状态,即 SN 是正确的, MAC 地址随意,无要求。
切记先半洗白再进行后面的操作否则就算你激活并下载HEVC解码器也无法解码,如果已经先激活了AME但是没有半洗白那么请先操作半洗白再删除AME再重新激活。使用有GPU的引导需要适配硬件(不懂的参考https://www.mi-d.cn/1338中硬解的说明),否则激活AME也没用。
群晖7.1.1 -42962 photos的HEVC不显示缩略图,打了AME补丁没用,就是由于群晖系统还不是是半洗白状态。
以下来源:我不是矿神
AME3.x激活补丁
只适用于x86_64的:DSM7.x Advanced Media Extensions (AME)版本3.0.1-2004、3.1.0-3005
激活过程需要下载官方的解码包,过程较慢,耐心等待。。。
DSM7.1和7.2的AME版本不同,脚本不通用!!!!!!只适用于x86_64的,不支持ARM
2023.12.5更新,集成了关闭apparmor保护,一直无法激活的可卸载AME、重启系统后重新安装再试试。
#DSM7.1 AME版本3.0.1-2004
curl http://code.imnks.com/ame3patch/ame71-2004.py | python
#DSM7.2 AME版本3.1.0-3005
curl http://code.imnks.com/ame3patch/ame72-3005.py | python执行情况
root@BXH_NAS:~# curl http://code.imnks.com/ame3patch/ame72-3005.py | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1868 100 1868 0 0 14513 0 --:--:-- --:--:-- --:--:-- 14480
Patching
Checking whether patch is successful...
Successful, updating codecs...
Done来源:https://xpenology.com/forum/topic/65643-ame-30-patcher/
备用脚本(jim):curl http://code.imnks.com/ame3patch/ame72-3005.sh | bash
脚本直接下载:
ame71-2004.rar
ame71-2004.py
import hashlib
import os
import subprocess
r = ['669066909066906690', 'B801000000', '30']
s = [(0x1F28, 0), (0x48F5, 1), (0x4921, 1), (0x4953, 1), (0x4975, 1), (0x9AC8, 2)]
prefix = '/var/packages/CodecPack/target/usr'
so = prefix + '/lib/libsynoame-license.so'
print("Patching")
with open(so, 'r+b') as fh:
full = fh.read()
if hashlib.md5(full).digest().hex() != 'fcc1084f4eadcf5855e6e8494fb79e23':
print("MD5 mismatch")
exit(1)
for x in s:
fh.seek(x[0] + 0x8000, 0)
fh.write(bytes.fromhex(r[x[1]]))
lic = '/usr/syno/etc/license/data/ame/offline_license.json'
os.makedirs(os.path.dirname(lic), exist_ok=True)
with open(lic, 'w') as licf:
licf.write('[{"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "hevc", "type": "free"}, "licenseContent": 1}, {"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "aac", "type": "free"}, "licenseContent": 1}]')
subprocess.run(['/usr/syno/etc/rc.sysv/apparmor.sh', 'remove_packages_profile', '0', 'CodecPack'])
apparmor = '/var/packages/CodecPack/target/apparmor'
if os.path.exists(apparmor):
os.rename(apparmor, apparmor + ".bak")
print("Checking whether patch is successful...")
ret = os.system(prefix + "/bin/synoame-bin-check-license")
if ret == 0:
print("Successful, updating codecs...")
os.system(prefix + "/bin/synoame-bin-auto-install-needed-codec")
print("Done")
else:
print(f"Patch is unsuccessful, retcode = {ret}")ame72-3005.py
import hashlib
import os
import subprocess
r = ['669066909066906690', 'B801000000', '30']
s = [(0x3718, 0), (0x60A5, 1), (0x60D1, 1), (0x6111, 1), (0x6137, 1), (0xB5F0, 2)]
prefix = '/var/packages/CodecPack/target/usr'
so = prefix + '/lib/libsynoame-license.so'
print("Patching")
with open(so, 'r+b') as fh:
full = fh.read()
if hashlib.md5(full).digest().hex() != '09e3adeafe85b353c9427d93ef0185e9':
print("MD5 mismatch")
exit(1)
for x in s:
fh.seek(x[0] + 0x8000, 0)
fh.write(bytes.fromhex(r[x[1]]))
lic = '/usr/syno/etc/license/data/ame/offline_license.json'
os.makedirs(os.path.dirname(lic), exist_ok=True)
with open(lic, 'w') as licf:
licf.write('[{"attribute": {"codec": "hevc", "type": "free"}, "status": "valid", "extension_gid": null, "expireTime": 0, "appName": "ame", "follow": ["device"], "duration": 1576800000, "appType": 14, "licenseContent": 1, "registered_at": 1649315995, "server_time": 1685421618, "firstActTime": 1649315995, "licenseCode": "0"}, {"attribute": {"codec": "aac", "type": "free"}, "status": "valid", "extension_gid": null, "expireTime": 0, "appName": "ame", "follow": ["device"], "duration": 1576800000, "appType": 14, "licenseContent": 1, "registered_at": 1649315995, "server_time": 1685421618, "firstActTime": 1649315995, "licenseCode": "0"}]')
subprocess.run(['/usr/syno/etc/rc.sysv/apparmor.sh', 'remove_packages_profile', '0', 'CodecPack'])
apparmor = '/var/packages/CodecPack/target/apparmor'
if os.path.exists(apparmor):
os.rename(apparmor, apparmor + ".bak")
print("Checking whether patch is successful...")
ret = os.system(prefix + "/bin/synoame-bin-check-license")
if ret == 0:
print("Successful, updating codecs...")
os.system(prefix + "/bin/synoame-bin-auto-install-needed-codec")
print("Done")
else:
print(f"Patch is unsuccessful, retcode = {ret}") 