How to convert Audible aax files to mp3 in Linux


Convert Audible aax-files to mp3 in LinuxSo far I always assumed that when I buy music or audiobooks on Amazon for download, I’ll get mp3 files for download. Far from it – yesterday I once again bought a an audiobook and had to find out that I was forwarded after the purchase to Audible and there was confronted with a “protected” aax file. If I wanted to buy at Audible, I would have gone to Audible. Thanks for nothing, Amazon!

But now the following question arises: “How do I convert the proprietary aax files into mp3’s, which I can play everywhere?” (aax files are only playable with the official Audible apps which aren’t available on all platforms.) After all, when buying on Amazon, there wasn’t the talk about the fact that the purchased audiobook can only be heard on devices for which there is also an Audible player. For Windows users, there are already simple tools like aax2mp3, which take over the conversion. As a Linux user, you have to reach deeply into the trickbox …

Convert aax-files to mp3-files

To convert the proprietary Audible aax files into “open” mp3 files, we need two free scripts, both available on Github. On the one hand we need AAXtoMP3 from KrumpetPirate, which carries out the actual conversion and on the other hand we need the audible-activator from inAudible-NG, which provides the authcode, which is needed for the conversion. Since AAXtoMP3 depends on this authcode, we start with the audible-activator. The following tutorial takes mainly place in the terminal/shell.

In the first step, you create a directory where you want to save the tools, download the audible-activator, unpack it and navigate to the audible-activator directory. (Each line is a command and should be entered after the previous command has been executed.)

mkdir aax2mp3tools
cd aax2mp3tools
cd audible-activator-master

The next step is to make the audible-activator still workable. To do this, we have to download the Selenium Chromedriver via the Python package manager and the “selenium” and the “requests” package.

pip install requests
pip install selenium

If you do not use a 64-bit variant of Linux, you may have to load another Chromedriver. The list of current Chromedrivers can be found here. (If you have not already installed the Google Chrome browser on your computer, you should do so now, because the audible-activator is a Python script that automates the Chrome browser.)

Now that the setup of the audible-activator is complete, it can be executed. The following call is enough:

./ -l de

If you have an US audible account, you should replace the “de” in the call with “us”. The script asks for “Username” and “Password”. Here you have to specify your Audible user name and your password. If you, like me, became an Audible customer because you bought a download on Amazon, you need to enter your Amazon credentials. Then the script opens the Chrome browser, loads a few pages and shows you your Authcode in the terminal.

raffael@nbb-kubuntu:~/Tools/aax2mp3tools/audible-activator-master$ ./ -l de
Username: <secret>
Password: <secret>
[*] Player ID is 2jmj7lXXXXXXXkK/YBwk=

I have anonymized my output, but the last line corresponds to the Auth code. This authcode is needed for the conversion of the aax-file or better said for the call of the aax2mp3-script.

Now that we have the authcode, we navigate back to our tools directory, download the aax2mp3 script and unpack it.

cd ..
cd AAXtoMP3-master

Now we can start converting from aax format to mp3 format. To do so, run the following command:

./ <authcode> <aax-file>

The token <authcode> has to be replaced with the authcode, which we have just read via audible-activator. The token <aax-file> must be replaced by the path to the aax file. The rest is done by the tool. After executing the script, you should find the respective mp3 version of the aax-file in the same directory as the aax file.


  1. Michaelsays:

    I’m having trouble installing Requests and Selenium. Any help much appreciated.

    I get the following messages

    “mike@mike-c2duo:~/aax2mp3tools/audible-activator-master$ pip install requests Requirement already satisfied (use –upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages”

    “mike@mike-c2duo:~/aax2mp3tools/audible-activator-master$ pip install seleniumDownloading/unpacking selenium
    Downloading selenium-3.5.0-py2.py3-none-any.whl (921kB): 921kB downloaded
    Installing collected packages: selenium
    Cleaning up…
    Traceback (most recent call last):
    File “/usr/lib/python2.7/dist-packages/pip/”, line 122, in main
    status =, args)
    File “/usr/lib/python2.7/dist-packages/pip/commands/”, line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
    File “/usr/lib/python2.7/dist-packages/pip/”, line 1436, in install
    requirement.install(install_options, global_options, *args, **kwargs)
    File “/usr/lib/python2.7/dist-packages/pip/”, line 672, in install
    self.move_wheel_files(self.source_dir, root=root)
    File “/usr/lib/python2.7/dist-packages/pip/”, line 902, in move_wheel_files
    File “/usr/lib/python2.7/dist-packages/pip/”, line 206, in move_wheel_files
    clobber(source, lib_dir, True)
    File “/usr/lib/python2.7/dist-packages/pip/”, line 193, in clobber
    File “/usr/lib/python2.7/”, line 157, in makedirs
    mkdir(name, mode)
    OSError: [Errno 13] Permission denied: ‘/usr/local/lib/python2.7/dist-packages/selenium’
    Storing debug log for failure in /home/mike/.pip/pip.log”

    I notice the first message refers to usr/lib/python2.7 while the second refers to usr/local/lib/python2.7

  2. flashcraftsays:

    OK, for what it’s worth,
    I bought and downloaded the Audible book ‘God Touched’.
    I installed ffmpeg according to QUISL’s instruction.

    Now, in the Terminal, I’m in the ‘AAXtoMP3-master’ folder but I kept getting, “AAXtoMP3: command not found” until I added “./” in front of ‘AAXtoMP3’ like so, ‘./AAXtoMP3 ******** ./GodTouched (the asterisks are my authcode)

    Then the Terminal wrote, “Created ./Audiobook/John Conroe/God Touched/God Touched.mp3.” and then did a bunch of stuff.
    This got me 23 .mp3 files and a cover .jpg. They work! 8D

    Thank you, Raffael and QUISL.

  3. Montesays:

    Great stuff. Thanks for sharing

  4. Angelesays:

    Hello. I am pretty new to the Linux terminal. I got all the way through the steps in my terminal but I keep getting an error message for the last command:

    bash: ./ No such file or directory

    I am sure the authcode is correct. I am less sure about the corrrect path for the directory, though this is the path listed in my file directory ‘/home/ampretus/Desktop/’ The apostrophes are added when I drag and drop the file.

    Do I need to change back to my home directory or move the .aax file into the ./ directory?

    Thank you for any suggestions.

    • Hi Angele,
      “No such file or directory” means, that the shell couldn’t find the script “”. So this says nothing about the “authcode”, etc.

      When writing “./” have a look at the beginning. The point “.” means “in this directory”. So “./” means “Open the script file ‘’ in this/the current directory”.

      Now you got the error that the file couldn’t be found. So either the file isn’t in the directory or you are in the wrong directory.

      Let’s say you saved the in “/home/ampretus/Desktop” then you have two options.

      1) Navigate to the directory via “cd /home/ampretus/Desktop” (cd means ‘change directory’) and the call “./”
      2) Call the script via fullpath “/home/ampretus/Desktop/”

      No matter which of the options you use, don’t forget to write the arguments/parameters behind the script’s name.

      • Thanks for the post Raffael

        Been trying to get this to work, having my own problems, but I did see and get past this issue.

        It seeems that in the current version the .sh name extension is not explicit.

        ‘./AAXtoMP3 … …’ from the correct directory should call the script

        It might also be noted that this requires chrome to be installed, having no previous experience with chromedriver I assumed that it would be able to GET, parse whatever it needed on its own. The error the python script throws in absence of chrome is going to be useless to most people… You need chrome to be installed.

        I also spent some time trying to figure out why the scipt would finish instantly and nothing would change. This script will silent fail if ffmpeg is not installed.

        I’m sure if you add that the current .zip unzipped

        After I got through those 3 issues it works 100% and sounds great!

        • Yea, when the program ends after the

          “Decoding ${path} with auth code ${auth_code}…”

          message you need to install ffmpeg first. On Debian and Ubuntu this can be done with:

          # apt-get install ffmpeg

          • Karolinasays:

            Hello, I have the same problem – the program ends after the

            “Decoding ${path} with auth code ${auth_code}…”, I got installed ffmpeg and it didn’t work. What can I be doing wrong?

  5. Saschasays:

    I tried this and it didn’t work for me. Here is what my computer says:

    $ls ~/aax2mp3
    audible-activator-master chromedriver
    $cd ~/aax2mp3/audible-activator-master
    $./ -l de

    … proceed to enter my credentials …

    [*] Player ID is 2jmj7l5rSw0yVb/vlWAYkK/YBwk=
    Traceback (most recent call last):
    File “./”, line 148, in
    fetch_activation_bytes(username, password, options)
    File “./”, line 57, in fetch_activation_bytes
    File “/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/”, line 62, in __init__
    File “/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/”, line 81, in start
    os.path.basename(self.path), self.start_error_message)
    selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see

    However, I added the folder to $PATH (I think):

    $echo $PATH

    What did I miss?

    • You added the aax2mp3 folder to the path variable, but you have to add the path of the chromedriver. The chromedrivers path is the folder where you extracted the file.

      Additionally you could have a look at this post:

      Let me know if this solved your problem or if you need further help.


Leave a comment

Please be polite. We appreciate that. Your email address will not be published and required fields are marked