• Administrator
  •  
    Support Ukraine
    If you experience any problems with the forum (it is not visible, there is no way to post messages, or some functionality does not work), please let us know. If you have problems with registration or you did not receive confirmation letter, let us know and we will activate your account manually.
    If you get an "The submitted form was invalid. Try submitting again" error, delete cookies, then try again.
     

beta py amazfit tool for GTR2(GTS2 also should work but not tested)

This forum is designed to discuss and develop tools creating watch faces.

Moderators: asoo, lvpokka, Internal error, Watchmens

Forum rules
All communication in this branch should only be in English.
To discuss tools that are not in this section, use the “Watchfaces tools (discussion)” forum.
bigdigital.kov
Posts: 4
Joined: 03 Aug 2020, 12:55
Location: Kyiv
Has thanked: 2 times
Been thanked: 9 times
Contact:

beta py amazfit tool for GTR2(GTS2 also should work but not tested)

Post by bigdigital.kov »

The link to the project on github /bigdigital/py_amazfit_tools/tree/GTR2
Hi to all. Recenly I did some research in gtr2 watchface structure and made this tool.

Its a well known py amazfit tool but with adaptation for GTR2.
It is also has included tool which allows to compress and decompress GTR2 bin files. Before uploading bin file to your watch, you should compress it with help of this tool.

The JSON structure for GTR2 is completely different. To get the basic knowledge about the structure you can unpack any existing GTR2 dial.

How to use it.
1. Unpack existing dial with help of the GTR2_Packer.exe tool by executing

Code: Select all

GTR2_Packer.exe -unc2 WATCH_FACE_FILE.bin
2 After uncompressing, you should receive a new file with .unc extension, rename file extension back to .bin
3. Now you can parse uncompressed dial with a command

Code: Select all

python main._py --gtr2  47 --file WATCH_FACE_FILE.bin
* due to the limitation on this forum, i can't post a topic with the correct python file name, so please remove "_" char between "main." and "py" in the command above.
As a result, if everything was ok, you should receive json file.
4 Now you can modificate json file or watchface images.
5. After all the modifications are completed, you can build watchface with help of the command

Code: Select all

python main._py --gtr2 47 --file WATCH_FACE_FILE.json
* due to the limitation on this forum, i can't post a topic with the correct python file name, so please remove "_" char between "main." and "py" in the command above.
6 . Pack a new bin file with help of GTR2_Packer.exe

Code: Select all

GTR2_Packer.exe -cmp2 WATCH_FACE_FILE_packed.bin
7. Rename compressed file extension back to .bin and upload to your watch to test it

Notes .
1. The previews generation does not work for GTR2 mode.
2 .Available Commands for GTR2_Packer.exe :

Code: Select all

-cmp Compress bin (for gtr(gts) first gen)
-cmp2 Compress gtr2(gts2) bin 
-unc Decompress
-unc2 Decompress gtr2(gts2) bin
3. Image numeration on GTR2 and GTS2 starting from 0001, not from zero like it was for previous Huami devices.


Current version 0.2

Chagelog
v0.2
Added widgets.
Fixed Images loss when packing bin file
Attachments
py_amazfit_tools-GTR2_v0_2.zip
(323.58 KiB) Downloaded 2313 times
Last edited by bigdigital.kov on 31 Jan 2021, 18:53, edited 3 times in total.
User avatar
asoo
Posts: 2130
Joined: 03 Jan 2019, 01:48
Location: ͼͽ Thailand ͼͽ
Has thanked: 411 times
Been thanked: 2050 times

Post by asoo »

Messef wrote: 16 Feb 2021, 15:44
Thank you for your response and the unpack.
I don't speak Russian, so I can't do much with the link to main.exe by SashaCX75.
See your PM.
ͼͽ To request please use the interrelated forum in action ͼͽ
Please do not PM to me for requests ported watchface.
demiurg1
WF maker
Posts: 114
Joined: 23 Feb 2020, 22:49
Location: Poland
Has thanked: 23 times
Been thanked: 17 times
Contact:

Post by demiurg1 »

The problem of not displaying the "Bluetooth" sign is not current. I know that the GTR 2 only shows the "Bluetooth" out of range sign, if we use one in the watch face design.
su8044
Posts: 2
Joined: 24 Feb 2021, 06:45
Location: Colombia
Has thanked: 1 time
Contact:

Post by su8044 »

eliasf wrote: 04 Feb 2021, 07:39
Trying to decompile a couple of watchfaces and it results in a traceback error.
The log says:

Code: Select all

WARNING - [ParamConv:parse] currentPath 5/./2/./3/./3 / Parameter 3 isn't supported for <class 'watchFaceParser.elements.gtr2.progress.Progress'>
CRITICAL - Parameter 3 isn't supported for <class 'watchFaceParser.elements.gtr2.progress.Progress'>
Traceback (most recent call last):
Has anyone else encountered it and is there a solution?
I can provide a full log if necessary.
Same issue here with only a couple of watch faces i tried. i wanted to try the workaround you mentioned but i think the file is now called "stepsProgress. py" on the latest version and already has 3 defined so i can't figure what else it might be, im still learning.


on another note, i see some default amazfit watchfaces not only have the option to select between different info displayed on the complication, but also the ability to be used as a shortcut to the amazfit app on the watch, and some extra info such as 5 day weather and windspeed i haven't seen on other watchfaces. is this possible in the current state of the compilers or will ot be in the future?

thanks!
User avatar
eliasf
Posts: 23
Joined: 29 Jan 2021, 18:10
Location: GR
Has thanked: 5 times
Been thanked: 5 times
Contact:

Post by eliasf »

That was an issue I had with v0.1 and it was since fixed in v0.2, it had to do with the weekdays progress which is probably parameter 3.

If you are trying to decompile a wf with "hot zone" (shortcuts) like huami calls it you would get a parameter 6 error. I did that and that's what I got.

This means that the parser can still not handle how huami have set up that specific feature.

Hopefully in a newer version this will be sorted out, unfortunately you can't get much help from Huami themselves which means it's up to the tool developer to understand their internal structure and how to implement a working parser that translates properly.

One can only hope...
su8044 wrote: 24 Feb 2021, 06:55
eliasf wrote: 04 Feb 2021, 07:39
Trying to decompile a couple of watchfaces and it results in a traceback error.
The log says:

Code: Select all

WARNING - [ParamConv:parse] currentPath 5/./2/./3/./3 / Parameter 3 isn't supported for <class 'watchFaceParser.elements.gtr2.progress.Progress'>
CRITICAL - Parameter 3 isn't supported for <class 'watchFaceParser.elements.gtr2.progress.Progress'>
Traceback (most recent call last):
Has anyone else encountered it and is there a solution?
I can provide a full log if necessary.
Same issue here with only a couple of watch faces i tried. i wanted to try the workaround you mentioned but i think the file is now called "stepsProgress. py" on the latest version and already has 3 defined so i can't figure what else it might be, im still learning.


on another note, i see some default amazfit watchfaces not only have the option to select between different info displayed on the complication, but also the ability to be used as a shortcut to the amazfit app on the watch, and some extra info such as 5 day weather and windspeed i haven't seen on other watchfaces. is this possible in the current state of the compilers or will ot be in the future?

thanks!
Fringo
WF maker
Posts: 3
Joined: 22 May 2020, 01:19
Location: KR
Has thanked: 6 times
Contact:

Post by Fringo »

It also works on ZEPP E CIRCLE not only GTR2! Thank you :)
masterplexus
Posts: 1
Joined: 11 Mar 2021, 16:52
Location: Germany
Contact:

Post by masterplexus »

Hi all,

I'll start to try todo my own Watchfaces, and it looks like it is possible with the help of this group and tool ;) But I have one question for a special need:
Is it possible to include in a watchface also data/information, wich comes not directly from the Zepp app, or the watch itself? The background is, that I'm diabetic, and I have a measurement system wich collects blood-sugar values (with an app called xDrip). This information's I would like to provide also on the watchface. I can provide the information's in several ways (like json, as a graphic, over intents or whatever), but I'm not sure how to bring this information then into the watchface.

Is there any manual which could describe something like this? If someone could put me in a direction would be great!

Many thanks for any help!
bird81309
WF maker
Posts: 3
Joined: 27 Apr 2018, 01:46
Location: Taipei , taiwan
Contact:

Post by bird81309 »

want to know how to modify the display of AOD mode...想知道要怎麼修改AOD的顯示
wolliden
Posts: 1
Joined: 15 Aug 2020, 15:38
Location: Germany
Has thanked: 2 times
Been thanked: 1 time
Contact:

Post by wolliden »

I am really happy that this tool exists, and it works (unpacked existing WF). I want to change several complications, because I need sunrise/sunset time and week number to show up permanently. Is this still not possible, with Huami watches?
CyclingAsia
WF maker
Posts: 10
Joined: 07 May 2021, 09:57
Location: Perth
Has thanked: 2 times
Been thanked: 3 times
Contact:

Post by CyclingAsia »

Thanks for this amazing utility. Until today I was stuck as I don't have a windows machine. But today I was able to work out how to run the GTR2_Packer.exe in macOS (and likely works in Linux as well). Turns out the GTR2_Packer.exe is a java cli app that has been attached to a stub java loader, as such it can be run with java on macOS and Linux machines.

I wrote a fairly simple bash script to launch java with the appropriate arguments.

1. Edit a file called GTR2_Packer using your favourite editor (eg vim)
2. Copy and paste the following:

Code: Select all

#!/bin/sh
  
java -jar $0.exe com.thatguys.Main $*
3. Save the file in the same directory as the GTR2_Package.exe
4. Execute it as you would any other command line utility.

Note: this will likely not work as expected if there are spaces in the directory tree.

Code: Select all

mbp:py_amazfit_tools-GTR2$ ./GTR2_Packer 
Wrong usage
usage: gtr-packer
 -cmp <filename>    Compress
 -cmp2 <filename>   Compress gtr2 format
 -test <filename>   Decompress and compress file, and make sure they are
                    equal
 -unc <filename>    Decompress
 -unc2 <filename>   Decompress gtr2 format
mbp:py_amazfit_tools-GTR2$ 
Aaronfet
Posts: 6
Joined: 09 Jul 2021, 01:47
Location: Russia
Contact:

Post by Aaronfet »

Thanks a lot for that tool I was just trying to figure out how to do a HTML5 port using Love.js games not finished yet, but I prefer to know early where I might have problems. I must have been doing something wrong because it wasnt working but thanks to your tool I wont have to waste time trying to find out what I did wrong. I was also starting to wonder if Id done something in my code that couldnt be ported, so it put my mind at ease.
Julien
Posts: 20
Joined: 27 Aug 2021, 16:50
Location: FR
Has thanked: 1 time
Contact:

Post by Julien »

Hello bigdigital.kov we've talked over Github, it seems you worked on the GTS 2 Mini too.
Is GTR2_Packer.exe an executable version of your python script or is it a separate project? I'm confused
bigdigital.kov
Posts: 4
Joined: 03 Aug 2020, 12:55
Location: Kyiv
Has thanked: 2 times
Been thanked: 9 times
Contact:

Post by bigdigital.kov »

GTR2_Packer.exe is a separate project. it is required to compress/decompress existing watchface before uploading wf to the device. The GTR2/GTS2 can consume only compressed watcfaces. But it seems the GTS2 mini , do not require any compression. I guess this is because they use relatively small 16 bit images and the device screen much smaller
.
darekperlinski

Post by darekperlinski »

Hello, with amazfit gtr 2e it's working also(not for every watchfaces)! thanks!
Post Reply

Return to “Watchfaces tools”

Who is online

Users browsing this forum: No registered users and 4 guests