CN107977313B - Debugging interface calling method and device - Google Patents

Debugging interface calling method and device Download PDF

Info

Publication number
CN107977313B
CN107977313B CN201711213159.1A CN201711213159A CN107977313B CN 107977313 B CN107977313 B CN 107977313B CN 201711213159 A CN201711213159 A CN 201711213159A CN 107977313 B CN107977313 B CN 107977313B
Authority
CN
China
Prior art keywords
debugging interface
interface switching
android
debugging
request file
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
CN201711213159.1A
Other languages
Chinese (zh)
Other versions
CN107977313A (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.)
Qisda Suzhou Co Ltd
Original Assignee
Qisda Suzhou 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 Qisda Suzhou Co Ltd filed Critical Qisda Suzhou Co Ltd
Priority to CN201711213159.1A priority Critical patent/CN107977313B/en
Publication of CN107977313A publication Critical patent/CN107977313A/en
Application granted granted Critical
Publication of CN107977313B publication Critical patent/CN107977313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3656Software debugging using additional hardware using a specific debug interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Abstract

The invention discloses a debugging interface calling method and device, and belongs to the technical field of communication. The method comprises the following steps: acquiring a debugging interface switching request file in an external storage device connected with an android device; verifying the debugging interface switching request file; if the verification is successful, setting a debugging interface switching identifier according to the debugging interface switching request file; and switching the debugging interface according to the debugging interface switching identifier. The embodiment of the invention can realize convenient and fast switching out of the debugging interface of the android device, thereby solving the problem that the android device without graphical interface operation can not switch the debugging interface in the prior art and solving the problem that certain android devices can not operate the android device by using an android debugging tool due to the default non-starting of the debugging interface after the release of the android formal version in the prior art.

Description

Debugging interface calling method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for invoking a debug interface.
Background
In the android development stage or after the android formal version is released, an android debugging tool is needed for debugging the android device. By using the android debugging tool, many operations such as installing or uninstalling an application program, executing an operation command on a device, performing file transfer, and the like can be conveniently performed, but a debugging interface needs to be switched first when the android debugging tool is used.
At present, debugging interfaces are usually switched through graphical interface operation of android equipment, and for the android equipment which has no way to directly obtain graphical interface operation, such as vehicle-mounted equipment provided with an android system, the android debugging tool cannot be used due to the fact that the debugging interfaces cannot be switched. In addition, due to the security requirement of the android device, some android devices do not default to start a debugging interface after the android formal version is released, but the situation that the android device cannot be operated by using an android debugging tool is caused.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for invoking a debug interface, so as to implement switching of a debug interface of an android device, thereby facilitating a user to operate the android device by using an android debug tool. The technical scheme is as follows:
in a first aspect, a method for invoking a debug interface is provided, where the method is used for an android device, and the method includes:
acquiring a debugging interface switching request file in an external storage device connected with the android device;
verifying the debugging interface switching request file;
if the verification is successful, setting a debugging interface switching identifier according to the debugging interface switching request file; and
and switching the debugging interface according to the debugging interface switching identifier.
With reference to the first aspect, in a first possible implementation manner, before the step of obtaining a debug interface switch request file in an external storage device connected to the android device, the method further includes:
starting the android device; and
detecting and identifying the external storage device inserted into the android device.
With reference to the first aspect, in a second possible implementation manner, the verifying the debug interface switch request file includes:
reading the debugging interface switching request file by a first daemon process of the android device; and
and the first daemon process judges whether the debugging interface switching request file meets a preset condition, and if so, the verification is successful.
With reference to the first aspect, in a third possible implementation manner, the setting a debug interface switching identifier according to the debug interface switching request file includes:
determining attribute setting information corresponding to the debugging interface switching request file; and
and according to the attribute setting information, the first daemon process sets the debugging interface switching identifier through the attribute service of the android device.
With reference to the first aspect, in a fourth possible implementation manner, the switching the debug interface according to the debug interface switching identifier includes:
reading the debugging interface switching identifier by a second daemon process of the android device; and
and according to the debugging interface switching identifier, the second daemon process switches the debugging interface.
In a second aspect, a device for invoking a debug interface is provided, which is applied to an android device, and the device includes:
the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a debugging interface switching request file in an external storage device connected with the android device;
the verification module is connected with the acquisition module and used for verifying the debugging interface switching request file;
the setting module is connected with the verification module and used for setting a debugging interface switching identifier according to the debugging interface switching request file if the debugging interface switching request file is successfully verified; and
and the switching module is connected with the setting module and used for switching the debugging interface according to the debugging interface switching identifier.
With reference to the second aspect, in a first possible implementation manner, the apparatus further includes a starting module and a detection and identification module;
the starting module is used for starting the android device; and
the detection and identification module is respectively connected with the starting module and the acquisition module and is used for detecting and identifying the external storage device inserted into the android device.
With reference to the second aspect, in a second possible implementation manner, the verification module includes:
the first reading submodule is used for reading the debugging interface switching request file through a first daemon process of the android device; and
and the verification submodule is used for judging whether the debugging interface switching request file meets the preset condition or not through the first daemon process, and if so, the verification is successful.
With reference to the second aspect, in a third possible implementation manner, the setting module includes:
the determining submodule is used for determining attribute setting information corresponding to the debugging interface switching request file; and
and the setting submodule is used for setting the debugging interface switching identifier through the attribute service of the android device by the first daemon process according to the attribute setting information.
With reference to the second aspect, in a fourth possible implementation manner, the switching module includes:
the second reading sub-module is used for reading the debugging interface switching identifier through a second daemon process of the android device; and
and the switching submodule is used for switching the debugging interface through the second daemon process according to the debugging interface switching identifier.
The embodiment of the invention provides a debugging interface calling method and device, which are applied to android equipment and comprise the following steps: acquiring a debugging interface switching request file in an external storage device connected with an android device; verifying the debugging interface switching request file; if the verification is successful, setting a debugging interface switching identifier according to the debugging interface switching request file; and switching the debugging interface according to the debugging interface switching identifier. The technical scheme provided by the invention only needs to connect the external storage device with the android device no matter whether the android device can directly provide graphical interface operation, by acquiring a debugging interface switching request file in an external storage device, verifying the debugging interface switching request file through an android device, and setting a debugging interface switching identifier after the verification is successful, and the debugging interface is switched according to the debugging interface switching identifier, thereby realizing the purpose of conveniently and rapidly switching out the debugging interface of the android device, thereby facilitating the operation of the android device by the user through a debugging tool, solving the problem that the android device without graphical interface operation in the prior art can not switch the debugging interface, the method and the device solve the problem that in the prior art, certain android devices cannot operate the android devices by using android debugging tools due to the fact that debugging interfaces are not opened by default after the android formal versions are released.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for invoking a debug interface according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for invoking a debug interface according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a calling device of a debug interface according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a method for calling a debugging interface, which is used for rapidly and conveniently enumerating the debugging interface for debugging an android device when the android device needs to be switched from a non-debugging state to a debugging state, wherein in the non-debugging state, the debugging interface of the android device is closed (namely functions are not activated and unavailable). Specifically, the method can be applied to the scene that the android debugging tool cannot be used due to the fact that the debugging interface cannot be switched by the android device without graphical interface operation, and in addition, the method can also be applied to the scene that the android debugging tool cannot be used due to the fact that the debugging interface cannot be opened by default after the android formal version of some android devices is released, or applied to the scene that the android debugging tool cannot be used due to the fact that the debugging interface cannot be directly switched by other devices, so that the debugging interface of the android device can be switched, and therefore a user can conveniently use the android debugging tool to operate the android device.
It should be noted that the foregoing application scenarios are merely exemplary, and are intended to further illustrate the method provided by the embodiment of the present invention, but not particularly intended to limit the specific application scenarios in the embodiment of the present invention.
In addition, it should be noted that, in the embodiment of the present invention, the debug interface switching request file may be acquired from an external storage device connected to the android device, and in addition, the debug interface switching request file may be acquired from another device that may be connected to the android device, where the another device may be a computer, an intelligent terminal, or the like, and the another device and the android device may be connected through WIFI (WIreless Fidelity ) connection, bluetooth connection, or near field communication connection.
Example one
An embodiment of the present invention provides a method for invoking a debug interface, and as shown in fig. 1, the method includes:
101. and acquiring a debugging interface switching request file in an external storage device connected with the android device.
The android device can be a smart phone, a tablet computer, a wearable device, an intelligent household appliance, a vehicle-mounted sound box, a vehicle-mounted radio or the like, wherein the android device is provided with an android system.
The external storage device can be an SD card, a U disk or a mobile hard disk, etc.
The android device and the external storage device can be connected through an SD card interface or a USB interface.
102. And verifying the debugging interface switching request file.
Specifically, a first daemon process of the android device reads a debugging interface switching request file; and
and the first daemon process judges whether the debugging interface switching request file meets a preset condition, and if so, the verification is successful.
103. And if the verification is successful, setting a debugging interface switching identifier according to the debugging interface switching request file.
Specifically, determining attribute setting information corresponding to a debugging interface switching request file; and
and according to the attribute setting information, the first daemon process sets a debugging interface switching identifier through the attribute service of the android device.
It should be noted that, if the verification fails for the debug interface switching request file, the process is ended.
104. And switching the debugging interface according to the debugging interface switching identifier.
Specifically, a second daemon process of the android device reads a debugging interface switching identifier; and
and according to the debugging interface switching identifier, the second daemon process switches the debugging interface.
Optionally, before step 101, the method provided in the embodiment of the present invention may further include:
starting the android device;
an external storage device inserted into an android device is detected and identified.
Optionally, before step 104, the method provided in the embodiment of the present invention may further include:
and reading and judging whether the read debugging interface switching identifier is effective or not by a second daemon process of the android device, if so, switching the debugging interface according to the debugging interface switching identifier, and otherwise, ending.
The embodiment of the invention provides a debugging interface calling method, which is used for android equipment, no matter whether the android equipment can directly provide graphical interface operation or not, only external storage equipment is connected with the android equipment, a debugging interface switching request file in the external storage equipment is obtained, the debugging interface switching request file is verified through the android equipment, a debugging interface switching identifier is set after verification is successful, and a debugging interface is switched according to the debugging interface switching identifier, so that the aim of conveniently and quickly switching out a debugging interface of the android equipment is fulfilled, a user can conveniently operate the android equipment by using a debugging tool, the problem that the android equipment without graphical interface operation cannot switch the debugging interface in the prior art is solved, and the problem that some android equipment in the prior art cannot use the android debugging tool due to the fact that the debugging interface is not opened by default after an android formal version is published is solved, and the android equipment cannot use the debugging tool to operate the android equipment The problem of operation.
Example two
An embodiment of the present invention provides a method for invoking a debug interface, and as shown in fig. 2, the method includes:
201. and starting the android device.
202. An external storage device inserted into an android device is detected and identified.
The android device can be a smart phone, a tablet computer, a wearable device, a smart household appliance, a vehicle-mounted sound box, a vehicle-mounted radio or the like, wherein the android device is provided with an android system;
the external storage device stores a debugging interface switching request file in advance, and the external storage device can be an SD card, a U disk or a mobile hard disk.
Specifically, the process may include:
when the external storage device is inserted into an interface of the android device, an insertion event between the external storage device and the android device is detected, and the external storage device is identified according to the insertion event.
For example, if the external storage device is an SD card, after the SD card is inserted into the android device, if an insertion event is detected between the SD card and the android device, the SD card is identified according to the insertion event.
The embodiment of the invention does not limit the specific detection and identification process.
In the embodiment of the invention, the external storage device inserted into the android device is detected and identified, so that the debugging interface switching request file can be conveniently acquired from the identified external storage device subsequently, and the debugging interface is switched by switching the debugging interface through the debugging interface switching request file.
203. And acquiring a debugging interface switching request file in an external storage device connected with the android device.
The debugging interface switching request file is used for indicating a debugging interface for switching the android device, and the debugging interface can be an adb interface of the android device.
Specifically, the embodiment of the present invention does not limit the specific acquisition process.
In the embodiment of the invention, the debugging interface switching request file in the external storage device connected with the android device is acquired, so that the android device can switch the debugging interface according to the debugging interface switching request file subsequently without the need of operating the android device by a user, the purpose of switching out the debugging interface conveniently and quickly is realized, the android debugging tool can be applied, and the use requirement of the user on the android debugging tool is met.
204. And reading the debugging interface switching request file by a first daemon process of the android device.
Specifically, after the connection event is generated between the android device and the external storage device, a system kernel of the android device sends the connection event to the first daemon process, the first daemon process mounts the external storage device, and a debugging interface switching request file in the external storage device is copied to a preset mounting directory.
The first Daemon process is a system Daemon process running on an android platform of the android device and used for managing the storage device such as an SD card and a usb disk, and in the embodiment of the present invention, the first Daemon process is a vold process (Volume Daemon), but the present invention is not limited thereto.
The embodiment of the present invention does not limit the specific reading process.
205. The first daemon process determines whether the debug interface switch request file meets a preset condition, if so, step 206 is executed, and if not, the process is ended.
The preset conditions comprise that a specified file name is met, and/or a specified file format is met, and/or a specified file signature is met.
Specifically, the first daemon process determines whether the debug interface switching request file meets a preset condition, and the process may include:
acquiring a file name, and/or a file format and/or a file signature of a debugging interface switching request file;
judging whether the file name in the debugging interface switching request file conforms to the specified file name or not; and/or
Judging whether the file format in the debugging interface switching request file conforms to the specified file format or not; and/or
And judging whether the file signature in the debugging interface switching request file conforms to the specified file signature or not.
The present invention does not limit the specific determination process.
It should be noted that, steps 204 to 205 are processes for implementing the verification of the debug interface switch request file, and besides the above-mentioned steps, the processes may also be implemented in other ways, and the specific way is not limited in the embodiment of the present invention.
In the embodiment of the invention, the debugging interface of the android device cannot be directly switched out by verifying the debugging interface switching request file, so that the safety of the android device is ensured.
206. And determining attribute setting information corresponding to the debugging interface switching request file.
Wherein the attribute setting information includes an attribute name and an attribute status value.
Specifically, the process may include:
analyzing the debugging interface switching request file to analyze the data content in the debugging interface switching request file;
attribute setting information corresponding to the parsed data content is determined.
In addition, the corresponding attribute setting information can be directly determined according to the file name of the debugging interface switching request file. The embodiment of the present invention does not limit the specific determination method.
207. And according to the attribute setting information, the first daemon process sets a debugging interface switching identifier through the attribute service of the android device.
The property service (property service) is a mechanism of the android platform, and can be used to query or set a corresponding property.
Specifically, the process may include:
the first daemon process obtains the attribute name and the attribute state value in the attribute setting information through the attribute service, assigns the attribute state value to the attribute name by calling a property _ set function to generate a debugging interface switching identifier, and stores the attribute file containing the debugging interface switching identifier, so that other daemon processes read the debugging interface switching identifier in the attribute file through an attribute service mechanism, wherein the other daemon processes can be the second daemon process in the embodiment of the invention.
The embodiment of the present invention does not limit the specific setting manner.
In the embodiment of the invention, according to the attribute setting information, the first daemon process sets the debugging interface switching identifier through the attribute service of the android device, so that other daemon processes can read the debugging interface switching identifier through the attribute service of the android device.
It should be noted that, steps 206 to 207 are processes for implementing setting of the debug interface switch identifier according to the debug interface switch request file, and besides the above-mentioned steps, the processes may also be implemented in other ways, and the specific way is not limited in the embodiment of the present invention.
208. And reading the debugging interface switching identifier by a second daemon process of the android device.
In the embodiment of the present invention, the second Daemon process is an Adbd process (Adbd Daemon), but the present invention is not limited thereto.
Specifically, the second daemon process reads the debug interface switching identifier in the slave attribute file through the attribute service of the android device, and the embodiment of the present invention does not limit the specific reading mode.
Because many daemons in the android device are not directly related to each other, the invention uses a property service mechanism of the android system to communicate a first daemon process (such as a vold process) and a second daemon process (such as an adbd process), so that the first daemon process triggers the second daemon process to run. In the embodiment of the invention, the second daemon process reads the debugging interface switching identifier in the subordinate attribute file through the attribute service of the android device, so that the aim of realizing information transmission between the second daemon process and the first daemon process by using the attribute service of the android device is fulfilled.
209. And according to the debugging interface switching identifier, the second daemon process switches the debugging interface.
Specifically, according to the debugging interface switching identifier, the second daemon process starts the debugging interface of the android device, so that other debugging devices operate the android device through the debugging interface.
It should be noted that steps 208 to 209 are processes for implementing switching of the debug interface according to the debug interface switching identifier, and besides the above steps, the processes may also be implemented in other ways, and the specific way of the embodiment of the present invention is not limited.
In the embodiment of the invention, the debugging interface is switched by utilizing the second daemon process according to the debugging interface switching identifier, so that the purpose of conveniently and quickly switching out the debugging interface of the installation equipment is realized, and further, a user can conveniently operate the android equipment by using an android debugging tool, thereby solving the problem that the android equipment without graphical interface operation cannot switch the debugging interface in the prior art, and solving the problem that some android equipment cannot operate the android equipment by using the android debugging tool due to default that the debugging interface is not opened after the official version of the android is released in the prior art.
Optionally, before step 209, the method provided in the embodiment of the present invention may further include:
and the second daemon process judges whether the read debugging interface switching identifier is effective.
Specifically, the second daemon process judges whether the debugging interface switching identifier is the same as a preset effective value or not, if so, the debugging interface switching identifier is judged to be effective, and otherwise, the debugging interface switching identifier is judged to be invalid;
and when the debugging interface switching identifier is judged to be effective, switching the debugging interface by the second daemon process according to the debugging interface switching identifier, and otherwise forbidding switching of the debugging interface.
In the embodiment of the invention, the validity of the debugging interface switching identifier is verified before the android device switches the debugging interface, the android device only switches the debugging interface if the debugging interface switching identifier is valid, and the android device forbids switching the debugging interface if the debugging interface switching identifier is invalid, so that the safety of the android device is further ensured.
The embodiment of the invention provides a method for calling a debugging interface, which is applied to android equipment, only needs to connect external storage equipment with the android equipment no matter whether the android equipment can directly provide graphical interface operation, by acquiring a debugging interface switching request file in an external storage device, verifying the debugging interface switching request file through an android device, and setting a debugging interface switching identifier after the verification is successful, and switching the debugging interface according to the debugging interface switching identifier, thereby realizing convenient and rapid switching out of the debugging interface, thereby facilitating the operation of the android device by the user by using an android debugging tool, solving the problem that the android device without graphical interface operation in the prior art can not switch the debugging interface, the method and the device solve the problem that in the prior art, certain android devices cannot operate the android devices by using android debugging tools due to the fact that debugging interfaces are not opened by default after the android formal versions are released.
EXAMPLE III
An embodiment of the present invention provides a device for invoking a debug interface, which is applied to an android device, and as shown in fig. 3, the device 3 includes:
the obtaining module 31 is configured to obtain a debug interface switching request file in an external storage device connected to the android device;
the verification module 32 is connected with the acquisition module 31 and used for verifying the debugging interface switching request file;
the setting module 33 is connected with the verification module 32 and is used for setting a debugging interface switching identifier according to the debugging interface switching request file if the verification of the debugging interface switching request file is successful; and
and a switching module 34 connected to the setting module 33, for switching the debug interface according to the debug interface switching identifier.
Optionally, the apparatus 3 further includes an activation module 35 and a detection and identification module 36;
the starting module 35 is used for starting the android device; and
and the detection and identification module 36 is connected with the starting module 35 and the obtaining module 31 respectively, and is used for detecting and identifying the external storage device inserted into the android device.
Optionally, the verification module 32 includes:
the first reading submodule 321 is configured to read a debug interface switching request file through a first daemon process of the android device; and
the verification sub-module 322 is configured to determine, through the first daemon process, whether the debug interface switching request file meets a preset condition, and if yes, the verification is successful.
Optionally, the setting module 33 includes:
the determining submodule 331 is configured to determine attribute setting information corresponding to the debug interface switching request file; and
the setting submodule 332 is configured to set, according to the attribute setting information, a debugging interface switching identifier by the first daemon process through an attribute service of the android device.
Optionally, the switching module 34 includes:
the second reading submodule 341 is configured to read the debug interface switching identifier through a second daemon process of the android device; and
the switching sub-module 342 is configured to switch the debug interface through the second daemon process according to the debug interface switching identifier.
The embodiment of the invention provides a calling device of a debugging interface, which is applied to android equipment, and no matter whether the android equipment can directly provide graphical interface operation or not, by the device, only the external storage equipment is connected with the android equipment, the debugging interface switching request file is verified by the android equipment, the debugging interface switching identifier is set after the verification is successful, and switching the debugging interface according to the debugging interface switching identifier, thereby realizing convenient and rapid switching out of the debugging interface, thereby facilitating the operation of the android device by the user by using an android debugging tool, solving the problem that the android device without graphical interface operation in the prior art can not switch the debugging interface, the method and the device solve the problem that in the prior art, certain android devices cannot operate the android devices by using android debugging tools due to the fact that debugging interfaces are not opened by default after the android formal versions are released.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again. In the embodiments provided in the present invention, it should be understood that the disclosed method and apparatus can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
It should be noted that: in the above-described embodiment, when executing the method for invoking the debug interface, the invoking apparatus for the debug interface is described by way of example only by dividing the functional modules, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above. In addition, the calling device of the debug interface and the calling method embodiment of the debug interface provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments and will not be described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A calling method of a debugging interface is used for an android device, and is characterized in that the method comprises the following steps:
acquiring a debugging interface switching request file in an external storage device connected with the android device;
verifying the debugging interface switching request file;
if the verification is successful, setting a debugging interface switching identifier according to the debugging interface switching request file; and
switching the debugging interface according to the debugging interface switching identifier;
the setting of the debugging interface switching identifier according to the debugging interface switching request file comprises:
analyzing the debugging interface switching request file to analyze the data content in the debugging interface switching request file, and determining attribute setting information corresponding to the analyzed data content; and
and a first daemon process of the android device acquires an attribute name and an attribute state value in the attribute setting information through an attribute service of the android device, assigns the attribute state value to the attribute name by calling a property _ set function to generate a debugging interface switching identifier, and stores an attribute file containing the debugging interface switching identifier so that other daemon processes read the debugging interface switching identifier in the attribute file through an attribute service mechanism.
2. The method according to claim 1, wherein before the step of obtaining the debug interface switch request file in the external storage device connected to the android device, the method further comprises:
starting the android device; and
detecting and identifying the external storage device inserted into the android device.
3. The method of claim 1, wherein the validating the debug interface switch request file comprises:
reading the debugging interface switching request file by a first daemon process of the android device; and
and the first daemon process judges whether the debugging interface switching request file meets a preset condition, and if so, the verification is successful.
4. The method of claim 1, wherein switching the debug interface according to the debug interface switching identifier comprises:
reading the debugging interface switching identifier by a second daemon process of the android device; and
and according to the debugging interface switching identifier, the second daemon process switches the debugging interface.
5. A debugging interface calling device is applied to android equipment and is characterized in that the device comprises:
the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a debugging interface switching request file in an external storage device connected with the android device;
the verification module is connected with the acquisition module and used for verifying the debugging interface switching request file;
the setting module is connected with the verification module and used for setting a debugging interface switching identifier according to the debugging interface switching request file if the debugging interface switching request file is successfully verified; and
the switching module is connected with the setting module and used for switching the debugging interface according to the debugging interface switching identifier;
the setting module includes:
the determining submodule is used for analyzing the debugging interface switching request file so as to analyze the data content in the debugging interface switching request file and determine attribute setting information corresponding to the analyzed data content;
and the setting submodule is used for acquiring the attribute name and the attribute state value in the attribute setting information by a first daemon process of the android device through an attribute service of the android device, assigning the attribute state value to the attribute name by calling a property _ set function so as to generate a debugging interface switching identifier, and storing the attribute file containing the debugging interface switching identifier so that other daemon processes read the debugging interface switching identifier in the attribute file through an attribute service mechanism.
6. The apparatus of claim 5, further comprising an activation module and a detection identification module;
the starting module is used for starting the android device; and
the detection and identification module is respectively connected with the starting module and the acquisition module and is used for detecting and identifying the external storage device inserted into the android device.
7. The apparatus of claim 5, wherein the verification module comprises:
the first reading submodule is used for reading the debugging interface switching request file through a first daemon process of the android device; and
and the verification submodule is used for judging whether the debugging interface switching request file meets the preset condition or not through the first daemon process, and if so, the verification is successful.
8. The apparatus of claim 5, wherein the switching module comprises:
the second reading sub-module is used for reading the debugging interface switching identifier through a second daemon process of the android device; and
and the switching submodule is used for switching the debugging interface through the second daemon process according to the debugging interface switching identifier.
CN201711213159.1A 2017-11-28 2017-11-28 Debugging interface calling method and device Active CN107977313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711213159.1A CN107977313B (en) 2017-11-28 2017-11-28 Debugging interface calling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711213159.1A CN107977313B (en) 2017-11-28 2017-11-28 Debugging interface calling method and device

Publications (2)

Publication Number Publication Date
CN107977313A CN107977313A (en) 2018-05-01
CN107977313B true CN107977313B (en) 2021-04-20

Family

ID=62012066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711213159.1A Active CN107977313B (en) 2017-11-28 2017-11-28 Debugging interface calling method and device

Country Status (1)

Country Link
CN (1) CN107977313B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109089252A (en) * 2018-09-26 2018-12-25 广州高清视信数码科技股份有限公司 A kind of adb connection control method, system and the device of Android intelligent equipment
CN110830850A (en) * 2019-10-31 2020-02-21 四川九州电子科技股份有限公司 Debugging information acquisition method of android set top box

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7660412B1 (en) * 2005-12-09 2010-02-09 Trend Micro Incorporated Generation of debug information for debugging a network security appliance
CN102713858A (en) * 2011-01-12 2012-10-03 丰田自动车株式会社 Online debugging system for information processing device and online debugging method
CN103810068A (en) * 2014-03-11 2014-05-21 福州瑞芯微电子有限公司 SD card slot based debugging equipment, system and method
CN105701373A (en) * 2015-12-28 2016-06-22 东软集团股份有限公司 ADB interface opening method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7660412B1 (en) * 2005-12-09 2010-02-09 Trend Micro Incorporated Generation of debug information for debugging a network security appliance
CN102713858A (en) * 2011-01-12 2012-10-03 丰田自动车株式会社 Online debugging system for information processing device and online debugging method
CN103810068A (en) * 2014-03-11 2014-05-21 福州瑞芯微电子有限公司 SD card slot based debugging equipment, system and method
CN105701373A (en) * 2015-12-28 2016-06-22 东软集团股份有限公司 ADB interface opening method and apparatus

Also Published As

Publication number Publication date
CN107977313A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
CN102340398A (en) Security policy setting and determining method, and method and device for executing operation by application program
CN105487966B (en) Program testing method, device and system
CN108763951B (en) Data protection method and device
US9891862B2 (en) Forensic data acquisition apparatus and method for guaranteeing integrity of flash memory in smart device
CN106648685B (en) Intelligent terminal system application processing method and device and intelligent terminal
CN107645546B (en) File monitoring method based on android system, intelligent device and storage medium
CN103455349A (en) Method and device for accessing intelligent card by application program
CN107977313B (en) Debugging interface calling method and device
JP6923582B2 (en) Information processing equipment, information processing methods, and programs
CN104809046A (en) Application program networking control method and application program networking control device
CN106951771B (en) Mobile terminal using method of android operating system
CN112732475A (en) Log collection method and device, electronic equipment and storage medium
CN106919812B (en) Application process authority management method and device
EP2835737A1 (en) Data terminal running mode switching method, device, and data terminal
CN106411745B (en) Method and device for modifying non-contact front-end chip routing table
JP6485973B2 (en) Method and apparatus for realizing virtual communication card
CN109471598B (en) Data deleting method and device of storage equipment and computer readable storage medium
EP2898413B1 (en) A security module and a method for optimum memory utilization
CN104348799B (en) A kind of filter method and device of network access request
CN111522564A (en) Method and device for identifying system upgrading state and computer readable storage medium
KR20150117336A (en) System and Method for Validating and Installing Application in Android Environment
CN112541182B (en) Kernel VFS layer system repairing method, device, equipment and storage medium
CN111079202A (en) Information display method and device of terminal equipment and terminal equipment
CN113190824B (en) Identity information acquisition method and device, terminal equipment and computer storage medium
KR20190047464A (en) Analysis System and Method of iOS System Log

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