I have packed my electron application using follwoing command
asar pack app app.asar
Now, I need to unpack it and get the whole code back. Is there anyway to do so?
From the asar documentation
(the use of npx
here is to avoid to install the asar
tool globally with npm install -g asar
)
Extract the whole archive:
npx asar extract app.asar destfolder
Extract a particular file:
npx asar extract-file app.asar main.js
It is possible to upack without node installed using the following 7Zip-plugin:
http://www.tc4shell.com/en/7zip/asar/
Thanks @MayaPosch for mentioning that.
来源:https://stackoverflow.com/questions/38523617/how-to-unpack-an-asar-file