CN107729171B - Self-adaptive activation method and device of USB interface, terminal equipment and storage medium - Google Patents

Self-adaptive activation method and device of USB interface, terminal equipment and storage medium Download PDF

Info

Publication number
CN107729171B
CN107729171B CN201711037373.6A CN201711037373A CN107729171B CN 107729171 B CN107729171 B CN 107729171B CN 201711037373 A CN201711037373 A CN 201711037373A CN 107729171 B CN107729171 B CN 107729171B
Authority
CN
China
Prior art keywords
usb interface
terminal equipment
state
working state
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711037373.6A
Other languages
Chinese (zh)
Other versions
CN107729171A (en
Inventor
柏凤佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201711037373.6A priority Critical patent/CN107729171B/en
Publication of CN107729171A publication Critical patent/CN107729171A/en
Application granted granted Critical
Publication of CN107729171B publication Critical patent/CN107729171B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0745Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in an input/output transactions management context
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72463User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention relates to the technical field of mobile terminals, in particular to a self-adaptive activation method and device of a USB interface, terminal equipment and a storage medium. The self-adaptive activation method of the USB interface comprises the following steps: when the preset triggering condition is met, detecting whether an SIM telephone card is inserted in an SIM card slot of the terminal equipment; if the detection result is yes, the working state of the USB interface of the terminal equipment is obtained; and updating the working state of the USB interface into an activated state. The embodiment of the invention achieves the aim of activation by directly updating the state in the system, omits the step of receiving the activation-allowed instruction input by the user, reduces the probability of dead halt caused when the terminal equipment is accessed into the computer through the USB interface, and ensures that the background can update the working state of the USB interface even if a certain process is crashed, so that the terminal equipment can be in data connection with the computer through the USB interface.

Description

Self-adaptive activation method and device of USB interface, terminal equipment and storage medium
Technical Field
The present invention relates to the field of terminal devices, and in particular, to a method and apparatus for adaptively activating a USB interface, a terminal device, and a storage medium.
Background
Based on the current design of terminal equipment such as a mobile phone, in view of safety, when the terminal equipment is in butt joint with a computer through a USB interface, a user is required to input an access permission instruction on a screen of the terminal equipment, and only if the computer end receives the access permission instruction, the computer end can establish data connection with the terminal equipment to perform operations such as data backup, data copying, machine brushing and the like.
However, the conventional design has a problem in that a user cannot input an instruction for allowing access to a screen of the terminal device when the terminal device is in a dead state, and the terminal screen is jammed, in which case the user can perform the following processes if he/she still wants to establish a data connection with a computer:
1. the battery is pulled down, the sound volume "+" key (or sound volume "-" key) is pressed down, the power key is pressed down, and the buffer memory and the data are cleared in the recovery mode, so that the problem of dead halt of the mobile phone can be basically solved.
2. If the mode 1 cannot be solved, the mobile phone system needs to be refreshed and reinstalled. After entering a first boot mode, namely a development mode of the android system, a user uses a brushing tool such as a brushing genie to search whether a system package suitable for the mobile phone exists, if not, the user needs to download an official package suitable for the mobile phone on a official network, and the system is restored by brushing a card.
It can be seen that no matter how to restore the data connection between the mobile phone and the computer, the complicated operation is required, the problem of dead halt of the terminal equipment is required to be solved, and then the reconnection of the USB interface is performed, so that the restoration efficiency of the USB interface is low.
Disclosure of Invention
Accordingly, the present invention is directed to a method, apparatus, terminal device and storage medium for adaptively activating a USB interface, which can fundamentally solve the technical problem that the USB interface is difficult to reconnect after the terminal device crashes, and improve the recovery efficiency of the USB interface.
The technical scheme adopted by the invention for solving the technical problems is as follows:
according to one aspect of the present invention, there is provided a method for adaptively activating a USB interface, the method comprising:
when the preset triggering condition is met, detecting whether an SIM telephone card is inserted in an SIM card slot of the terminal equipment;
if the detection result is yes, the working state of the USB interface of the terminal equipment is obtained;
and updating the working state of the USB interface into an activated state.
In one embodiment, when the detection result is yes, before the step of obtaining the working state of the USB interface of the terminal device, the adaptive activation method of the USB interface further includes:
Acquiring an NV file stored in the terminal equipment;
the step of obtaining the working state of the USB interface of the terminal device specifically includes:
acquiring working state parameters of a USB interface of the terminal equipment recorded in the NV file;
the step of updating the working state of the USB interface to an active state specifically includes:
and updating the acquired working state parameters to preset values.
In one embodiment, the preset trigger condition includes that the terminal device is restored to factory settings; the self-adaptive activation method of the USB interface further comprises the following steps:
when receiving an instruction for restoring factory settings, clearing data stored in the terminal equipment;
when the data stored in the terminal equipment is successfully cleared, the preset triggering condition is judged to be met.
In one embodiment, the preset triggering condition includes that the working mode of the terminal device is in a calibration test mode; the self-adaptive activation method of the USB interface further comprises the following steps:
acquiring the working mode of the terminal equipment;
when the acquired working mode is a calibration test mode, judging that the preset triggering condition is met.
In one embodiment, the adaptive activation method of the USB interface further includes:
When the preset USB self-adaptive button is in an on state, judging that the preset triggering condition is met.
In one embodiment, the adaptive activation method of the USB interface further includes:
acquiring detection data sent by an interruption detection pin positioned at the edge of the SIM card slot;
and when the detection data carries uninterrupted information, judging that the SIM card slot of the terminal equipment is internally inserted with the SIM phone card.
According to another aspect of the present invention, there is provided an adaptive activation device for a USB interface, the device comprising:
the detection module is used for detecting whether an SIM telephone card is inserted in the SIM card slot of the terminal equipment when a preset triggering condition is met;
the state acquisition module is used for acquiring the working state of the USB interface of the terminal equipment if the detection result is yes;
and the updating module is used for updating the working state of the USB interface into an activated state.
In one embodiment, the adaptive activation device of the USB interface further includes:
the file acquisition module is used for acquiring the NV file stored in the terminal equipment;
the state acquisition module includes:
the parameter acquisition unit is used for acquiring the working state parameters of the USB interface of the terminal equipment recorded in the NV file;
The update module includes:
and the parameter updating unit is used for updating the acquired working state parameter to a preset value.
According to still another aspect of the present invention, there is provided a terminal device including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the above-mentioned method for adaptively activating a USB interface when executing the program.
According to still another invention, a computer-readable storage medium is provided, on which a computer program is stored, which program, when being executed by a processor, implements the steps of the above-mentioned method for adaptive activation of a USB interface.
According to the self-adaptive activation method, device, terminal equipment and storage medium of the USB interface, provided by the embodiment of the invention, through presetting a certain trigger condition, when the trigger condition is met and a SIM telephone card is inserted in a SIM card slot of the terminal equipment, the working state of the USB interface is automatically updated to be the activated state, the purpose of activation is achieved by directly carrying out state update in a system, the step of receiving an instruction of allowing activation input by a user is omitted, the probability of causing a dead halt when the terminal equipment is accessed into a computer through the USB interface is greatly reduced, and on the other hand, the background can still be connected with the computer through the USB interface by updating the working state of the USB interface even if a certain process is blocked or crashed.
Drawings
Fig. 1 is a schematic hardware structure of a terminal device implementing various embodiments of the present invention;
fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method for adaptive activation of a USB interface according to one embodiment of the present invention;
FIG. 4 is a flow chart of a method for adaptive activation of a USB interface according to another embodiment of the present invention;
FIG. 5 is a flow chart of a method for adaptive activation of a USB interface according to yet another embodiment of the present invention;
FIG. 6 is an exemplary block diagram of an adaptive activation device for a USB interface according to one embodiment of the present invention;
the achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear and obvious, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include terminal devices such as mobile phones, tablet computers, notebook computers, palm computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, and the like.
The following description will be given taking a terminal device as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic hardware structure of a terminal device implementing various embodiments of the present invention, the terminal device 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. It will be appreciated by those skilled in the art that the terminal device structure shown in fig. 1 does not constitute a limitation of the terminal device, and the terminal device may comprise more or less components than shown, or may combine certain components, or may have a different arrangement of components.
The following describes the components of the terminal device in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and terminal equipment can help a user to send and receive emails, browse webpages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the essential constitution of the terminal device, and can be omitted entirely as required within the scope of not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the terminal device 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the terminal device 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The terminal device 100 further comprises at least one sensor 105, such as a light sensor, a motion sensor and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the terminal device 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 is operable to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the terminal device. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the terminal device, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the terminal device, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected to the terminal apparatus 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 100 or may be used to transmit data between the terminal apparatus 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the terminal device, connects respective parts of the entire terminal device using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the terminal device. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The terminal device 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, power consumption management, etc. through the power management system.
Although not shown in fig. 1, the terminal device 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the terminal device of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the hardware structure of the terminal equipment and the communication network system, various embodiments of the method are provided.
Fig. 3 is a flowchart of an adaptive activation method of a USB interface according to an embodiment of the present invention, and the adaptive activation method of a USB interface according to an embodiment of the present invention is described in detail below with reference to fig. 3, and is applied to a terminal device such as a mobile phone, as shown in fig. 3, and includes the following steps S301 to S303.
S301, when a preset triggering condition is met, detecting whether a SIM telephone card is inserted in a SIM card slot of the terminal equipment.
According to one example of the present embodiment, the preset trigger condition includes, but is not limited to, at least one of the following: the terminal device is restored to factory settings, the operating mode of the terminal device is in a calibration test mode, a preset USB adaptive button is in an on state, and so on.
The method comprises the steps that whether the terminal equipment is restored to a factory setting system or not is detected by a plurality of detection methods, for example, all menu setting items are updated to be in an initial state, the terminal equipment is not detected to store user data, and the recorded content in a log is empty.
According to an example of this embodiment, detecting whether a SIM phone card is inserted into a SIM card slot of the terminal device may be implemented by: acquiring detection data sent by an interruption detection pin positioned at the edge of the SIM card slot; and when the detection data carries uninterrupted information, judging that the SIM card slot of the terminal equipment is internally inserted with the SIM phone card.
When the preset triggering condition includes that the terminal equipment is in a working mode of calibration test, the mobile phones of the same model are produced at present, and the mobile phones are not considered to be bad because the mobile phones of the same model are all the same devices, but the same devices have certain deviation, so that the combined mobile phones have certain differences, but the differences are in a certain range and exceed the certain range. The purpose of the calibration is therefore to adjust the difference of the cell phone to the national standard, and the final test is to check the calibration, because the calibration cannot be performed on each channel of the cell phone, each power level can only be selected to be representative (experimental experience point), the cell phone passing the calibration cannot be confirmed to be good, and only the cell phone passing the final test is checked to be qualified.
Because the computer is generally required to be used for calibration, the condition that the mobile phone is halted when being connected with the computer through the USB interface easily occurs in the calibration process, and if the condition is not processed timely, the calibrated efficiency of the terminal equipment can be affected, so that the working efficiency of a programmer is reduced, and the problem can be avoided by setting the preset triggering condition as the working mode that the terminal equipment is in a calibration test.
In this embodiment, the above-described preset USB adaptation button may be provided in a menu of system setting items, and the user may turn on the adaptation function of the USB interface by clicking the button, which may be the same virtual button as other setting item buttons.
The method and the device have the advantages that whether the SIM telephone card is inserted into the SIM card slot of the terminal equipment is set as a judging condition of whether the USB interface self-adaption function is started or not, so that mobile phone sellers or other people can be prevented from brushing third party programs or ROM in batches through USB to change mobile phone systems or environments, legal rights and interests of consumers can be protected from being infringed, and safety guarantee is provided for a system which is not changed by using original edition by users.
S302, if the detection result is yes, the working state of the USB interface of the terminal equipment is obtained.
According to an example of this embodiment, the operation state of the USB interface may be a state in which the USB interface is activated, and when the operation state of the USB interface is an activated state, it indicates that the terminal device allows the connected device (for example, a computer) to access the data of the terminal device through the USB interface, and when the USB interface is in a deactivated state, it indicates that the terminal device does not allow the connected device to access the data of the terminal device through the USB interface.
According to another example of the present embodiment, the operation state of the USB interface may be acquired by acquiring an NV file stored in the terminal device. Some information related to the handset, such as meid, etc., is recorded in the NV file. In general, the nv item is relatively close to the communication function, and of course, some other information, such as the use state of the USB interface of the mobile phone, for example, the nv item also marks the network that the mobile phone is allowed to register, the network that the mobile phone is currently registered, and so on. For example, nv marks a connected 3G network in the mobile phone, and when a mobile card is inserted into the mobile phone, a problem that a new number of the network cannot be found occurs. Some nv items can be rewritten along with the insertion of a mobile phone card, and the damage of the nv items can cause a plurality of problems of the mobile phone, so that the nv items are not allowed to be modified randomly.
S303, updating the working state of the USB interface to an activated state.
Wherein updating the operating state of the USB interface to an active state indicates that the device is allowed to transmit and receive to a connected device (e.g., a computer) through the USB interface. According to an example of the present embodiment, there are various ways to update the operation state of the USB interface to the active state, for example:
and updating the working state parameters of the USB interface of the terminal equipment recorded in the NV file to a preset value. Wherein the preset value represents a value which allows activation, and the preset value can be 3 or other values; or (b)
Setting the state of 'hiding the appointed drivers in the my computer' in the windows resource manager to be disabled, and setting the parameter of 'preventing the drivers from being accessed from the my computer' to be disabled; or (b)
And updating the parameters corresponding to the USB state in the registry editor to a preset value. For example: opening to HKEY_LOCAL_MACHINE\SYSTEM\CurrentCntrolSet\Services\USBSTOR, finding a DWORD value named as "Start" in a pane on the right side, modifying the numerical data into hexadecimal numerical value "3" in a pop-up editing dialog box after selection, clicking a "determine" button and closing a registry editor, thus finishing updating the working state of the USB interface.
According to the embodiment, a certain triggering condition is preset, when the triggering condition is met and a SIM telephone card is inserted in a SIM card slot of the terminal equipment, the working state of the USB interface is automatically updated to be an activated state, the purpose of activation is achieved by directly carrying out state update in the system, the step of receiving an instruction which is input by a user and allows activation is omitted, the probability of the terminal equipment to be halted when the terminal equipment is accessed to a computer through the USB interface is greatly reduced, and on the other hand, the background can still update the working state of the USB interface even if the terminal equipment is jammed or crashed in a certain process, so that the terminal equipment can be connected with the computer through the USB interface.
Fig. 4 is a flowchart of a method for adaptively activating a USB interface according to another embodiment of the present invention, and the method for adaptively activating a USB interface according to another embodiment of the present invention is described in detail below with reference to fig. 4, and as shown in fig. 4, the method further includes, on the basis of including the step S101, the following steps:
s401, if the SIM card slot of the terminal equipment is internally inserted with the SIM phone card, the NV file stored in the terminal equipment is acquired.
The present embodiment allows to obtain the working state of the USB interface by obtaining the NV file stored in the terminal device. Some information related to the handset, such as meid, etc., is recorded in the NV file. In general, the nv item is relatively close to the communication function, and of course, some other information, such as the use state of the USB interface of the mobile phone, for example, the nv item also marks the network that the mobile phone is allowed to register, the network that the mobile phone is currently registered, and so on. For example, nv marks a connected 3G network in the mobile phone, and when a mobile card is inserted into the mobile phone, a problem that a new number of the network cannot be found occurs. Some nv items can be rewritten along with the insertion of a mobile phone card, and the damage of the nv items can cause a plurality of problems of the mobile phone, so that the nv items are not allowed to be modified randomly.
According to an example of this embodiment, detecting whether a SIM phone card is inserted into a SIM card slot of the terminal device may be implemented by: acquiring detection data sent by an interruption detection pin positioned at the edge of the SIM card slot; and when the detection data carries uninterrupted information, judging that the SIM card slot of the terminal equipment is internally inserted with the SIM phone card.
The step S302 further includes the following step S402:
s402, acquiring working state parameters of the USB interface of the terminal equipment recorded in the NV file.
The step S303 further includes the following step S403:
s403, updating the acquired working state parameters to preset values.
For the NV of the high-pass platform, some parameter values possibly used by each module in the running process of the system are saved, and the parameter values are saved in an EFS (Encrypting File System, encrypted file system) in the form of a single file, but the user cannot access the parameter values at will, and can only read and write through the software of the QXDM.
Since the NV values are required to be calibrated and final measured to enable the hardware of the mobile phone to reach the optimal working state, especially the NV items related to RF (Radio Frequency), after the calibration and final measurement, the NV values of each mobile phone are basically different, and the NV data are stored in the EFS, and the data of the EFS are likely to be destroyed (e.g. re-written version), the NV data will be destroyed, and similarly, in order to keep the working state parameters of the USB interface of the terminal device recorded in the updated NV file from being destroyed, after the step of updating the obtained working state parameters to the preset values in step S403, the method further includes:
Setting the updated working state parameters of the USB interface of the terminal equipment to be in a read-only state;
when the preset trigger condition for releasing the read-only state is met, the working state parameter of the USB interface of the terminal equipment is set to be in a read-write state.
According to an example of the present embodiment, the preset trigger condition for releasing the read-only state is opposite to the preset trigger condition in step S301, that is, the preset trigger condition for releasing the read-only state is judged to be satisfied when at least one of the following conditions is satisfied: the terminal device is not restored to factory settings, the working mode of the terminal device is not in a calibration test mode, a preset USB self-adaptive button is in a closed state, and the like.
The embodiment provides a method for updating the working state of a USB interface of a terminal device into an active state by modifying the working state parameter of the USB interface of the terminal device recorded in an NV file, and setting the updated working state parameter of the USB interface of the terminal device into a read-only state, so that when a malicious program cannot modify the working state of the USB interface by modifying the parameter in the NV item, and when a triggering condition for releasing the read-only state is met, the working state parameter of the USB interface of the terminal device is set into a read-write state, and when the terminal device is in a normal working state, a user can normally use the USB interface.
Fig. 5 is a flowchart of a method for adaptively activating a USB interface according to still another embodiment of the present invention, and the method for adaptively activating a USB interface according to still another embodiment of the present invention is described in detail below with reference to fig. 5, where the preset trigger condition includes that the terminal device is restored to a factory setting, as shown in fig. 5, and further includes the following steps S501 and S502 on the basis of including the steps S301 to S303.
S501, acquiring the working mode of the terminal equipment.
According to an example of this embodiment, the operation modes include a calibration test mode and a non-calibration test mode, and when the operation mode of the terminal device is in the non-calibration test mode, it may indicate that the terminal device is in a state that the user side normally uses.
S502, when the acquired working mode is a calibration test mode, judging that the preset triggering condition is met.
According to one example of this embodiment, the calibration test pattern includes the following two test objects:
(1) Cell calibration: the battery simulation of the mobile phone is adjusted to be used in two cases (4.2V and 3.5V). The constant 9 series is similar to the calibration of the Florence platform, the bias value of the mobile phone battery at 4.2V is firstly adjusted to enable the voltage representation value read by the mobile phone to be in the range of 4.2+/-0.1V, then the voltage of the battery is adjusted to 3.5V, and whether the voltage is still in the range of 3.5+/-0.1V or not is judged, and the bias value is stored in the mobile phone.
(2) And (3) calibrating a transmitter: different platforms have different calibration methods, but the general principle is the same. The method is to adjust the representation value of the power value at one or several experimental experience points (all power levels) by a certain method so as to meet the national standard requirements. The representation may be a single number or a set of values, like the A6/A8 series, that is, a single number for the full power level of multiple experience points (10, 60, 105, 1000 channels for GSM900, 570, 700, 800 for DCS1800, 3 channels for DCS1800, i.e., 5-19 for GSM900, 0-15 for DCS 1800), whereas the constant 9 series and Florence platforms are single experience points (62 for GSM900, 698 for DCS 1800) for the full power level representing the representation of a set of power curves for that power level.
In other embodiments, the preset trigger condition includes the terminal device being restored to factory settings; the method further comprises the steps of:
when receiving an instruction for restoring factory settings, clearing data stored in the terminal equipment;
when the data stored in the terminal equipment is successfully cleared, the preset triggering condition is judged to be met.
According to one example of this embodiment, the user may input the instruction to restore factory settings by checking an option to restore factory settings in the setting item. The android mobile phone can find the factory setting to restore in the settings, and the mobile phone can be restarted after the user clicks to confirm restoration, and the android mobile phone can be waited for completion. The detailed steps are as follows: opening the mobile phone function table, setting, protecting privacy and restoring factory settings. And the android mobile phone auxiliary software such as a smart phone brushing agent, pea pods and the like have the function of restoring the factory settings of the mobile phone.
The mobile phone is reset to the factory setting, namely all information of a user in the mobile phone, installed applications and downloaded data are completely emptied, and the mobile phone is reset to the factory state. However, the premise of restoring factory settings is that the root authority is not broken, and otherwise errors occur. If the root authority is broken, the application carried by the mobile phone and the mobile phone can be deleted, but the warranty is lost, and the factory setting cannot be restored.
In other embodiments, the method further comprises:
when the preset USB self-adaptive button is in an on state, judging that the preset triggering condition is met.
In this embodiment, the above-described preset USB adaptation button may be provided in a menu of system setting items, and the user may turn on the adaptation function of the USB interface by clicking the button, which may be the same virtual button as other setting item buttons.
The embodiment provides various possibilities of preset triggering conditions, considers the situations that various mobile terminals are used, including whether the use state of the terminal equipment is factory-restored, whether the working mode of the terminal equipment is in a calibration test mode, whether a preset USB self-adaptive button is in an on state, and the like, so that the technical scheme described in the application can cover various situations requiring the self-adaptive teaching of the activation state of the USB interface, and the application range of the application is wider.
According to an example of the present embodiment, the above-mentioned reference numerals of steps S301 to S502 are not used to define the sequence of the steps in the present embodiment, and the numbers of the steps are merely for convenience of referring to the reference numerals of the steps when describing the steps, so long as the sequence of executing the steps does not affect the logical relationship of the present embodiment, that is, the sequence is indicated in the scope of protection claimed in the present application.
Fig. 6 is an exemplary block diagram of a USB interface adaptive activation device according to an embodiment of the present invention, and the USB interface adaptive activation device according to an embodiment of the present invention is described in detail below with reference to fig. 6, and as shown in fig. 6, the USB interface adaptive activation device 10 includes the following detection module 11, a status acquisition module 12, and an update module 13.
And the detection module 11 is used for detecting whether the SIM telephone card is inserted into the SIM card slot of the terminal equipment when the preset triggering condition is met.
According to one example of the present embodiment, the preset trigger condition includes, but is not limited to, at least one of the following: the terminal device is restored to factory settings, the operating mode of the terminal device is in a calibration test mode, a preset USB adaptive button is in an on state, and so on.
The method comprises the steps that whether the terminal equipment is restored to a factory setting system or not is detected by a plurality of detection methods, for example, all menu setting items are updated to be in an initial state, the terminal equipment is not detected to store user data, and the recorded content in a log is empty.
According to an example of the present embodiment, the detection of whether the SIM phone card is inserted into the SIM card slot of the terminal device by the detection module 11 may be implemented by: and acquiring detection data sent by an interruption detection pin positioned at the edge of the SIM card slot, and judging that the SIM phone card is inserted in the SIM card slot of the terminal equipment when the detection data carries uninterrupted information.
When the preset triggering condition includes that the terminal equipment is in a working mode of calibration test, the mobile phones of the same model are produced at present, and the mobile phones are not considered to be bad because the mobile phones of the same model are all the same devices, but the same devices have certain deviation, so that the combined mobile phones have certain differences, but the differences are in a certain range and exceed the certain range. The purpose of the calibration is therefore to adjust the difference of the cell phone to the national standard, and the final test is to check the calibration, because the calibration cannot be performed on each channel of the cell phone, each power level can only be selected to be representative (experimental experience point), the cell phone passing the calibration cannot be confirmed to be good, and only the cell phone passing the final test is checked to be qualified.
Because the computer is generally required to be used in calibration, the condition that the mobile phone is halted when being connected with the computer through the USB interface easily occurs in the calibration process, if the condition is not processed timely, the calibrated efficiency of the terminal equipment is affected, so that the working efficiency of a programmer is reduced, the preset triggering condition is set to be the working mode that the terminal equipment is in the calibration test, and the detection module detects whether the terminal equipment is in the working mode of the calibration test or not, so that the problem can be avoided.
In this embodiment, the above-described preset USB adaptation button may be provided in a menu of system setting items, and the user may turn on the adaptation function of the USB interface by clicking the button, which may be the same virtual button as other setting item buttons.
The method and the device have the advantages that whether the SIM telephone card is inserted into the SIM card slot of the terminal equipment is set as a judging condition of whether the USB interface self-adaption function is started or not, so that mobile phone sellers or other people can be prevented from brushing third party programs or ROM in batches through USB to change mobile phone systems or environments, legal rights and interests of consumers can be protected from being infringed, and safety guarantee is provided for a system which is not changed by using original edition by users.
And the state acquisition module 12 is configured to acquire the working state of the USB interface of the terminal device if the detection result is yes.
According to an example of this embodiment, the operation state of the USB interface may be a state in which the USB interface is activated, and when the operation state of the USB interface is an activated state, it indicates that the terminal device allows the connected device (for example, a computer) to access the data of the terminal device through the USB interface, and when the USB interface is in a deactivated state, it indicates that the terminal device does not allow the connected device to access the data of the terminal device through the USB interface.
According to another example of the present embodiment, the state acquisition module 12 may acquire the operation state of the USB interface by acquiring the NV file stored in the terminal device. Some information related to the handset, such as meid, etc., is recorded in the NV file. In general, the nv item is relatively close to the communication function, and of course, some other information, such as the use state of the USB interface of the mobile phone, for example, the nv item also marks the network that the mobile phone is allowed to register, the network that the mobile phone is currently registered, and so on. For example, nv marks a connected 3G network in the mobile phone, and when a mobile card is inserted into the mobile phone, a problem that a new number of the network cannot be found occurs. Some nv items can be rewritten along with the insertion of a mobile phone card, and the damage of the nv items can cause a plurality of problems of the mobile phone, so that the nv items are not allowed to be modified randomly.
And the updating module 13 is used for updating the working state of the USB interface into an activated state.
Wherein the update module 13 updates the operation state of the USB interface to an active state, which means that it allows transmitting and receiving devices to a connected device (e.g. a computer) through the USB interface. According to an example of the present embodiment, there are various ways to update the operation state of the USB interface to the active state, for example:
and updating the working state parameters of the USB interface of the terminal equipment recorded in the NV file to a preset value. Wherein the preset value represents a value which allows activation, and the preset value can be 3 or other values; or (b)
Setting the state of 'hiding the appointed drivers in the my computer' in the windows resource manager to be disabled, and setting the parameter of 'preventing the drivers from being accessed from the my computer' to be disabled; or (b)
And updating the parameters corresponding to the USB state in the registry editor to a preset value. For example: opening to HKEY_LOCAL_MACHINE\SYSTEM\CurrentCntrolSet\Services\USBSTOR, finding a DWORD value named as "Start" in a pane on the right side, modifying the numerical data into hexadecimal numerical value "3" in a pop-up editing dialog box after selection, clicking a "determine" button and closing a registry editor, thus finishing updating the working state of the USB interface.
According to the embodiment, a certain triggering condition is preset, when the triggering condition is met and a SIM telephone card is inserted in a SIM card slot of the terminal equipment, the working state of the USB interface is automatically updated to be an activated state, the purpose of activation is achieved by directly carrying out state update in the system, the step of receiving an instruction which is input by a user and allows activation is omitted, the probability of the terminal equipment to be halted when the terminal equipment is accessed to a computer through the USB interface is greatly reduced, and on the other hand, the background can still update the working state of the USB interface even if the terminal equipment is jammed or crashed in a certain process, so that the terminal equipment can be connected with the computer through the USB interface.
In one embodiment, when the detection module detects that the result is yes, the adaptive activation device of the USB interface further includes:
the file acquisition module is used for acquiring the NV file stored in the terminal equipment;
the state acquisition module 12 includes:
the parameter acquisition unit is used for acquiring the working state parameters of the USB interface of the terminal equipment recorded in the NV file;
the update module 13 includes:
and the parameter updating unit is used for updating the acquired working state parameter to a preset value.
The file acquisition module acquires the working state of the USB interface in a mode of acquiring the NV file stored in the terminal equipment. Some information related to the handset, such as meid, etc., is recorded in the NV file. In general, the nv item is relatively close to the communication function, and of course, some other information, such as the use state of the USB interface of the mobile phone, for example, the nv item also marks the network that the mobile phone is allowed to register, the network that the mobile phone is currently registered, and so on. For example, nv marks a connected 3G network in the mobile phone, and when a mobile card is inserted into the mobile phone, a problem that a new number of the network cannot be found occurs. Some nv items can be rewritten along with the insertion of a mobile phone card, and the damage of the nv items can cause a plurality of problems of the mobile phone, so that the nv items are not allowed to be modified randomly.
According to an example of this embodiment, the adaptive activation device of a USB interface further includes:
the state updating module is used for setting the updated working state parameters of the USB interface of the terminal equipment into a read-only state;
and the parameter setting module is used for setting the working state parameter of the USB interface of the terminal equipment into a read-write state when the preset trigger condition for releasing the read-only state is met.
According to an example of the present embodiment, the preset trigger condition for releasing the read-only state is opposite to the preset trigger condition in step S301, that is, the preset trigger condition for releasing the read-only state is judged to be satisfied when at least one of the following conditions is satisfied: the terminal device is not restored to factory settings, the working mode of the terminal device is not in a calibration test mode, a preset USB self-adaptive button is in a closed state, and the like.
In one embodiment, the preset trigger condition includes that the terminal device is restored to factory setting; the adaptive activation device 10 of the USB interface further includes:
the instruction receiving module is used for clearing data stored in the terminal equipment when receiving an instruction for restoring factory settings;
and the first judging module is used for judging that the preset triggering condition is met when the data stored in the terminal equipment is successfully cleared.
The mobile phone is reset to the factory setting, namely all information of a user in the mobile phone, the installed application and the downloaded data are completely emptied, and the mobile phone is reset to the factory state. However, the premise of restoring factory settings is that the root authority is not broken, and otherwise errors occur. If the root authority is broken, the application carried by the mobile phone and the mobile phone can be deleted, but the warranty is lost, and the factory setting cannot be restored.
In one embodiment, the preset trigger condition includes that the working mode of the terminal device is in a calibration test mode; the adaptive activation device 10 of the USB interface further includes:
the mode acquisition module is used for acquiring the working mode of the terminal equipment;
and the second judging module is used for judging that the preset triggering condition is met when the acquired working mode is a calibration test mode.
According to one example of this embodiment, the calibration test pattern includes the following two test objects:
(1) Cell calibration: the battery simulation of the mobile phone is adjusted to be used in two cases (4.2V and 3.5V). The constant 9 series is similar to the calibration of the Florence platform, the bias value of the mobile phone battery at 4.2V is firstly adjusted to enable the voltage representation value read by the mobile phone to be in the range of 4.2+/-0.1V, then the voltage of the battery is adjusted to 3.5V, and whether the voltage is still in the range of 3.5+/-0.1V or not is judged, and the bias value is stored in the mobile phone.
(2) And (3) calibrating a transmitter: different platforms have different calibration methods, but the general principle is the same. The method is to adjust the representation value of the power value at one or several experimental experience points (all power levels) by a certain method so as to meet the national standard requirements. The representation may be a single number or a set of values, like the A6/A8 series, that is, a single number for the full power level of multiple experience points (10, 60, 105, 1000 channels for GSM900, 570, 700, 800 for DCS1800, 3 channels for DCS1800, i.e., 5-19 for GSM900, 0-15 for DCS 1800), whereas the constant 9 series and Florence platforms are single experience points (62 for GSM900, 698 for DCS 1800) for the full power level representing the representation of a set of power curves for that power level.
In one embodiment, the adaptive activation device 10 of the USB interface further includes:
and the third judging module is used for judging that the preset triggering condition is met when the preset USB self-adaptive button is in an on state.
In this embodiment, the above-described preset USB adaptation button may be provided in a menu of system setting items, and the user may turn on the adaptation function of the USB interface by clicking the button, which may be the same virtual button as other setting item buttons.
In one embodiment, the adaptive activation device 10 of the USB interface further includes:
the detection data acquisition module is used for acquiring detection data sent by the interruption detection pin positioned at the edge of the SIM card slot;
and the fourth judging module is used for judging that the SIM telephone card is inserted in the SIM card slot of the terminal equipment when the detection data carries uninterrupted information.
The meaning of "first", "second", "third" and "fourth" in the first, second, third and fourth judgment modules is merely to distinguish different judgment modules, and is not used to limit which judgment has higher priority or other limitation meaning.
The modules included in the adaptive activation device of the USB interface may be implemented in whole or in part by software, hardware, or a combination thereof. Further, each module in the adaptive activation device of the USB interface may be a program segment for implementing a corresponding function.
The above-described adaptive activation means of the USB interface may be implemented in the form of a computer program which is executable on a terminal device as shown in fig. 1.
According to another embodiment of the present invention, a mobile terminal is provided, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the above-mentioned method for adaptively activating a USB interface when executing the program.
According to a further embodiment of the present invention, a computer readable storage medium is provided, on which a computer program is stored, which program, when being executed by a processor, implements the steps of the method for adaptive activation of a USB interface described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
According to the self-adaptive activation method, device, terminal equipment and storage medium for the USB interface, provided by the embodiment, through presetting a certain trigger condition, when the trigger condition is met and a SIM telephone card is inserted in a SIM card slot of the terminal equipment, the working state of the USB interface is automatically updated to be an activated state, the purpose of activation is achieved by directly carrying out state update in a system, the step of receiving an instruction of allowing activation input by a user is omitted, the probability of causing a dead halt when the terminal equipment is accessed into a computer through the USB interface is greatly reduced, and on the other hand, the background can still be connected with the computer through the USB interface by updating the working state of the USB interface even if a certain process is blocked or crashed.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (9)

1. An adaptive activation method for a USB interface, the method comprising:
when the preset triggering condition is met, detecting whether an SIM telephone card is inserted in an SIM card slot of the terminal equipment;
if the detection result is yes, the working state of the USB interface of the terminal equipment is obtained;
updating the working state of the USB interface to be an activated state;
the preset trigger condition includes any one of the terminal device being restored to factory settings, calibrating a test mode, or when a preset USB adaptive button is in an on state.
2. The method according to claim 1, wherein when the detection result is yes, before the step of acquiring the operation state of the USB interface of the terminal device, the method further includes:
Acquiring an NV file stored in the terminal equipment;
the step of obtaining the working state of the USB interface of the terminal device specifically includes:
acquiring working state parameters of a USB interface of the terminal equipment recorded in the NV file;
the step of updating the working state of the USB interface to an active state specifically includes:
and updating the acquired working state parameters to preset values.
3. The method according to claim 1, wherein the method further comprises:
when receiving an instruction for restoring factory settings, clearing data stored in the terminal equipment;
and when the data stored in the terminal equipment is successfully cleared, judging that the preset triggering condition is met.
4. The method according to claim 1, wherein the method further comprises:
acquiring the working mode of the terminal equipment;
and when the acquired working mode is a calibration test mode, judging that the preset trigger condition is met.
5. The method according to any one of claims 1 to 4, further comprising:
acquiring detection data sent by an interruption detection pin positioned at the edge of the SIM card slot;
And when the detection data carries uninterrupted information, judging that the SIM card slot of the terminal equipment is internally inserted with the SIM phone card.
6. An adaptive activation device for a USB interface, the device comprising:
the detection module is used for detecting whether an SIM telephone card is inserted in the SIM card slot of the terminal equipment or not when the preset triggering condition is met;
the state acquisition module is used for acquiring the working state of the USB interface of the terminal equipment if the detection result is yes;
the updating module is used for updating the working state of the USB interface into an activated state;
the preset trigger condition includes any one of the terminal device being restored to factory settings, calibrating a test mode, or when a preset USB adaptive button is in an on state.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the file acquisition module is used for acquiring the NV file stored in the terminal equipment;
the state acquisition module includes:
the parameter acquisition unit is used for acquiring working state parameters of the USB interface of the terminal equipment recorded in the NV file;
the updating module comprises:
and the parameter updating unit is used for updating the acquired working state parameters to preset values.
8. A terminal device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements an adaptive activation method of a USB interface according to any one of claims 1 to 5 when executing the program.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 5.
CN201711037373.6A 2017-10-30 2017-10-30 Self-adaptive activation method and device of USB interface, terminal equipment and storage medium Active CN107729171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711037373.6A CN107729171B (en) 2017-10-30 2017-10-30 Self-adaptive activation method and device of USB interface, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711037373.6A CN107729171B (en) 2017-10-30 2017-10-30 Self-adaptive activation method and device of USB interface, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN107729171A CN107729171A (en) 2018-02-23
CN107729171B true CN107729171B (en) 2023-06-02

Family

ID=61203222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711037373.6A Active CN107729171B (en) 2017-10-30 2017-10-30 Self-adaptive activation method and device of USB interface, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN107729171B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988549B (en) * 2020-07-21 2022-09-09 深圳市金锐显数码科技有限公司 Television USB seat power supply method and device
CN113382113A (en) * 2021-05-18 2021-09-10 希姆通信息技术(上海)有限公司 Intelligent mobile communication terminal storage equipment activating device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010023508A1 (en) * 2008-08-29 2010-03-04 Nokia Corporation Method, apparatus and computer program product for providing device security
CN103577733A (en) * 2013-09-02 2014-02-12 小米科技有限责任公司 Safety protection method and device for terminal equipment and terminal equipment
CN105120100A (en) * 2015-09-01 2015-12-02 广东欧珀移动通信有限公司 Mobile terminal with theft anti-flashing function, and anti-flashing method of same
CN105117912A (en) * 2015-09-01 2015-12-02 广东欧珀移动通信有限公司 Anti-reinstallation-after-stolen mobile terminal and anti-reinstallation-after-stolen method therefor
CN107018142A (en) * 2017-04-28 2017-08-04 努比亚技术有限公司 Active defense method and mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101772018B (en) * 2010-01-21 2016-03-30 中兴通讯股份有限公司 The theft preventing method of theft preventing mobile terminal and mobile terminal
US9031541B2 (en) * 2012-04-09 2015-05-12 Cellco Partnership Method for transmitting information stored in a tamper-resistant module

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010023508A1 (en) * 2008-08-29 2010-03-04 Nokia Corporation Method, apparatus and computer program product for providing device security
CN103577733A (en) * 2013-09-02 2014-02-12 小米科技有限责任公司 Safety protection method and device for terminal equipment and terminal equipment
CN105120100A (en) * 2015-09-01 2015-12-02 广东欧珀移动通信有限公司 Mobile terminal with theft anti-flashing function, and anti-flashing method of same
CN105117912A (en) * 2015-09-01 2015-12-02 广东欧珀移动通信有限公司 Anti-reinstallation-after-stolen mobile terminal and anti-reinstallation-after-stolen method therefor
CN107018142A (en) * 2017-04-28 2017-08-04 努比亚技术有限公司 Active defense method and mobile terminal

Also Published As

Publication number Publication date
CN107729171A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
CN107734614B (en) Wi-Fi antenna control method, mobile terminal and computer readable storage medium
CN109800602B (en) Privacy protection method, mobile terminal and computer readable storage medium
US20200150860A1 (en) Mobile terminal and control method therefor, and readable storage medium
CN107506646B (en) Malicious application detection method and device and computer readable storage medium
CN108536490B (en) Application program starting method, mobile terminal and computer storage medium
CN110187925B (en) Desktop pre-starting control method, device and computer readable storage medium
CN109687974B (en) APK verification method and device, mobile terminal and readable storage medium
CN108833690B (en) Authority control method, terminal and computer readable storage medium
CN109766119B (en) Recovery partition upgrade method, terminal and computer readable storage medium
CN108958936B (en) Application program switching method, mobile terminal and computer readable storage medium
WO2016192511A1 (en) Method and apparatus for remotely deleting information
CN107402710B (en) Privacy information protection method, mobile terminal and computer readable storage medium
CN107729171B (en) Self-adaptive activation method and device of USB interface, terminal equipment and storage medium
CN109545120B (en) Screen light sensor adjusting method, mobile terminal and computer readable storage medium
CN108629863B (en) Method for automatically signing in application program, mobile terminal and readable storage medium
CN107194217B (en) User data access control method, apparatus and computer-readable storage medium
CN107168747B (en) Method and device for distinguishing mobile terminal configuration and computer readable storage medium
CN111443818B (en) Screen brightness regulation and control method, equipment and computer readable storage medium
CN110413330B (en) Face unlocking initialization method, equipment and computer readable storage medium
CN109032621B (en) Application program installation method, mobile terminal and computer storage medium
CN111159738A (en) Permission configuration method, application login method and device
CN108108054B (en) Method, apparatus and computer-readable storage medium for predicting user sliding operation
CN111125680A (en) Permission setting method and terminal equipment
CN107728789B (en) Starting method of one-hand operation mode, terminal and storage medium
CN109409081A (en) A kind of authority setting method, mobile terminal and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant