[ GUIDE BY 0dx ]
How to setup ALAC downloader (windows).
Installing choco
To make this easier, first we need choco, a package manager for windows.
Create a .ps1 file in your desktop and paste this code, then right click, run it as admin:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | # Check if the script is running with administrative privileges
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if (-not $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
# Restart the script with administrative privileges
Start-Process powershell.exe -Verb RunAs -ArgumentList ("-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"")
Exit
}
# Set TLS 1.2 as the default protocol for better security
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
# Check if Chocolatey is already installed
$chocoInstallPath = "$env:ALLUSERSPROFILE\chocolatey\bin"
if (-not (Test-Path $chocoInstallPath)) {
# Download and install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
}
else {
Write-Host "Chocolatey is already installed."
}
# Install Go Lang
if (-not (Get-Command -Name "go" -ErrorAction SilentlyContinue)) {
choco install -y golang
}
else {
Write-Host "Go is already installed."
}
# Install Python
if (-not (Get-Command -Name "python" -ErrorAction SilentlyContinue)) {
choco install -y python
}
else {
Write-Host "Python is already installed."
}
# Install 7-Zip
if (-not (Get-Command -Name "7z" -ErrorAction SilentlyContinue)) {
choco install -y 7zip.commandline
}
else {
Write-Host "7-Zip is already installed."
}
# Install adb
if (-not (Get-Command -Name "adb" -ErrorAction SilentlyContinue)) {
choco install -y adb
}
else {
Write-Host "adb is already installed."
}
# Install GPAC (mp4box)
choco install gpac
# Install Android Studio
choco install -y androidstudio --package-parameters="/AddToDesktop"
# Install frida-tools
pip install frida-tools
# Install webdriver-manager
pip install webdriver-manager
# Install selenium
pip install selenium
# Pause and wait for user input
Write-Host "TYPE [continue] ONCE YOU FINISHED THE ANDROID STUDIO AVD SETUP AND THE AVD IS ALREADY RUNNING: "
$userInput = Read-Host
while ($userInput.ToLower() -ne "continue") {
Write-Host "Please type [continue] to proceed."
$userInput = Read-Host
}
# Start the specified AVD instance
Start-Process -FilePath $emulatorPath -ArgumentList "-avd $avdName" -NoNewWindow
# Check if the script is running with administrative privileges
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if (-not $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
# Restart the script with administrative privileges
Start-Process powershell.exe -Verb RunAs -ArgumentList ("-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"")
Exit
}
# Download the APK files
$apkUrl1 = "https://f-droid.org/repo/com.aefyr.sai.fdroid_60.apk"
$apkUrl2 = "https://gitlab.com/0daxelagnia/appleapkm/-/raw/main/apple_music.apkm?ref_type=heads&inline=false"
$apkFile1 = "$env:TEMP\com.aefyr.sai.fdroid_60.apk"
$apkFile2 = "$env:TEMP\app.apkm"
Invoke-WebRequest -Uri $apkUrl1 -OutFile $apkFile1
Invoke-WebRequest -Uri $apkUrl2 -OutFile $apkFile2
# Start adb as root
adb root
# Install the first APK file
adb install $apkFile1
# Push the second APK file to the device's Download folder
adb push $apkFile2 "/storage/emulated/0/Download/app.apkm"
# Download Frida server for Android
$fridaServerUrl = "https://github.com/frida/frida/releases/download/16.2.1/frida-server-16.2.1-android-x86_64.xz"
$fridaServerFile = "$env:TEMP\frida-server.xz"
Invoke-WebRequest -Uri $fridaServerUrl -OutFile $fridaServerFile
# Extract Frida server
$extractPath = "$env:TEMP\frida-server"
New-Item -ItemType Directory -Path $extractPath -Force | Out-Null
7z.exe x $fridaServerFile -o"$extractPath" | Out-Null
# Find the extracted Frida server file
$fridaServerExtracted = Get-ChildItem -Path $extractPath -Filter "frida-server*" -File | Select-Object -First 1
# Rename Frida server file
$fridaServerRenamedPath = Join-Path $extractPath "frida"
Move-Item -Path $fridaServerExtracted.FullName -Destination $fridaServerRenamedPath -Force
# Push Frida server to the device
adb push $fridaServerRenamedPath "/data/local/tmp/frida"
# Clean up downloaded files and extracted directory
Remove-Item $apkFile1, $fridaServerFile, $extractPath -Recurse
|
Once android studio is installed, open it and follow these steps:
Wait till it is done downloading!
Wait till it is done downloading!
Type continue in the powershell console.
Now in the Android window, follow these steps:
Here you have to sign in with your account
Once you signed in, delete all the other powershell files in your desktop and create this one for future use (downloading)
Now the powershell console contains the frida server (must be running so dont close it.)
The other CMD console is running the frida agent.js, theres also one for the emulator and lastly one with the path with the script
Now type in the CMD containing the path for apple music atmos downlader the following command to start downloading songs:
example:
Enjoy your ALAC music!
IF YOU GET THIS ERROR
MAKE SURE THE FRIDA SERVER AND AGENT.JS ARE RUNNING, ALSO MAKE SURE YOUR AUDIO QUALITY IN THE APPLE MUSIC APP IS SET TO LOSSLESS
AND ALSO CHECK THE COUNTRY CODE IN THE URL TO MATCH YOURS (FOR EXAMPLE IF YOU ARE IN THE US IT SHOULD LOOK LIKE THIS)
UPDATE
If you already tried this guide before, do this:
We have to install a couple things if you already followed this guide. First update your https://rentry.co/YWxhYyBkbCBndWlkZSAxMzM3#once-you-signed-in-delete-all-the-other-powershell-files-in-your-desktop-and-create-this-one-for-future-use-downloading and replace the old one.
Press WIN + R
in your keyboard, now type cmd. Now in your console type the following commands:
Now follow the guide under this ↓
If it's your first time following this guide, do this:
Now you need your media-user-token cookie to retrieve lyrics, also MP4Box (GPAC).
First, make a python file (main.py
) inside the apple-music-alac-atmos-downloader-main
folder and paste this code inside.
Then run it.
It should open a new chrome window, here you have to log in.
Once logged in, verify it with your OTP message.
Then click Trust to successfully logging in.
Lastly, it will modify a config.yaml file containing your media-user-token where the script is installed
It should look like this.
And we are done!
If everything worked fine, ill kindly ask you to donate to my Paypal! this guide took some time and research to create, i will updating it in the future to make it more user-friendly.
Credits:
@zhaarey (github) for creating the atmos version for the script.
Sorrow for creating the original script.
and everyone at https://t.me/apple_music_alac