CN108334357B - Intelligent terminal and flashing method thereof - Google Patents

Intelligent terminal and flashing method thereof Download PDF

Info

Publication number
CN108334357B
CN108334357B CN201710040851.2A CN201710040851A CN108334357B CN 108334357 B CN108334357 B CN 108334357B CN 201710040851 A CN201710040851 A CN 201710040851A CN 108334357 B CN108334357 B CN 108334357B
Authority
CN
China
Prior art keywords
resistance value
intelligent terminal
ground
preset
equal
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
CN201710040851.2A
Other languages
Chinese (zh)
Other versions
CN108334357A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710040851.2A priority Critical patent/CN108334357B/en
Publication of CN108334357A publication Critical patent/CN108334357A/en
Application granted granted Critical
Publication of CN108334357B publication Critical patent/CN108334357B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)
  • Motor Or Generator Current Collectors (AREA)

Abstract

The disclosure relates to a flashing method of an intelligent terminal and the intelligent terminal, relating to the technical field of intelligent terminals, wherein the method comprises the following steps: when a boot loader runs, detecting a ground resistance value of a configuration channel pin of a Universal Serial Bus (USB) data line, wherein the USB data line is used for connecting an intelligent terminal with other terminals; and determining a machine refreshing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and entering the machine refreshing mode to refresh the intelligent terminal, wherein the first preset resistance value is not equal to the second preset resistance value. In the embodiment of the disclosure, when the boot loader runs, the ground resistance value of the configuration channel pin of the USB data line is detected, and the flashing mode is determined by comparing the ground resistance value with the first preset resistance value and the second preset resistance value, so that the problem that the flashing mode cannot be entered to flash the intelligent terminal when the intelligent terminal has no entity volume key in the related art is avoided, and convenience is brought to a user flashing.

Description

Intelligent terminal and flashing method thereof
Technical Field
The disclosure relates to the technical field of intelligent terminals, in particular to a flashing method of an intelligent terminal and the intelligent terminal.
Background
Generally, a user can update or reinstall a system of the intelligent terminal by a flashing method. The current common flashing method is mainly realized by two modes, namely a fast start mode (Fastboot) and a Recovery mode (Recovery). In the Fastboot mode, the intelligent terminal may communicate with the computer through a USB (Universal Serial Bus) data line, and when receiving system data sent by the computer, the intelligent terminal updates the system data to a designated partition of the intelligent terminal, thereby completing the flush. In the Recovery mode, the intelligent terminal can modify the system data of the intelligent terminal according to the system data stored in the memory of the intelligent terminal, so that the flash is completed.
In the related art, when the intelligent terminal is booted, whether the Fastboot mode or the Recovery mode is used, first, when the intelligent terminal is booted, the intelligent terminal needs to enter the two modes by pressing a specific combination key. Currently, for most intelligent terminals, in the running process of a boot loader (Bootloader) of a system, the operation of pressing a key of the intelligent terminal can be determined, when a power key and a volume down key are detected to be pressed simultaneously, the intelligent terminal enters a Fastboot mode, and when the power key and the volume up key are detected to be pressed simultaneously, the intelligent terminal enters a Recovery mode. And after the intelligent terminal enters a Fastboot mode or a Recovery mode, refreshing the intelligent terminal according to the method.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a flashing method of an intelligent terminal and the intelligent terminal.
According to a first aspect of the embodiments of the present disclosure, a flashing method of an intelligent terminal is provided, where the method includes:
when a boot loader runs, detecting a ground resistance value of a configuration channel pin of a currently connected Universal Serial Bus (USB) data line, wherein the USB data line is used for connecting an intelligent terminal with other terminals;
and determining a machine refreshing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and entering the machine refreshing mode to refresh the intelligent terminal, wherein the first preset resistance value is not equal to the second preset resistance value.
Optionally, the determining a brushing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value includes:
judging whether the ground resistance value is equal to the first preset resistance value or not, and judging whether the ground resistance value is equal to the second preset resistance value or not;
when the ground resistance value is equal to the first preset resistance value, determining that the flashing mode is a fast start fastboost mode;
and when the ground resistance value is equal to the second preset resistance value, determining that the flashing mode is a Recovery mode.
Optionally, after determining whether the ground resistance value is equal to the first resistance value and determining whether the ground resistance value is equal to the second resistance value, the method further includes:
and when the ground resistance value is not equal to the first preset resistance value and the ground resistance value is not equal to the second preset resistance value, stopping detecting the ground resistance value of the configuration channel pin of the USB data line, and starting the intelligent terminal based on the boot loader.
Optionally, the configuration channel pin is a CC pin, and the impedance to ground of the CC pin is greater than 126 kohms.
According to a second aspect of the embodiments of the present disclosure, there is provided an intelligent terminal, including:
the detection module is used for detecting the earth resistance value of a configuration channel pin of a currently connected Universal Serial Bus (USB) data line when a bootstrap loader runs, wherein the USB data line is used for connecting the intelligent terminal with other terminals;
and the determining module is used for determining a machine-refreshing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and entering the machine-refreshing mode to refresh the intelligent terminal, wherein the first preset resistance value is not equal to the second preset resistance value.
Optionally, the determining module includes:
the judgment submodule is used for judging whether the ground resistance value is equal to the first preset resistance value or not and judging whether the ground resistance value is equal to the second preset resistance value or not;
the first determining submodule is used for determining that the flashing mode is a fast start fastboost mode when the ground resistance value is equal to the first preset resistance value;
and the second determining submodule is used for determining that the flashing mode is a Recovery mode when the ground resistance value is equal to the second preset resistance value.
Optionally, the determining module further comprises:
and the starting module is used for stopping detecting the ground resistance value of the configuration channel pin of the USB data line when the ground resistance value is not equal to the first preset resistance value and the ground resistance value is not equal to the second preset resistance value, and starting the intelligent terminal based on the boot loader.
Optionally, the configuration channel pin is a CC pin, and the impedance to ground of the CC pin is greater than 126 kohms.
According to a third aspect implemented by the present disclosure, there is provided a smart terminal, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a boot loader runs, detecting a ground resistance value of a configuration channel pin of a currently connected Universal Serial Bus (USB) data line, wherein the USB data line is used for connecting an intelligent terminal with other terminals;
and determining a machine refreshing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and entering the machine refreshing mode to refresh the intelligent terminal, wherein the first preset resistance value is not equal to the second preset resistance value.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when a boot loader of the intelligent terminal runs, the resistance value to the ground of a configuration channel pin of the USB data line is detected, and then the flashing mode is determined based on the detected resistance value to the ground, the first preset resistance value and the second preset resistance value. That is, the user can not need to enter the flashing mode by pressing the specific combination key of the intelligent terminal, so that the problem that the flashing mode cannot be entered to flash the intelligent terminal when the intelligent terminal does not have an entity volume key in the related art is solved, and convenience is brought to the flashing of the user.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flowchart illustrating a flashing method of an intelligent terminal according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a flashing method of an intelligent terminal according to an exemplary embodiment.
Fig. 3A is a block diagram illustrating an intelligent terminal according to an example embodiment.
FIG. 3B is a block diagram illustrating a determination module in accordance with an exemplary embodiment.
FIG. 3C is a block diagram illustrating a determination module in accordance with an exemplary embodiment.
Fig. 4 is a block diagram illustrating an intelligent terminal according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Before explaining the embodiments of the present disclosure in detail, an application scenario of the embodiments of the present disclosure will be described. At present, the flash mode of an intelligent terminal mainly has two modes, namely a Fastboot mode and a Recovery mode. Generally, when a user wants to flush the intelligent terminal through the Fastboot mode, the user can simultaneously press a power key and a volume down key of the intelligent terminal, and when the boot loader of the intelligent terminal detects that the power key and the volume down key are simultaneously pressed during the running process, the user enters the Fastboot mode. When a user wants to flush the intelligent terminal through the Recovery mode, the user can simultaneously press a power key and an upper volume key of the intelligent terminal, and when the boot loader of the intelligent terminal detects that the power key and the lower volume key are simultaneously pressed during operation, the user enters the Recovery mode. In the related art, the intelligent terminal needs to rely on the entity volume key to enter the flashing mode, and for the intelligent terminal without the entity volume key, the intelligent terminal cannot enter the flashing mode for flashing through the method, so that great inconvenience is brought to flashing of a user.
In order to solve the above problem, the embodiment of the present disclosure provides a flashing method of an intelligent terminal and the intelligent terminal. In the flashing method of the intelligent terminal, the intelligent terminal can determine whether to enter the flashing mode and which flashing mode to enter by detecting the grounding value on the CC pin of the configuration channel of the USB data line and comparing the grounding resistance value with the stored first preset resistance value and the second preset resistance value, so that the problem that the intelligent terminal cannot be flashed in the flashing mode when an entity volume key does not exist in the intelligent terminal in the related technology is solved, and convenience is brought to the use of a user.
Fig. 1 is a flowchart illustrating a flashing method of an intelligent terminal according to an exemplary embodiment, where the method is used in the intelligent terminal, as shown in fig. 1, and includes the following steps:
in step 101, when the boot loader runs, a ground value of a configuration channel pin of a currently connected USB data line is detected, where the USB data line is used to connect the intelligent terminal with another terminal.
In step 102, a flashing mode is determined based on the ground resistance value, the first preset resistance value and the second preset resistance value, and flashing is performed on the intelligent terminal in the flashing mode, wherein the first preset resistance value is not equal to the second preset resistance value.
In the implementation of the disclosure, when a boot loader of the intelligent terminal runs, the ground resistance value of the configuration channel pin of the USB data line is detected, and then the flashing mode is determined based on the detected ground resistance value, the first preset resistance value and the second preset resistance value. That is, the user can not need to enter the flashing mode by pressing the specific combination key of the intelligent terminal, so that the problem that the flashing mode cannot be entered to flash the intelligent terminal when the intelligent terminal does not have an entity volume key in the related art is solved, and convenience is brought to the flashing of the user.
Optionally, the determination of the brushing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value includes:
judging whether the ground resistance value is equal to the first preset resistance value or not and judging whether the ground resistance value is equal to the second preset resistance value or not;
when the ground resistance value is equal to the first preset resistance value, determining that the flashing mode is a fast starting fastboost mode;
and when the ground resistance value is equal to the second preset resistance value, determining that the flashing mode is a Recovery mode.
Optionally, after determining whether the ground resistance is equal to the first resistance and determining whether the ground resistance is equal to the second resistance, the method further includes:
and when the ground resistance value is not equal to the first preset resistance value and the ground resistance value is not equal to the second preset resistance value, stopping detecting the ground resistance value of the configuration channel pin of the USB data line, and starting the intelligent terminal based on the boot loader.
Optionally, the channel pin is configured to be a CC pin, and the impedance to ground of the CC pin is greater than 126 kohms.
All the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present disclosure, and the embodiments of the present disclosure are not described in detail again.
Fig. 2 is a flashing method of an intelligent terminal according to an exemplary embodiment, and the method is used in the intelligent terminal, as shown in fig. 2, and includes the following steps:
in step 201, the intelligent terminal is connected with other terminals through the USB data line.
The USB data line may include two interfaces, one of which may be a class C interface designed based on the class C USB specification, and the other of which may be a class a interface designed based on the class a USB specification. Generally, the class a interface is mainly used for connecting with a computer, and the class C interface is mainly used for connecting with a mobile terminal such as a mobile phone.
When a user wants to flush the intelligent terminal, the intelligent terminal can be shut down, and then the intelligent terminal is connected with other terminals through a special USB data line. The A-type interface of the USB data line is connected with other terminals, and the C-type interface of the USB data line is connected with the intelligent terminal. And after the connection of the intelligent terminal and other terminals is completed, starting the intelligent terminal. Generally, when an intelligent terminal is started, a boot loader needs to be run first to complete various tasks such as initialization of hardware devices and loading and starting of a system, so as to complete the start.
In the process of starting the intelligent terminal, the intelligent terminal can be powered by a battery of the intelligent terminal when a power key is pressed, so that a guide loading program is operated. Of course, the intelligent terminal may also be powered by other intelligent terminals when connected with other terminals through the USB data line, so as to start running the boot loader. Wherein the other terminal can be a terminal such as a computer capable of communicating with the intelligent terminal through a USB data line.
It should be noted that the USB data line is a specially-made USB data line. The ground resistance value of a Configuration Channel (CC) pin in the class-C interface of the USB data line is greater than the ground resistance value of a CC pin in a common USB data line specified in the class-C USB specification. For a self-powered device or a device supporting error recovery, the ground resistance value of the CC pin in the normal USB data line specified in the class C USB specification is at least 126 kohm, and therefore, the ground resistance value of the CC pin in the special USB data line may be greater than 126 kohm. Other hardware settings of the USB data line are designed with reference to the class-C USB specification, and are not described in detail in the embodiment of the present disclosure.
In addition, since there is only one grounding value of the CC pin in each specially-made USB data line, and there are two types of the flashing modes, it is necessary to design USB data lines with different grounding values for different flashing modes in order to determine the flashing mode according to the grounding value. That is, when there are two flush modes, two USB data lines with different ground values need to be designed, and a user can select a corresponding USB data line to flush according to a flush mode that the user wants to enter. For example, assuming that a USB data line with a ground resistance of 200 kohms can enter the fastboost mode and a USB data line with a ground resistance of 220 kohms can enter the Recovery mode, when a user wants to perform a flash operation in the fastboost mode, the USB data line with a ground resistance of 200 kohms needs to be selected for the flash operation, and when the user wants to perform a flash operation in the Recovery mode, the USB data line with a ground resistance of 220 kohms needs to be selected for the flash operation.
In step 202, when the boot loader is running, the resistance value to ground of the configuration channel pin of the currently connected USB data line is detected.
Based on the description in step 201, when the intelligent terminal is connected to another terminal through the USB data line and the boot loader of the intelligent terminal starts to operate, the intelligent terminal may detect the resistance value to ground of the CC pin in the class C interface of the USB data line connected to the intelligent terminal.
Since the boot loader can only execute the operation of determining whether to enter the flash mode and which flash mode to enter only when the boot loader runs to a certain stage, and the intelligent terminal cannot determine when the stage is up in the process of running the boot loader, in order to ensure that the intelligent terminal can determine the flash mode at the stage, the intelligent terminal can detect the ground-to-ground value of the CC pin in the USB data line when the boot loader starts to run, and store the detected ground-to-ground value of the CC pin, so as to determine the flash mode through the ground-to-ground value later.
Certainly, the intelligent terminal can also read the earth resistance value of the CC pin in the USB data line at preset time intervals when the boot loader starts to run, so as to avoid the problem that the earth resistance value of the CC pin changes due to the temporary replacement of the USB data line during the running process of the boot loader by a user, and thus, an accurate earth resistance value of the CC pin can be provided for the subsequent determination of the flashing mode.
In step 203, a flashing mode is determined based on the ground resistance value, the first preset resistance value and the second preset resistance value, and flashing is performed on the intelligent terminal in the flashing mode, wherein the first preset resistance value is not equal to the second preset resistance value.
After the intelligent terminal detects the ground resistance value of the CC pin in the USB data line, when the boot loader runs to the step of determining the flashing mode, the intelligent terminal can determine the flashing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and then the intelligent terminal is flashed in the determined flashing mode.
The intelligent terminal determines the operation mode of the flashing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and the operation mode can be as follows: judging whether the ground resistance value is equal to the first preset resistance value or not and judging whether the ground resistance value is equal to the second preset resistance value or not; when the ground resistance value is equal to the first preset resistance value, determining that the flashing mode is a fastboost mode; and when the ground resistance value is equal to the second preset resistance value, determining that the flashing mode is the Recovery mode. And when the resistance value to the ground is not equal to the first preset resistance value and the resistance value to the ground is not equal to the second preset resistance value, stopping executing the step 202 and the step 203, and starting the intelligent terminal based on the boot loader.
The intelligent terminal can judge whether the ground resistance value is equal to the second preset resistance value or not while judging whether the ground resistance value is equal to the first preset resistance value or not, and therefore the judging speed is improved. Of course, since the first preset resistance value and the second preset resistance value are not equal to each other, if the ground resistance value is equal to one of the first preset resistance value and the second preset resistance value, the ground resistance value is not equal to the other resistance value, that is, the intelligent terminal does not need to judge whether the ground resistance value is equal to the other resistance value. Therefore, the intelligent terminal can firstly judge whether the ground resistance value is equal to the first preset resistance value or not, or firstly judge whether the ground resistance value is equal to the second preset resistance value or not, and when the ground resistance value is not equal to the first preset resistance value or when the ground resistance value is not equal to the second preset resistance value, then judge whether the ground resistance value is equal to the other preset resistance value or not, so that the judgment times of the intelligent terminal are reduced.
It should be noted that the first preset resistance value and the second preset resistance value are resistance values preset and stored in the intelligent terminal, and the first preset resistance value and the second preset resistance value correspond to different brusher modes respectively, for example, when the first preset resistance value corresponds to the Fastboot mode, the second preset resistance value corresponds to the Recovery mode. And the first preset resistance value and the second preset resistance value are set according to the ground resistance value of the CC pin in the specially-made USB data line. For example, the resistance to ground of the CC pin in one specially-made USB data line is 200 kilo-ohms, the resistance to ground of the CC pin in another specially-made USB data line is 220 kilo-ohms, and the intelligent terminal may set the first preset resistance to 200 kilo-ohms and the second preset resistance to 220 kilo-ohms, or of course, the first preset resistance may be set to 220 kilo-ohms and the second preset resistance may be set to 200 kilo-ohms. That is, when the first predetermined resistance value takes different values according to the ground value of the CC pin in the specially made USB data line, the USB data line required for entering the Fastboot mode is correspondingly different.
After the intelligent terminal determines the flashing mode, the intelligent terminal can be flashed based on the determined flashing mode. When the determined flashing mode is the Fastboot mode, the intelligent terminal can receive the system data file sent by other terminals connected with the intelligent terminal through the USB data line and update the system data file to a partition designated by the intelligent terminal, so that flashing is completed. And when the flashing mode is determined to be the Recovery mode, the intelligent terminal can modify the current system data through the system data in the memory of the intelligent terminal, so that flashing is completed.
In the embodiment of the disclosure, the intelligent terminal may determine whether to enter the flashing mode and which flashing mode to enter by detecting the ground resistance value on the CC pin of the configuration channel pin of the USB data line and comparing the ground resistance value with the stored first preset resistance value and the second preset resistance value, that is, the user may not enter the flashing mode by pressing the specific combination key of the intelligent terminal, so that the problem that the flashing mode cannot be entered to flash the intelligent terminal when the intelligent terminal does not have an entity volume key in the related art is solved, and convenience is brought to the user.
Fig. 3A is a block diagram illustrating an intelligent terminal 300 according to an example embodiment. Referring to fig. 3A, the smart terminal 300 includes a detection module 301 and a determination module 302.
The detection module 301 is configured to detect a ground impedance value of a configuration channel pin of a currently connected USB data line of a Universal Serial Bus (USB) when the boot loader runs, where the USB data line is used to connect the intelligent terminal with other terminals;
the determining module 302 is configured to determine a flashing mode based on a ground resistance value, a first preset resistance value and a second preset resistance value, and enter the flashing mode to flash the intelligent terminal, where the first preset resistance value and the second preset resistance value are not equal to each other.
Optionally, referring to fig. 3B, the determining module 302 includes:
the judging submodule 3021 is configured to judge whether the ground resistance value is equal to the first preset resistance value, and judge whether the ground resistance value is equal to the second preset resistance value;
a first determining submodule 3022, configured to determine that the flashing mode is the fast start Fastboot mode when the ground value is equal to the first preset resistance value;
a second determining submodule 3023, configured to determine that the flashing mode is the Recovery mode when the resistance value to ground is equal to the second preset resistance value.
Optionally, referring to fig. 3C, the determining module 302 further includes:
and the starting module 3024 is configured to, when the ground resistance value is not equal to the first preset resistance value and the ground resistance value is not equal to the second preset resistance value, stop the operation of detecting the ground resistance value of the configuration channel pin of the USB data line, and start the intelligent terminal based on the boot loader.
Optionally, the channel pin is configured to be a CC pin, and the impedance to ground of the CC pin is greater than 126 kohms.
In the embodiment of the disclosure, the intelligent terminal may determine whether to enter the flashing mode and which flashing mode to enter by detecting a ground resistance value on the CC pin of the configuration channel pin of the USB data line and comparing the ground resistance value with the stored first preset resistance value and the stored second preset resistance value, that is, the user may not enter the flashing mode by pressing a specific combination key of the intelligent terminal, so as to solve the problem that the flashing mode cannot be entered to flash the intelligent terminal when the intelligent terminal does not have an entity volume key in the related art, and bring convenience to the user.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 4 is a block diagram illustrating an intelligent terminal 400 for the flashing method of the intelligent terminal according to an exemplary embodiment. For example, the smart terminal 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 4, the smart terminal 400 may include one or more of the following components: processing components 402, memory 404, power components 406, multimedia components 408, audio components 410, input/output (I/O) interfaces 412, sensor components 414, and communication components 416.
The processing component 402 generally controls the overall operation of the smart terminal 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the smart terminal 400. Examples of such data include instructions for any application or method operating on the smart terminal 400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power component 406 provides power to the various components of the smart terminal 400. The power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the smart terminal 400.
The multimedia component 408 includes a screen providing an output interface between the intelligent terminal 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. When the smart terminal 400 is in an operation mode, such as a photographing mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, audio component 410 includes a Microphone (MIC) configured to receive external audio signals when apparatus 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the apparatus 400. For example, the sensor component 414 may detect an open/closed state of the smart terminal 400, a relative positioning of components, such as a display and keypad of the smart terminal 400, the sensor component 414 may also detect a change in position of the smart terminal 400 or a component of the smart terminal 400, the presence or absence of user contact with the smart terminal 400, orientation or acceleration/deceleration of the smart terminal 400, and a change in temperature of the smart terminal 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the smart terminal 400 and other devices. The smart terminal 400 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the smart terminal 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the smart terminal 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a flashing method of a smart terminal, the method comprising:
when the boot loader runs, detecting a ground resistance value of a configuration channel pin of a currently connected USB data line, wherein the USB data line is used for connecting the intelligent terminal with other terminals;
and determining a machine refreshing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and entering the machine refreshing mode to refresh the intelligent terminal, wherein the first preset resistance value is not equal to the second preset resistance value.
Optionally, the determining a brushing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value includes:
judging whether the ground resistance value is equal to the first preset resistance value or not, and judging whether the ground resistance value is equal to the second preset resistance value or not;
when the ground resistance value is equal to the first preset resistance value, determining that the flashing mode is a fast start fastboost mode;
and when the ground resistance value is equal to the second preset resistance value, determining that the flashing mode is a Recovery mode.
Optionally, after determining whether the ground resistance value is equal to the first resistance value and determining whether the ground resistance value is equal to the second resistance value, the method further includes:
and when the ground resistance value is not equal to the first preset resistance value and the ground resistance value is not equal to the second preset resistance value, stopping detecting the ground resistance value of the configuration channel pin of the USB data line, and starting the intelligent terminal based on the boot loader.
Optionally, the configuration channel pin is a CC pin, and the impedance to ground of the CC pin is greater than 126 kohms.
In the embodiment of the disclosure, the intelligent terminal may determine whether to enter the flashing mode and which flashing mode to enter by detecting a ground resistance value on the CC pin of the configuration channel pin of the USB data line and comparing the ground resistance value with the stored first preset resistance value and the stored second preset resistance value, that is, the user may not enter the flashing mode by pressing a specific combination key of the intelligent terminal, so as to solve the problem that the flashing mode cannot be entered to flash the intelligent terminal when the intelligent terminal does not have an entity volume key in the related art, and bring convenience to the user.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (9)

1. A flashing method of an intelligent terminal is characterized by comprising the following steps:
when a boot loader runs, detecting a ground resistance value of a configuration channel pin of a currently connected Universal Serial Bus (USB) data line, wherein the USB data line is used for connecting an intelligent terminal with other terminals, the ground resistance value of the configuration channel pin in a class C interface of the USB data line is larger than the ground resistance value of the configuration channel pin in a common USB data line specified in a class C USB specification, and USB data lines with different ground resistance values correspond to different flash modes;
and determining a machine refreshing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and entering the machine refreshing mode to refresh the intelligent terminal, wherein the first preset resistance value is not equal to the second preset resistance value.
2. The method of claim 1, wherein determining a brusher mode based on the ground resistance value, the first predetermined resistance value and the second predetermined resistance value comprises:
judging whether the ground resistance value is equal to the first preset resistance value or not, and judging whether the ground resistance value is equal to the second preset resistance value or not;
when the ground resistance value is equal to the first preset resistance value, determining that the flashing mode is a fast start fastboost mode;
and when the ground resistance value is equal to the second preset resistance value, determining that the flashing mode is a Recovery mode.
3. The method of claim 2, wherein after determining whether the ground resistance is equal to the first predetermined resistance and determining whether the ground resistance is equal to the second predetermined resistance, further comprising:
and when the ground resistance value is not equal to the first preset resistance value and the ground resistance value is not equal to the second preset resistance value, stopping detecting the ground resistance value of the configuration channel pin of the USB data line, and starting the intelligent terminal based on the boot loader.
4. The method of claim 1, wherein the configuration channel pin is a CC pin, and wherein the impedance to ground of the CC pin is greater than 126 kilo-ohms.
5. An intelligent terminal, characterized in that, intelligent terminal includes:
the detection module is used for detecting the earth resistance value of a configuration channel pin of a currently connected Universal Serial Bus (USB) data line when a bootstrap loader runs, wherein the USB data line is used for connecting an intelligent terminal with other terminals, the earth resistance value of the configuration channel pin in a class C interface of the USB data line is larger than the earth resistance value of the configuration channel pin in a common USB data line specified in a class C USB specification, and USB data lines with different earth resistance values correspond to different flash modes;
and the determining module is used for determining a machine-refreshing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and entering the machine-refreshing mode to refresh the intelligent terminal, wherein the first preset resistance value is not equal to the second preset resistance value.
6. The intelligent terminal of claim 5, wherein the determining module comprises:
the judgment submodule is used for judging whether the ground resistance value is equal to the first preset resistance value or not and judging whether the ground resistance value is equal to the second preset resistance value or not;
the first determining submodule is used for determining that the flashing mode is a fast start fastboost mode when the ground resistance value is equal to the first preset resistance value;
and the second determining submodule is used for determining that the flashing mode is a Recovery mode when the ground resistance value is equal to the second preset resistance value.
7. The intelligent terminal of claim 6, wherein the determining module further comprises:
and the starting module is used for stopping detecting the ground resistance value of the configuration channel pin of the USB data line when the ground resistance value is not equal to the first preset resistance value and the ground resistance value is not equal to the second preset resistance value, and starting the intelligent terminal based on the boot loader.
8. The intelligent terminal of claim 5, wherein the configuration channel pin is a CC pin, and the impedance to ground of the CC pin is greater than 126 kilo-ohms.
9. An intelligent terminal, characterized in that, intelligent terminal includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a boot loader runs, detecting a ground resistance value of a configuration channel pin of a currently connected Universal Serial Bus (USB) data line, wherein the USB data line is used for connecting an intelligent terminal with other terminals, the ground resistance value of the configuration channel pin in a class C interface of the USB data line is larger than the ground resistance value of the configuration channel pin in a common USB data line specified in a class C USB specification, and USB data lines with different ground resistance values correspond to different flash modes;
and determining a machine refreshing mode based on the ground resistance value, the first preset resistance value and the second preset resistance value, and entering the machine refreshing mode to refresh the intelligent terminal, wherein the first preset resistance value is not equal to the second preset resistance value.
CN201710040851.2A 2017-01-20 2017-01-20 Intelligent terminal and flashing method thereof Active CN108334357B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710040851.2A CN108334357B (en) 2017-01-20 2017-01-20 Intelligent terminal and flashing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710040851.2A CN108334357B (en) 2017-01-20 2017-01-20 Intelligent terminal and flashing method thereof

Publications (2)

Publication Number Publication Date
CN108334357A CN108334357A (en) 2018-07-27
CN108334357B true CN108334357B (en) 2021-05-04

Family

ID=62921944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710040851.2A Active CN108334357B (en) 2017-01-20 2017-01-20 Intelligent terminal and flashing method thereof

Country Status (1)

Country Link
CN (1) CN108334357B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114138377B (en) * 2022-02-08 2022-07-05 荣耀终端有限公司 Electronic device, control method thereof, and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102483728A (en) * 2009-09-01 2012-05-30 苹果公司 Device-dependent selection between modes for asymmetric serial protocols
CN103365388A (en) * 2012-04-09 2013-10-23 华为终端有限公司 Power supply method of terminal device and terminal device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10045061B2 (en) * 2015-04-30 2018-08-07 Samsung Electronics Co., Ltd. Electronic device, adapter device, and video data processing method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102483728A (en) * 2009-09-01 2012-05-30 苹果公司 Device-dependent selection between modes for asymmetric serial protocols
CN103365388A (en) * 2012-04-09 2013-10-23 华为终端有限公司 Power supply method of terminal device and terminal device

Also Published As

Publication number Publication date
CN108334357A (en) 2018-07-27

Similar Documents

Publication Publication Date Title
US9967811B2 (en) Method and device for displaying WIFI list
US10205332B2 (en) Efficient two way charging method using master and slave devices
EP3133528A1 (en) Method and apparatus for fingerprint identification
EP2991275B1 (en) Making router management application compatible with router firmware
CN107102772B (en) Touch control method and device
EP3116165B1 (en) Method and device for testing a terminal
EP3200116A1 (en) Method and apparatus for acquiring information via a virtual identity module from lost or stolen terminal
EP2940523A1 (en) Method and device for configuring photographing parameters
CN105553963A (en) Control method and device of positioning services
CN109324846B (en) Application display method and device and storage medium
EP3076745A1 (en) Methods and apparatuses for controlling wireless access point
CN110413148B (en) False touch prevention detection method, device, equipment and storage medium
US20170177530A1 (en) Method and apparatus for switching state
CN105068848A (en) System upgrading method and apparatus
CN104378267A (en) Hinting method and device of equipment connecting
CN107562500B (en) Debugging device, method and equipment
CN105183309A (en) Switching control method and device
CN110852163A (en) Binding method and device
CN112148148A (en) Touch operation identification method and device, mobile terminal and storage medium
CN108334357B (en) Intelligent terminal and flashing method thereof
CN108829532B (en) Fingerprint detection method, device and readable storage medium
CN104038255A (en) Device connecting method and device
CN106658674B (en) Mobile terminal and method for outputting conducted power
CN108334328B (en) Intelligent terminal and flashing method thereof
CN107708106B (en) User identification card management method and user identification card management device

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