how can I unpack a .app Application for Mac OS built with Electron? I want to view the source files, but I don't know how to access them.
Generally, Electron apps are bundled using Electron's asar
tool. Usually, you can unpack the source for these apps using the same tool.
If the app was bundled using a different tool, you will need to do your own research into whether the bundling process can be trivially reversed.
If you don't have asar
installed, you can install it via npm
:
npm install -g asar
Then try using asar
to unpack the source:
cd /Applications/Slack.app/Contents/Resources
mkdir example-sourcecode
asar extract app.asar example-sourcecode
I found the above information on this blog post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With