zhaarey's wrapper setup guide!

Written by FieryFly

Part 1 - Initial Setup (Skip if you already have WSL configured or use Linux.)

  1. Install WSL.
    winget install --id Microsoft.WSL
  2. Install a WSL distro. I recommend Ubuntu 24.04.
    winget install --id Canonical.Ubuntu.2404
  3. Open Ubuntu and go through the initial setup process until you're in the shell.

Part 2 - Setup

Prerequisites:
sudo apt install clang wget git unzip build-essential golang pkg-config zlib1g-dev

  1. Compile MP4Box.
    git clone --depth 1 https://github.com/gpac/gpac.git && cd gpac && ./configure --static-bin && make -j4 && sudo make install && cd ~
  2. Download and extract the NDK needed to build the wrapper.
    wget https://dl.google.com/android/repository/android-ndk-r23b-linux.zip && unzip android-ndk-r23b-linux.zip -d ~
  3. Clone the repos.
    git clone --depth 1 https://github.com/zhaarey/wrapper && git clone --depth 1 https://github.com/zhaarey/apple-music-alac-atmos-downloader downloader
  4. cd into the wrapper directory and make it.
    cd wrapper && mkdir build && cd build && cmake .. && make -j4 && cd ..
  5. Run the wrapper as root.
    sudo ./wrapper -M 20020 -L email:password
    The wrapper needs to be run in the background.
    (At the time of writing, the agent's m3u8 retrieving functionality is disabled because of instability. Specifying the m3u8 port is mandatory to avoid any errors. 1, 2)
  6. Open up a new terminal window (Linux) or a new Ubuntu window (Windows) and cd into the downloader directory.
    cd downloader
  7. Build the downloader.
    go build

Finished!

Now what?

Download some songs lol. You can download an album by executing this while in the downloader directory:

  • ./main apple-music-album-link

You can download Dolby Atmos by adding --atmos to the argument.

  • ./main --atmos apple-music-album-link

Not all albums have Atmos, so you'll have to check for its availability with AME

  • You can configure the downloads directory by editing config.yaml and changing alac-save-folder and atmos-save-folder.

Everytime you need to download a song you need to launch the wrapper first before you'll be able to use the downloader as the wrapper is mandatory for decryption.

Edit
Pub: 02 Dec 2024 23:52 UTC
Edit: 23 Dec 2024 07:13 UTC
Views: 8249