I've been playing around with the DJI Assistant 2 with the Mini and figured out how to enable the developer tools back. I wasn't able to do much with them but maybe someone can figure out how to write the config params like in the other Mavics?
Assistant still is an Electron based application but now everything is "compiled" into an asar file. So first you need to decompile it with:
Then you'll have to edit two lines in main.js
Change it to true.
And uncomment the developer tools line:
If you compile this folder into an asar, replace the original asar file and run Assistant , you'll see a new button onthe top left corner that says "Developer tools":
If you click it and open electron's dev tools (CTRL SHIFT I if im not mistaken) you'll see it's trying to find the file "tools.html". It's is not packaged anymore with Assistant. But you can import it from Assistant 1.1.2! Google it, unpack the asar and import the following files:
Some files might already exist in your newer asar file, don't replace them. Once you added those files, repackage the folder with
Replace the original asar folder, start assistant, plug your mini and click developer tools.
You'll see somehting like this:
Click on open connection and send this payload:
{“SEQ”:“123456”,“CMD”:“}
You'll get back a base64 string that seems to be encrypted.
Things to think about:
1) How to decrypt what assistant sends back
2) Can we send parameters and write to the mini?
3) Can we enable/disable cool things?
Hopefully someone smarter than me can figure this out. Let me know if something is not clear to you.
Assistant still is an Electron based application but now everything is "compiled" into an asar file. So first you need to decompile it with:
npx asar extract app.asar app
Then you'll have to edit two lines in main.js
var debug = false
Change it to true.
And uncomment the developer tools line:
mainWindow.webContents.openDevTools()
If you compile this folder into an asar, replace the original asar file and run Assistant , you'll see a new button onthe top left corner that says "Developer tools":
If you click it and open electron's dev tools (CTRL SHIFT I if im not mistaken) you'll see it's trying to find the file "tools.html". It's is not packaged anymore with Assistant. But you can import it from Assistant 1.1.2! Google it, unpack the asar and import the following files:
Code:
./build/base.css
./build/a3.css
./build/tools.css
./build/locale.js
./build/utils.js
./build/ws.js
./build/dass.js
./build/tools.js
Some files might already exist in your newer asar file, don't replace them. Once you added those files, repackage the folder with
asar pack ./app app-tools-hack.asar
Replace the original asar folder, start assistant, plug your mini and click developer tools.
You'll see somehting like this:
Click on open connection and send this payload:
{“SEQ”:“123456”,“CMD”:“}
You'll get back a base64 string that seems to be encrypted.
Things to think about:
1) How to decrypt what assistant sends back
2) Can we send parameters and write to the mini?
3) Can we enable/disable cool things?
Hopefully someone smarter than me can figure this out. Let me know if something is not clear to you.