AppImage: Difference between revisions

From Notes to self
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:
===Extract the contents of an AppImage===
===Extract the contents of an AppImage===
* <code>$ xxd -e foo.AppImage | grep -m 1 73717368</code>
* Compute offset in bytes:
::This gives the offset in hex.
<pre>
* <code>$ unsquashfs -offset XXXXX nvim.appimage</code>
$ f=$(xxd -e foo.AppImage | grep -m 1 -o "^.*73717368")
::Here XXXXX is the offset in decimal.
$ expr $(printf %d 0x$(echo $f | sed 's/:.*$//')) \
    + $(($(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