Basics of Mi Band 7 development

If you have Xiaomi Smart Band 7, you can find unofficial apps and watch faces for your device. But, what is required to create your own one? This post describes what do you need to know to create app or watch face from scratch.

Any ZeppOS app / watch face .bin-file is a ZIP archive, which contains graphics and code. You can rename it and unpack, but images inside assets directory have their own TGA-based format, and to open them you should convert them back to PNG with some tool that can do it.

In pages/watchfaces folder you can find a JavaScript file(s), which is a main program code. So, first that you must know to begin development – basics of JavaScript. All apps and watch faces are written in that programming language, and no one other. All interactions with screen and hardware will be done with ZeppOS 1.0 Watchface/Mini app API. Note that it’s documentation have a lot of mistakes and typos, so best way to learn development basics is reversing other’s apps or watch faces.

But, our device isn’t supported in ZeppOS development toolchain, their simulator and builder aren’t usable for us. So we have some homebrew alternatives:

  • ZeppPlayer – a emulator that can run apps or watch faces on PC;
  • ZMake – builder, which can convert graphics into ZeppOS format. As alternative you can use tools from Chinese community.

In some apps or watch faces you can find .bin files instead of .js code. That scripts are compiled into bytecode, so you can’t read it. For now, there’s no way to reverse them.

Where to find more information?

thumb_up 14 thumb_down 3 chat Comments (6) favorite Donate