You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WorldObservationLog
fee042fd6f
|
6 months ago | |
---|---|---|
.github/workflows | 6 months ago | |
.idea | 6 months ago | |
assets | 6 months ago | |
src | 6 months ago | |
.gitignore | 6 months ago | |
LICENSE.txt | 6 months ago | |
README.md | 6 months ago | |
agent.js | 6 months ago | |
config.example.toml | 6 months ago | |
main.py | 6 months ago | |
poetry.lock | 6 months ago | |
pyproject.toml | 6 months ago |
README.md
AppleMusicDecrypt
Apple Music decryption tool, based on zhaarey/apple-music-alac-atmos-downloader
WARNING: This project is currently in an extremely early stage, and there are still a large number of undiscovered bugs and unfinished features. USE IT WITH CAUTION.
Usage
# Download song/album with default codec (alac)
download https://music.apple.com/jp/album/nameless-name-single/1688539265
# Download song/album with specified codec
download https://music.apple.com/jp/song/caribbean-blue/339592231 -c aac
# Download specify artist's all albums
download https://music.apple.com/jp/artist/%E3%83%88%E3%82%B2%E3%83%8A%E3%82%B7%E3%83%88%E3%82%B2%E3%82%A2%E3%83%AA/1688539273
# Download specify artist's all songs
download https://music.apple.com/jp/artist/%E3%83%88%E3%82%B2%E3%83%8A%E3%82%B7%E3%83%88%E3%82%B2%E3%82%A2%E3%83%AA/1688539273 --include-participate-songs
# Download all songs of specified playlist
download https://music.apple.com/jp/playlist/bocchi-the-rock/pl.u-Ympg5s39LRqp
# Download song from specified m3u8 with default codec (alac)
m3u8 https://aod.itunes.apple.com/itunes-assets/HLSMusic116/v4/cb/f0/91/cbf09175-ce98-d133-1936-2e46b6992aa5/P631756252_lossless.m3u8
# Start Mitm mode
mitm
Support Codec
alac (audio-alac-stereo)
ec3 (audio-atmos / audio-ec3)
ac3 (audio-ac3)
aac (audio-stereo)
aac-binaural (audio-stereo-binaural)
aac-downmix (audio-stereo-downmix)
Support Link
- Apple Music Song Share Link (https://music.apple.com/jp/album/%E5%90%8D%E3%82%82%E3%81%AA%E3%81%8D%E4%BD%95%E3%82%82%E3%81%8B%E3%82%82/1688539265?i=1688539274)
- Apple Music Album Share Link (https://music.apple.com/jp/album/nameless-name-single/1688539265)
- Apple Music Song Link (https://music.apple.com/jp/song/caribbean-blue/339592231)
- Apple Music Artist Link (https://music.apple.com/jp/artist/%E3%82%A8%E3%83%B3%E3%83%A4/160847)
- Apple Music Playlist Link (https://music.apple.com/jp/playlist/bocchi-the-rock/pl.u-Ympg5s39LRqp)
Deploy
Prepare Local Environment
- Install GPAC
- Download Bento4 MP4Tools and add the executable files to the environment variables
- Run
gpac -version
,mp4box -version
,mp4extract
,mp4edit
and make sure all the commands run fine
Prepare Android Environment
For WSA (Recommend):
- Install Apple Music (3.6.0-beta) and login
- Play a song in Apple Music
- Install WSA from LSPosed/MagiskOnWSALocal. Choose the version that includes Magisk but not GApps
- Install following Magisk modules: magisk-frida, sqlite3-magisk-module
- Edit
config.toml
[[devices]]
host = "127.0.0.1"
port = 58526 # Replace this value to your WSA ADB port!
agentPort = 10020
suMethod = "su -c"
For Google Android Emulator
- Install Apple Music (3.6.0-beta) and login
- Play a song in Apple Music
- Manually install Frida and start frida-server in background
- Edit
config.toml
[[devices]]
host = "127.0.0.1"
port = 5555
agentPort = 10020
suMethod = "su 0"
Run Script
Use pre-built script (For Windows)
Download latest build from Actions (need login your
GitHub account). Unzip it, and run main.exe
Manually Run
git clone https://github.com/WorldObservationLog/AppleMusicDecrypt.git
cd AppleMusicDecrypt
poetry install
cp config.example.toml config.toml
poetry run python main.py
Mitm Mode
Prepare Environment
- Install Proxifier and Apple Music Windows
- Sign in to Apple Music Windows with your Apple account
- Run
poetry run mitmproxy
under the script directory and quit - Install the CA certificate according to Mitmproxy's instructions
- Create a new proxy server in Proxifier(
Profile -> Proxy Servers -> Add
).Address
andPort
are values ofmitm.host
andmitm.port
inconfig.toml
, andProtocol
isSOCKS Version 5
- Create a new proxification rule in Proxifier(
Profile -> Proxy Servers -> Add
). Fill inApplications
field withamplibraryagent.exe; applemusic.exe
and select the proxy server just created inAction
Start Mitm
- Run the script, type command
mitm
- Start Proxifier
- Start Apple Music Windows and play a song or an album.
- Now the script should catch the m3u8 link and start ripping