11

From what I've read, an Appimage file is a compressed application along with all of its resources, and when run it is auto-mounted and then executed.

I want to inspect the resources and files inside an Appimage file I've downloaded, without actually running the Appimage.

How can I do this?

  • I searched for this question before posting and was surprised to find no version of the question at all already posted. So I've kept this one as simple as possible. – Wildcard Apr 26 at 19:58
  • 1
    It appears there isn't currently a reliable way to do this without executing the binary :( The documentation suggests using mount, but even that requires you to extract the image offset from the file. Creating an external command that can do the mounting automatically is filed as bug #830 in their bug tracker. – IMSoP Apr 27 at 15:25
12

Without changing their extension:

As such, an appimage can be mounted or extracted. That is:

To mount them:

my.AppImage --appimage-mount

The AppImage is unmounted when the application called in the example is interrupted (e.g., by pressing Ctrl+C, closing the terminal etc.).

Note: This is only available for type 2 AppImages. Type 1 AppImages do not provide any self-mounting mechanism. To mount type 1 AppImages, use

mount -o loop

To extract them:

An alternative to mounting the AppImages is to extract their contents. This allows for modifying the contents. The resulting directory is a valid AppDir, and users can create AppImages from them again using appimagetool.

Analog to mounting AppImages, there is a simple commandline switch to extract the contents of type 2 AppImages without external tools. Just call the AppImage with the parameter --appimage-extract. This will cause the runtime to create a new directory called squashfs-root, containing the contents of the AppImage’s AppDir specification.

Type 1 AppImages require the deprecated tool AppImageExtract to extract the contents of an AppImage. It’s very limited functionality wise, and requires a GUI to run. It creates a new directory in the user’s desktop directory.

There is an answer on superuser on how to extract files from an AppImage.

Looking at my appimages I see that only some of them can be mounted with gnome-disk-image-mounter. Also here.


Changing their extension:

Not all appimages have exactly the same structure, but all are archives. Wikipedia says: "An AppImage of version 1.0 is an ISO 9660 Rock Ridge file (which can be optionally zisofs compressed) containing a minimal AppDir and a tiny runtime. (Version 2 may use other file system image formats like SquashFS)".

So, it can be extracted. In this way you can examine the files.

Simply changing the extension from AppImage to an archive extension that my file-roller archive manager can read (I tested with zip, 7z, etc) and double-clicking the file reveals the contents in file-roller:

enter image description here

They can also be extracted, of course. The "extract" file manager context menu action works too in order to extract the archive. (As said in comment, the unzip command reports an error with a file renamed with a zip extension, so renaming to zip is not the proper choice in itself, but it works with archive managers like file-roller.)

| improve this answer | |
  • I tried copying an AppImage to test.zip and running unzip test.zip and I got the message: End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. note: test.zip may be a plain executable, not an archive – Wildcard Apr 26 at 23:43
  • 2
    @Wildcard - it seems that some archive managers like file-roller do not care about the proper archive extension as long as the file IS an archive with an archive extension (no matter what that is), and are able to extract it, while unzip tool is extension-oriented and looks for more extension-specific properties in order to operate. So, instead of unzip, use the file manager extract action or file-roller -f. See file-roller --help for details. – cipricus Apr 27 at 7:37
9

According to AppImage documentation the --appimage-mount option allows you to mount and inspect the contents.

For example:

./Joplin.AppImage --appimage-mount /tmp/mount_myXXXX

The application's help can usually be shown with ./whatever.AppImage --help like any other application, but to see the AppImage specific options, you can run:

./whatever.AppImage --appimage-help

Here is the relevant portion of the output:

AppImage options:
...
  --appimage-mount                Mount embedded filesystem image and print
                                  mount point and wait for kill with Ctrl-C

You don't have to create a mountpoint for it or delete the directory afterwards; the AppImage will take care of all of that.

| improve this answer | |
  • also, --appimage-extract to extract it. – cipricus Apr 27 at 7:45
  • 4
    A file you're trying to examine should NOT be executed. This is a dangerous answer – Syfer Polski Apr 27 at 10:47
  • @SyferPolski Particularly as the OP specified, "without actually running the Appimage". – Jon Bentley Apr 27 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.