Page 7 of 26

MiBandWFTool

Posted: 08 Jul 2019, 12:57
by lvpokka
Author
lvpokka

Tool Description
1. The tool is based on a modified version of AmazfitBipTools, thanks to the original open source .
2. The tool supports unpacking, packing of the official watch face bin file.
3. Mi band 4 supports 16,581,375 colors.
4. Mi band 5 supports 15,499,008 colors.

How to
1. Unzip MiBandWFTool_X.X.zip.
2. Download .bin file from catalog or get standard watchface file.
3. Drag the .bin file to WatchFace.exe (in step 1. , get the decompressed file)
(if there is only one log file, the decompression failed).

4. There are two ways to modify the dial.
  • is to modify the corresponding image file and replace it with what we want.
  • is to modify the corresponding json file and modify the position of the image.
5. After all the modifications are completed, drag the modified json into WatchFace.exe in step 1 to get the corresponding bin file
(the file name depends on the name of the bin. If the .bin file is not generated, the package is wrong)

6. Copy the newly generated bin file to the corresponding directory of the mobile phone, and the synchronization will be completed. (This step is not very clear, you can refer to the original tutorial) above, you're done!
History log
What's new
  • added animation support
  • fixed pulse and weather
  • removed color restrictions for images
  • analog clock support
ver1.2
- Added compatibility for Pulse progress bar

ver1.3
- added full support for transparent images
- drawing 20 frames for preview GIF

ver1.3.2
- bug fixes
- added 2 versions, both with transparency but Palette version uses less memory if images are simple.

ver1.3.3
- Added circular/linear step progress on preview

Stable v1.3.6
- locked transparency for palette mode, support only (0 and 255) values
- palette mode fix

Stable v1.3.7
v1.3.7 (cosmetic changes, you can use 1.3.6 if everything suits)
- Fixed GIF preview (Pulse rendering, Step segments, Kilometer drawing, Calories)
- Added the ability to choose which Set of images to use for WeekDays. (Config file WatchFace.exe.config)
- STRONGLY fixed json examples in README.
(to avoid problems, pack 1.3.6 and unpack 1.3.7 for a smooth transition)

Stable v1.3.8
- Removed image order dependency for json (sorting images no longer required)
- Fixed display bugs
Important: the order of the images should be from 0000 to XXXX without gaps.

v1.3.9
- Removed dependence on images order 0000->XXXX
- Calories rendering fixed
- Added ability to change Preview Speed (available from 50ms - 1000ms)
- TimeElement DrawingOrder hardcoded to 1234 (not used by MiBand4)

v1.4.1
- Other bugfixes
- New WF support
- Added new elements (time delimiter / step icon / linear progress )

v2.1.4
- Added support Mi Band 5 wfaces
- Pandafix (new unknown element)
- BugFixes

v2.1.5
- Preview bugfixes
- [WFPreview] Added Copy/Paste/Save ability
- [WFPreview] Added ability to replace watchface header
Mi Band 4 WF Tool
v1.4.2
- Added miles image support
NOTE:
- if your using image for MilesSuffixImageIndex, then KmSuffixImageIndex is required! you can use the same image for it

Mi Band 5 WF Tool
v2.1.6
- Preview bugfixes
- Watchfaces generating with random header identifier
- Fixed problem with Windows scaling, DPI is tied to 96
- [WFPreview] Removed ability to clone watchface header

Mi Band 6 WF Tool
v4.1.0
- Added Lunar calendar
- Bug fixes
- New preview generator, should be pixel perfect (big thx to Johnson070)

MiBandWFTool_4.1.0.zip

MiBandWFTool_2.1.6.zip [alt url] [alt url 2]

MiBandWFTool_1.4.2.zip [alt url] [alt url 2]

Re: MiBandWFTool

Posted: 21 Aug 2019, 13:09
by Skar3
Hi, are you planning to release the source code?

Re: MiBandWFTool

Posted: 22 Aug 2019, 07:40
by lvpokka
Not right now) you want some new features?

Re: MiBandWFTool

Posted: 22 Aug 2019, 14:54
by Toan
Hi, thank you for your work. I want to report a possible problem that i have found with calories indicator.
If i use only "Number" in my json all seems to be correct in preview but calories are shown in a different way in my MiBand4, in my case, aligned to the left instead of right and without background.
I used the other parameter "DelimiterImageIndex", the preview does not change and on MiBand calories are shown as they should but moved because there is the delimiter image on the last position on right (indicated by "BottomRightX").
I solved using a 1x1 pixels image as delimiter image and moving the last position 2 pixels to the right (1 for delimiter, 1 for spacing that i have set), calories are shown correctly on MiBand but moved one position to the right in preview.
I hope I was clear enough to help to understand this problem.

Re: MiBandWFTool

Posted: 22 Aug 2019, 19:21
by Titerinho
lvpokka wrote: 21 Aug 2019, 12:17
Weather was not supported by MiBand4 for now
Actually I did some testing and it turns out that ONLY the temperature is not supported. If you try to display just the weather icon, it works fine, which you can see in the image below.
weather.png
weather.png (230.08 KiB) Viewed 23774 times
If you try to use both weather icon and temperature, none of them will shop up. I wonder when Xiaomi will start supporting temperature too.

EDIT:
Go ahead and download my watchface, if you want to test it: https://amazfitwatchfaces.com/mi-band-4/view/4780

But I guess you were right, I did some more testing. It's only half-supported. The icon is displaying, but it's not updating. :lol:

Re: MiBandWFTool

Posted: 23 Aug 2019, 08:46
by lvpokka
[mention]Titerinho[/mention] Let me guess you always have a picture of the night? :DDDD First icon of array in your case moon means "Error" or "No Weather"

p.s Anyway thanks for testing and checking for some weather features. Sometime it could help allot)

Re: MiBandWFTool

Posted: 23 Aug 2019, 08:49
by Titerinho
lvpokka wrote: 23 Aug 2019, 08:46
@Titerinho Let me guess you always have a picture of the night? :DDDD First icon of array in your case moon means "Error" or "No Weather"

p.s Anyway thanks for testing and checking for some weather features. Sometime it could help allot)
Yes I always have a picture of the night, haha :D I thought it was working, because I was testing it at night :lol:

I guess we just have to wait for a firmware update from Xiaomi. I also wonder why when I have weather only, the icon is visible, but when I want to show both weather icon and temperature, then both are not visible...

Re: MiBandWFTool

Posted: 24 Aug 2019, 17:03
by sml_boor
Anyone has any idea why when creating WF using Raw mode on 1.3.8 I'm getting a 315kb .bin out of 32kb (total) of .png images?
Palette gives me a 106kb .bin out of same files

Re: MiBandWFTool

Posted: 24 Aug 2019, 17:32
by lvpokka
sml_boor wrote: 24 Aug 2019, 17:03
Anyone has any idea why when creating WF using Raw mode on 1.3.8 I'm getting a 315kb .bin out of 32kb (total) of .png images?
Palette gives me a 106kb .bin out of same files
Read article https://en.wikipedia.org/wiki/Indexed_color

ormaken wrote: 24 Aug 2019, 16:14
Can I apply a parameter "Z" or "Z-index" to "Time"? I would like that to appear above "StepsProgress".
Not possible, rendering order is predefined (at least for now)

Re: MiBandWFTool

Posted: 24 Aug 2019, 18:21
by sml_boor
[mention]lvpokka[/mention]
Ok, I did a thorough read of that wiki page. I do understand why palette mode is smaller. My question still stands though - why my 32kb of .png turns into 315kb of .bin? I don't think i can reduce the .png files any more

Re: MiBandWFTool

Posted: 24 Aug 2019, 19:11
by lvpokka
[mention]sml_boor[/mention] it's not using PNG format, mi band storing images in BMP with compatibility of full transparent pixels...
PNG format used just for transparency in image editors

Re: MiBandWFTool

Posted: 25 Aug 2019, 06:34
by lazimk
[mention]lvpokka[/mention]
in bandbbs.cn i have seen a GUI tool which allow you to see realtime preview and edit coordinates in json, compress and decompress bin file and resource file , etc. (some Mihuan tool v4.20 being latest).
Can we have a english translated version of that.
Or something similar tool ?

They also have a font file creation tool, using which u can change font file for MiBand4

Re: MiBandWFTool

Posted: 25 Aug 2019, 09:44
by lvpokka
Sorry but its not my part of job :D i home one my friend will release some king of version

Re: MiBandWFTool

Posted: 25 Aug 2019, 15:21
by MonsterDruide1
I've made a GUI-Builder for Watchfaces. It's based on the functionality of Drag'n'Drop and supports most of the elements so far. It's available in German and English, but I can add more languages on request. It's avaliable on Github, please search for "MiBand4-WatchfaceEditor" or this link: https://github.com/MonsterDruide1/MiBan ... r/releases . The controls are intuitive (I hope), otherwise they can be found in the README-file.

I published this first version a few days ago, so it may contain bugs or there could be features missing. If that's the case, please adress me here or via the "Issues"-Tab on GitHub.

Re: MiBandWFTool

Posted: 25 Aug 2019, 20:50
by w0mbat
sml_boor wrote: 24 Aug 2019, 18:21
@lvpokka
Ok, I did a thorough read of that wiki page. I do understand why palette mode is smaller. My question still stands though - why my 32kb of .png turns into 315kb of .bin? I don't think i can reduce the .png files any more
Have you checked the number of times you call your 32kb pngs in your JSON?
viewtopic.php?f=25&t=744&p=2006#p2006

Re: MiBandWFTool

Posted: 27 Aug 2019, 16:08
by becamer
Is there an option to edit priority of image displaying? I mean a layer priority like "z-index" in CSS. For example: if I have a weekday and date image in the same place, I want to change its z-index that one of it would show under or above the second image. This is required for the theme I'm creating so I'll be grateful for any advice.

Re: MiBandWFTool

Posted: 27 Aug 2019, 16:18
by lvpokka
Not possible...

b.t.w

v1.3.9
https://yadi.sk/d/t-gN9dmQN4myzA
- Removed dependence on images order 0000->XXXX
- Calories rendering fixed
- Added ability to change Preview Speed (available from 50ms - 1000ms)
- TimeElement DrawingOrder hardcoded to 1234 (not used by MiBand4)

Re: MiBandWFTool

Posted: 28 Aug 2019, 11:16
by lazimk
[mention]lvpokka[/mention] Thank you so much for releasing v1.3.9
btw, what do you mean by "TimeElement DrawingOrder hardcoded to 1234 (not used by MiBand4)"
Can you explain ?

Does it mean it always render/draw hour 10 first, then hour 1, then minute 10 and then minute 1 ??
Why is it hardcoded now if it could be customized??

Re: MiBandWFTool

Posted: 28 Aug 2019, 12:06
by lvpokka
[mention]lazimk[/mention]
Do you have proofs? do you have any watchface which on MI band 4 has order not like 1234 (12:45)-( hour 1 hour 2 minute 4 minute 5)

please build it with 1.3.8

Re: MiBandWFTool

Posted: 28 Aug 2019, 16:30
by lazimk
[mention]lvpokka[/mention]
I have not personally made different cases. But i will give you these examples.
In different WFs i have made, i used same order only (example : https://amazfitwatchfaces.com/mi-band-4/view/5073)

But, lets take those 2 stock WFs available in band (Orange and Blue) , they have Hour digits drawn on top of Minute digits. (right?)
Which makes me think it is possible.


Edit: I tried changing order of appearance of element (by lines) in json (since something like order attribute is not available yet). Its not working in v.1.3.8
But i believe such thing is possible as we can see in stock WFs

Re: MiBandWFTool

Posted: 28 Aug 2019, 18:36
by lvpokka
[mention]lazimk[/mention] yeap) thx for testing, we also trying to find order or parameter for that, but for now, order is not working) Thats why on preview order will be always 1234

Re: MiBandWFTool

Posted: 28 Aug 2019, 20:21
by lazimk
[mention]lvpokka[/mention]
Thanks.
Can u mention how you guys are doing this reverse engineering or finding order / parameters, parsing parameters, what tools are used. Etc?
(If it is okay)

Re: MiBandWFTool

Posted: 28 Aug 2019, 23:53
by jfpolaniar
Hello, I would like to know if the weather can be added. I try to edit a watchface but not let it load in the Mi Band 4
https://amazfitwatchfaces.com/mi-band-4/view/799

Re: MiBandWFTool

Posted: 29 Aug 2019, 03:18
by lazimk
[mention]jfpolaniar[/mention] from my understanding by reading posts from this thread,
weather does not work in MiBand4 Watchfaces.
even it show some weather icon / temperature, they are not correct (does not update as well).

So, weather does not work (alteast for now).

Re: MiBandWFTool

Posted: 29 Aug 2019, 03:19
by lazimk
There is a BETA firmware v.1.0.6.06 released for Mi Band 4. I wonder what changes it brings.

Re: MiBandWFTool

Posted: 02 Sep 2019, 00:17
by cndjonno
[mention]lvpokka[/mention]

Found an issue under "MonthAndDay" when "TwoDigitsMonth": false, in order to use months in text format the program still expects 10 images instead of the 12 and my November and December do not display correctly.

Great job by the way and if you have a link to github, I could try and see where the issue lies. Keep up the great work!