Tutorial How to modify Firmware file

L_Ac

Member
Joined
Jan 6, 2019
Messages
2
Likes
0
Points
6
#21
Why is it random? I set the font "courier new" and it's UTF-8 encoding.
i am a chinese mifans and I'm sorry that I can't change the software language.
I'm sorry about my poor english.


 
Joined
Jul 19, 2018
Messages
12
Likes
2
Points
8
#22
Instead "Connect to app to update", I want write "I like unicorns and teddy bears".
Like you can see, my new translation is more long than the original. Isn't a problem, I can write over the other languages translations :). Write only over the translations !
modified-png.3141
I understand you said that we can overwrite in usual the original english translations to a bit longer so it will take space from the next language translations, but i have a concern about the day names, because they are after each other (Mon, Tue, Wed, Thu, Fri, Sat, Sun).

What if the newly translated day names extends beyond their own space? I mean in Hungarian, the Monday is "Hétfő", which has 2 accented letter. Its shortened version could be "Hét" or "Hé"(or even be "H"). But because of the accented letter "é", it will take at least 2 character and with the initial H it's already 3 character, then comes the closing "0x00" character. So i can't use the "Hét" form, or it's not a problem, just after its end, it should be there the closing "0x00"?

So my question is, could it be extended to take space(characters) from the next day name (Tue), or in this case, it shouldn't be longer than it's original length?

Thanks in advance for the answer/help.
 

MagicalUnicorn

Moderator
Staff member
Moderator
Developer
Joined
Jul 4, 2018
Messages
4,657
Likes
4,087
Points
248
#23
I understand you said that we can overwrite in usual the original english translations to a bit longer so it will take space from the next language translations, but i have a concern about the day names, because they are after each other (Mon, Tue, Wed, Thu, Fri, Sat, Sun).

What if the newly translated day names extends beyond their own space? I mean in Hungarian, the Monday is "Hétfő", which has 2 accented letter. Its shortened version could be "Hét" or "Hé"(or even be "H"). But because of the accented letter "é", it will take at least 2 character and with the initial H it's already 3 character, then comes the closing "0x00" character. So i can't use the "Hét" form, or it's not a problem, just after its end, it should be there the closing "0x00"?

So my question is, could it be extended to take space(characters) from the next day name (Tue), or in this case, it shouldn't be longer than it's original length?

Thanks in advance for the answer/help.
You can't extend over a other English translation.
Also in Firmware weekdays are only for weather, for homescreen it's in Resources file ^^.
 

MagicalUnicorn

Moderator
Staff member
Moderator
Developer
Joined
Jul 4, 2018
Messages
4,657
Likes
4,087
Points
248
#24
Why is it random? I set the font "courier new" and it's UTF-8 encoding.
i am a chinese mifans and I'm sorry that I can't change the software language.
I'm sorry about my poor english.


View attachment 3208
You have all characters displayed, all is good.
In your screenshot is functions, not translations.
 

ViBE

Well-known member
Joined
Jul 6, 2018
Messages
410
Likes
155
Points
53
#25
You can't extend over an a other English translation.
Also in Firmware weekdays are only for weather, for homescreen it's in Resources file ^^.
i'm also working on this part on the same language and overall the translated text have similar length as the original english. of course it should be extended with some additional zeroes.

this should work, right?
 
Joined
Jul 19, 2018
Messages
12
Likes
2
Points
8
#26
You can't extend over a other English translation.
Also in Firmware weekdays are only for weather, for homescreen it's in Resources file ^^.
Oh i see, thanks for the info.

If i want to have the watchface to be on the same language as in the firmware, i also have to modify(decompile and recompile) the appropriate resource file, and edit the english day names as pictures, right?

Last question then(i hope so, sorry for asking too much questions): So for a full language change, i also need a modified resource file(.res), not just the firmware file (.fw)?

Really thanks for your time and help.
 
Joined
Jul 19, 2018
Messages
12
Likes
2
Points
8
#27
i'm also working on this part on the same language and overall the translated text have similar length as the original english. of course it should be extended with some additional zeroes.

this should work, right?
View attachment 3210
Be aware about that Csü will take 4 characters and so, it will overlap to the original Fri string(Pé). Your 0x00 character will be shifted with one character to the right. So as far as i understand @MagicalUnicorn's explanation, because they're all english translations, they should be on the same space, shouldn't be moved away. (probably a pointer or array's address refers to that place and won't find it, or something like that)

Also Ke is shorter than Tue, so you should use two 0x00 characters at the end(just in case, shorter maybe not a problem, but better to be sure).
 

ViBE

Well-known member
Joined
Jul 6, 2018
Messages
410
Likes
155
Points
53
#28
Be aware about that Csü will take 4 characters and so, it will overlap to the original Fri string(Pé). Your 0x00 character will be shifted with one character to the right. So as far as i understand @MagicalUnicorn's explanation, because they're all english translations, they should be on the same space, shouldn't be moved away. (probably a pointer or array's address refers to that place and won't find it, or something like that)

Also Ke is shorter than Tue, so you should use two 0x00 characters at the end(just in case, shorter maybe not a problem, but better to be sure).
this overlapping thing is still confusing since you can overlap another languages but that's not clear what things are allowed in this case. hex editing is a mystery in some ways. but yes that edit is wrong. by following the rules the code should be looks like this:
 

MagicalUnicorn

Moderator
Staff member
Moderator
Developer
Joined
Jul 4, 2018
Messages
4,657
Likes
4,087
Points
248
#29
Oh i see, thanks for the info.

If i want to have the watchface to be on the same language as in the firmware, i also have to modify(decompile and recompile) the appropriate resource file, and edit the english day names as pictures, right?

Last question then(i hope so, sorry for asking too much questions): So for a full language change, i also need a modified resource file(.res), not just the firmware file (.fw)?

Really thanks for your time and help.
Yes you need modify the Resources file, else weekdays on the homescreen will be in English.

(just in case, shorter maybe not a problem, but better to be sure).
Yes ^^.
 

MagicalUnicorn

Moderator
Staff member
Moderator
Developer
Joined
Jul 4, 2018
Messages
4,657
Likes
4,087
Points
248
#30
this overlapping thing is still confusing since you can overlap another languages but that's not clear what things are allowed in this case. hex editing is a mystery in some ways. but yes that edit is wrong. by following the rules the code should be looks like this:
View attachment 3211
Flash with this modifications and you will have a surprise :).
 

MagicalUnicorn

Moderator
Staff member
Moderator
Developer
Joined
Jul 4, 2018
Messages
4,657
Likes
4,087
Points
248
#32

MagicalUnicorn

Moderator
Staff member
Moderator
Developer
Joined
Jul 4, 2018
Messages
4,657
Likes
4,087
Points
248
#35
i see but it's not clear what are the difference between this and my example in the other thread:confused:
Cz¨u0P◌́e0Svo0Va0
Thu0Fri0Sat0Sun0

In Black & Bold : Where you put 0x00 bytes.
In
Red & Bold : Original place of the 0x00 bytes.
 
Joined
Jul 19, 2018
Messages
12
Likes
2
Points
8
#36
@MagicalUnicorn Thank you, i really appreciate it, helped me a lot to find all of the strings.

Though i could find some minor mistakes in it (mostly spelling/typo). Also found a missing string.

Between Battery and Distance, Burned is missing.
Time is to short to be recorded -> Time is too short to be recorded
Distance is to short to be recorded -> Distance is too short to be recorded
Pace is to low -> Pace is too low
Before notification and notifications, there is also an extra space. -> _notification, _notifications
Found device, ring now -> Found device, ringing now
Press & holdto hang up -> Press & hold to hang up

Couldn't -> Couldn't update (it's not your mistake, it's literally just Couldn't, but i translated the original german string nearest to it, and its meaning is Update failed, which is quite the same as Couldn't update)
They messed it up after a firmware update probably. I have completed mine the same way as it would be a bit longer traslation.

PS: @MagicalUnicorn as i said, it helped me a lot, so don't take this as a criticism, just trying to help. Maybe someone will need it, who can't speak english well. Thanks again
 
Last edited:

MagicalUnicorn

Moderator
Staff member
Moderator
Developer
Joined
Jul 4, 2018
Messages
4,657
Likes
4,087
Points
248
#37
Thanks a lot, it helped me a lot to find all of the strings.
Though i could find some minor mistakes in it. (mostly spelling/typo)
Also found a missing string.

Between Battery and Distance, Burned is missing.
Time is to short to be recorded -> Time is too short to be recorded
Distance is to short to be recorded -> Distance is too short to be recorded
Pace is to low -> Pace is too low
Before notification and notifications, there is also an extra space. -> _notification, _notifications
Found device, ring now -> Found device, ringing now
Press & holdto hang up -> Press & hold to hang up

Couldn't -> Couldn't update (it's not your mistake, it's literally just Couldn't, but i translated the original german string nearest to it, and its meaning is Update failed, which is quite the same as Couldn't update)
They messed it up after a firmware update probably. I have completed mine the same way as it would be a bit longer traslation.

PS: as i said, it helped me a lot, so don't take this as a criticism, just trying to help. Maybe someone will need it, who can't speak english well. Thanks again
Thanks, I will correct that maybe tomorrow, else in the week :).
 

Desufnoc

New member
Joined
Nov 28, 2018
Messages
3
Likes
1
Points
3
#39
hi @MagicalUnicorn

55 53 FC 07 01 4B 18 78 70 47 C0 46
55 53 FC 07 00 BF 0C 20 70 47 C0 46


changed 4 byte of every latest firmware to set the default language. right?
 
Last edited:

Trusted Store

Members online

Our Telegram Channel

Which color of official strap would you like to buy for your Mi Band 3?

  • Black

    Votes: 2,154 52.8%
  • Deep Blue

    Votes: 1,197 29.4%
  • Redish Orange

    Votes: 726 17.8%

Forum statistics

Threads
2,408
Messages
40,524
Members
211,820
Latest member
careylui
Top