tnxec2 / py_amazfit_tools Goto Github PK
View Code? Open in Web Editor NEWThis project forked from bigdigital/py_amazfit_tools
pack/unpack .bin for amazfit verge lite/gtr
This project forked from bigdigital/py_amazfit_tools
pack/unpack .bin for amazfit verge lite/gtr
Hi, when unpack this watchface https://amazfitwatchfaces.com/bip/view/38573 , no preview was generated ;)
it seems wf creation handles parameters up to id 6
while parsing has id 7 and 8
py_amazfit_tools/watchFaceParser/elements/gts2mini/progress.py
Lines 14 to 16 in da25668
I did a quick try and repacked a watchface with a positive value for Unknown7 (Minutes).
Looks like it's meant to offset the digits vertically.
{
"Info": {
"DeviceId": 73
},
"Background": {
"Image": {
"X": 133,
"Y": 100,
"ImageIndex": 0
},
"Preview": {
"X": 0,
"Y": 0,
"ImageIndex": 1
},
"PreviewKorean": {
"X": 0,
"Y": 0,
"ImageIndex": 1
},
"PreviewChinese": {
"X": 0,
"Y": 0,
"ImageIndex": 1
}
},
"DateBlock": {
"Date": {
"PaddingZeroMonth": true,
"PaddingZeroDay": true,
"Unknown6": 0
}
},
"TimeDigital": {
"Hours": {
"TopLeftX": 42,
"TopLeftY": 100,
"BottomRightX": 147,
"BottomRightY": 177,
"Alignment": "TopLeft",
"Spacing": 0,
"Unknown7": 0,
"ImageIndex": 2,
"ImagesCount": 10
},
"PaddingZeroHours": true,
"HoursFollowPosition": false,
"Time": {
"Unknown1": 1,
"Minutes": {
"TopLeftX": 167,
"TopLeftY": 100,
"BottomRightX": 272,
"BottomRightY": 177,
"Alignment": "TopLeft",
"Spacing": 0,
"Unknown7": 50,
"ImageIndex": 2,
"ImagesCount": 10
},
"PaddingZeroMinutes": true,
"PaddingZeroSeconds": true,
"MinutesFollowHours": false,
"SecondsFollowMinutes": false
}
}
}
I play with pack/unpack, it works in general, but have 2 bugs i found:
PS: I can provide watch face .bin which utilize both shortcuts to check.
9dd4668a2762a86e8b837b933a23efe4.zip
It is a bit weird, on this watchface the blue circle is obtained with a set of images.
But the green circle (for steps) seems to be drawn by the watch
Parsing descriptor for parameter 7...
4 (22): 28 bytes
1 ( 8): 239 EF # x coord.
2 (10): 84 54 # y coord.
3 (18): 33 21 # width?
4 (20): 33 21 # height?
5 (28): 180 B4 # start angle
6 (30): 540 21C # stop angle
7 (38): 8 8 # ????
8 (40): 18446744073694918516 FFFFFFFFFF 20B774 # green color
I created a very simple watchface on Huami with just hour/minutes and a background:
simple.zip
If I unpack it I get this json
{
"Info": {
"DeviceId": 73
},
"Background": {
"Image": {
"X": 133,
"Y": 100,
"ImageIndex": 0
},
"Preview": {
"X": 0,
"Y": 0,
"ImageIndex": 1
},
"PreviewKorean": {
"X": 0,
"Y": 0,
"ImageIndex": 1
},
"PreviewChinese": {
"X": 0,
"Y": 0,
"ImageIndex": 1
}
},
"DateBlock": {
"Date": {
"PaddingZeroMonth": true,
"PaddingZeroDay": true,
"Unknown6": 0
}
},
"TimeDigital": {
"Hours": {
"TopLeftX": 42,
"TopLeftY": 100,
"BottomRightX": 147,
"BottomRightY": 177,
"Alignment": "TopLeft",
"Spacing": 0,
"Unknown7": 0,
"ImageIndex": 2,
"ImagesCount": 10
},
"PaddingZeroHours": true,
"HoursFollowDate": false,
"Time": {
"Unknown1": 1,
"Minutes": {
"TopLeftX": 167,
"TopLeftY": 100,
"BottomRightX": 272,
"BottomRightY": 177,
"Alignment": "TopLeft",
"Spacing": 0,
"Unknown7": 0,
"ImageIndex": 2,
"ImagesCount": 10
},
"PaddingZeroMinutes": true,
"PaddingZeroSeconds": true,
"MinutesFollowHours": false,
"SecondsFollowMinutes": false
}
}
}
If I repack it:
bytes gap
and fail on last imageWatchface eddc844402b6157dfb01e2b780b64b0b.bin contains data for parameter 22
It looks like a set of 8 images that cycle during the day.
Not sure if we can have more or less than 8.
Parsing descriptor for parameter 22...
1 ( A): 132 bytes
1 ( A): 50 bytes
1 ( 8): 51 33 # id of the first image
2 (12): 4 bytes # array of 10 (x,y) coordinates
1 ( 8): 0 0
2 (10): 109 6D
2 (12): 4 bytes
1 ( 8): 0 0
2 (10): 109 6D
2 (12): 4 bytes
1 ( 8): 0 0
2 (10): 109 6D
2 (12): 4 bytes
1 ( 8): 0 0
2 (10): 109 6D
2 (12): 4 bytes
1 ( 8): 0 0
2 (10): 109 6D
2 (12): 4 bytes
1 ( 8): 0 0
2 (10): 109 6D
2 (12): 4 bytes
1 ( 8): 0 0
2 (10): 109 6D
2 (12): 4 bytes
1 ( 8): 0 0
2 (10): 109 6D
2 (12): 8 bytes # array of start/stop time for each image?
1 ( 8): 19 13 # 19:00 -> 06:00
2 (10): 0 0
3 (18): 6 6
4 (20): 0 0
2 (12): 8 bytes
1 ( 8): 6 6 # 06:00 -> 08:00
2 (10): 0 0
3 (18): 8 8
4 (20): 0 0
2 (12): 8 bytes
1 ( 8): 8 8 # 08:00 -> 10:00
2 (10): 0 0
3 (18): 10 A
4 (20): 0 0
2 (12): 8 bytes
1 ( 8): 10 A
2 (10): 0 0
3 (18): 11 B
4 (20): 30 1E
2 (12): 8 bytes
1 ( 8): 11 B
2 (10): 30 1E
3 (18): 12 C
4 (20): 31 1F
2 (12): 8 bytes
1 ( 8): 12 C
2 (10): 31 1F
3 (18): 15 F
4 (20): 0 0
2 (12): 8 bytes
1 ( 8): 15 F
2 (10): 0 0
3 (18): 17 11
4 (20): 0 0
2 (12): 8 bytes
1 ( 8): 17 11
2 (10): 0 0
3 (18): 19 13
4 (20): 0 0
There is a typo, what causes to not be compatible with the older "AmazfitBipS_Tools_alpha_230420". I didn't see this typo first. Wondering why it's not working
Within "Today" , "OneLine", "AppendDegresForBoth": false, should be: "AppendDegreesForBoth"
Here is a funny thing to tinker,
In Zepp application you can select a background, a text color and it will generate a watchface for you.
The resulting watchface is really weird.
This was reported to me by Lazim, props to him
It looks like this
and the bin:
ret.zip
We already have OneLineMonthAndDay
and MonthAndDay
but this watchface seems to have another parameter address for month and day. Does it look like anything that already exists in Bip/GTS2 watchfaces?
6608e628967af66d1b74f8f9952596d7.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.