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?
- Smart Band 7 thread on BandBBS – Chinese community, use Google Translate;
- Smart Band 7 apps and watch faces threads in 4PDA – Russian community, the only thing that will stop you to access that forum is Russian-language captcha =);
- ZeppOS documentation
Sal
ReplyMelianMiko verified
Replyjon
Replysal
ReplyAnd
ReplyMelianMiko verified
Reply