Xiaomi Mi Band 2 - Firmware | Fitness bracelet



Rep: (1200)
Fitness braceletXiaomi Mi Band 2 - Firmware
PictureXiaomi Mi Band 2
Discussion пїЅ | Purchase пїЅ | Firmware пїЅ | Accessories пїЅ | Marriage пїЅ | Android app пїЅ | IOS application пїЅ | Xiaomi club пїЅ | Sleep Watch Club пїЅ | Wearable Electronics Club пїЅ | Our achievements in Mi Fit пїЅ | Club owners Xiaomi Mi Band 2

Attached Image


FAQ
Q - Question
O - Answer


AT: Is it possible to return the original firmware?
ABOUT: Yes , can. For this there is several ways .

AT: What is the name of the firmware file and fonts?
ABOUT:
  • Mili_pro .fw - firmware
  • Mili_pro.ft - fonts

AT: How to see the version of the bracelet to understand which firmware is suitable?
ABOUT: One way is with the Gadgetbridge app. We read here .

AT: What should be the minimum charge level of the bracelet before installing the firmware?
ABOUT: When charging below 10%, the bracelet itself will not allow to flash.
It is recommended to flash at a rate not lower than 15%.

AT: The bracelet has permanent breaks and the inability to connect it after reflashing.
ABOUT: We read here .

AT: Caller name display on Android 9.0 does not work. How to fix?
ABOUT: No !
Properly make out the post
  • Device manufacturer, model
  • Firmware version
  • Official or custom firmware
  • What software do you use to sync your device
  • Your problem (the more you specify the information, the better)

Modified firmware design template
For different versions of bracelets do a separate post!
In the spoiler "Download"it is necessary to enter which version number of the firmware will be as a result (preferably with an explanation).
This was done specifically to prevent flashing the original from the application itself!


Picture

It should look like this:


Title: ...
Based on firmware: ...
For bracelets version HW: ...
What is done
Here is a description of what has been done.

A photo
Here is a photo.

Download
Here is the firmware and description (archive or rename), in .rar not desirable.

Image archive
Here is the archive itself with pictures.


Picture

In the code:

[B] Name: [/ B] ...
[B] Based on firmware: [/ B] ...
[SPOILER = [B] For bracelets version HW: [/ B] ...]
[SPOILER = [B] [SIZE = 1] What has been done [/ SIZE] [/ B]] Here is a description of what has been done. [/ SPOILER]
[SPOILER = [B] [SIZE = 1] Photo [/ SIZE] [/ B]] Here is the photo. [/ SPOILER]
[SPOILER = [B] [SIZE = 1] Download [/ SIZE] [/ B]] here is the firmware. [/ SPOILER]
[SPOILER = [B] [SIZE = 1] Archive of pictures [/ SIZE] [/ B]] Here is the archive itself with pictures. [/ SPOILER]
[/ SPOILER]
Firmware and fonts
Original firmware
For all revisions

For HW: v.0.1.3.2 (3)

For HW: v0.16.2.2 (3)

Custom firmware(dials, dates, fonts, icons)
How to flash
For smartphones with MIUI, it is recommended to disable the Mi Band smart unlock before starting the firmware!

Before starting to read firmwarerecommendation !

For bracelets HW: v.0.1.3.2(3)(4)

For bracelets HW: v.0.9.3.3(4)

For bracelets HW: v.0.16.2.2(3)

Fonts

Instructions
Instruments
Polls archive
Poll 30.03.2018
Attached Image
Poll 04/28/2018
Attached Image


Topics Curator:AndyER03. For filling caps contact inQMS!


Post has been editedAndyER03 - 25.06.19, 18:32
Reason for editing: SimpleMod v.1



Rep: (1200)
* santax , at your request, made a photo to count the number of pixels on the screen. In the off state did not work, because surface tinting exists. But in the mode of the number of steps he made (he considered that these are the biggest signs that should be in full height). But with a width heavier. -_- But on the Internet, I found info that the resolution is 128 * 32 (you should not trust it, I don’t remember where the info comes from).
Attached Image

Photo with date
Attached Image
Attached Image


Post has been editedDupleXSPb - 13.09.17, 14:11
Reason for editing: Added with date



Rep: (387)
A little reflection on the topic of why in Mi Band 2 will not work to display text in which more than 18 characters, even by correct modification of the firmware (change the length of the command to send text):
Mi Band 2 can receive a maximum of 20 bytes for a single command, based on the fact that the firmware is transmitted in parts of 20 bytes at most and the command for sending text has a maximum length of 20 bytes too (2 bytes for identifying the command and 18 bytes of text). If he supported commands greater than 20 bytes, then he would be stitched in parts larger than 20 bytes (in my opinion, this could be done for other reasons, for example, this length is optimal for the bracelet to quickly read the CRC16 hash to verify the integrity of the transmitted firmware, or in order to more quickly repeat the sending of part of the firmware in case it was not possible to send the part correctly).
In the Mi Fit code, there is sending text to 240 characters, it seems to be for Amazfit or some future bracelet, I don’t know what existing Xiaomi product can now display 240 characters.
The option of transmitting text in several parts is possible, but only if Xiaomi does it, you will not be able to write such a mod without the source code yourself.
Such are the cases.

Post has been editedXtracer - 13.09.17, 20:18



Rep: (422)
A little reflection on the topic of why in Mi Band 2 will not work to display a text with more than 18 characters
Will it be possible to reduce the width of Russian letters (remove these wild voids) so that the displayed text becomes more readable?



Rep: (422)
* santax,
And it will be possible to remake the day of the week into more standard "Mon", "W", ... Ie two letter abbreviations?



Rep: (1081)
* DupleXSPb, there is a little about something else. * SirStefan, I think I meant to do that thing. instead of "Thu", i.e. replace one letter with a dot. Agree, it is much easier than completely changing the date format?



Rep: (907)
* SirStefan, maybe thinking if you find a place in the code.
* xRaitor, I will try to make the date with 2 options: with the 2nd letter of the day of the week and the 3rd, I will only deal with the format.
While helping the Italians with the withdrawal date in their native language.
Attached Image



Rep: (422)
* xRaitor,
Exactly. Do not change the date format, but replace the character with a space. It is quite realizable.



Rep: (387)
Will it be possible to reduce the width of Russian letters (remove these wild voids) so that the displayed text becomes more readable?

It is rather to santax, he went into it, I just learned to decode and encode the icons back.
But I think that in any way, since Russian letters in UTF-8 occupy 2 characters and the bracelet displays spaces between letters, and the letters themselves are of normal width.
You can, of course, make a crutch in the form of replacing Chinese characters with Russian ones, and so that when the text is output, the program encodes Russian letters into Chinese.

Post has been editedXtracer - 15.09.17, 22:32



Rep: (422)
But I think that in any way, since Russian letters in UTF-8 occupy 2 characters and the bracelet displays spaces between letters, and the letters themselves are of normal width.
You can, of course, make a crutch in the form of replacing Chinese characters with Russian ones, and so that when the text is output, the program encodes Russian letters into Chinese.
Well, as far as I understand the second byte is 00, not 20 as a space. Can make for 00 output shortened space, for example 1 character wide?
Or as an option to reduce the width of the space. And where it is needed, it will be displayed twice and wider

Post has been editedSirStefan - 16.09.17, 14:02



Rep: (387)
You can do it in MBM, but you will need to crash into Mifit in smali, can you do it?

I can handle the first, the second is not, maybe someone understands smali, the replacement code itself and a place to tell.
And to replace the Chinese characters in the firmware will need your help, I did not really figure out the characters.
That is, you need to insert all Russians instead of Chinese characters and create a replacement table, and I can already make a replacement for it when displaying text.

Post has been editedXtracer - 17.09.17, 13:27



Rep: (422)
XTracer @ 09/17/17, 21:26*
That is, you need to insert all Russians instead of Chinese characters and create a replacement table, and I can already make a replacement for it when displaying text.

Will not help. Just checked. These are not spaces. In English, there is an adaptation to the width of the character. We display a 32-wide character, no matter how real it is.
Attached Image
Attached Image

Those. in fact, there is a selection somewhere in the firmware when outputting: if the second byte is 00, then we turn on the adaptive width, if not, then fixed. And it must be replaced with an unconditional transition. But that's where to find it?

ZY Can GadgetBridge reflash a file with fonts like Notify & Fitness or is it able to do the firmware itself? I do not want to check myself, suddenly the bracelet will lock up. Maybe someone already checked?

Post has been editedSirStefan - 19.09.17, 06:46



Rep: (387)
SirStefan @ 09/19/17, 09:01*
Will not help. Just checked. These are not spaces. In English, there is an adaptation to the width of the character. We display a 32-wide character, no matter how real it is.

My idea was to change the Chinese letters to Russian in fonts, for example е°” = A, then when displaying text, the program will replace all A with е°” and the bracelet will show the Russian letter A without a space, but with a width of the Chinese letter.



Rep: (422)
XTracer @ 09/19/2017, 20:35*
My idea was to change Chinese letters to Russian in fonts, for example = A

I understood. Just think that Chinese is also a fixed width. I can now replace any hieroglyphs with Russian letters and lay out a language pack, and whoever has a thread with Chinese in the system will check whether there will be spaces. I need only Unicode hieroglyphs and replacement letters.



Rep: (387)
SirStefan @ 09/19/17, 6:00 pm*
Just think that Chinese is also a fixed width.

They are about the width of the upper English, in any case, 18 characters can be displayed instead of 9. Even if the distance between the letters will be slightly larger.
You have to push 66 characters instead of any Chinese,http://www.studychinese.ru/kljuchi/for example, from here take the table and from 1 to 66 characters replace with Russian letters.
How to insert a replacement in Mi Fit, I do not know, I can only do this in MBM.

UPD: Chinese characters can be displayed only 6 at all, the idea was not justified) They occupy 3 bytes means. What else is there besides Chinese characters?
There is another option to replace the upper English with Russian, though 7 letters will not fit in this case.

Post has been editedXtracer - 19.09.17, 15:43



Rep: (422)
XTracer @ 09/19/17, 23:33*
UPD: Chinese characters can be displayed only 6 at all, the idea was not justified) They occupy 3 bytes means. What else is there besides Chinese characters?

Greek, Japanese and a lot of Chinese. It seems to me better to look for how to make the adaptive width of the Russian in the firmware, than to replace other encodings.

XTracer @ 09/19/17, 23:33*
There is another option to replace the upper English with Russian, though 7 letters will not fit in this case.

It is not necessary, then you need to always do the substitution. And in hieroglyphs everything will work on the standard program (with a standard set with spaces) and on the adapted one (with adapted characters)



Rep: (422)
* lolex put the date numbers down in the firmware from * santax,
, but when MiFit is connected, it tries to flash its firmware :( Does it need to be rebuilt in MiFit and reinstalled so that it does not overwrite the old one?

Attached files

Attached fileMili_pro_santax_ss.fw.zip(124.78 KB)



Rep: (907)
XTracer @ 09/19/17, 12:35*
My idea was to change the Chinese letters to Russian in fonts, for example е°” = A, then when displaying text, the program will replace all A with е°” and the bracelet will show the Russian letter A without a space, but with a width of the Chinese letter.

I tried, the space between the letters disappeared, but the number of characters is also 9.
Can anybody show an array of bytes, which are transferred to a bracelet with English letters, and what array with Russian letters?
I can not yet fully understand where the restriction is laid ..



Rep: (5052)
* santax, I didn’t find it in the myth, I thought, either in the fonts themselves, or in the prosh itself, now I don’t remember what I was looking for.
* SirStefan, I'll redo it now, but the firmware will be 55))) so that everyone will update. As far as I remember in the myth, there are more bends for different markets and there is the last 63, most likely if it comes out, there will be more than 63

Post has been editedlolex - 19.09.17, 18:47



Rep: (5052)
* SirStefan, the numbers have dropped, and the point can still be the same or so leave))), otherwise I’m afraid the numbers will not be enough for all the fixes of the numbers or is this point every day of the week?
+
Attached Image


Post has been editedlolex - 19.09.17, 20:11



Rep: (227)
SirStefan @ 09/19/2017, 17:46*
* lolex put the date numbers down in the firmware from * santax,
, but when MiFit is connected, it tries to flash its firmware :( Does it need to be rebuilt in MiFit and reinstalled so that it does not overwrite the old one?

Fine!
Attached Image

Can you make a two-day day of the week?
Mon Tue Wed Thu Fri Sat Sun

Posted on 09/19/2017, 19:44:

* SirStefan, the numbers have dropped, and the point can still be the same or so leave))), otherwise I'm afraid the numbers will not be enough for all the corrections, or is this point with every day of the week?

The point looks like a separator of the day of the week and the month, and so you can leave.

Post has been editedSPRITE_ASUS - 19.09.17, 19:45


Full version    

Help     rules

Now: 28.06.19, 07:43