User Tools

Site Tools

Translations of this page:

howto:app.asar

This is an old revision of the document!


Exploring app.asar

MacOS

This document describes how to unpack the contents of app.asar, which is one of the components of Dji Assistant. The instructions below assume you are running on OSX. Most of these instructions will readily translate to most Linux variants.

1. Toolchain

Install your toolchain as per the instructions here. You only need to do this once… but check the instructions to see if there are any new tools that you may need.

2. Install DJI assistant

Install DJI assistant from here if it is not already installed.

3. Extract the ASAR file

cd ~/Documents/nodejs
./node_modules/asar/bin/asar.js e /Applications/Assistant.app/AppFiles/app.asar ./app.asar.extr

4. Format the results

./node_modules/standard/bin/cmd.js --fix "./app.asar.extr/**/*.js"

The output is some interesting files which can help in understanding how DJI assistant works.

Credits

Windows

On Windows, you can still use the Node.js method shown above (with varying steps); or you can go an easier route and use 7-Zip with a plugin called Asar7z. This allows you to easily open the app.asar file similar to a compressed file (.zip, .rar, tar, etc) and save changes without needing a complex process.

Download and Install 7zip and plugin

Open and run the 7zip installer. Follow the prompts.

Extract the plugin

Follow these steps to install the plugin file. Close 7-zip and then:

  • Navigate to C:\Program Files\7-Zip
  • Create a new folder named, “Formats”
  • Open the Asar7z file you downloaded earlier
  • Extract the contents of the Asar7z file to the newly created formats folder above, this will be C:\Program Files\7-Zip\Formats\

Now, each time you launch 7-Zip, it will automatically find Asar7z and use it when opening .asar files.

Open the app.asar file

Now that you have installed the app plugin, open 7zip. Within 7zip, navigate to C:\Program Files (x86)\DJI Product\DJI Assistant 2\AppFiles and you will find app.asar. You can open this file with 7zip.

You can either extract the contents to a destination, or find files and edit within 7zip. If you extract the files, you will need to re-compile the archive (which I'm not going into detail here). If you edit from within 7zip, files will be saved to the current app.asar, no need to recompress.

Screenshot showing app.asar open in 7zip

howto/app.asar.1555272221.txt.gz · Last modified: 2019/04/14 20:03 by digdat0