• 管理员
  •  
    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.

版主: asoolvpokkaInternal errorWatchmens

版面规则
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
帖子: 4
注册时间: 03 8月 2020, 12:55
来自: Kyiv
Has thanked: 2 time
Been thanked: 9 time
联系:

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

帖子 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

代码: 全选

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

代码: 全选

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

代码: 全选

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

代码: 全选

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 :

代码: 全选

-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
附件
py_amazfit_tools-GTR2_v0_2.zip
(323.58 KiB) 已下载 2380 次
上次由 bigdigital.kov 在 31 1月 2021, 18:53,总共编辑 3 次。
头像
asoo
帖子: 2202
注册时间: 03 1月 2019, 01:48
来自: ͼͽ Thailand ͼͽ
Has thanked: 420 time
Been thanked: 2122 time

帖子 asoo »

Messef 写了: 16 2月 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
帖子: 114
注册时间: 23 2月 2020, 22:49
来自: Poland
Has thanked: 23 time
Been thanked: 17 time
联系:

帖子 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
帖子: 2
注册时间: 24 2月 2021, 06:45
来自: Colombia
Has thanked: 1 time
联系:

帖子 su8044 »

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

代码: 全选

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!
头像
eliasf
帖子: 23
注册时间: 29 1月 2021, 18:10
来自: GR
Has thanked: 5 time
Been thanked: 5 time
联系:

帖子 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 写了: 24 2月 2021, 06:55
eliasf 写了: 04 2月 2021, 07:39
Trying to decompile a couple of watchfaces and it results in a traceback error.
The log says:

代码: 全选

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
帖子: 3
注册时间: 22 5月 2020, 01:19
来自: KR
Has thanked: 6 time
联系:

帖子 Fringo »

It also works on ZEPP E CIRCLE not only GTR2! Thank you :)
masterplexus
帖子: 1
注册时间: 11 3月 2021, 16:52
来自: Germany
联系:

帖子 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
帖子: 3
注册时间: 27 4月 2018, 01:46
来自: Taipei , taiwan
联系:

帖子 bird81309 »

want to know how to modify the display of AOD mode...想知道要怎麼修改AOD的顯示
wolliden
帖子: 1
注册时间: 15 8月 2020, 15:38
来自: Germany
Has thanked: 2 time
Been thanked: 1 time
联系:

帖子 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
帖子: 10
注册时间: 07 5月 2021, 09:57
来自: Perth
Has thanked: 2 time
Been thanked: 3 time
联系:

帖子 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:

代码: 全选

#!/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.

代码: 全选

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
帖子: 6
注册时间: 09 7月 2021, 01:47
来自: Russia
联系:

帖子 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
帖子: 20
注册时间: 27 8月 2021, 16:50
来自: FR
Has thanked: 1 time
联系:

帖子 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
帖子: 4
注册时间: 03 8月 2020, 12:55
来自: Kyiv
Has thanked: 2 time
Been thanked: 9 time
联系:

帖子 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

帖子 darekperlinski »

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

回到 “Watchfaces tools”

在线用户

正浏览此版面之用户: 没有注册用户 和 3 访客