Skip to content

Unpacking existing ASAR archive

Rodion Morozov edited this page Dec 1, 2022 · 3 revisions

To unpack an existing ASAR archive, you need to use AsarArchiveUnpacker class. It provides methods for extracting all files, or just files you need.

Creating an unpacker

First, you need to open an ASAR archive in order to start extracting files from archive. After you opened an ASAR archive, you can create an unpacker and extract files from this archive.

Here is an example of creating unpacker:

AsarArchive archive = new AsarArchive("path/to/archive.asar");
AsarArchiveUnpacker unpacker = new AsarArchiveUnpacker(archive);

Unpacker class has two events that can be occurred when unpacking whole archive.

Extract one file

Clone this wiki locally