CN102917095B - A kind of method of the terminal test based on android system and device - Google Patents

A kind of method of the terminal test based on android system and device Download PDF

Info

Publication number
CN102917095B
CN102917095B CN201210387261.4A CN201210387261A CN102917095B CN 102917095 B CN102917095 B CN 102917095B CN 201210387261 A CN201210387261 A CN 201210387261A CN 102917095 B CN102917095 B CN 102917095B
Authority
CN
China
Prior art keywords
port
data
socket
instruction
terminal
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
CN201210387261.4A
Other languages
Chinese (zh)
Other versions
CN102917095A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201210387261.4A priority Critical patent/CN102917095B/en
Publication of CN102917095A publication Critical patent/CN102917095A/en
Application granted granted Critical
Publication of CN102917095B publication Critical patent/CN102917095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephone Function (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to communication technical field, the method for particularly a kind of terminal test based on android system and device, existing when development and testing software for solving, need to carry out for different chips the problem that designs.The method of the embodiment of the present invention comprises: test lead, by ADB interface, is set up Socket with measured terminal and is connected; And connected by the Socket set up, adopt the communication protocol that ADB interface is supported, and carry out Signalling exchange and transfer of data between measured terminal.Because test lead of the present invention is connected by setting up Socket between ADB interface with tested terminal, when testing the tested terminal based on different hardware platforms, as long as adopt the communication protocol of ADB interface support to communicate, and do not need to develop different testing softwares for different hardware platforms, decrease the repeatability of testing software exploitation.

Description

A kind of method of the terminal test based on android system and device
Technical field
The present invention relates to communication technical field, the method for particularly a kind of terminal test based on android system and device.
Background technology
At present, based on the terminal of android system, as mobile phone, panel computer etc., be widely used in daily life.In the making or later maintenance process of terminal, need for different terminal development testing softwares and communication software, to realize exploitation to terminal and test.These testing softwares and communication software are all generally that the Modem communication port provided based on the inside chip of terminal carries out designing; The Modem communication port that chip provides comprises diagnostic port (Diagnostic), dummy general serial bus (UniversalSerial Bus, USB) communication port etc.
Owing to there being multiple different hardware platform at present, the command format adopted based on the chip of different Hardware platform design and data transmission format likely different, thus cause when development and testing software or communication software, in order to can and the chip of terminal between carry out instruction interaction and transfer of data, need to develop for command format corresponding to different chips and data transmission format and design.For the terminal adopting different hardware platforms, when each terminal is tested, sometimes the test realizing same function is only needed, but because different chips likely adopts different command format and data transmission format, therefore, need overlapping development to have testing software or the communication software of identical function for each different chip, thus not only cause the waste of resource, also make the construction cycle of testing software and communication software elongated.
In sum, adopt the test interface disunity that the terminal of different hardware platforms provides, and the command format of different chip employing and data transmission format are also likely different, make when development and testing software or communication software, need to design for command format corresponding to different chips and data transmission format, not only cause the waste of resource, also make the construction cycle of testing software and communication software elongated.
Summary of the invention
Embodiments provide a kind of method and device of the terminal test based on android system, for solving in prior art when development and testing software or communication software, the needs of existence carry out the problem designed for command format corresponding to different chips and data transmission format.
Embodiments provide a kind of method of the terminal test based on android system, comprising:
Test lead, by the debugging bridge ADB interface of android system, is set up Socket with measured terminal and is connected;
Described test lead is connected by the Socket set up, and adopts the communication protocol that described ADB interface is supported, and carries out Signalling exchange and transfer of data between described measured terminal, to complete the test to described measured terminal.
Embodiments provide a kind of device of the terminal test based on android system, comprising:
Connection establishment module, for by ADB interface, sets up Socket with measured terminal and is connected;
Communication module, connecting for the Socket by setting up, adopting the communication protocol that described ADB interface is supported, and carrying out Signalling exchange and transfer of data between described measured terminal, to complete the test to described measured terminal.
Embodiment of the present invention test lead is by ADB interface, with set up Socket between tested terminal and be connected, to realize carrying out instruction interaction and transfer of data with tested terminal, and then the test realized this tested terminal, therefore, the testing software of test lead is when testing the tested terminal based on different hardware platforms, as long as adopt the communication protocol of ADB interface support to communicate, and no longer need to develop different testing softwares for different hardware platforms, thus decrease the repeatability of the testing software exploitation of test lead; Further, adopt ADB interface to communicate, its communication speed is faster compared to traditional serial communication speed, thus improves testing efficiency.
Accompanying drawing explanation
Fig. 1 is the method flow schematic diagram of the embodiment of the present invention based on the terminal test of android system;
Fig. 2 is the handset testing method schematic flow sheet of the embodiment of the present invention based on android system;
Fig. 3 is the operating process schematic diagram in embodiment of the present invention handset testing method performed by PC end;
The operating process schematic diagram of Fig. 4 performed by mobile phone tested in embodiment of the present invention handset testing method;
Fig. 5 is the apparatus structure schematic diagram of the embodiment of the present invention based on the terminal test of android system.
Embodiment
Embodiment of the present invention test lead is by ADB interface, with set up Socket between tested terminal and be connected, to realize carrying out instruction interaction and transfer of data with tested terminal, and then the test realized this tested terminal, therefore, the testing software of test lead is when testing the tested terminal based on different hardware platforms, as long as adopt the communication protocol of ADB interface support to communicate, and no longer need to develop different testing softwares for different hardware platforms, thus decrease the repeatability of the testing software exploitation of test lead.
Below in conjunction with Figure of description, the embodiment of the present invention is described in further detail.
Shown in Figure 1, the method for the terminal test based on android system that the embodiment of the present invention provides, comprises the following steps:
Step 11, test lead, by the debugging bridge ADB interface of android system, are set up Socket with measured terminal and are connected;
Further, test lead, by ADB interface, can connect with the terminal based on different hardware platforms, to realize the test to different terminals;
Further, test lead can be PC PC, notebook computer or server etc.
Step 12, test lead are connected by the Socket set up, and adopt the communication protocol that ADB interface is supported, and carry out Signalling exchange and transfer of data between measured terminal, to complete the test to measured terminal;
Wherein, the agreement of carrying out between test lead with measured terminal communicating can be existing communication protocol, as TCP/IP(Transfer Control Protocol, transmission control protocol/Internet Protocol, Internet Protocol), also can be the agreement of certain form of arranging between test lead and measured terminal, as long as adopt the communication protocol that ADB interface can be supported.
Further, set up Socket connection in step 11 to comprise:
Test lead, by ADB interface, calls adb forward instruction, sets up Socket and connects; Wherein, test lead is sent by the Socket port (Port) of specifying in adb forward instruction or receives signaling and data.
Further, this adb forward instruction is adb forward tcp:12800tcp12500;
Concrete, port one 2800 is as the Socket port of test lead, and test lead sends instruction or data by port one 2800 to measured terminal, and/or is received the instruction or data that send from measured terminal by port one 2800;
Port one 2500 is as the Socket port of measured terminal, and measured terminal monitors the instruction or data that send from test lead by port one 2500, and/or sends instruction or data by port one 2500 to test lead.
It should be noted that, android system debugging bridge (Android Debug Bridge, ADB) be in Android operation system for debugging, following the tracks of the interface of the log files such as cell phone software operation information or Log, greatly facilitate developer and develop cell phone software or follow the tracks of and solve cell phone software Bug etc.At present, most intelligent mobile phone platform is all developed based on Android operation system, although the chip of each mobile phone is likely different, but, when ADB interface based on Android operation system communicates, PC end is consistent with the agreement of mobile phone terminal, thus same testing software or communication software can be shared on the mobile phone supporting different hardware platforms.
Citing is below described in detail.Shown in Figure 2, the embodiment of the present invention comprises based on the method for the terminal test of android system:
Step 21, run tested mobile phone power-on, and by connecting between USB data line and PC;
The testing software of step 22, PC end, according to the ADB equipment listed in the list of devices of its equipment manager (tested mobile phone), determines tested mobile phone; Wherein, the driver of ADB is installed in PC in advance;
The testing software of step 23, PC end calls adb.exe program, and call instruction " adb forwardtcp:12800tcp:12500 " is set up an energy be connected with the Socket that tested mobile phone carries out communicating at PC end;
The testing software of step 24, PC end realizes instruction interaction between tested mobile phone or transfer of data by port one 2800;
Step 25, tested mobile phone terminal, as Socket service device, are monitored instruction or the data of this PC end, and according to the instruction received or data, are fed back by port one 2500 by port one 2500.
Be described in detail from the operation performed by the testing software of PC end and the cell phone software of tested mobile phone respectively below.
Shown in Figure 3, the operation performed by testing software of PC end comprises:
The testing software of step 31, operation PC end;
The testing software of step 32, PC end starts Adb.exe;
The testing software of step 33, PC end calls adb forward instruction and sets up Socket connection;
The testing software of step 34, PC end sends instruction or data by Socket port, and/or receives the instruction or data that send from tested mobile phone.
Shown in Figure 4, the operation performed by the cell phone software of tested mobile phone comprises:
Step 41, run tested mobile phone;
Step 42, start the cell phone software of tested mobile phone, namely start the Socket set up connect in the monitoring service of Socket port of acquiescence;
The Socket port of acquiescence during the Socket that the cell phone software of step 43, tested mobile phone passes through to have set up connects, monitors the instruction or data that send from PC end;
The cell phone software of step 44, tested mobile phone, according to the instruction from the transmission of PC end received or data, is fed back by this Socket port.
Based on same inventive concept, the device of the terminal test based on android system is additionally provided in the embodiment of the present invention, the principle of dealing with problems due to this device is similar to the method for the above-mentioned terminal test based on android system, therefore the enforcement of this device see the enforcement of method, can repeat part and repeats no more.
Shown in Figure 5, the device of the terminal test based on android system that the embodiment of the present invention provides, comprising:
Connection establishment module 51, for by ADB interface, sets up Socket with measured terminal and is connected;
Communication module 52, connects for the Socket by setting up, and adopts the communication protocol that ADB interface is supported, and carries out Signalling exchange and transfer of data between measured terminal, to complete the test to measured terminal.
Further, connection establishment module 51 specifically for:
By ADB interface, call adb forward instruction, set up Socket and connect; Wherein, connection establishment module 51 is sent by the Socket port of specifying in adb forward instruction or receives signaling and data.
Further, the adb forward instruction of calling is adb forward tcp:12800tcp12500.
Concrete, port one 2800 is as the Socket port of communication module, and communication module sends instruction or data by port one 2800 to measured terminal, and/or is received the instruction or data that send from measured terminal by port one 2800;
Port one 2500 is as the Socket port of measured terminal, and measured terminal monitors the instruction or data that send from communication module by port one 2500, and/or sends instruction or data by port one 2500 to communication module.
Further, the device of the embodiment of the present invention can be PC, notebook computer or server etc.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Embodiment of the present invention test lead is by ADB interface, with set up Socket between tested terminal and be connected, to realize carrying out instruction interaction and transfer of data with tested terminal, and then the test realized this tested terminal, therefore, the testing software of test lead is when testing the tested terminal based on different hardware platforms, as long as adopt the communication protocol of ADB interface support to communicate, and no longer need to develop different testing softwares for different hardware platforms, thus decrease the repeatability of the testing software exploitation of test lead; Further, adopt ADB interface to communicate, its communication speed is faster compared to traditional serial communication speed, thus improves testing efficiency.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (8)

1. based on a method for the terminal test of android system, it is characterized in that, this method of testing comprises:
Test lead is by the debugging bridge ADB interface of android system, call adb forward instruction, set up Socket with the measured terminal based on different hardware platforms to be connected, wherein, described test lead is sent by the Socket port of specifying in described adb forward instruction or receives signaling and data;
Described test lead is connected by the Socket set up, adopt the communication protocol that described ADB interface is supported, and carry out Signalling exchange and transfer of data between described measured terminal, to complete the test to described measured terminal, wherein, the communication protocol of described ADB interface support is existing agreement, or the agreement of the form of arranging between described test lead and described tested end.
2. the method for claim 1, is characterized in that, described adb forward instruction is adbforward tcp:12800tcp12500.
3. method as claimed in claim 2, it is characterized in that, port one 2800 is as the Socket port of described test lead, described test lead sends instruction or data by described port one 2800 to described measured terminal, and/or is received the instruction or data that send from described measured terminal by described port one 2800;
Port one 2500 is as the Socket port of described measured terminal, and described measured terminal monitors the instruction or data that send from described test lead by described port one 2500, and/or sends instruction or data by described port one 2500 to described test lead.
4. the method as described in as arbitrary in claims 1 to 3, it is characterized in that, described test lead is PC PC, notebook computer or server.
5. based on a device for the terminal test of android system, it is characterized in that, this device comprises:
Connection establishment module, for by ADB interface, call adb forward instruction, set up Socket with the measured terminal based on different hardware platforms and be connected, wherein, described connection establishment module is sent by the Socket port of specifying in described adbforward instruction or receives signaling and data;
Communication module, connect for the Socket by setting up, adopt the communication protocol that described ADB interface is supported, and carry out Signalling exchange and transfer of data between described measured terminal, to complete the test to described measured terminal, wherein, the communication protocol of described ADB interface support is existing agreement, or the agreement of the form of arranging between described test lead and described tested end.
6. device as claimed in claim 5, it is characterized in that, described adb forward instruction is adbforward tcp:12800tcp12500.
7. device as claimed in claim 6, it is characterized in that, port one 2800 is as the Socket port of described communication module, described communication module sends instruction or data by described port one 2800 to described measured terminal, and/or is received the instruction or data that send from described measured terminal by described port one 2800;
Port one 2500 is as the Socket port of described measured terminal, and described measured terminal monitors the instruction or data that send from described communication module by described port one 2500, and/or sends instruction or data by described port one 2500 to described communication module.
8. the device as described in as arbitrary in claim 5 ~ 7, it is characterized in that, described device is PC, notebook computer or server.
CN201210387261.4A 2012-10-10 2012-10-10 A kind of method of the terminal test based on android system and device Active CN102917095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210387261.4A CN102917095B (en) 2012-10-10 2012-10-10 A kind of method of the terminal test based on android system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210387261.4A CN102917095B (en) 2012-10-10 2012-10-10 A kind of method of the terminal test based on android system and device

Publications (2)

Publication Number Publication Date
CN102917095A CN102917095A (en) 2013-02-06
CN102917095B true CN102917095B (en) 2015-08-05

Family

ID=47615321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210387261.4A Active CN102917095B (en) 2012-10-10 2012-10-10 A kind of method of the terminal test based on android system and device

Country Status (1)

Country Link
CN (1) CN102917095B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804366A (en) * 2018-03-14 2018-11-13 南京烽火天地通信科技有限公司 A kind of device and method improving Android device data line transfer rate

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038381B (en) * 2013-03-07 2018-11-09 腾讯科技(深圳)有限公司 Cloud test method, system, client and the server of application
CN103269292B (en) * 2013-04-19 2015-10-21 福州瑞芯微电子有限公司 Short distance microwave telecommunication devices are utilized to carry out the method for debugging acid ADB debugging
CN103269291B (en) * 2013-04-19 2016-02-24 福州瑞芯微电子股份有限公司 Android platform utilize point-to-point radio-frequency apparatus carry out the method for ADB debugging
CN103246587B (en) * 2013-04-19 2014-12-10 福州瑞芯微电子有限公司 Method for utilizing SD (secure digital) card for ADB (android debug bridge) debugging on android platform
CN103269293B (en) * 2013-04-19 2015-10-14 福州瑞芯微电子有限公司 Android platform utilize microwave telecommunication devices carry out the method for debugging acid ADB debugging
CN104252587B (en) * 2013-06-25 2018-04-27 腾讯科技(深圳)有限公司 Pull the method, apparatus and system of file
CN103701874A (en) * 2013-12-11 2014-04-02 深圳市东微智能科技有限公司 Method and system for remote communications of ARM core board and panel
CN104468260A (en) * 2014-11-13 2015-03-25 百度在线网络技术(北京)有限公司 Recognition method, device and system for mobile terminal device
CN104679631B (en) * 2015-03-23 2018-02-23 重庆蓝岸通讯技术有限公司 Method of testing and system for the equipment based on android system
CN106453766B (en) * 2015-08-04 2019-04-09 阿里巴巴集团控股有限公司 Data transmission method, apparatus and system based on virtual machine
CN105227729A (en) * 2015-10-09 2016-01-06 惠州Tcl移动通信有限公司 The method and system that a kind of automatic control radio frequency testing mobile telephone registration networks
CN105391832A (en) * 2015-11-24 2016-03-09 湖北大学 Hardware information detection system used for detecting hardware state of smartphone
CN106027728A (en) * 2016-04-26 2016-10-12 乐视控股(北京)有限公司 Mobile phone debugging system and method without screen
CN106851513B (en) * 2016-12-30 2020-06-30 歌尔科技有限公司 Method and system for testing electronic product
CN106790902B (en) * 2017-02-22 2021-03-23 惠州Tcl移动通信有限公司 Mobile terminal power consumption testing method and system
CN107153778A (en) * 2017-03-24 2017-09-12 捷开通讯(深圳)有限公司 A kind of method and system for injecting key data
CN107231272A (en) * 2017-05-26 2017-10-03 上海斐讯数据通信技术有限公司 Automatic test device and method that a kind of wireless messages are obtained
CN108777706A (en) * 2018-05-18 2018-11-09 深圳壹账通智能科技有限公司 Information encapsulation method, apparatus, computer equipment and storage medium
CN109669084A (en) * 2018-12-13 2019-04-23 歌尔科技有限公司 Equipment ESD test method and system
CN110740080A (en) * 2019-10-21 2020-01-31 京东数字科技控股有限公司 Test method and device, and test agent method and device
CN112367362B (en) * 2020-10-23 2024-01-09 深圳市信锐网科技术有限公司 Data processing method, device, equipment and computer storage medium
CN113923442A (en) * 2021-09-24 2022-01-11 湖北三赢兴光电科技股份有限公司 Universal software testing method and system for camera module

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102419732A (en) * 2011-12-27 2012-04-18 Tcl集团股份有限公司 Android-platform-based automated testing method and testing tool

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070240118A1 (en) * 2006-02-28 2007-10-11 Ido Keren System, method, and software for testing a software application

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102419732A (en) * 2011-12-27 2012-04-18 Tcl集团股份有限公司 Android-platform-based automated testing method and testing tool

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804366A (en) * 2018-03-14 2018-11-13 南京烽火天地通信科技有限公司 A kind of device and method improving Android device data line transfer rate

Also Published As

Publication number Publication date
CN102917095A (en) 2013-02-06

Similar Documents

Publication Publication Date Title
CN102917095B (en) A kind of method of the terminal test based on android system and device
WO2014015573A1 (en) Wireless automation test apparatus and method for mobile device
CN103246586B (en) Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform
CN103744761A (en) Method and system for controlling multiple mobile terminals to automatically execute tasks
CN103616937A (en) Mainboard, PCIE network card and server system
CN103516557A (en) Method and system for testing
CN103269291B (en) Android platform utilize point-to-point radio-frequency apparatus carry out the method for ADB debugging
CN101957771A (en) Method and device for installing mobile software for multiple mobile phones simultaneously
CN106708748B (en) Method and system for improving mounting performance of OpenStack block storage volume
CN104239114A (en) Application compiling method and device
CN103177104A (en) Searching method and device of application program
CN101505339B (en) Implementation method for directly deploying mobile phone application program from computer onto mobile phone
CN104184635A (en) Method and device of home gateway for achieving one-to-many data communication based on Android RIL
CN104375854A (en) Application updating and downloading method and user terminal
CN104636249A (en) Generation system and method of debugging information of application program
CN104869129A (en) Application program management method, application program management and application program management system
CN103530159A (en) Upgrading method and system of wireless communication module
CN205281471U (en) Printing terminal and system
CN103269293B (en) Android platform utilize microwave telecommunication devices carry out the method for debugging acid ADB debugging
CN103324526A (en) Method for calling sensor
CN102664836A (en) Prototype verification platform for broadband wireless communication digital baseband processor
CN104461629B (en) PC terminals and its method for installing application program of mobile phone
CN104407714A (en) Main board and use method thereof for remote multi-computer switching
CN111506502B (en) Mobile terminal UI automatic distribution network flow test system and method
CN103200588A (en) Automatic core network dial testing equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant