melianmiko / zmake

Unofficial ZeppOS build system, for Smart Band 7
https://melianmiko.ru/en/zmake/
GNU General Public License v3.0
41 stars 5 forks source link

Support "bin" files from Amazfit Band 7 #1

Closed cfgnunes closed 1 year ago

cfgnunes commented 1 year ago

Hello!

It will be interesting if the Zmake uncompress the "bin" files from "Amazfit Band 7" watchfaces.

Best regards!

melianmiko commented 1 year ago

It already can do that.

Amazfit Band 7 uses the same watchface/app formats as Smart Band 7, so zmake will work with them.

cfgnunes commented 1 year ago

Hi, @melianmiko!

When I try to convert a file ".bin" to ".js", it result an error:

Traceback (most recent call last): File "zmake/main.py", line 26, in File "zmake/context.py", line 52, in perform_auto File "zmake/context.py", line 86, in process_bin File "zipfile.py", line 1267, in init File "zipfile.py", line 1334, in _RealGetContents zipfile.BadZipFile: File is not a zip file FAILED

See these examples below: https://github.com/cfgnunes/tricarbon-watchface/blob/main/app/watchface/194x368_s_bari/index.bin https://github.com/cfgnunes/tricarbon-watchface/blob/main/app/app.bin

melianmiko commented 1 year ago

Oh, now I understand.

That files aren't a watchface by itself, it's a compiled JavaScript code. For some reasons, some watchfaces uses a QuickJS bytecode files instead of plain JS scripts.

And this files can't be decompiled for now. Not only zmake, there's globally no way to decompile JS bytecode files.

Sorry, I can't help with that.

cfgnunes commented 1 year ago

Thanks for the information, @melianmiko! 😊