CN105824669A - Debugging log obtaining method, debugging log obtaining device and terminal equipment - Google Patents

Debugging log obtaining method, debugging log obtaining device and terminal equipment Download PDF

Info

Publication number
CN105824669A
CN105824669A CN201610150781.1A CN201610150781A CN105824669A CN 105824669 A CN105824669 A CN 105824669A CN 201610150781 A CN201610150781 A CN 201610150781A CN 105824669 A CN105824669 A CN 105824669A
Authority
CN
China
Prior art keywords
command line
line parameter
terminal unit
image file
serial ports
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.)
Granted
Application number
CN201610150781.1A
Other languages
Chinese (zh)
Other versions
CN105824669B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610150781.1A priority Critical patent/CN105824669B/en
Publication of CN105824669A publication Critical patent/CN105824669A/en
Application granted granted Critical
Publication of CN105824669B publication Critical patent/CN105824669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a debugging log obtaining method, a debugging log obtaining device and terminal equipment, wherein the method comprises the following steps that in a core loading stage of the terminal equipment, a first command line parameter, corresponding to the application version of the terminal equipment, preset in a boot guide image file is resolved; a serial port is closed according to the first command line parameter; when the debugging log needs to be obtained, the boot guide mirror image file is refreshed; a second command line parameter, corresponding to the debugging version of the terminal equipment, in the refreshed boot guide mirror image file is resolved; the serial port is opened according to the second command line parameter to obtain the debugging log. Therefore the reduction of the boot time of the terminal equipment is reduced, and meanwhile, the debugging log information can be obtained according to application requirements.

Description

Debugging log acquisition methods, device and terminal unit
Technical field
The application relates to computer processing technology field, particularly relates to a kind of debugging log acquisition methods, device and terminal unit.
Background technology
When terminal unit running goes wrong, need by analyzing debugging log solution problem.Such as: the problems such as mobile phone not start.
At present, the Debugging message tending to the registration of linux layer terminal unit needs to carry out crawl log by serial ports, meanwhile, is also required to obtain Debugging message by serial ports for the problem do not started shooting.But, for the formal released version of terminal unit, need to reach to reduce the purpose of available machine time by closing serial ports.Therefore, when terminal unit emerged in operation problem, will be unable to obtain debugging log and carry out problem analysis.
Summary of the invention
One of technical problem that the application is intended to solve in correlation technique the most to a certain extent.
To this end, the first of the application purpose is to propose a kind of debugging log acquisition methods, the method achieve while reducing the terminal unit available machine time, can need to obtain debugging log information according to application.
Second purpose of the application is to propose a kind of debugging log acquisition device.
3rd purpose of the application is to propose a kind of terminal unit.
For reaching above-mentioned purpose, the application first aspect embodiment proposes a kind of debugging log acquisition methods, including: in the kernel loads stage of terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file;Serial ports is closed according to described first command line parameter;When needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing;Open serial ports according to described second command line parameter and obtain described debugging log.
The debugging log acquisition methods of the embodiment of the present application, by the kernel loads stage at terminal unit, resolves and is preset in the first command line parameter corresponding with terminal unit application version in start boot image file;Serial ports is closed according to described first command line parameter;When needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing;Open serial ports according to described second command line parameter and obtain described debugging log.Hereby it is achieved that while reducing the terminal unit available machine time, can need to obtain debugging log information according to application.
For reaching above-mentioned purpose, the application second aspect embodiment proposes a kind of debugging log acquisition device, including: the first parsing module, in the kernel loads stage of terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file;First processing module, for closing serial ports according to described first command line parameter;Refresh module, for when needs obtain debugging log, refreshing described start boot image file;Second parsing module, the second command line parameter corresponding with terminal unit debugging version in the start boot image file after resolving refreshing;Second processing module, obtains described debugging log for opening serial ports according to described second command line parameter.
The debugging log acquisition device of the embodiment of the present application, by the kernel loads stage at terminal unit, resolves and is preset in the first command line parameter corresponding with terminal unit application version in start boot image file;Serial ports is closed according to described first command line parameter;When needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing;Open serial ports according to described second command line parameter and obtain described debugging log.Hereby it is achieved that while reducing the terminal unit available machine time, can need to obtain debugging log information according to application.
For reaching above-mentioned purpose, the application third aspect embodiment proposes a kind of terminal unit, including following one or more assemblies: processor, memorizer, power circuit, multimedia groupware, audio-frequency assembly, the interface of input/output (I/O), sensor cluster, and communications component;Wherein, described circuit board is placed in the interior volume that described housing surrounds, described processor and described memorizer and is arranged on described circuit board;Described power circuit, powers for each circuit or the device for described mobile terminal;Described memorizer is used for storing executable program code;Described processor runs the program corresponding with described executable program code by reading the executable program code of storage in described memorizer, for performing following steps:
In the kernel loads stage of terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file;
Serial ports is closed according to described first command line parameter;
When needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing;
Open serial ports according to described second command line parameter and obtain described debugging log.
The terminal unit of the embodiment of the present application, by the kernel loads stage at terminal unit, resolves and is preset in the first command line parameter corresponding with terminal unit application version in start boot image file;Serial ports is closed according to described first command line parameter;When needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing;Open serial ports according to described second command line parameter and obtain described debugging log.Hereby it is achieved that while reducing the terminal unit available machine time, can need to obtain debugging log information according to application.
Accompanying drawing explanation
The present invention above-mentioned and/or that add aspect and advantage will be apparent from easy to understand, wherein from the following description of the accompanying drawings of embodiments:
Fig. 1 is the flow chart of the debugging log acquisition methods of one embodiment of the application;
Fig. 2 is the flow chart of the debugging log acquisition methods of another embodiment of the application;
Fig. 3 is the FB(flow block) of debugging log acquisition methods;
Fig. 4 is the structural representation of the debugging log acquisition device of one embodiment of the application;
Fig. 5 is the structural representation of the debugging log acquisition device of another embodiment of the application;
Fig. 6 is the structural representation of the terminal unit of one embodiment of the application.
Detailed description of the invention
Embodiments herein is described below in detail, and the example of described embodiment is shown in the drawings, and the most same or similar label represents same or similar element or has the element of same or like function.The embodiment described below with reference to accompanying drawing is exemplary, it is intended to be used for explaining the application, and it is not intended that restriction to the application.
Below with reference to the accompanying drawings debugging log acquisition methods, device and the terminal unit of the embodiment of the present application are described.
Fig. 1 is the flow chart of the debugging log acquisition methods of one embodiment of the application.
As it is shown in figure 1, this debugging log acquisition methods includes:
Step 101, in the kernel loads stage of terminal unit, resolves and is preset in the first command line parameter corresponding with terminal unit application version in start boot image file.
Step 102, closes serial ports according to described first command line parameter.
Specifically, the debugging log acquisition methods that the present embodiment provides is configured with in the terminal unit of operating system execution.It should be noted that the type of terminal unit is a lot, can select, such as according to application needs: mobile phone, panel computer, intelligent watch etc..
For terminal unit produced problem in running, it is all to be obtained after debugging log by serial ports, debugging log is analyzed to solution problem.But, after serial ports is opened, although debugging log can be obtained, but considerably increase the available machine time.Therefore, in order to reduce the available machine time of terminal unit, in the released version of terminal unit, serial ports is closed.
But, once there is operation problem in terminal unit, owing to serial ports is closed, also cannot obtain debugging log and be analyzed.If open serial ports by the way of kernel file obtain debugging log by refreshing, whole kernel processes process can committed memory space always.Such as:
Terminal unit for not starting shooting passes through heavily brush kernel mirror image, and internal memory can be caused occupied, it is impossible to accurately problem analysis phenomenon.Thus, the debugging log acquisition methods that the present embodiment provides is by setting command line parameter in the start boot image file in start vectoring phase (before the kernel stage), with debugging version and the released version of distinguishing terminal equipment.
And then utilize command line parameter will not disappear therewith when start vectoring phase (before kernel) is delivered to the kernel stage, but start boot image file can be after system runs kernel, feature from internal memory disappearance (being i.e. not take up internal memory), kernel controls opening and closing of serial ports according to this value, to reaching to reduce the target of terminal unit available machine time crawl log information the most freely.Specifically include following steps:
In order to close serial ports when terminal unit is properly functioning, and open serial ports when operation goes wrong, when compiling start boot image file, the command line parameter corresponding with compiling option value be set, such as:
When compiling option value and being terminal unit application version, arranging first command line parameter corresponding with terminal unit application version, wherein, the first command line parameter is used for indicating closedown serial ports.
When compiling option value and being terminal unit compiled version, arranging second command line parameter corresponding with described terminal unit compiled version, wherein, the second command line parameter opens serial ports for instruction.
For the application version of terminal unit, when entering the kernel loads stage after the vectoring phase of starting shooting terminates, in start boot image file, first command line parameter corresponding with terminal unit application version is delivered to the kernel stage.
And then, kernel resolves this first command line parameter, and closes serial ports according to this first command line parameter, thus stops debugging log information to be exported by serial ports, has saved the available machine time.
Step 103, when needs obtain debugging log, refreshes described start boot image file, resolves the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing.
Step 104, opens serial ports according to described second command line parameter and obtains described debugging log.
Specifically, when the application version of terminal unit goes wrong in running, need to obtain debugging log and problem is analyzed.Now, refresh start boot image file, i.e. obtain and be set in advance in the second command line parameter for opening serial ports corresponding with debugging version in start boot image file.
Start boot image file corresponding with terminal unit debugging version after refreshing for terminal unit, when entering the kernel loads stage after the vectoring phase of starting shooting terminates, the second command line parameter corresponding with terminal unit debugging version in start boot image file is delivered to the kernel stage.
And then, kernel resolves this second command line parameter, and opens serial ports according to this second command line parameter, so that debugging log information is exported by serial ports, obtains debugging log information, to be analyzed produced problem.
The debugging log acquisition methods of the embodiment of the present application, the kernel loads stage at terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file, serial ports is closed according to described first command line parameter, when needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing, open serial ports according to described second command line parameter and obtain described debugging log.Hereby it is achieved that while reducing the terminal unit available machine time, can need to obtain debugging log information according to application.
Fig. 2 is the flow chart of the debugging log acquisition methods of another embodiment of the application.
As in figure 2 it is shown, this debugging log acquisition methods includes:
Step 201, during compiling described start boot image file, arranges the command line parameter corresponding with compiling option value.
Specifically, in order to close serial ports when terminal unit is properly functioning, and open serial ports when operation goes wrong, when compiling start boot image file, the command line parameter corresponding with compiling option value be set, such as:
When compiling option value and being terminal unit application version, arranging first command line parameter corresponding with terminal unit application version, wherein, the first command line parameter is used for indicating closedown serial ports.
When compiling option value and being terminal unit compiled version, arranging second command line parameter corresponding with described terminal unit compiled version, wherein, the second command line parameter opens serial ports for instruction.
Step 202, in the kernel loads stage of terminal unit, resolves and is preset in the first command line parameter corresponding with terminal unit application version in start boot image file.
Step 203, is initialized as the first state according to described first command line parameter by global variable value;
Step 204, when described serial port drive, calls first power function corresponding with described first state and closes described serial ports.
Specifically, for the application version of terminal unit, when entering the kernel loads stage after the vectoring phase of starting shooting terminates, in start boot image file, first command line parameter corresponding with terminal unit application version is delivered to the kernel stage.Kernel resolves this first command line parameter, and according to this first command line parameter, global variable value is initialized as the first state.
And then, when serial ports is driven, calls default first power function corresponding with this first state and close serial ports, thus stop debugging log information to be exported by serial ports, saved the available machine time.
Step 205, when needs obtain debugging log, refreshes described start boot image file, resolves the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing.
Step 206, is initialized as the second state according to described second command line parameter by global variable value.
Step 207, when described serial port drive, calls second power function corresponding with described second state and opens described serial ports, obtain described debugging log.
When the application version of terminal unit goes wrong in running, need to obtain debugging log and problem is analyzed.Now, refresh start boot image file, i.e. obtain and be set in advance in the second command line parameter for opening serial ports corresponding with debugging version in start boot image file.
Start boot image file corresponding with terminal unit debugging version after refreshing for terminal unit, when entering the kernel loads stage after the vectoring phase of starting shooting terminates, the second command line parameter corresponding with terminal unit debugging version in start boot image file is delivered to the kernel stage.Kernel resolves this second command line parameter, according to described second command line parameter, global variable value is initialized as the second state.
And then, when serial ports is driven, calls default second power function corresponding with this second state and open serial ports, so that debugging log information is exported by serial ports, obtain debugging log information, so that produced problem to be analyzed.
It should be noted that, the first command line parameter, the second command line parameter, the first state of global variable value and the second state that relate in above-described embodiment and the first power function and the second power function, can be configured according to reality application needs, this is not restricted by the present embodiment.In order to more clearly describe above-mentioned implementation process, by embodiment illustrated in fig. 3, above-mentioned concept is illustrated.
Fig. 3 is the FB(flow block) of debugging log acquisition methods, see Fig. 3, the first command line parameter in the present embodiment is disable.uart=1, the second command line parameter disable.uart=0, the first state of global variable enable_uart value are 1, and the second state is 1.The concrete steps obtaining debugging log include:
Step 1: in start boot image file, when compiling option value and being application version release, the first command line parameter arranging correspondence is disable.uart=1 (title is any), when compiling option value for debugging version debug, the second command line parameter arranging correspondence is disable.uart=0.
Step 2: kernel obtained the first command line parameter disable.uart=1 before serial ports initializes, initializing a global variable enable_uart according to the first command line parameter is 1.
Step 3: be 1 to call the first power function serial ports is closed according to enable_uart in serial port drive.
Step 4: when needing to obtain debugging log, by heavily brushing the second command line parameter disable.uart=0 in start boot image file.Kernel obtained the second command line parameter disable.uart=0 before serial ports initializes, and initializing a global variable enable_uart according to the second command line parameter is 1.
Step 5: be 0 to call the second power function serial ports is opened according to enable_uart in serial port drive, required daily record can be obtained by serial ports.
The debugging log acquisition methods of the embodiment of the present application, during compiling described start boot image file, the command line parameter corresponding with compiling option value is set, the kernel loads stage at terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file, serial ports is closed according to described first command line parameter, when needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing, open serial ports according to described second command line parameter and obtain described debugging log.Hereby it is achieved that while reducing the terminal unit available machine time, can need to obtain debugging log information according to application.
In order to realize above-described embodiment, the application also proposes a kind of debugging log acquisition device.
Fig. 4 is the structural representation of the debugging log acquisition device of one embodiment of the application.
As shown in Figure 4, this debugging log acquisition device includes:
First parsing module 11, in the kernel loads stage of terminal unit, resolves and is preset in the first command line parameter corresponding with terminal unit application version in start boot image file;
First processing module 12, for closing serial ports according to described first command line parameter;
Refresh module 13, for when needs obtain debugging log, refreshing described start boot image file;
Second parsing module 14, the second command line parameter corresponding with terminal unit debugging version in the start boot image file after resolving refreshing;
Second processing module 15, obtains described debugging log for opening serial ports according to described second command line parameter.
It should be noted that the aforementioned explanation to debugging journal obtaining method embodiment is also applied for the debugging log acquisition device of this embodiment, here is omitted.
The debugging log acquisition device of the embodiment of the present application, the kernel loads stage at terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file, serial ports is closed according to described first command line parameter, when needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing, open serial ports according to described second command line parameter and obtain described debugging log.Hereby it is achieved that while reducing the terminal unit available machine time, can need to obtain debugging log information according to application.
Fig. 5 is the structural representation of the debugging log acquisition device of another embodiment of the application.
As it is shown in figure 5, based on embodiment illustrated in fig. 4, described device also includes:
Module 16 is set, for, during compiling described start boot image file, arranging the command line parameter corresponding with compiling option value.
Specifically, described arrange module 16 for:
When described compiling option value is terminal unit application version, first command line parameter corresponding with described terminal unit application version is set;
When described compiling option value is terminal unit compiled version, second command line parameter corresponding with described terminal unit compiled version is set.
Further, in one embodiment, described first processing module 12, including:
First initialization unit 121, for being initialized as the first state according to described first command line parameter by global variable value;
First call unit 122, for when described serial port drive, calls first power function corresponding with described first state and closes described serial ports.
Further, in one embodiment, described second processing module 15, including:
Second initialization unit 151, for being initialized as the second state according to described second command line parameter by global variable value;
Second call unit 152, for when described serial port drive, calls second power function corresponding with described second state and opens described serial ports, obtain described debugging log.
It should be noted that the aforementioned explanation to debugging journal obtaining method embodiment is also applied for the debugging log acquisition device of this embodiment, here is omitted.
The debugging log acquisition device of the embodiment of the present application, during compiling described start boot image file, the command line parameter corresponding with compiling option value is set, the kernel loads stage at terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file, serial ports is closed according to described first command line parameter, when needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing, open serial ports according to described second command line parameter and obtain described debugging log.Hereby it is achieved that while reducing the terminal unit available machine time, can need to obtain debugging log information according to application.
In order to realize above-described embodiment, the application also proposes a kind of debugging log acquisition device.
Fig. 6 is the structural representation of the terminal unit of one embodiment of the application.Such as, terminal unit 1000 can be mobile phone etc..
Seeing Fig. 6, terminal unit 1000 can include following one or more assembly: processor 1001, memorizer 1002, power circuit 1003, multimedia groupware 1004, audio-frequency assembly 1005, the interface 1006 of input/output (I/O), sensor cluster 1007, and communications component 1008.
Described power circuit 1003, powers for each circuit or the device for described mobile terminal;Described memorizer 1002 is used for storing executable program code;Described processor 1001 runs the program corresponding with described executable program code by reading the executable program code of storage in described memorizer 1002, for performing following steps:
In the kernel loads stage of terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file;
Serial ports is closed according to described first command line parameter;
When needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing;
Open serial ports according to described second command line parameter and obtain described debugging log.
It should be noted that the aforementioned explanation to debugging journal obtaining method embodiment is also applied for the terminal unit of this embodiment, it realizes principle and is similar to, and here is omitted.
The terminal unit of the embodiment of the present application, the kernel loads stage at terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file, serial ports is closed according to described first command line parameter, when needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing, open serial ports according to described second command line parameter and obtain described debugging log.Hereby it is achieved that while reducing the terminal unit available machine time, can need to obtain debugging log information according to application.
In the description of this specification, the description of reference term " embodiment ", " some embodiments ", " example ", " concrete example " or " some examples " etc. means that the specific features, structure, material or the feature that combine this embodiment or example description are contained at least one embodiment or the example of the application.In this manual, the schematic representation of above-mentioned term is necessarily directed to identical embodiment or example.And, the specific features of description, structure, material or feature can be to combine in one or more embodiments in office or example in an appropriate manner.Additionally, in the case of the most conflicting, the feature of the different embodiments described in this specification or example and different embodiment or example can be combined and combine by those skilled in the art.
Additionally, term " first ", " second " are only used for describing purpose, and it is not intended that instruction or hint relative importance or the implicit quantity indicating indicated technical characteristic.Thus, define " first ", the feature of " second " can express or implicitly include at least one this feature.In the description of the present application, " multiple " are meant that at least two, such as two, three etc., unless otherwise expressly limited specifically.
In flow chart or at this, any process described otherwise above or method description are construed as, represent and include one or more module of code, fragment or part for the executable instruction of the step that realizes specific logical function or process, and the scope of the preferred implementation of the application includes other realization, wherein can not be by order that is shown or that discuss, including according to involved function by basic mode simultaneously or in the opposite order, performing function, this should be understood by embodiments herein person of ordinary skill in the field.
Represent in flow charts or the logic described otherwise above at this and/or step, such as, it is considered the sequencing list of executable instruction for realizing logic function, may be embodied in any computer-readable medium, use for instruction execution system, device or equipment (system such as computer based system, including processor or other can be from instruction execution system, device or equipment instruction fetch the system performing instruction), or combine these instruction execution systems, device or equipment and use.For the purpose of this specification, " computer-readable medium " can be any can to comprise, store, communicate, propagate or transmission procedure for instruction execution system, device or equipment or combines these instruction execution systems, device or equipment and the device that uses.The more specifically example (non-exhaustive list) of computer-readable medium includes following: have the electrical connection section (electronic installation) of one or more wiring, portable computer diskette box (magnetic device), random access memory (RAM), read only memory (ROM), erasable edit read only memory (EPROM or flash memory), fiber device, and portable optic disk read only memory (CDROM).Additionally, computer-readable medium can even is that paper or other the suitable media that can print described program thereon, because can be such as by paper or other media be carried out optical scanning, then carry out editing, interpreting or be processed to electronically obtain described program with other suitable methods if desired, be then stored in computer storage.
Should be appreciated that each several part of the application can realize by hardware, software, firmware or combinations thereof.In the above-described embodiment, multiple steps or method can realize with software or the firmware that storage in memory and is performed by suitable instruction execution system.Such as, if realized with hardware, as in another embodiment, can realize by any one in following technology well known in the art or their combination: there is the discrete logic of logic gates for data signal realizes logic function, there is the special IC of suitable combination logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc..

Claims (11)

1. a debugging log acquisition methods, it is characterised in that comprise the following steps:
In the kernel loads stage of terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file;
Serial ports is closed according to described first command line parameter;
When needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing;
Open serial ports according to described second command line parameter and obtain described debugging log.
2. the method for claim 1, it is characterised in that described before the kernel loads stage of terminal unit, also includes:
During compiling described start boot image file, the command line parameter corresponding with compiling option value is set.
3. method as claimed in claim 2, it is characterised in that the command line parameter that described setting is corresponding with compiling option value, including:
When described compiling option value is terminal unit application version, first command line parameter corresponding with described terminal unit application version is set;
When described compiling option value is terminal unit compiled version, second command line parameter corresponding with described terminal unit compiled version is set.
4. the method for claim 1, it is characterised in that described according to described first command line parameter close serial ports, including:
According to described first command line parameter, global variable value is initialized as the first state;
When described serial port drive, call first power function corresponding with described first state and close described serial ports.
5. the method for claim 1, it is characterised in that described according to described second command line parameter open serial ports obtain described debugging log, including:
According to described second command line parameter, global variable value is initialized as the second state;
When described serial port drive, call second power function corresponding with described second state and open described serial ports, obtain described debugging log.
6. a debugging log acquisition device, it is characterised in that including:
First parsing module, in the kernel loads stage of terminal unit, resolves and is preset in the first command line parameter corresponding with terminal unit application version in start boot image file;
First processing module, for closing serial ports according to described first command line parameter;
Refresh module, for when needs obtain debugging log, refreshing described start boot image file;
Second parsing module, the second command line parameter corresponding with terminal unit debugging version in the start boot image file after resolving refreshing;
Second processing module, obtains described debugging log for opening serial ports according to described second command line parameter.
7. device as claimed in claim 6, it is characterised in that also include:
Module is set, for, during compiling described start boot image file, arranging the command line parameter corresponding with compiling option value.
8. device as claimed in claim 7, it is characterised in that described arrange module for:
When described compiling option value is terminal unit application version, first command line parameter corresponding with described terminal unit application version is set;
When described compiling option value is terminal unit compiled version, second command line parameter corresponding with described terminal unit compiled version is set.
9. device as claimed in claim 6, it is characterised in that described first processing module, including:
First initialization unit, for being initialized as the first state according to described first command line parameter by global variable value;
First call unit, for when described serial port drive, calls first power function corresponding with described first state and closes described serial ports.
10. device as claimed in claim 6, it is characterised in that described second processing module, including:
Second initialization unit, for being initialized as the second state according to described second command line parameter by global variable value;
Second call unit, for when described serial port drive, calls second power function corresponding with described second state and opens described serial ports, obtain described debugging log.
11. 1 kinds of terminal units, it is characterised in that include following one or more assembly: processor, memorizer, power circuit, multimedia groupware, audio-frequency assembly, the interface of input/output (I/O), sensor cluster, and communications component;Wherein, described circuit board is placed in the interior volume that described housing surrounds, described processor and described memorizer and is arranged on described circuit board;Described power circuit, powers for each circuit or the device for described mobile terminal;Described memorizer is used for storing executable program code;Described processor runs the program corresponding with described executable program code by reading the executable program code of storage in described memorizer, for performing following steps:
In the kernel loads stage of terminal unit, resolve and be preset in the first command line parameter corresponding with terminal unit application version in start boot image file;
Serial ports is closed according to described first command line parameter;
When needs obtain debugging log, refresh described start boot image file, resolve the second command line parameter corresponding with terminal unit debugging version in the start boot image file after refreshing;
Open serial ports according to described second command line parameter and obtain described debugging log.
CN201610150781.1A 2016-03-16 2016-03-16 Debugging log acquisition methods, device and terminal device Active CN105824669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610150781.1A CN105824669B (en) 2016-03-16 2016-03-16 Debugging log acquisition methods, device and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610150781.1A CN105824669B (en) 2016-03-16 2016-03-16 Debugging log acquisition methods, device and terminal device

Publications (2)

Publication Number Publication Date
CN105824669A true CN105824669A (en) 2016-08-03
CN105824669B CN105824669B (en) 2018-02-06

Family

ID=56523860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610150781.1A Active CN105824669B (en) 2016-03-16 2016-03-16 Debugging log acquisition methods, device and terminal device

Country Status (1)

Country Link
CN (1) CN105824669B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704380A (en) * 2017-07-26 2018-02-16 深圳天珑无线科技有限公司 Mobile terminal adjustment method, device and storage medium
CN109147821A (en) * 2018-08-20 2019-01-04 Oppo广东移动通信有限公司 Intelligent terminal audio-frequency detection, electronic device and computer readable storage medium
CN109274758A (en) * 2018-10-17 2019-01-25 北京潘达互娱科技有限公司 A kind of processing method and calculating equipment of request message
CN110515853A (en) * 2019-08-30 2019-11-29 苏州浪潮智能科技有限公司 A kind of dual serial ports Debug adjustment method and equipment
CN111414299A (en) * 2020-03-26 2020-07-14 深圳忆联信息***有限公司 SSD extended information obtaining method and device based on hdparm
CN111897569A (en) * 2020-07-13 2020-11-06 深圳市亿道数码技术有限公司 Method and system for processing mobile terminal configuration device based on MTK platform
CN112000379A (en) * 2020-08-06 2020-11-27 北京浪潮数据技术有限公司 BIOS setup interface access control equipment, method and related components
CN113986806A (en) * 2021-11-03 2022-01-28 厦门市美亚柏科信息股份有限公司 GOIP high-speed evidence obtaining method and system based on serial port and network port and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110239049A1 (en) * 2010-03-25 2011-09-29 Dell Products, Lp Computer Data Protection Lock
CN104461953A (en) * 2014-12-31 2015-03-25 厦门雅迅网络股份有限公司 Method and system for carrying out linux log management through virtual serial port

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110239049A1 (en) * 2010-03-25 2011-09-29 Dell Products, Lp Computer Data Protection Lock
CN104461953A (en) * 2014-12-31 2015-03-25 厦门雅迅网络股份有限公司 Method and system for carrying out linux log management through virtual serial port

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704380A (en) * 2017-07-26 2018-02-16 深圳天珑无线科技有限公司 Mobile terminal adjustment method, device and storage medium
CN109147821A (en) * 2018-08-20 2019-01-04 Oppo广东移动通信有限公司 Intelligent terminal audio-frequency detection, electronic device and computer readable storage medium
CN109274758A (en) * 2018-10-17 2019-01-25 北京潘达互娱科技有限公司 A kind of processing method and calculating equipment of request message
CN109274758B (en) * 2018-10-17 2021-05-18 北京龙之心科技有限公司 Request message processing method and computing device
CN110515853A (en) * 2019-08-30 2019-11-29 苏州浪潮智能科技有限公司 A kind of dual serial ports Debug adjustment method and equipment
CN111414299A (en) * 2020-03-26 2020-07-14 深圳忆联信息***有限公司 SSD extended information obtaining method and device based on hdparm
CN111414299B (en) * 2020-03-26 2023-06-06 深圳忆联信息***有限公司 SSD (solid State disk) extension information acquisition method and device based on hdchart
CN111897569A (en) * 2020-07-13 2020-11-06 深圳市亿道数码技术有限公司 Method and system for processing mobile terminal configuration device based on MTK platform
CN111897569B (en) * 2020-07-13 2024-04-16 深圳市亿道数码技术有限公司 Processing method and system for mobile terminal configuration device based on MTK platform
CN112000379A (en) * 2020-08-06 2020-11-27 北京浪潮数据技术有限公司 BIOS setup interface access control equipment, method and related components
CN113986806A (en) * 2021-11-03 2022-01-28 厦门市美亚柏科信息股份有限公司 GOIP high-speed evidence obtaining method and system based on serial port and network port and storage medium
CN113986806B (en) * 2021-11-03 2022-08-02 厦门市美亚柏科信息股份有限公司 GOIP high-speed evidence obtaining method and system based on serial port and network port and storage medium

Also Published As

Publication number Publication date
CN105824669B (en) 2018-02-06

Similar Documents

Publication Publication Date Title
CN105824669A (en) Debugging log obtaining method, debugging log obtaining device and terminal equipment
KR102059705B1 (en) Adaptive portable libraries
CN102741812B (en) Execution of dynamic languages via metadata extraction
US10846101B2 (en) Method and system for starting up application
CN106325970A (en) Compiling method and compiling system
CN104407886B (en) It is a kind of to guide the embedded software solidification separated with target, loading method
WO2008038265A4 (en) Method and system for isolating software components
CN101986286B (en) Embedded system and managing method thereof
CN109966742B (en) Method and device for acquiring rendering performance data in game running
CN109815141B (en) Test method and device
KR20060102479A (en) Method and apparatus for executing unit tests in application host environment
CN110413230A (en) A kind of embedded system construction method and storage medium
CN108762833A (en) Application in Android system starts method and apparatus
CN112667315A (en) Game engine editor starting method and device, electronic equipment and storage medium
CN100363906C (en) Method for testing software unit
CN102355592B (en) A kind of method and system detecting camera of mobile terminal
CN104239441A (en) Web page loading control method and device
CN115904393B (en) Condition compiling realization method, device, medium and equipment
CN115185534A (en) Data desensitization method and device, readable storage medium and electronic equipment
CN104123165B (en) Application program unloading method and device and mobile terminal
CN105824668A (en) Process control method, process control device and terminal equipment
CN105335199A (en) Desktop wallpaper setting method and device and terminal equipment
CN106598593A (en) Method for starting WinCE by utilizing U disk of Uboot
CN111399926A (en) Method and device for downloading starting program
CN105095072A (en) Application testing method and device and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523859 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.