CN110830850A - Debugging information acquisition method of android set top box - Google Patents

Debugging information acquisition method of android set top box Download PDF

Info

Publication number
CN110830850A
CN110830850A CN201911053903.5A CN201911053903A CN110830850A CN 110830850 A CN110830850 A CN 110830850A CN 201911053903 A CN201911053903 A CN 201911053903A CN 110830850 A CN110830850 A CN 110830850A
Authority
CN
China
Prior art keywords
debugging information
disk
jzmanager
configuration file
background service
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.)
Pending
Application number
CN201911053903.5A
Other languages
Chinese (zh)
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.)
Sichuan Jiuzhou Electronic Technology Co Ltd
Original Assignee
Sichuan Jiuzhou Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Jiuzhou Electronic Technology Co Ltd filed Critical Sichuan Jiuzhou Electronic Technology Co Ltd
Priority to CN201911053903.5A priority Critical patent/CN110830850A/en
Publication of CN110830850A publication Critical patent/CN110830850A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2268Logging of test results

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a debugging information acquisition method of an android set top box, which comprises the following steps: step S100: the android application reads a debugging information configuration file inserted into a U disk of the set top box and establishes a corresponding output folder and file according to the debugging information configuration file; step S200: the android application calls a background service Jzmanager in a cross-process mode to send a request of a call command, and the background service Jzmanager receives the request of the call command, executes the command and outputs a result to the U disk to finish the acquisition of debugging information. The invention uses the U disk as a debugging information storage medium, the system can finish the generation of debugging information by analyzing the debugging configuration file of the U disk, and the debugging information can be directly stored in the U disk. The operation is simple, the use is flexible, no additional equipment is needed except for the U disk, and no requirement is made on the network environment.

Description

Debugging information acquisition method of android set top box
Technical Field
The invention relates to the technical field of set top boxes, in particular to a debugging information acquisition method of an android set top box.
Background
The common methods for acquiring debugging information of an android set top box in the prior art include two methods: one is to connect and acquire debugging information through an adb tool of the android system; the method is limited by the customization requirements of operators, the requirement generally requires the system to close adb based on safety consideration, and adb cannot be connected or some network-related debugging information cannot be acquired because the adb depends on the network environment; the second method is that the debugging information is acquired by connecting a serial port tool with a set top box; according to the method, equipment such as a computer and a serial port line needs to be prepared, a shell of the set top box needs to be disassembled to connect the serial port line, some set top boxes do not have serial port connecting pins due to cost consideration, the serial port connecting pins need to be welded for connection, the operation is complex, the set top boxes can be damaged, and the requirement on operators is high.
Disclosure of Invention
The invention aims to provide a debugging information obtaining method of an android set top box, which is used for solving the problems that in the prior art, when a system is closed, an adb tool cannot be used for obtaining debugging information, and a serial port tool needs to be disassembled and welded with a serial port connecting pin, so that the set top box is complicated to operate and is easy to damage.
The invention solves the problems through the following technical scheme:
a debugging information obtaining method of an android set top box comprises the following steps:
step S100: the android application reads a debugging information configuration file inserted into a U disk of the set top box and establishes a corresponding output folder and file according to the debugging information configuration file;
step S200: the android application calls a background service Jzmanager in a cross-process mode to send a request of a call command, and the background service Jzmanager receives the request of the call command, executes the command and outputs a result to the U disk to finish the acquisition of debugging information.
Further, the step S100 is specifically:
step S110: the android application UsbDebug receives starting broadcast starting, a background service Jzmanager runs in root authority after starting, and a connection request of the android application UsbDebug is waited;
step S120: the android application UsbDebug monitors whether a U disk is inserted, and if the U disk is inserted, the next step is carried out; otherwise, repeating the step S120;
step S130: checking whether the U disk has a debugging information configuration file, if so, entering the next step, otherwise, returning to the step S120;
step S140: analyzing the debugging information configuration file, if the debugging information configuration file can be normally analyzed, entering the next step, and if not, returning to the step S120;
step S150: acquiring the description information of the debugging information configuration file, establishing a corresponding folder and file in the U disk according to the description information, generating a debugging information acquisition command according to the description information of the debugging information configuration file, and entering step S200.
Further, the step S200 specifically includes:
step S210: the android application UsbDebug is connected with a background service Jzmanager in a binder cross-process communication mode;
step S220: the android application UsbDebug calls a command starting interface of a background service Jzmanager, and the background service Jzmanager creates a thread execution command;
step S230: the android application UsbDebug finishes the limiting condition according to the debugging information in the description information, judges whether the limiting condition is reached, if so, calls a command of a background service Jzmanager to close an interface, calls the background service Jzmanager to close a thread, outputs debugging information to a specified file of the USB flash disk, pulls out the USB flash disk, and finishes the acquisition of the debugging information; otherwise, return to step S230.
Compared with the prior art, the invention has the following advantages and beneficial effects:
(1) the invention uses the U disk as a debugging information storage medium, the system can finish the generation of debugging information by analyzing the debugging configuration file of the U disk, and the debugging information can be directly stored in the U disk. The USB flash disk is simple to operate and flexible to use, does not need additional equipment except the USB flash disk, has no requirement on a network environment, and does not depend on the network environment.
(2) According to the method, the shell of the set top box is not required to be disassembled to connect the serial port line and the serial port connecting pin is not required to be welded, the set top box is not damaged, the requirement on after-sales personnel is not high, the on-site after-sales personnel can acquire the debugging information of the set top box by using a simple operation method, the positioning efficiency and the problem solving efficiency can be effectively improved, and the after-sales cost is reduced.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a flowchart of the operation of the android application UsbDebug;
FIG. 3 is a flow chart of the work of the background service Jzmanager.
Detailed Description
The present invention will be described in further detail with reference to examples, but the embodiments of the present invention are not limited thereto.
Example 1:
with reference to fig. 1, a method for acquiring debugging information of an android set-top box includes a system authority android application 'usbdibug' and a root authority background service 'Jzmanager', where the android application usbdibug is responsible for reading and analyzing a debugging information configuration file of a usb disk, establishing a corresponding output folder and file according to the configuration file, and calling the background service to execute a corresponding debugging command in a cross-process calling manner; the background service Jzmanager is responsible for receiving a request for calling a command, executing the command and outputting a result to a file specified by the U disk to finish the acquisition of debugging information.
and the android application UsbDebug and the background service Jzmanager perform cross-process communication through a binder mechanism of the android. The specific implementation method comprises the following steps:
an execution flow of an android application usbdibug is shown in fig. 2, and specifically includes:
step (1.1): powering on and starting up the android set top box, sending a starting broadcast by the system after starting up, starting up the Usbdebug application after receiving the starting broadcast, and entering the step (1.2);
step (1.2): the UsbDebug application monitors the USB flash disk pumping event: if the USB flash disk is monitored to be inserted, the step (1.3) is carried out, otherwise, the monitoring is carried out all the time;
step (1.3): checking whether the U disk has a debugging information configuration file, if not, entering the step (1.2), and entering the step (1.4);
step (1.4): analyzing the debugging information configuration file, if the debugging information configuration file cannot be analyzed correctly, entering the step (1.2), and if the debugging information configuration file can be analyzed correctly, entering the step (1.5);
step (1.5): establishing corresponding folders and files in the USB flash disk according to the description information of the configuration files, and entering the step (1.6);
step (1.6): generating a debugging information command according to the description information of the configuration file, and entering the step (1.7);
step (1.7): connecting a background service Jzmanager in a binder cross-process communication mode, and entering the step (1.8);
step (1.8): calling a command starting interface of a background service Jzmanager, and entering the step (1.9);
step (1.9): controlling and acquiring a debugging information structure according to configuration file information and a capture event according to the file size, and calling a command closing interface of a postnatal service Jzmanager after the condition is met;
and (5) pulling out the USB flash disk, wherein the debugging information file is stored in the USB flash disk, and the debugging information acquisition process is finished.
An execution flow of the background service Jzmanager is shown in fig. 3, and specifically includes:
step (2.1): after the Jzmanager of the background service is started, running the Jzmanager with root authority, and entering the step (2.2);
step (2.2): realizing the server function of cross-process binder communication, waiting for the connection of the binder client, and entering the step (2.3);
step (2.3): after receiving the connection request, establishing a binder connection, and entering the step (2.4);
step (2.4): waiting for the command starting interface to be called, newly building a thread, executing a command, executing a debugging information command in the thread, and entering the step (2.5);
step (2.5): waiting for the command ending interface to be called, ending the thread corresponding to the command, and entering the step (2.6);
step (2.6): and generating and outputting the debugging information to the USB flash disk, and ending.
Although the present invention has been described herein with reference to the illustrated embodiments thereof, which are intended to be preferred embodiments of the present invention, it is to be understood that the invention is not limited thereto, and that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure.

Claims (3)

1. A debugging information obtaining method of an android set top box is characterized by comprising the following steps:
step S100: the android application reads a debugging information configuration file inserted into a U disk of the set top box and establishes a corresponding output folder and file according to the debugging information configuration file;
step S200: the android application calls a background service Jzmanager in a cross-process mode to send a request of a call command, and the background service Jzmanager receives the request of the call command, executes the command and outputs a result to the U disk to finish the acquisition of debugging information.
2. The method for acquiring the debugging information of the android set-top box according to claim 1, wherein the step S100 is specifically as follows:
step S110: the android application UsbDebug receives starting broadcast starting, a background service Jzmanager runs in root authority after starting, and a connection request of the android application UsbDebug is waited;
step S120: the android application UsbDebug monitors whether a U disk is inserted, and if the U disk is inserted, the next step is carried out; otherwise, repeating the step S120;
step S130: checking whether the U disk has a debugging information configuration file, if so, entering the next step, otherwise, returning to the step S120;
step S140: analyzing the debugging information configuration file, if the debugging information configuration file can be normally analyzed, entering the next step, and if not, returning to the step S120;
step S150: acquiring the description information of the debugging information configuration file, establishing a corresponding folder and file in the U disk according to the description information, generating a debugging information acquisition command according to the description information of the debugging information configuration file, and entering step S200.
3. The method for acquiring the debugging information of the android set-top box according to claim 2, wherein the step S200 specifically comprises:
step S210: the android application UsbDebug is connected with a background service Jzmanager in a binder cross-process communication mode;
step S220: the android application UsbDebug calls a command starting interface of a background service Jzmanager, and the background service Jzmanager creates a thread execution command;
step S230: the android application UsbDebug finishes the limiting condition according to the debugging information in the description information, judges whether the limiting condition is reached, if so, calls a command of a background service Jzmanager to close an interface, calls the background service Jzmanager to close a thread, outputs debugging information to a specified file of the USB flash disk, pulls out the USB flash disk, and finishes the acquisition of the debugging information; otherwise, return to step S230.
CN201911053903.5A 2019-10-31 2019-10-31 Debugging information acquisition method of android set top box Pending CN110830850A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911053903.5A CN110830850A (en) 2019-10-31 2019-10-31 Debugging information acquisition method of android set top box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911053903.5A CN110830850A (en) 2019-10-31 2019-10-31 Debugging information acquisition method of android set top box

Publications (1)

Publication Number Publication Date
CN110830850A true CN110830850A (en) 2020-02-21

Family

ID=69551817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911053903.5A Pending CN110830850A (en) 2019-10-31 2019-10-31 Debugging information acquisition method of android set top box

Country Status (1)

Country Link
CN (1) CN110830850A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124684A (en) * 2021-10-22 2022-03-01 杭州依赛通信有限公司 Method for realizing zero-contact full-automatic network element deployment by using USB flash disk

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201497985U (en) * 2009-07-31 2010-06-02 广东浩兆信息科技发展有限公司 Embedded equipment auxiliary failure analytical tool
CN103246586A (en) * 2013-04-19 2013-08-14 福州瑞芯微电子有限公司 Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform
CN104780360A (en) * 2015-03-18 2015-07-15 福建新大陆通信科技股份有限公司 Set top box debugging method and set top box debugging system
WO2017201897A1 (en) * 2016-05-27 2017-11-30 深圳Tcl数字技术有限公司 Method and device for collecting fault information of smart television
CN107977313A (en) * 2017-11-28 2018-05-01 苏州佳世达电通有限公司 The call method and device of a kind of debugging interface
CN107992407A (en) * 2017-11-15 2018-05-04 烽火通信科技股份有限公司 System and method using USB flash disk to android terminal equipment debugging
US20180157562A1 (en) * 2015-08-04 2018-06-07 Alibaba Group Holding Limited Virtual machine-based data transmission method, apparatus and system
CN109040752A (en) * 2018-10-15 2018-12-18 四川长虹电器股份有限公司 Automatic debugging system for smart television

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201497985U (en) * 2009-07-31 2010-06-02 广东浩兆信息科技发展有限公司 Embedded equipment auxiliary failure analytical tool
CN103246586A (en) * 2013-04-19 2013-08-14 福州瑞芯微电子有限公司 Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform
CN104780360A (en) * 2015-03-18 2015-07-15 福建新大陆通信科技股份有限公司 Set top box debugging method and set top box debugging system
US20180157562A1 (en) * 2015-08-04 2018-06-07 Alibaba Group Holding Limited Virtual machine-based data transmission method, apparatus and system
WO2017201897A1 (en) * 2016-05-27 2017-11-30 深圳Tcl数字技术有限公司 Method and device for collecting fault information of smart television
CN107992407A (en) * 2017-11-15 2018-05-04 烽火通信科技股份有限公司 System and method using USB flash disk to android terminal equipment debugging
CN107977313A (en) * 2017-11-28 2018-05-01 苏州佳世达电通有限公司 The call method and device of a kind of debugging interface
CN109040752A (en) * 2018-10-15 2018-12-18 四川长虹电器股份有限公司 Automatic debugging system for smart television

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124684A (en) * 2021-10-22 2022-03-01 杭州依赛通信有限公司 Method for realizing zero-contact full-automatic network element deployment by using USB flash disk
CN114124684B (en) * 2021-10-22 2024-04-19 杭州依赛通信有限公司 Method for realizing zero-contact full-automatic deployment of network elements by using USB flash disk

Similar Documents

Publication Publication Date Title
CN111162972B (en) Automatic test method for vehicle-mounted Ethernet protocol stack based on semantic analysis
WO2016169145A1 (en) Cloud terminal log processing method, device and system
US20090204851A1 (en) Method and System for Software Testing
WO2012016409A1 (en) Terminal upgrade method, terminal upgrade downgrade method and upgrade management center
CN112953983A (en) SFTP transmission method and device
CN109189687A (en) A kind of method and apparatus obtaining Android log
CN115686540A (en) RPA control method and system based on Hongmong system
CN112636966A (en) Application batch deployment method based on remote debugging protocol
CN110830850A (en) Debugging information acquisition method of android set top box
CN106452965B (en) A kind of method of automatic verifying network interface card NCSI stability
CN114880177A (en) Method and device for testing complete machine abnormal power failure of solid state disk and computer equipment
CN111435227B (en) Smart home equipment testing method, device, equipment and medium
CN111104336A (en) Online service interface testing method and device based on container and VNC
CN113296795A (en) Application deployment method, device, equipment, storage medium and program product
CN103699485A (en) Application program debugging method and device
CN112860555B (en) Software remote upgrading verification testing device and method
CN113010187B (en) Application installation method and device and electronic equipment
CN109656740A (en) A method of supporting timeout treatment task flow
CN112948195B (en) Interface testing method, device, electronic equipment and storage medium
CN113867806A (en) Synchronization method and system for in-band modification of BIOS option
CN108803582B (en) Automatic bus switching system and method suitable for remote fault diagnosis
CN107220149B (en) Method and system for capturing debugging data of wireless communication module in Linux system under Windows
CN110825624A (en) Module testing system and method of embedded equipment
CN114020350B (en) Android system-based terminal off-load equipment detection method, system and medium
CN109800167B (en) Test method, test client and test system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200221

RJ01 Rejection of invention patent application after publication