Summary of the invention
To the problems referred to above; One of the object of the invention is to propose a kind of terminal; Can accurately obtain the version of terminal operating system, thereby avoid manufacturer to cause terminal fault to increase maintenance cost because of the user uses the installation file installing terminal operating system of third party or modification voluntarily.
In view of this, the present invention proposes a kind of terminal, comprising: identifier acquisition module, from the terminal, select ad-hoc location, and read version identifier from said ad-hoc location; The version identification module according to said version identifier, judges whether the version of the operating system at said terminal is indicated release.
In this technical scheme, can obtain version identifier from the ad-hoc location at terminal, whether the version of decision operation system is indicated release.The indicated release here can be that manufacturer is the official version of terminal development; So just can distinguish with the version that other third party or user revise voluntarily; Thereby the installation file installing terminal operating system of avoiding manufacturer to use the third party because of the user or revising voluntarily causes terminal fault to increase maintenance cost; This scheme is not forbidden the installation file installing terminal operating system that the user uses the third party or revises voluntarily simultaneously, to the not influence of playability at terminal.
Preferably, also comprise: the identification record module, when said operating system being installed, generate said version identifier, and be kept at said ad-hoc location for the terminal, whether be said indicated release to indicate said operating system.
In this technical scheme, version identifier generates and record when for the terminal said operating system being installed, as long as there is pair behavior of terminal installing operating system will note the version that file is installed like this.
Preferably; Also comprise: the deciphering installed module, when said operating system being installed, if the installation file of said operating system has been encrypted for said terminal; Then said installation file is carried out decryption oprerations, and use the said installation file after the deciphering that said operating system is installed by predetermined way.
In this technical scheme, owing to the operating system installation file of official version possibly encrypted, so when using the installation file installing operating system of official version, need decipher by corresponding mode, to guarantee smooth installation.Because the installation file of official version is encrypted,, need to being installed, decipher by file by the manner of decryption consistent with cipher mode so need formulate manner of decryption in advance.
Preferably; Also comprise: the verification module; Calculate by predetermined way according to said installation file, obtain first check code, and from said installation file, extract second check code; Judge that whether said first check code is consistent with said second check code, generates said version identifier according to judged result.
In this technical scheme, confirm to install the version of file through the calculation check sign indicating number.Manufacturer can be after installing file (being indicated release) deciphering to official; The calculation check sign indicating number; If official installs file and was not modified, its check code is necessarily correct, distinguishes with the installation file that third party or user revise voluntarily thereby file (being indicated release) is installed by official.
Preferably, also comprise: alert module is installed, when said operating system being installed for said terminal, if the non-said indicated release of the version of said operating system, warning on said terminal.
In this technical scheme; Use non-indicated release; Be that the installation file revised voluntarily of third party or user is during to the terminal installing operating system; Warning is pointed out the user on the terminal, makes the user know that this operation has certain risk, if cause terminal fault need bear maintenance cost voluntarily.
Preferably, said version identification module response user's operation, according to said revision identification information, whether display reminding information on said terminal is said indicated release with the version of pointing out said operating system.
In this technical scheme, can pass through assigned operation simply, such as on the terminal, pressing the specific combined key, come the version of display operation system.
The invention allows for a kind of method of identification terminal operating system, comprising: step 202, from the terminal, select ad-hoc location, and read version identifier from said ad-hoc location; Step 204 according to said version identifier, judges whether the version of the operating system at said terminal is indicated release.
In this technical scheme, can obtain version identifier from the ad-hoc location at terminal, whether the version of decision operation system is indicated release.The indicated release here can be that manufacturer is the official version of terminal development; So just can distinguish with the version that other third party or user revise voluntarily; Thereby the installation file installing terminal operating system of avoiding manufacturer to use the third party because of the user or revising voluntarily causes terminal fault to increase maintenance cost; This scheme is not forbidden the installation file installing terminal operating system that the user uses the third party or revises voluntarily simultaneously, to the not influence of playability at terminal.
Whether preferably, before said step 202, also comprise: when for the terminal said operating system being installed, generating said version identifier, and be kept at said ad-hoc location, is said indicated release to indicate said operating system.
In this technical scheme, version identifier generates and record when for the terminal said operating system being installed, as long as there is pair behavior of terminal installing operating system will note the version that file is installed like this.
Preferably; Before said step 202; Also comprise: step 201, when said operating system being installed, if the installation file of said operating system has been encrypted for said terminal; Then said installation file is carried out decryption oprerations, and use the said installation file after the deciphering that said operating system is installed by predetermined way.
In this technical scheme, owing to the operating system installation file of official version possibly encrypted, so when using the installation file installing operating system of official version, need decipher by corresponding mode, to guarantee smooth installation.Because the installation file of official version is encrypted,, need to being installed, decipher by file by the manner of decryption consistent with cipher mode so need formulate manner of decryption in advance.
Said step 201 also comprises: calculate by predetermined way according to said installation file; Obtain first check code; And from said installation file, extract second check code, judge that whether said first check code is consistent with said second check code, generates said version identifier according to judged result.
In this technical scheme, confirm to install the version of file through the calculation check sign indicating number.Manufacturer can be after installing file (being indicated release) deciphering to official; The calculation check sign indicating number; If official installs file and was not modified, its check code is necessarily correct, distinguishes with the installation file that third party or user revise voluntarily thereby file (being indicated release) is installed by official.
Preferably, said step 201 also comprises: when said operating system being installed for said terminal, if the non-said indicated release of the version of said operating system, warning on said terminal.
In this technical scheme; Use non-indicated release; Be that the installation file revised voluntarily of third party or user is during to the terminal installing operating system; Warning is pointed out the user on the terminal, makes the user know that this operation has certain risk, if cause terminal fault need bear maintenance cost voluntarily.
Preferably, said step 204 comprises: response user's operation, according to said revision identification information, whether display reminding information on said terminal is said indicated release with the version of pointing out said operating system.
In this technical scheme, can pass through assigned operation simply, such as on the terminal, pressing the specific combined key, come the version of display operation system.
Through technique scheme, can accurately obtain the version of terminal operating system, thereby avoid manufacturer to cause terminal fault to increase maintenance cost because of the user uses the installation file installing terminal operating system of third party or modification voluntarily.
Embodiment
In order more to be expressly understood above-mentioned purpose of the present invention, feature and advantage, the present invention is further described in detail below in conjunction with accompanying drawing and embodiment.
A lot of details have been set forth in the following description so that make much of the present invention; But; The present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention does not receive the restriction of following disclosed specific embodiment.
Below in conjunction with accompanying drawing and embodiment the present invention is further specified.Need to prove that under the situation of not conflicting, the application's embodiment and the characteristic among the embodiment can make up each other.
Fig. 1 shows the block diagram at terminal according to an embodiment of the invention.
As shown in Figure 1, terminal 100 comprises according to an embodiment of the invention: identifier acquisition module 102, and from the terminal, select ad-hoc location, and read version identifier from ad-hoc location; Version identification module 104 according to version identifier, judges whether the version of the operating system at terminal 100 is indicated release.
In this technical scheme, can be from the terminal 100 ad-hoc location obtain version identifier, whether the version of decision operation system is indicated release.The indicated release here can be that manufacturer is the official version of terminal development; So just can distinguish with the version that other third party or user revise voluntarily; Thereby the installation file installing terminal operating system of avoiding manufacturer to use the third party because of the user or revising voluntarily causes terminal fault to increase maintenance cost; This scheme is not forbidden the installation file installing terminal operating system that the user uses the third party or revises voluntarily simultaneously, to the not influence of playability at terminal.
Preferably, also comprise: identification record module 106, during for terminal 100 installing operating systems, generate version identifier, and be kept at ad-hoc location, whether be indicated release with indication operating system.
In this technical scheme, version identifier generates and record when being terminal 100 installing operating systems, as long as there is the behavior of pair terminal 100 installing operating systems will note the version that file is installed like this.
Preferably; Also comprise: deciphering installed module 108; When being the said operating system of said terminal 100 installations; If the installation file of said operating system is encrypted, then said installation file is carried out decryption oprerations, and use the said installation file after the deciphering that said operating system is installed by predetermined way.
In this technical scheme, owing to the operating system installation file of official version possibly encrypted, so when using the installation file installing operating system of official version, need decipher by corresponding mode, to guarantee smooth installation.Because the installation file of official version is encrypted,, need to being installed, decipher by file by the manner of decryption consistent with cipher mode so need formulate manner of decryption in advance.
Preferably; Also comprise: verification module 110; Calculate by predetermined way according to said installation file, obtain first check code, and from said installation file, extract second check code; Judge that whether said first check code is consistent with said second check code, generates said version identifier according to judged result.
In this technical scheme, confirm to install the version of file through the calculation check sign indicating number.Manufacturer can be after installing file (being indicated release) deciphering to official; The calculation check sign indicating number; If official installs file and was not modified, its check code is necessarily correct, distinguishes with the installation file that third party or user revise voluntarily thereby file (being indicated release) is installed by official.
Preferably, also comprise: alert module 112 is installed, during for terminal 100 installing operating systems, if the non-indicated release of the version of operating system, warning on terminal 100.
In this technical scheme; Use non-indicated release; Be that the installation file revised voluntarily of third party or user is during to terminal 100 installing operating systems; Warning is pointed out the user on the terminal 100, makes the user know that this operation has certain risk, if cause terminal 100 faults need bear maintenance cost voluntarily.
Preferably, version identification module 104 response users' operation, according to revision identification information, whether display reminding information on terminal 100 is indicated release with the version of prompting operation system.
In this technical scheme, can pass through assigned operation simply, such as on terminal 100, pressing the specific combined key, come the version of display operation system.
Fig. 2 shows the process flow diagram of the method for identification terminal operating system according to an embodiment of the invention.
As shown in Figure 2, the method for identification terminal operating system according to an embodiment of the invention comprises: step 202, and from the terminal, select ad-hoc location, and read version identifier from ad-hoc location; Step 204 according to version identifier, judges whether the version of the operating system at terminal is indicated release.
In this technical scheme, can obtain version identifier from the ad-hoc location at terminal, whether the version of decision operation system is indicated release.The indicated release here can be that manufacturer is the official version of terminal development; So just can distinguish with the version that other third party or user revise voluntarily; Thereby the installation file installing terminal operating system of avoiding manufacturer to use the third party because of the user or revising voluntarily causes terminal fault to increase maintenance cost; This scheme is not forbidden the installation file installing terminal operating system that the user uses the third party or revises voluntarily simultaneously, to the not influence of playability at terminal.
Whether preferably, before step 202, also comprise: for the terminal installing operating system time, generating version identifier, and be kept at ad-hoc location, is indicated release with indication operating system.
In this technical scheme, version identifier generates and record when being the terminal installing operating system, as long as there is pair behavior of terminal installing operating system will note the version that file is installed like this.
Preferably; Before said step 202; Also comprise: step 201, when said operating system being installed, if the installation file of said operating system has been encrypted for said terminal; Then said installation file is carried out decryption oprerations, and use the said installation file after the deciphering that said operating system is installed by predetermined way.
In this technical scheme, owing to the operating system installation file of official version possibly encrypted, so when using the installation file installing operating system of official version, need decipher by corresponding mode, to guarantee smooth installation.Because the installation file of official version is encrypted,, need to being installed, decipher by file by the manner of decryption consistent with cipher mode so need formulate manner of decryption in advance.
Said step 201 also comprises: calculate by predetermined way according to said installation file; Obtain first check code; And from said installation file, extract second check code, judge that whether said first check code is consistent with said second check code, generates said version identifier according to judged result.
In this technical scheme, confirm to install the version of file through the calculation check sign indicating number.Manufacturer can be after installing file (being indicated release) deciphering to official; The calculation check sign indicating number; If official installs file and was not modified, its check code is necessarily correct, distinguishes with the installation file that third party or user revise voluntarily thereby file (being indicated release) is installed by official.
Preferably, step 201 also comprises: during for the terminal installing operating system, if the non-indicated release of the version of operating system, warning on the terminal.
In this technical scheme; Use non-indicated release; Be that the installation file revised voluntarily of third party or user is during to the terminal installing operating system; Warning is pointed out the user on the terminal, makes the user know that this operation has certain risk, if cause terminal fault need bear maintenance cost voluntarily.
Preferably, step 204 comprises: response user's operation, according to revision identification information, whether display reminding information on the terminal is indicated release with the version of prompting operation system.
In this technical scheme, can pass through assigned operation simply, such as on the terminal, pressing the specific combined key, come the version of display operation system.
Below in conjunction with Fig. 3 the method for identification terminal operating system according to an embodiment of the invention is elaborated.
The Image version file: the image image file, the subregion recordable paper of android standard is called for short Image in the literary composition, just the installation file of operating system.
From the brush machine: the Image version file that the user uses third party/modification to destroy, rather than use Image version file that official provides burning version voluntarily, this operation has danger.
The technical scheme of present embodiment is mainly concerned with four module:
1.Image generation module 302;
2.Image encrypting module 304;
3.Image burning module 306;
4. judge from brushing machine display module 308;
The cardinal principle of the technical scheme of present embodiment is:
After Image develops, before the developer publishes to user or customer service site, earlier it is encrypted.And user or customer service site can only get access to the Image of encryption, and can not get access to former Image version file.Therefore user/player uses traditional Android unpacking method not unpack the Image after encrypting.As long as the user can't learn the Image file encryption algorithm of manufacturer, just can't unpack the program that obtains in the Image version file, thereby protect the intellecture property of manufacturer's version.When user or customer service use the Image version file of encrypting on mobile phone, to carry out burning,, thereby can not influence the burning action of user/customer service owing to the bootloader module (having burning version function) of mobile phone can be deciphered the Image file of encrypting.Allow the user to use third party's/be modified Image file to carry out burning (improving the playability of mobile phone) in this scheme; The bootloader module can be deciphered in the burning process; Judge whether this Image file meets encryption logic; Then prove official version if meet,, then prove the user from brushing the machine behavior if do not meet.
1, Image generation module (this module is original technology, is positioned at the PC end):
This module is the generation module of standard I mage version file, generates the general subregion recordable paper of android platform.
2, Image encrypting module (being positioned at the PC end):
The Image encrypting module two effects are arranged:
(1) confidentiality of raising Image file, the Image file after the encryption can't use Android standard unpacking method to unpack.Thereby the program in the protection Image file.
Whether (2) provide is the foundation of the Image of official version file.When the burning version, can decipher judgement to the Image file of need burning, then be official version if meet; Then be not third party's version if meet, this burning behavior belongs to from brushing the machine behavior.
The method of Image file encryption can adopt following mode: insert the registration code authentication, add shell protection, DES, 3DES, 3DES+MAC.Also can adopt methods (including but not limited to these cipher modes) such as other cipher mode or Custom Encryption mode.The file of encrypting comprises boot.img (kernel partitioned file), recovery.img (recovering partitioned file certainly), system.img.ext4/system.img (including but not limited to these img files) such as (system partitioning files).
The Image encryption flow is as shown in Figure 4:
Step 402 is developed the Image file of standard format;
Step 404 is carried out the encryption of ad hoc fashion to the Image file;
Step 406 generates the Image file after encrypting.
3, Image burning module (be positioned at the terminal, be equivalent to aforesaid system installed module, identification record module):
After the Image file is encrypted, must when the burning version, realize decryption work simultaneously.This decryption work is realized in bootloader module (be positioned at the terminal, increased decipher function).
The decryption step of this module is as shown in Figure 5:
Step 502, (through the bootloader module) receives the Image file data from PC side replication tool;
Step 504 is saved in Image in the internal memory.
Step 506, (through the bootloader module) carried out the manner of decryption operation consistent with cipher mode to the Image file in the internal memory, calculates its check code.
Step 508, whether the checking sign indicating number is correct, if official version, then its check code is necessarily correct.If third party or the version that was modified, check code inevitable wrong (because the matching degree of encrypting and decrypting is very high, common encryption accurate rate is also very high).
Step 510 if check code is correct, then proves official version, then in certain parameter subregion of mobile phone, writes 0.
If step 512 check code failure, then proves third party's/revised version, and oneself brushes the machine behavior for the user, then in certain parameter subregion of mobile phone, writes 1.
Step 514, if official version, the image burning file after then will deciphering in machine, if third party's version then need not decipher, directly with the image burning file in machine.
With upper type, even the user can carry out having kept the playability of machine from the brush machine to machine.Whether also write in the machine parameter subregion through this mode simultaneously is from brushing the sign of machine behavior.
4, judge from brushing machine display module (be positioned at the terminal, be equivalent to identifier acquisition module, version identification module):
Whether behind the different identification that is written to the parameter subregion, need provide inquiry mode to remove to obtain this machine is that process is from the brush machine.This programme provides a kind of display mode (comprise but be not limited to this mode), and is specifically as shown in Figure 6.
Whether step 602 detects Macintosh and presses, and when machine is started shooting, will inevitably start the bootloader module;
Step 604 is if the user presses certain specific physical combination key, after (through the bootloader module) identification, with the brush machine sign that reads in the parameter subregion.
Step 606 through brush machine sign, judges whether system belongs to from the brush machine;
Step 608, if brush the machine of machine certainly, then display reminding character " root by user " on display screen does not then show any character if having through from the brush machine.
Step 610, after the demonstration, the machine Auto Power On.
The advantage of present embodiment technical scheme is:
Manufacturer terminal is provided to client service center and user's official version Image file; Owing to passed through encryption; Other developers can't unpack official version Image file according to the original means that unpack of Android; Thereby the exploitation file that can't get access to the version the inside carries out decompiling and gets access to the source code solution, and this scheme has been protected the manufacturer terminal core technology.
The user carries out behind the brush machine mobile phone and can not start shooting, and mobile phone is delivered to the client service center place.Client service center is through Macintosh start, and this moment is if show " Root by User " on the screen, guarantee request that then can with good grounds refusing user's, thus the visitor that can reduce manufacturer terminal moves back rate, reduces maintenance cost.
Can avoid other-end manufacturer or hacker's malicious act, avoid malice to distort the Image file, destroy the original version safety of files, bring the bad prestige problem of quality to company.
To sum up, the operations according to the instant invention system identification technique can accurately obtain the version of terminal operating system, thereby avoids manufacturer to cause terminal fault to increase maintenance cost because of the user uses the installation file installing terminal operating system of third party or modification voluntarily.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.