About this project

Ark-Unpacker is a batch unpacking tool designed for Arknights game resources, written in Python and released under the BSD-3 open source license. The current version is v5.2, and the author has announced a gradual migration to the more feature-complete ArkStudio platform; this project will cease updates once the migration is complete. Main Features 1. Batch unpacking of game resource objects from Arknights Unity AssetBundle (AB) files. Supports the special decompression algorithm for game version v2.5.04 and above; can distinguish Spine model files for base chibi characters, dynamic portraits, and combat chibi characters during unpacking; can organize exported results into directories based on the source AB file name. 2. Batch merging of RGB channel images and Alpha channel images. 3. Batch decoding of FlatBuffers data files. 4. Provides both an interactive command-line interface and direct command-line invocation. Supported export resource types include: Sprite (PNG), Texture2D (PNG), AudioClip (WAV), TextAsset (text or byte data), Mesh (OBJ), TypeTree (JSON). Usage Workflow Before use, you need to obtain the game resource files. Android resources are divided into two parts: the assets/AB/Android directory inside the installation package and the Bundles directory generated by hot updates; merge and overwrite them to obtain the complete resources. For PC, obtain the initial StreamingAssets/AB/Windows resources and PersistentData/Bundles hot update resources from the Arknights_Data directory under the Hypergryph launcher installation directory. The repository provides a resource locating guide document to help find the AB files containing specific resources. The program provides a Windows 64-bit executable, downloadable from the Releases page. Place the folder to be unpacked in the same directory as the program and run it to enter the interactive interface. Working Modes - One-click execution: Unpacks files in the program's directory and performs image merging, exporting to Unpacked_xxxx and Combined_xxxx folders. The documentation advises against using it to unpack the entire game resource directory, as it may take too long and consume excessive resources. - Custom resource unpacking: Specify input/output paths and select resource types. - Custom image merging: Merge RGB images and Alpha images in the specified path. - Custom text data decoding: Decode data files in the specified directory. - Custom Spine model export: Export Spine animated chibi character models. - Custom Criware USM audio/video extraction: Extract audio and video from USM files. - ArkModels and ArkVoice extraction and sorting tools: Custom features; refer to dedicated documentation. Command-Line Usage The program supports direct invocation via arguments. The mode parameter -m accepts ab (unpack), cb (image merge), fb (FlatBuffers decoding), sp (Spine parsing), cu (USM parsing); input and output are specified with -i and -o; -d can delete an existing output directory first; in unpack mode, --image, --text, --audio, --spine, --mesh, --typetree can be used to select export types, and -g groups by source AB file name; in USM mode, --no-video and --no-audio can skip corresponding processing; -l sets the log level (0 to 4). Running without the mode parameter enters the interactive interface. Notes The one-click execution mode does not unpack AB files located directly in the program directory; it only processes files within subfolders. The program automatically adjusts its multi-process strategy based on the number of CPU cores, and has certain requirements for CPU and hard drive performance; devices with lower specifications may run slowly. After running, a configuration file ArkUnpackerConfig.json and a log file ArkUnpackerLogs.log will be generated in the working directory. The repository also provides documentation on configuration file guidance, essential knowledge (RGB channel images and A channel images, Spine animated chibi characters), and developer guidance.