Jump to content
XPEnology Community

AME 3.0 patcher


wangsiji

Recommended Posts

This patcher enables Advanced Media Extensions 3.0 for you, without having to login account.

 

Download AME3.0 from store. Put the following Python script to any location. Run it with root. Done.

Spoiler
import hashlib
import os

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}]')


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}")

 

 

  • Like 6
Link to comment
Share on other sites

  • 3 months later...

Hello!

Hmm it seems I don't have a valid serial (impossible to add it to my Synology Account), because it has been generated by RedPill at start and I don't have any idea how to change it for a valid one. (And I'm not even sure that I CAN change it since I use a DS3622+ ESXI installation).

 

I tried the script anyway but I obtain:

./ame.py: line 1: import: command not found
./ame.py: line 2: import: command not found
./ame.py: line 3: $'\r': command not found
./ame.py: line 4: r: command not found
./ame.py: line 5: syntax error near unexpected token `('
./ame.py: line 5: `s = [(0x1F28, 0), (0x48F5, 1), (0x4921, 1), (0x4953, 1), (0x4'75, 1), (0x9AC8, 2)]

 

Some help? 😥

 

Thanks!!!

Edited by waazdakka
Link to comment
Share on other sites

@waazdakka normally you just need the "valid" Serial# generated by RedPill... A official Serial# should avoid you to use this patch??

I am no way a expert in programing or script... but the error you have "command not found" might indicate you are missing "Module" or "package component" to be instal??? So peoples with programing competance are more qualify to troobleshoot unless I am wrong.

 

However if you want to change the Serial# then take a look at "Acidflash" 2nd post. The idea is to mount the partition that have the "grub.cfg" file to be modify. It is on VM machine but should be the same on "bare metal" install too.

 

Link to comment
Share on other sites

On 2/23/2023 at 4:41 AM, waazdakka said:

Nice, thanks for the fast answer! (For those who search for it:

But what about finding a valid serial? I can't find any serial generator for the DS3622XS+ :(

Or I can make a new VM installation to get RedPill again and access to the integrate seralizer 😂

 

Just boot tinycore RP on the same VM you already have running and use built-in generator to generate a SN then run commands again to build redpill using that SN. It will update your existing install to use the new SN. That being said, I don't know if using a generated serial # will work or not. Wondering if AME needs an actual real SN from a real SN unit.

Link to comment
Share on other sites

On 2/21/2023 at 5:15 PM, waazdakka said:

I tried the script anyway but I obtain:

./ame.py: line 1: import: command not found
./ame.py: line 2: import: command not found
./ame.py: line 3: $'\r': command not found
./ame.py: line 4: r: command not found
./ame.py: line 5: syntax error near unexpected token `('
./ame.py: line 5: `s = [(0x1F28, 0), (0x48F5, 1), (0x4921, 1), (0x4953, 1), (0x4'75, 1), (0x9AC8, 2)]

 

just use: python ame.py

 

On 3/4/2023 at 12:38 PM, apriliars3 said:
root@DVA1619:/volume1/Almacenamiento# python /volume1/Almacenamiento/ame.py
Patching
MD5 mismatch

check your installed AME (aka CodecPack) version

its tested/used with "3.0.1-2004" that came out 9/2022 and it is atm still the recent version

https://archive.synology.com/download/Package/CodecPack/3.0.1-2004

 

Edited by IG-88
  • Thanks 1
Link to comment
Share on other sites

Wow thanks, was stupid to not test this... AME activated, it seems I don't need to change my serial eventually.. Thanks again! :)

 

(I guess I don't have AAC since I didn't install Audio Station, but I have a doubt on the version?)

 

image.png.00407bb9fe16f6f8eaf1da738767a490.png

Edited by waazdakka
Link to comment
Share on other sites

On 3/9/2023 at 10:57 AM, waazdakka said:

(I guess I don't have AAC since I didn't install Audio Station, but I have a doubt on the version?)

 

you will also need to patch some files to get videostation working properly (at least when using any random serial)

 

https://xpenology.com/forum/topic/24864-transcoding-without-a-valid-serial-number/?do=findComment&comment=439520

i did not use the file as it was intended i was more looking inside it to see what it was trying to do, it might work for you as it is but i did not tested it that way

if you look inside the start.sh you will see that this one is about patching the files needed (starting it without anything will give you a short help but in the end you will need to start it with -p to ptach things)

https://raw.githubusercontent.com/apriliars3/synocodectool-patch/master/patch.sh

 

the AMEpack.tgz will also contain parts for aac audio so you can "enrich" the stuff you already have with that

 

with these things videostation should work properly (also with qsv and transcoding if the i915 stuff is working properly), but i did not test it much as i usually replay just files over network shares and there is jellyfin as spk package too

 

edit: and just to complete it, you might want to use this patch to get dts working

https://raw.githubusercontent.com/AlexPresso/VideoStation-FFMPEG-Patcher/main/patcher.sh

 

 

Edited by IG-88
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
On 3/28/2023 at 5:25 PM, AlexSoft_58 said:

 

Good afternoon. Share a link to the downloader if you don't mind.

https://wp.gxnas.com/11849.html

Browse the above website before downloading the bootloader to make sure the bootloader includes your network driver.

 

And you can download the bootloader from here:

https://d.gxnas.com/GXNAS网盘-OneDrive/黑群晖/黑群晖DSM6.24和DSM7.x测试版

Edited by wq2020wdm
  • Thanks 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

I patched the AME, but it still cant transcode anything. I'm on DSM 7.1.1-42962 Update 5 and have two movies in my video folder. I have two identical Baremetal installs with 3622xs+ both have AME patched/activated but only one works fine and can transcode to my vlc player on my phone. The other one does not. I don't know where I'm going wrong.

Link to comment
Share on other sites

В 18.11.2022 в 11:56, wangsiji сказал:

This patcher enables Advanced Media Extensions 3.0 for you, without having to login account.

 

Download AME3.0 from store. Put the following Python script to any location. Run it with root. Done.

 

Hello dear, after starting script system answer is

Patching

MD5 Mismatch

how i can fix it?

Latest AME 3-1-0-3005

And latest DSM 7.2.64570

DS918+ real mac real sn

 

UPD: AME Activated via native mode!

Edited by loveburn
Link to comment
Share on other sites

On 6/11/2023 at 11:29 AM, loveburn said:

Hello dear, after starting script system answer is

Patching

MD5 Mismatch

how i can fix it?

Latest AME 3-1-0-3005

And latest DSM 7.2.64570

DS918+ real mac real sn

 

UPD: AME Activated via native mode!

 

Please tell, what is native mode?

Link to comment
Share on other sites

  • 2 weeks later...

For 7.2 you may try this one (downloaded from https://mi-d.cn/d/ame72-3005.py , originating from

 

import hashlib
import os

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"}]')


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}")

 

Edited by wangsiji
  • Thanks 2
Link to comment
Share on other sites

I have a FFmpeg and (GStreamer) Wrapper that enable to you to play AAC, DTS, EAC3, TrueHD and into the installer (Option P in the Main menu) has a license's crack. The code for the crack is an adaptation and addons by me from the code of wangsiji.

 

https://github.com/darknebular/Wrapper_VideoStation

 

I hope that It is useful for somebody. Give me a star if you find this useful, the Advanced Wrapper is the unique Wrapper with 5.1 support when It needs to transcode something.

 

There is a possibility to uninstall the crack too.

 

Best regards.

Edited by darknebular
  • Thanks 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...