Page 2 of 3

Create Bip S watchface or convert from Bip

Posted: 05 Jun 2020, 11:17
by Upo
Few informations for converting Bip watchfaces to Bip S
Infos and Bip S tool taken from here:

Code: Select all

4pda.ru/forum/index.php?showtopic=988136
Bip S Tools Alpha 230420 mirrored to my yadisk:

Code: Select all

yadi.sk/d/I1tDQ3PbDIupWA
Converting from Bip or creating new is nearly the same. No Bip S watchface editor as I know, but Bip editor exists. So create it as a new Bip watchface and "convert" it.
Editor here: https://amazfitwatchfaces.com/editor/wa ... ditor/?bip

Always compress/decompress Bip watchfaces with original Bip Tool and Bip S watchfaces with Bip S tool.
Bip S tool does not handle Bip watchfaces, throws error or produce erratic json data.
So for convert, unpack bip watchface with Bip tool, edit json, add preview, and finally pack with Bip S tool.

Bip S watchfaces are not fully decrypted yet, there are many unknown options that we don't know. Eg. there is shortcut support in factory watchfaces and editable watchfaces, but it is unknown how to make them in a new watchface.
Currently known things are nearly the same as original Bip, just some syntax differences, and there is a preview option for background section that will show up in Settings - Watch face menu.
This is a preview of the watchface. I use the static PNG that watchface tool creates, but have to resize to 110x110 pixel to fit to the menu frame.
For the convert, the simplest thing is to put this picture to the last index, so no need to rearrange existing picture numbers. Eg. if last picture is 0074.png then it will be 0075.png and change in json is the following:

Old (Bip) json:

Code: Select all

"Background": {
    "Image": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 0
    }
},
New (Bip S) json:

Code: Select all

"Background": {
    "Image": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 0
    },
    "Preview": {
      "X": 0,
      "Y": 0,
      "ImageIndex": 75
    }
},
wfmenu.jpg
wfmenu.jpg (22.1 KiB) Viewed 50613 times
Above picture shows Preview in watch menu. It has to be 110x110 resolution to fit to the frame in settings menu. Usually I use Bip unpack tool's static preview png and resize it to 110x110 because Bip S unpack tool is early alpha, and does not put pulse and steps numbers to preview pictures png & gif (but will show on real watchface).

Next we have to adjust syntax for Battery, Steps, Pulse, Calories numerical values (no need for images). We have to insert a number section after text section.
Example of battery:

Old:

Code: Select all

"Battery": {
    "Text": {
      "TopLeftX": 96,
      "TopLeftY": 6,
      "BottomRightX": 121,
      "BottomRightY": 19,
      "Alignment": "TopRight",
      "Spacing": 1,
      "ImageIndex": 21,
      "ImagesCount": 10
    }
},
New:

Code: Select all

"Battery": {
    "Text": {
	"Number": {
           "TopLeftX": 96,
           "TopLeftY": 6,
           "BottomRightX": 121,
           "BottomRightY": 19,
           "Alignment": "TopRight",
           "Spacing": 1,
           "ImageIndex": 21,
           "ImagesCount": 10
	}
    }
},
Activity:

Old:

Code: Select all

"Activity": {
   "Steps": {
      "TopLeftX": 28,
      "TopLeftY": 114,
      "BottomRightX": 94,
      "BottomRightY": 132,
      "Alignment": "TopRight",
      "Spacing": 3,
      "ImageIndex": 11,
      "ImagesCount": 10
   },
   "Calories": {
      "TopLeftX": 28,
      "TopLeftY": 157,
      "BottomRightX": 62,
      "BottomRightY": 170,
      "Alignment": "TopRight",
      "Spacing": 1,
      "ImageIndex": 21,
      "ImagesCount": 10
   },
   "Pulse": {
      "TopLeftX": 134,
      "TopLeftY": 113,
      "BottomRightX": 168,
      "BottomRightY": 131,
      "Alignment": "TopCenter",
      "Spacing": 1,
      "ImageIndex": 11,
      "ImagesCount": 10
   },
   "Distance": {
      "Number": {
        "TopLeftX": 27,
        "TopLeftY": 138,
        "BottomRightX": 94,
        "BottomRightY": 151,
        "Alignment": "TopLeft",
        "Spacing": 2,
        "ImageIndex": 22,
        "ImagesCount": 10
      },
      "SuffixImageIndex": 32,
      "DecimalPointImageIndex": 33
   }
}
New:

Code: Select all

"Activity": {
    "Steps": {
       "Number": {
          "TopLeftX": 28,
          "TopLeftY": 114,
          "BottomRightX": 94,
          "BottomRightY": 132,
          "Alignment": "TopRight",
          "Spacing": 3,
          "ImageIndex": 11,
          "ImagesCount": 10
       }
    },
    "Calories": {
       "Number": {
          "TopLeftX": 28,
          "TopLeftY": 157,
          "BottomRightX": 62,
          "BottomRightY": 170,
          "Alignment": "TopRight",
          "Spacing": 1,
          "ImageIndex": 21,
          "ImagesCount": 10
       }
    },
    "Pulse": {
       "Number": {
          "TopLeftX": 134,
          "TopLeftY": 113,
          "BottomRightX": 168,
          "BottomRightY": 131,
          "Alignment": "TopCenter",
          "Spacing": 1,
          "ImageIndex": 11,
          "ImagesCount": 10
	}
    },
    "Distance": {
       "Number": {
            "TopLeftX": 27,
            "TopLeftY": 138,
            "BottomRightX": 94,
            "BottomRightY": 151,
            "Alignment": "TopLeft",
            "Spacing": 2,
            "ImageIndex": 22,
            "ImagesCount": 10
        },
        "SuffixImageIndex": 32,
        "DecimalPointImageIndex": 33
    }
}
Distance is the same, there is a "Number" section on original Bip so no need to alter it.

I hope this will be a good starting point to make/edit.
Thanks to the russian guys at 4pda and lmaxwell @ 4pda for Bip S tool.

If you have further infos about Bip S watchfaces, feel free to add to this topic.

Re: Create Bip S watchface or convert from Bip

Posted: 05 Aug 2020, 09:11
by Willy_hu
I think the easiest way is to use "Notify&Fitness for Amazfit" app

Re: Create Bip S watchface or convert from Bip

Posted: 10 Oct 2020, 14:22
by rspada
Hi. I had built a whatchface for Bip S with icons for battery. It has been working fine until a few days ago. Now the battery icon is stuck to max power which is not true. I believe this happened after an update of the watch, but I don't know how to fix it. Recompiling the json does not work. Any idea? Thanks

Re: Create Bip S watchface or convert from Bip

Posted: 26 Oct 2020, 20:26
by Upo
Willy_hu wrote: 30 Jul 2020, 05:30
Hi,
I've edited an original Bip S watchface for my doughter. Surprisingly everything new I did works fine, exept the original clock isn't shown.

Anyway, what's that unknown part in the code? ,There is a lot...
I don't know. What did you change? Number images? Maybe number picture dimensions don't fit to coordinates. Without full watchface data I can not solve this problem.

Just a tip, I would try that without those "unknown" options, like this:

Code: Select all

"Time": {
"Hours": {
"Tens": {
"X": 15,
"Y": 12,
"ImageIndex": 2,
"ImagesCount": 10,
},
"Ones": {
"X": 49,
"Y": 12,
"ImageIndex": 2,
"ImagesCount": 10,
}
},
"Minutes": {
"Tens": {
"X": 100,
"Y": 12,
"ImageIndex": 2,
"ImagesCount": 10,
},
"Ones": {
"X": 134,
"Y": 12,
"ImageIndex": 2,
"ImagesCount": 10,
}
And delete all other "unknown"-s. These are unresolved parameters, maybe someone can reverse engineer those functions, maybe not.

Re: Create Bip S watchface or convert from Bip

Posted: 31 Oct 2020, 09:46
by Alexr71
rspada wrote: 10 Oct 2020, 14:22
Hi. I had built a whatchface for Bip S with icons for battery. It has been working fine until a few days ago. Now the battery icon is stuck to max power which is not true. I believe this happened after an update of the watch, but I don't know how to fix it. Recompiling the json does not work. Any idea? Thanks
Same problem here, after the last firmware update. Don't know how to solve it.
My code is simple:

Code: Select all

    "Battery": {
        "Icon": {
            "X": 58,
            "Y": 147,
            "ImageIndex": 73,
            "ImagesCount": 9
        }
    }
I've decompiled some other watchfaces that works, and it seems they have used some other options that the decompiler is unable to get:

Code: Select all

  "Battery": {
    "Icon": {
      "X": 136,
      "Y": 145,
      "ImageIndex": 63,
      "ImagesCount": 11,
      "Unknown5": 0,
      "Unknown6": 0
    }
  }
Any help would be highly appreciated.

Re: Create Bip S watchface or convert from Bip

Posted: 31 Oct 2020, 12:02
by Alexr71
Oh well, I got it
Now we need (maybe at least) 10 images for battery!
I've update the number of the images and now seems to work fine!

Re: Create Bip S watchface or convert from Bip

Posted: 13 Nov 2020, 11:19
by crusi86
Hi everybody. I have a question, is there any way to do analog seconds hand for BIP S. I have tried everything and it looks like bip s compiler breaks something in code when you make a bin file with it. I have tried to use code for seconds hand from orginal BIP watchfaces which works on BIP S, but after compiling it with BIP S tools, all analog hands are not visible at all.

Re: Create Bip S watchface or convert from Bip

Posted: 26 Nov 2020, 01:13
by emersondm
Hi guys, You can answer me what the limits for the background image on Amazfit Bip S? Can I use any image that fit in size limits or there are some limitations? thks!

Re: Create Bip S watchface or convert from Bip

Posted: 04 Dec 2020, 22:45
by mik1i
I don't know anymore. Always the same error:

Code: Select all

System.ArgumentException: The image has 9 bit/pixel and can't be packed for using on the watches. Looks like dithering works incorrectly on the image.
   w Resources.Image.Writer.Write(Bitmap image)
   w Resources.Models.Image.WriteTo(Stream stream)
   w Resources.Writer.Write(List`1 resources)
   w WatchFace.Parser.Writer.Write(IList`1 descriptor)
   w WatchFace.Program.WriteWatchFace(String outputDirectory, String outputFileName, String 
   imagesDirectory, WatchFace watchFace)
I've even set it up for a try background and preview as 3 bit pictures and nothing.

Re: Create Bip S watchface or convert from Bip

Posted: 24 Jan 2021, 20:30
by vasiliy_z
Alexr71 wrote: 31 Oct 2020, 12:02
Oh well, I got it
Now we need (maybe at least) 10 images for battery!
I've update the number of the images and now seems to work fine!
I had same issue - battery icon just disappeared after firmware update (I have 11 images for battery - didn't work).
After one more firmware update at about a week ago battery icon become visible but stuck on first image in series and not changing :(

Re: Create Bip S watchface or convert from Bip

Posted: 24 Jan 2021, 21:13
by vasiliy_z
It seems that battery images count should be only 10.
11 didn't work for me, but 10 works fine...

Re: Create Bip S watchface or convert from Bip

Posted: 09 Feb 2021, 22:51
by psycool
hi!.. u think when BIP S editor released? coz a bit hard for me to change all the code.. i tried to upgrade all my older BIP watchface at my profie, but end up it corrupt. if i can download it, a lot data missing on that watch face.. :(

Re: Create Bip S watchface or convert from Bip

Posted: 17 Mar 2021, 08:44
by Mokkaschnitte
I am looking for a way to modify a Bip S watchface. How can I convert it to Bip Watchface? I could not find a solution yet and unpacking via dial2img.py ends with errors :(

Re: Create Bip S watchface or convert from Bip

Posted: 15 May 2021, 10:10
by Andy_Andy_Andy
I converted a BIP Watchface to BIP S. I was looking for a complete code with files in this thread that worked. I got mine to work so I have attached it. The preview file created say it won't work but when I uploaded to the watch then it works fine.

I look at my watch most of the time to tell the time so wanted really big numbers.

Image

Image

Re: Create Bip S watchface or convert from Bip

Posted: 27 Jun 2021, 09:58
by Ninoh-FOX
hi, anybody know how is the code for progres bar in steps?

I am port my casio theme, all work, but the progres bar for steps not work, anyway the progres bar for battery work fine.

Image

I tried change "Linear" for "Scale" (this work with battery), but the compilation said me that this is an error.

I use AmazfitBipS Tools alpha 230420

Re: Create Bip S watchface or convert from Bip

Posted: 03 Aug 2021, 16:49
by Lock
I'm trying to make the progress bar for steps to work as well but no luck.
As far as I know the Bip S does indeed support the StepsProgress function, as is some of the Zepp internal watchfaces it's there and works great.

I tried to extract one of them and unpack with BipTools for Bip S but it gets and error:

Code: Select all

System.ArgumentException: Parameter 3 isn't supported for StepsProgress
   in WatchFace.Parser.Utils.ParametersConverter.Parse[T](List`1 descriptor, String path)
   in WatchFace.Program.ParseResources(Reader reader)
I understand there's something not supported in the "compiler" yet, but it's not possible to extract the data so to understand that "Parameter 3" means? It surely reads some "input data", it would be nice to show it, so maybe we can figure out how it works.

Who is the creator of BipTools?

Re: Create Bip S watchface or convert from Bip

Posted: 04 Aug 2021, 17:35
by Lock
Anyone is able to understand how battery progress bar works? Because with "scale" the images are swapped/displayed but the % is totally wrong.
Is it another thing that the compiler is not able to do correctly?

Re: Create Bip S watchface or convert from Bip

Posted: 14 Aug 2021, 10:13
by DDRitter
Does anyone know how many max images are now for steps?

In the original BIP it was 20, but now it does not seem to show, so I think maybe its less. I'm testing with 6 and tomorrow we will see, but I would like the exact number if anyone has it. ^^

Re: Create Bip S watchface or convert from Bip

Posted: 19 Aug 2021, 16:20
by DDRitter
So.... Bip S apparently does not support images for step progress...

Amazing. Nice "upgrade" from my old BIP...

I'm gonna cry in my corner now.

EDIT: So I just tried some of the original watchfaces with images for step progress on the zepp app and turns out that they work. I think that the wathface tool is not working properly, because I cannot decompress those original bin files to check the json file. It throws an error.

Re: Create Bip S watchface or convert from Bip

Posted: 26 Aug 2021, 13:28
by Ninoh-FOX
I think that the data base program no it is completed, because Zepp has themes where the stepsprogress works fine.

I think that the correct command is "Scale", how in the battery images, but without the source code I can make nothing.

Re: Create Bip S watchface or convert from Bip

Posted: 02 Nov 2021, 07:59
by XiaomiFan
I need your help. I have created a watchface with the bip editor. Then converted the JSON file with "BIP2Sjson". Then converted to bin with the alpha tool. All without error. But I can't upload the watchface. No matter what I try. Is it possibly due to the size? 152 KB

What is the maximum size for a watchface on BIPs ?

Re: Create Bip S watchface or convert from Bip

Posted: 02 Nov 2021, 16:11
by 6ust4ve
Thx a lot Upo for your explainations, and others people for questions I asked me.
My WF now have date, hours and statuts plus steps, pulse and battery number working and it's cool :D but I want a battery and a steps gauge :| ...
Does someone know how make it works :?:

Re: Create Bip S watchface or convert from Bip

Posted: 30 Dec 2021, 07:47
by Fenrisar
Can anyone help, using AmazfitBipS_Tools_alpha_230420 for compile, but receiving error:
Fatal|Newtonsoft.Json.JsonSerializationException: Could not find member 'TopLeftX' on object of type 'BatteryNumber'. Path 'Battery.Text.TopLeftX', line 110, position 23.

Code: Select all

    "Battery": {
        "Icon": {
            "X": 150,
            "Y": 6,
            "ImageIndex": 65,
            "ImagesCount": 6
        },
        "Text": {
            "TopLeftX": 112,
            "TopLeftY": 6,
            "BottomRightX": 137,
            "BottomRightY": 19,
            "Alignment": "TopRight",
            "Spacing": 2,
            "ImageIndex": 200,
            "ImagesCount": 10
        }
Same error with distance, calories, pulse

Re: Create Bip S watchface or convert from Bip

Posted: 03 Apr 2022, 02:07
by oldGuy
Thanks Upo for this. I am an old guy who can't read my watch without glasses. I was able to make the watch face in my avatar that is easier to read. This guide on GitHub was also super helpful:
https://github.com/wdschei/amazfit-bip-s-watchfaces
The ImageMagick tool made it easy to get images using the BIP S palette and to make text images.

I'm a little disappointed that Steps Progress doesn't seem to be possible. Does anyone know how to analyze the BIP provided watch faces that have this feature?

I know how to upload a watch face to the BIP S, but how do you download the current watch face?

I have the AmazfitBipS_Tools_alpha_230420 tool, but does anyone know where it came from? Is the source code available anywhere?

Re: Create Bip S watchface or convert from Bip

Posted: 09 Jun 2022, 08:35
by Wampiris
Hello,
https://4pda.to/forum/index.php?showtop ... 36&st=2700
A last version tool is here, but i can't download this version (05/06/22)


Steps Progress it's possible with code "LinearScale" and same for battery.

Code: Select all

"StepsProgress": { 
    "LinearScale": { 
      "StartImageIndex": 38, 
      "Segments": [ 
       { 
          "X": 4, 
          "Y": 140 
        }, 
	    { 
          "X": 4, 
          "Y": 140 
        }, 
	    { 
          "X": 4, 
          "O": 140 
        }, 
	    { 
          "X": 4, 
          "O": 140 
        }, 
	    { 
          "X": 4, 
          "O": 140 
        }, 
	    { 
          "X": 4, 
          "O " :140 
        }, 
	    { 
          "X": 4, 
          "O": 140 
        },
	    { 
          "X": 4, 
          "Y": 140 
        }, 
	    { 
          "X": 4, 
          "Y": 140 
        }, 
	    { 
          "X": 4, 
          "Y": 140 
        } 
   ] 
  } 
}

Re: Create Bip S watchface or convert from Bip

Posted: 12 Aug 2023, 06:26
by Warmmittens
Hi, I followed the steps in the post and decompiled a bip watchface, then added a preview img and edited the JSON, but when I try to compile it with the tool I get this error:

Fatal|Newtonsoft.Json.JsonSerializationException: Could not find member 'ImageIndexAMCN' on object of type 'AmPm'. Path 'Time.AmPm.ImageIndexAMCN', line 46, position 23.

looking at the json, It looks like the error is supposed to be here, but I'm not sure what the problem is.

Code: Select all

 "AmPm": {
      "X": 120,
      "Y": 159,
      "ImageIndexAMCN": 11,
      "ImageIndexPMCN": 12,
      "ImageIndexAMEN": 0,
      "ImageIndexPMEN": 0
    }

Anyone have a fix for this?