|
In the Xmmi platform, there are two ways to enter the mold, respectively:
1 input "*#* #1705 #", and then press "Dialing Key", you can enter the research and development of mobile phone test mode, for the research and development personnel to test the mobile phone.
For example, the 1th item (Customer software version) is the software version, and the last is the mutation date and time; item 12th (Emmi Debug)
The following "Enable USB menu" and "Disable USB menu" can switch between USB mode and serial (COM) mode.
2 Input "*#*0*", and then press "Dialing Key", you can enter the factory product test mode, for the production line on the phone for the relevant testing.
However, these two passwords are not fixed and can be customized as needed. The main content of this article is to tell you how to change these two ports
Make.
Modify "*#* #1705 #" In the mmi_common_util.c file, Mmi_common_parsegsmseq () has this interface, the main function of which is the input
Each password is parsed, and then the corresponding return value is returned according to the different password, and then the corresponding program is started.
First, understand how the "*#* #1705 #" is set. In Mmi_common_parsegsmseq () there is such a piece of code, its function is
is how to determine if the user entered is "*#* #1705 #". Here, the code first determines whether the first and second of the input strings
For *#, whether the last letter is "#", and then further determine whether the third to fourth string is "*#" and string length, and then judge whether
To "1705", if all of the input strings are met, the return value common_seq_specific will be sent out and then called
The Mmi_common_parsegsmseq () will start the program into the mold according to the return value obtained. The following figure is the code that sets the "*#* #1705 #".
/* *#.......# */
If
(*sequence = = Common_star) &&
(* (sequence+1) = = Common_hash) &&
(* (sequence+length-1) = = Common_hash)
)
{
/* Interogate SEQUENCE * *
PTR = (U8 *) sequence+2;
if (length = = 7 && send)
{
if (* (ptr) = = ' 8 ' &&
* (PTR + 1) = = ' 0 ' &&
* (PTR + 2) = = ' 8 ' &&
* (PTR + 3) = = ' 0 ')
{
return Common_seq_install_java;
}
}
/* *#* #XXXX #s * *
If
(length = 9) &&
(*ptr = = Common_star) &&
(* (ptr+1) = = Common_hash) &&
Send
)
{
* * *#* #1705 # * * *
If
(* (ptr+2) = = ' 1 ') &&
(* (ptr+3) = = ' 7 ') &&
(* (ptr+4) = = ' 0 ') &&
(* (ptr+5) = = ' 5 ')
)
{
/*
** --------------
* * Specific MENU
** --------------
*/
return common_seq_specific;
}
Second, if you want to replace the "*#* #1705 #" Password, you can modify the code above. For example, if you only want to modify "1705",
It's easiest to replace these numbers in the code, but if you want to change the entire password for "*#* #1705 #", just imitate
Code design ideas, the first in the string, a certain end of letters and the length of the string, and so on to judge, if fully comply with the return
Modify "*#*0*" First, "*#*0*" has the corresponding Code, is also in Mmi_common_parsegsmseq () inside. Because of "*#*0*" and
The end letter of the two string of "*#* #1705 #" is different, so the "*#*0*" code has to determine if the end letter is not
"#" and then judge whether the first letter, the length of the string, etc. are fully compliant, and return common_seq_wavecom_specific if they are met.
As shown in the following illustration:
else if ((* (sequence+length-1)!= Common_hash) && (*sequence = = Common_star) && (! Isidcall))
{
/* "*#*0*" used for EM production test*/
if (length = 5 &&
(* (sequence+1) = = Common_hash) &&
(* (sequence+2) = = Common_star) &&
(* (sequence+3) = = ' 0 ') &&
(* (sequence+4) = = Common_star)
)
{
return common_seq_wavecom_specific;
}
Second, if you need to change the password, but also to the above Code to modify it. For example, if you want to use a new string at the end of the same
The type is not "#" letter, and the length of the string is still 5, so long as in the above code to replace the original letter for the new letter, which is the most
If the new string is "#" at the end, or if the length of the string changes, then just imitate the code in the diagram and
The first, the end of the letter and the length of the string to judge, if fully comply with the return of Common_seq_wavecom_specific.
|