AppImage: Difference between revisions

From Notes to self
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Extract the contents of an AppImage===
===Extract the contents of an AppImage===
* <code>$ foo.AppImage --appimage-offset</code>
* Compute offset in bytes:
* <code># mount my.AppImage /mnt -o offset=<offset></code>
<pre>
* <code># mkdir /opt/foo</code>
$ f=$(xxd -e foo.AppImage | grep -m 1 -o "^.*73717368")
* <code># cp -a /mnt/* /opt/foo</code>
$ expr $(printf %d 0x$(echo $f | sed 's/:.*$//')) \
* <code># umount /mnt</code>
    + $(($(echo $f | awk '{ print length }')/8-2)) \* 4
</pre>
* <code>$ unsquashfs -offset <bytes> foo.AppImage</code>


===Some AppImages===
===Some AppImages===

Latest revision as of 22:16, 5 July 2021

Extract the contents of an AppImage

  • Compute offset in bytes:
$ f=$(xxd -e foo.AppImage | grep -m 1 -o "^.*73717368")
$ expr $(printf %d 0x$(echo $f | sed 's/:.*$//')) \
    + $(($(echo $f | awk '{ print length }')/8-2)) \* 4
  • $ unsquashfs -offset <bytes> foo.AppImage

Some AppImages