• 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.
     

MiBandWFTool

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.
Post Reply
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

MiBandWFTool

Post 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]
Last edited by lvpokka on 02 Aug 2020, 19:41, edited 24 times in total.
w0mbat
WF maker
Posts: 9
Joined: 13 Jul 2019, 15:37
Location: France
Has thanked: 3 times
Been thanked: 1 time
Contact:

Post by w0mbat »

If your image has too many color and you want to use the palette mode, you have to posterize it, reduce the number of tones.
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

In result Band using BMP images and tool is encoding to BMP images. If image is not passing palette, please user raw to store only this image
Morridin6

Post by Morridin6 »

Hi, I'm trying to get an analog wf to work, but somehow the tool doesn't work correctly

I also downloaded an analog wf (which I know works) and used the tool to extract and regenerate the wf without changing anything, and then the analog part doesn't work either.
Who knows what's wrong?
Attachments
MyOwn_packed.bin
(145.02 KiB) Downloaded 232 times
Last edited by Morridin6 on 30 Jul 2019, 16:17, edited 1 time in total.
Morridin6

Post by Morridin6 »

The cause why the analog watch face doesn't seem to work is possibly the complexity of the shapes that are used.
When I use for example the hour shape:

"Shape": [
{
"X": 0,
"Y": 1,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": 30,
"Y": 2,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": 32,
"Y": 0,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": 30,
"Y": -2,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": 0,
"Y": -1,
"X2": 0,
"Y2": 0,
"X3": 0
}
]

it works, but when I use the shape:

"Shape": [
{
"X": -12,
"Y": -2,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": -12,
"Y": 2,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": 0,
"Y": 3,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": 20,
"Y": 5,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": 30,
"Y": 0,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": 20,
"Y": -5,
"X2": 0,
"Y2": 0,
"X3": 0
},
{
"X": 0,
"Y": -3,
"X2": 0,
"Y2": 0,
"X3": 0
}
]

It doesn't work.

Is there maybe a bug in the MiBandWFTool that limits the number of coordinates that can be used?
[mention]lvpokka[/mention] Is this something you can look into?
No hurry, I continued with a less complex dial and succesfully created my first wf on this site 🤗
Last edited by Morridin6 on 30 Jul 2019, 21:06, edited 2 times in total.
fprietog
WF maker
Posts: 6
Joined: 01 Jul 2019, 18:46
Has thanked: 10 times
Been thanked: 1 time
Contact:

Post by fprietog »

Hi,

I'm was trying to use a raw.cfg file but i get this error:

Code: Select all

Found raw.cfg
[Error] Found raw.cfg but it contains unallowed characters, please use (ex. 0,1,3,4,5)
I'm using Ubuntu (Wine with Mono-gecko instead of .NET). The problem is that the editor i'm using (gedit) is always putting EOL characters (0x0A for linux or 0x0D0A for windows).

I can solve it but maybe the parser should be a bit less restrictive.

Thanks and best regards.
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

Morridin6 wrote: 30 Jul 2019, 15:52
The cause why the analog watch face doesn't seem to work is possibly the complexity of the shapes that are used.

@lvpokka Is this something you can look into?
No hurry, I continued with a less complex dial and succesfully created my first wf on this site 🤗
If MiBandWF tool is building it and there is some problems only direct on Mi Band 4, then I have no idea how Mi band 4 parse negative coordinate... Could you provide more specific details about problem?

BTW. number of coordinates limited from 20-32(some unknown conditions) in sum of all points of all shapes
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

fprietog wrote: 30 Jul 2019, 19:45
Hi,

I'm was trying to use a raw.cfg file but i get this error:

Code: Select all

Found raw.cfg
[Error] Found raw.cfg but it contains unallowed characters, please use (ex. 0,1,3,4,5)
I'm using Ubuntu (Wine with Mono-gecko instead of .NET). The problem is that the editor i'm using (gedit) is always putting EOL characters (0x0A for linux or 0x0D0A for windows).

I can solve it but maybe the parser should be a bit less restrictive.

Thanks and best regards.
Hmm, need to check that. For now it allowing only numbers "0-9" and symbol ","
Morridin6

Post by Morridin6 »

lvpokka wrote: 30 Jul 2019, 22:22
Morridin6 wrote: 30 Jul 2019, 15:52
The cause why the analog watch face doesn't seem to work is possibly the complexity of the shapes that are used.

@lvpokka Is this something you can look into?
No hurry, I continued with a less complex dial and succesfully created my first wf on this site 🤗
If MiBandWF tool is building it and there is some problems only direct on Mi Band 4, then I have no idea how Mi band 4 parse negative coordinate... Could you provide more specific details about problem?

BTW. number of coordinates limited from 20-32(some unknown conditions) in sum of all points of all shapes
Indeed, the WF tool is building it and the previews are created correctly, but somehow when I upload it to the band it doesn't show up. Negative coordinates are process correctly. You can see I use negative value in the shape that does work on the miband.
If the number of coordinates in total is limited to 20 or something then that explains why it doesn't work. The hours, minutes and seconds were in total 20+ coordinates. Still strange that [mention]EiphThe[/mention] can make it work with that many coordinates. I used his WF's as a template.
BeatlJoe
WF maker
Posts: 2
Joined: 27 Jul 2019, 11:26
Location: unknown
Has thanked: 1 time
Contact:

Post by BeatlJoe »

Please. where am I making mistake? I don't see the day in the date.

I apologize for the translation.




{
"Background": {
"Image": {
"X": 0,
"Y": 0,
"ImageIndex": 0
}
},
"Time": {
"Hours": {
"Tens": {
"X": 5,
"Y": 28,
"ImageIndex": 1,
"ImagesCount": 10
},
"Ones": {
"X": 31,
"Y": 28,
"ImageIndex": 1,
"ImagesCount": 10
}
},
"Minutes": {
"Tens": {
"X": 65,
"Y": 28,
"ImageIndex": 1,
"ImagesCount": 10
},
"Ones": {
"X": 91,
"Y": 28,
"ImageIndex": 1,
"ImagesCount": 10
}
}
},
"Activity": {
"Steps": {
"Step": {
"TopLeftX": 20,
"TopLeftY": 178,
"BottomRightX": 100,
"BottomRightY": 210,
"Alignment": "Center",
"Spacing": 0,
"ImageIndex": 11,
"ImagesCount": 10
}
},
"Distance": {
"Number": {
"TopLeftX": 20,
"TopLeftY": 212,
"BottomRightX": 100,
"BottomRightY": 222,
"Alignment": "Center",
"Spacing": 0,
"ImageIndex": 80,
"ImagesCount": 10
},
"SuffixImageIndex": 79,
"DecimalPointImageIndex": 78
}
},
"Date": {
"MonthAndDay": {
"Separate": {
"Month": {
"TopLeftX": 66,
"TopLeftY": 105,
"BottomRightX": 84,
"BottomRightY": 100,
"Alignment": "TopRight",
"Spacing": 0,
"ImageIndex": 21,
"ImagesCount": 10
},
"Day": {
"TopLeftX": 24,
"TopLeftY": 105,
"BottomRightX": 116,
"BottomRightY": 100,
"Alignment": "TopLeft",
"Spacing": 0,
"ImageIndex": 21,
"ImagesCount": 10
}
},
"TwoDigitsMonth": true,
"TwoDigitsDay": true
},
"WeekDay": {
"X": 0,
"Y": 67,
"ImageIndex": 31,
"ImagesCount": 21
},
"DayAmPm": {
"TopLeftX": 120,
"TopLeftY": 240,
"ImageIndexAMCN": 52,
"ImageIndexPMCN": 53,
"ImageIndexAMEN": 54,
"ImageIndexPMEN": 55
}
},
"Status": {
"DoNotDisturb": {
"Coordinates": {
"X": 4,
"Y": 5,
"X2": 17,
"Y2": 2,
"X3": 1
},
"ImageIndexOn": 56
},
"Lock": {
"Coordinates": {
"X": 21,
"Y": 5,
"X2": 17,
"Y2": 2,
"X3": 1
},
"ImageIndexOn": 57
},
"Bluetooth": {
"Coordinates": {
"X": 38,
"Y": 5,
"X2": 12,
"Y2": 2,
"X3": 1
},
"ImageIndexOff": 58
},
"Battery": {
"Text": {
"TopLeftX": 0,
"TopLeftY": 0,
"BottomRightX": 0,
"BottomRightY": 0,
"Alignment": 0,
"Spacing": 0,
"ImageIndex": 0,
"ImagesCount": 0
},
"Text2": {
"TopLeftX": 84,
"TopLeftY": 3,
"BottomRightX": 84,
"BottomRightY": 16,
"Alignment": "TopRight",
"Spacing": 0,
"ImageIndex": 59,
"ImagesCount": 10
},
"Icon": {
"X": 98,
"Y": 5,
"ImageIndex": 69,
"ImagesCount": 9
}
}
}
}
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

BeatlJoe wrote: 31 Jul 2019, 11:59
Please. where am I making mistake? I don't see the day in the date
Please check image sequence, there should not be empty spaces in numbering 0000-0099.
Second all images should be in order

"Step": {
"ImageIndex": 11,
"ImagesCount": 10

->>

"Distance": {
"Number": {
"ImageIndex": 80, ?????
"ImagesCount": 10

it should be 21 instead of 80.

then your using

"DayAmPm": {
"ImageIndexAMCN": 52, <----

it cannot be 80 and then 52
BeatlJoe
WF maker
Posts: 2
Joined: 27 Jul 2019, 11:26
Location: unknown
Has thanked: 1 time
Contact:

Post by BeatlJoe »

lvpokka wrote: 31 Jul 2019, 14:31
BeatlJoe wrote: 31 Jul 2019, 11:59
Please. where am I making mistake? I don't see the day in the date
Please check image sequence, there should not be empty spaces in numbering 0000-0099.
Second all images should be in order

"Step": {
"ImageIndex": 11,
"ImagesCount": 10

->>

"Distance": {
"Number": {
"ImageIndex": 80, ?????
"ImagesCount": 10

it should be 21 instead of 80.

then your using

"DayAmPm": {
"ImageIndexAMCN": 52, <----

it cannot be 80 and then 52
Thank you very much. I don't know what I was thinking.
Morridin6

Post by Morridin6 »

BeatlJoe wrote: 31 Jul 2019, 11:59
"Date": {
"MonthAndDay": {
"Separate": {
"Month": {
"TopLeftX": 66,
"TopLeftY": 105,
"BottomRightX": 84,
"BottomRightY": 100,
"Alignment": "TopRight",
"Spacing": 0,
"ImageIndex": 21,
"ImagesCount": 10
},
"Day": {
"TopLeftX": 24,
"TopLeftY": 105,
"BottomRightX": 116,
"BottomRightY": 100,
"Alignment": "TopLeft",
"Spacing": 0,
"ImageIndex": 21,
"ImagesCount": 10
}
An issue I encountered with seperate day and month display is that I was not allowed to use the same imageindex for both day and month (you used 21). If I did it that way, the tool somehow started to hussle up all the numbers and even started to include the weekdays as a number in the month...(weekdays indices came in order after the other numbers for month). No idea why this happened.

Only after I created a new set of images for the month (just copied the other set of 10 numbers and renamed them) and used the new imageindex in the month, the day and month were correctly displayed.
So if someone encounters the same problem, you can save a lot of time by reading this post :)
User avatar
Urimu
WF maker
Posts: 8
Joined: 02 Aug 2019, 23:18
Has thanked: 1 time
Contact:

Post by Urimu »

Thank you for this awesome tool!
But I have a Bug to report, the 1.3.7 version can't find the "X2" in the json but the 1.3.6 works fine
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

Urimu wrote: 02 Aug 2019, 23:21
Thank you for this awesome tool!
But I have a Bug to report, the 1.3.7 version can't find the "X2" in the json but the 1.3.6 works fine
Its not a bug, read topic, or read Readme, or Pack with 1.3.6 and then UNPACK with 1.3.7 to avoid problems with JSON.
You cant use different packers... use only one.
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

Morridin6 wrote: 31 Jul 2019, 19:12

An issue I encountered with seperate day and month display is that I was not allowed to use the same imageindex for both day and month (you used 21). If I did it that way, the tool somehow started to hussle up all the numbers and even started to include the weekdays as a number in the month...(weekdays indices came in order after the other numbers for month). No idea why this happened.
Actually its allowing to reuse all images multiple times... Problem is in sequence, from top json to bottom it should be from 0 -> 100
and then you can reuse images which was used previously.

https://yadi.sk/d/w70sJPTEqQjaCA example (used 1.3.7)

btw/ https://yadi.sk/d/KjLhGl8NC9EgLA 1.3.7 released
Kuroneko

Post by Kuroneko »

Hi guys, after reading and reading all the posts I decided to post a doubt.
I'm trying to put an animated image at my Mi Band 4 and it is this source image
I have already converted the gif file to frames with the .png extension. It gave me a total of 52 images. I tried to edit the .json file putting it to the image count at 52. It compiles as well but at the gif preview it doesn't show the entire gif.
Other doubt is that I want the image in the entire screen but when I do it, the clock is behind the image. There is a way do put all the information in front of the image?

Kind regards.
Attachments
tenor.gif
tenor.gif (456.86 KiB) Viewed 55804 times
MILLANAZGUL

Post by MILLANAZGUL »

i have the same problems in the log
Error|[ERROR] error while rendering : Índice fuera de los límites de la matriz.
please help
mapiasa

Post by mapiasa »

hi guys,i'm trying to create a visual tool to edit watchfaces kinda reverse engineering the json file,the problem is when i pack the json the resulting bin file is too big,even if i unpack and pack a bin without modifying it,how is it possible?
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

mapiasa wrote: 04 Aug 2019, 12:47
hi guys,i'm trying to create a visual tool to edit watchfaces kinda reverse engineering the json file,the problem is when i pack the json the resulting bin file is too big,even if i unpack and pack a bin without modifying it,how is it possible?
Use Palette mode
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

Kuroneko wrote: 03 Aug 2019, 20:10
I tried to edit the .json file putting it to the image count at 52. It compiles as well but at the gif preview it doesn't show the entire gif.
Tooo big image count for gif i suppose
MILLANAZGUL wrote: 04 Aug 2019, 07:49
i have the same problems in the log
Error|[ERROR] error while rendering : Índice fuera de los límites de la matriz.
please help
Check image sequence or provide your files for check
User avatar
yinas
WF maker
Posts: 13
Joined: 19 Oct 2018, 13:40
Location: Austria
Has thanked: 6 times
Contact:

Post by yinas »

Does 'weather' work actually now as per 1.3.7?
At least the "what's new" section says so.

Please if you could assist me in bringing my WatchFace to full functionality, by checking the code at the end.
Some more info:
- I created this watchface off of another in the beginning, but edited the whole JSON completely to my liking.
- It was first unpacked and the final version packaged with WFTool_1.3.6
- Now I unpacked the bin again with 1.3.6, then packaged anew with 1.3.7
- Before and now, everything works according to the generated preview, including weather.
- When I synchronize it to the actual band though, the weather does not show; neither icon nor temperature value.
- The band is connected to MiFit, weather via the menu works just fine, current and forecast.

Please also find my published watchface in the list if needed (release with WFTool version 1.3.6): https://amazfitwatchfaces.com/mi-band-4/view/1833

Code: Select all

 "Weather": {
    "Icon": {
      "Coordinates": {
        "X": 15,
        "Y": 170,
        "BoxWidth": 0,
        "Alignment": 0,
        "Order": 0
      }
    },
    "Temperature": {
      "Current": {
        "Number": {
          "TopLeftX": 35,
          "TopLeftY": 170,
          "BottomRightX": 120,
          "BottomRightY": 200,
          "Alignment": "Center",
          "Spacing": 2,
          "ImageIndex": 11,
          "ImagesCount": 10
        },
        "MinusImageIndex": 42,
        "DegreesImageIndex": 43
      }
    }
  }
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

Weather is not supported by Miband4 itself, at all, for watchface...
You wanna tell that you have working weather watchface?
User avatar
Urimu
WF maker
Posts: 8
Joined: 02 Aug 2019, 23:18
Has thanked: 1 time
Contact:

Post by Urimu »

lvpokka wrote: 04 Aug 2019, 14:10
Kuroneko wrote: 03 Aug 2019, 20:10
I tried to edit the .json file putting it to the image count at 52. It compiles as well but at the gif preview it doesn't show the entire gif.
Tooo big image count for gif i suppose
MILLANAZGUL wrote: 04 Aug 2019, 07:49
i have the same problems in the log
Error|[ERROR] error while rendering : Índice fuera de los límites de la matriz.
please help
Check image sequence or provide your files for check
I acutally have the same problem, I have 20 images in my animation and it compiles and spits out an error while rendering. The coordintes arw x0 and y82 the images are 120x158px (120 is width). The error says that the index is outside the bounds of the array, I tried everything making it smaller, shifting it up and down left to right, always the same. The starting index for the images is 59 the image count is 20. I use version 1.3.7 and it also happens on the 1.3.6
lvpokka
Posts: 178
Joined: 07 Jul 2019, 20:22
Location: L1
Has thanked: 19 times
Been thanked: 152 times
Contact:

Post by lvpokka »

You should follow the order in json.. each next image index set should be HIGHER then index used above(or you can reuse already used indexes from above)... i will add this feature in 1.3.8.

Its simple to follow only two rules
mellps

Post by mellps »

Hi [mention]lvpokka[/mention]!

I'm trying to make a custom watchface, but the hours just wont appear, could you help me please? Everything else seems to be working fine...

Thanks!


dva_packed_static.png
dva_packed_static.png (7.84 KiB) Viewed 55811 times
dva_packed.bin
(162.55 KiB) Downloaded 211 times
Post Reply

Return to “Watchfaces tools”

Who is online

Users browsing this forum: No registered users and 1 guest