You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Is there a way to manually mount or extract a .flatpack file?
Something like: flatpak --extract LibreOffice.flatpak
Is there any utility to do this?
Thanks, but I was looking specifically for an extraction tool... or some way to just unpack/extract/mount a .flatpak file
I guess we can just install the .flatpak on a chroot and check the contents... but a dedicated extraction tool would be useful... (Malware analysis, unpacking to convert into Portable Apps, etc.)
On a related note, is there any documentation about the file format? A technical specification or something?
You can then check out the file with ostree checkout.
Alternatively you can install the app and then look in /var/lib/flatpak/app/org.app.name/x86_64/$version/active to see the files. This will not run any code from the app.
Strange... I had tried that, but I can't get it to work with the extracted repo:
ostree init --repo=repo sudo ostree static-delta apply-offline --repo=repo LibreOffice.flatpak ostree refs --repo=repo
(the command is executed but no output is produced)
However, if I do: sudo flatpak install --bundle LibreOffice.flatpak ostree refs --repo=/var/lib/flatpak/repo
I get:
Just had a look at this, and yeah, there is in issue here. ostree apply-offline doesn't actually create a ref, so you can't easily reference the newly created commit object from apply-offiline. @cgwalters: Maybe ostree should accept an optional branchname here?
Sure: I'm the lead developer of ORB (Open Runnable Bundle), which is a project to create "next-gen Linux executables"
ORB executables (.orb files) work out-of-the-box on most modern linux distros: they behave exactly like ELF binaries (just mark the file as executable and run)
They also have a "next-gen mode" (enabled after installing ORB Launcher) where the .orb executables become clickable, with icons and with several security features, like automatic cryptographic signature checking.
Now to answer your question: We are very excited about Flatpak and are planning to add support for it in our ORB Creator. In short, it will take a .flatpak as input, download the runtimes, and output a cross-distro .orb executable (a Portable App)
In addition, it might also be interesting to take the flatpak+runtimes and create a
cross-distro/offline-friendly/clickable installer (using flatpak at the "back-end").
Feel free to let me know if you have any questions or suggestions (either regarding Flatpak integration or anything else)
@probonopd alexlarsson's command line above also fails with the same error if you unpack in a tmpfs like /tmp. I retried on a regular ext file system and it worked.
FWIW my scenario is trying to figure if the latest LibreOffice flatpak bundle for download matched the version that flatpak --user update installed. So I unpacked then ran diff ~/.local/share/flatpak/app/org.libreoffice.LibreOffice/x86_64/fresh/783b14e2f564bbc37f3beb0c7ec26f71755674968917afdd01c7e683d4e4d1cf/files/libreoffice/program ~/temp/ostree_LibreOffice/outdir/files/libreoffice/program.
Activity
matthiasclasen commentedon Jun 18, 2016
Use flatpak install --bundle to install a bundle file.
pcx862 commentedon Jun 18, 2016
Thanks, but I was looking specifically for an extraction tool... or some way to just unpack/extract/mount a .flatpak file
I guess we can just install the .flatpak on a chroot and check the contents... but a dedicated extraction tool would be useful... (Malware analysis, unpacking to convert into Portable Apps, etc.)
On a related note, is there any documentation about the file format? A technical specification or something?
Thanks
alexlarsson commentedon Jun 18, 2016
The format is an ostree static delta file, so you should be able to apply it to a new ostree repo with something like:
You can then check out the file with
ostree checkout.Alternatively you can install the app and then look in /var/lib/flatpak/app/org.app.name/x86_64/$version/active to see the files. This will not run any code from the app.
pcx862 commentedon Jun 18, 2016
Great! Thats what I was looking for.
Just one more thing...
ostree checkoutrequires a commit/SHA256Any way to tell ostree to "just extract the latest commit"?
alexlarsson commentedon Jun 19, 2016
The "latest commit" is stored by branch (just like in git), and the branch name is the app+arch+version. You can use ostree refs to list them.
pcx862 commentedon Jun 19, 2016
Strange... I had tried that, but I can't get it to work with the extracted repo:
ostree init --repo=reposudo ostree static-delta apply-offline --repo=repo LibreOffice.flatpakostree refs --repo=repo(the command is executed but no output is produced)
However, if I do:
sudo flatpak install --bundle LibreOffice.flatpakostree refs --repo=/var/lib/flatpak/repoI get:
Further investigation reveals the repos have some differences:
cat $HOME/repo/configcat /var/lib/flatpak/repo/config
What am I missing?
(ostree version 2016.5 / Fedora 23 / 64bits)
alexlarsson commentedon Jun 20, 2016
Just had a look at this, and yeah, there is in issue here. ostree apply-offline doesn't actually create a ref, so you can't easily reference the newly created commit object from apply-offiline. @cgwalters: Maybe ostree should accept an optional branchname here?
Anyway, for now you can do something like:
pcx862 commentedon Jun 21, 2016
Excellent! I confirm this works.
This will be very useful. Thank you.
alexlarsson commentedon Jun 21, 2016
May I ask what you're using it for?
pcx862 commentedon Jun 21, 2016
Sure: I'm the lead developer of ORB (Open Runnable Bundle), which is a project to create "next-gen Linux executables"
ORB executables (.orb files) work out-of-the-box on most modern linux distros: they behave exactly like ELF binaries (just mark the file as executable and run)
They also have a "next-gen mode" (enabled after installing ORB Launcher) where the .orb executables become clickable, with icons and with several security features, like automatic cryptographic signature checking.
Now to answer your question: We are very excited about Flatpak and are planning to add support for it in our ORB Creator. In short, it will take a .flatpak as input, download the runtimes, and output a cross-distro .orb executable (a Portable App)
In addition, it might also be interesting to take the flatpak+runtimes and create a
cross-distro/offline-friendly/clickable installer (using flatpak at the "back-end").
Feel free to let me know if you have any questions or suggestions (either regarding Flatpak integration or anything else)
matthiasclasen commentedon Jun 30, 2016
I think the question here was answered.
probonopd commentedon Jul 4, 2016
Doesn't work on Ubuntu Live ISOs because
Unable to set xattr: Operation not supported.skierpage commentedon Jan 2, 2017
@probonopd alexlarsson's command line above also fails with the same error if you unpack in a tmpfs like /tmp. I retried on a regular ext file system and it worked.
FWIW my scenario is trying to figure if the latest LibreOffice flatpak bundle for download matched the version that
flatpak --user updateinstalled. So I unpacked then randiff ~/.local/share/flatpak/app/org.libreoffice.LibreOffice/x86_64/fresh/783b14e2f564bbc37f3beb0c7ec26f71755674968917afdd01c7e683d4e4d1cf/files/libreoffice/program ~/temp/ostree_LibreOffice/outdir/files/libreoffice/program.probonopd commentedon Jan 1, 2018
There still seems no exist no way to extract the contents of a flatpak file using a system running on a Xubuntu 16.04 Live ISO:
#986 seems to have made no difference?
Merge pull request flatpak#126 from endlessm/T23422-no-source-summary…
ryanabx commentedon Apr 28, 2024
I went ahead and automated the process of running a .flatpak file: https://github.com/ryanabx/portapak
faveoled commentedon May 3, 2025