WO2017075997A1 - 安卓调试桥的启动方法、装置及终端 - Google Patents
安卓调试桥的启动方法、装置及终端 Download PDFInfo
- Publication number
- WO2017075997A1 WO2017075997A1 PCT/CN2016/085829 CN2016085829W WO2017075997A1 WO 2017075997 A1 WO2017075997 A1 WO 2017075997A1 CN 2016085829 W CN2016085829 W CN 2016085829W WO 2017075997 A1 WO2017075997 A1 WO 2017075997A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- terminal
- button
- duration
- adb
- debugging bridge
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/725—Cordless telephones
Definitions
- the present invention relates to the field of Android debugging bridge technology, and in particular, to an Android debugging bridge startup method, device and terminal.
- the Android Debug Bridge (ADB) is a program for transferring data between two terminals. Therefore, ADB is an indispensable means in the process of realizing data transmission between mobile phones, tablets and computers.
- the ADB in the terminal of the commonly used Android operating system can use the Universal Serial Bus (USB) as the transmission layer or the wireless network as the transmission layer, so that the mobile phone, the tablet and the computer can be effectively established. Connect to complete the data transfer.
- USB Universal Serial Bus
- the ADB when the ADB is used as the transport layer through the wireless network, the ADB needs to be started through the USB interface and the touch panel (TP). Therefore, when the USB interface or the TP cannot be used normally, the ADB cannot be started, thereby reducing the Start the reliability and efficiency of ADB.
- the present application provides a method, a device, and a terminal for starting an Android debugging bridge, which improve the reliability and efficiency of starting the ADB.
- the application provides a method for starting an Android debugging bridge, including:
- the Android debugging bridge in the first terminal is activated, so that the first terminal transmits a control command to the second terminal through the Android debugging bridge.
- the application also provides an Android debugging bridge startup device, including:
- a detecting module configured to detect a first pressing duration of the first designated button on the first terminal
- a control module configured to start an Android debugging bridge in the first terminal if the first pressing duration reaches a first specified duration, so that the first terminal transmits a control command to the second terminal by using the Android debugging bridge .
- the application further provides a terminal, wherein the terminal is provided with an activation device of the Android debugging bridge as described above.
- the embodiment of the present application provides a terminal, including a memory, and one or more processors, where the terminal further includes:
- One or more units the one or more units being stored in the memory and configured to be executed by the one or more processors, the one or more units including instructions for performing the following steps :
- the Android debugging bridge in the first terminal is activated, so that the first terminal transmits a control command to the second terminal through the Android debugging bridge.
- the embodiment of the present application provides a computer program product for use in conjunction with a terminal, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising instructions for performing the following steps:
- the Android debugging bridge in the first terminal is activated, so that the first terminal transmits a control command to the second terminal through the Android debugging bridge.
- the ADB startup method, the device, and the terminal start the ADB in the first terminal, thereby failing to implement the USB or TP.
- ADB can still be started, which improves the reliability of starting ADB.
- the ADB can be started quickly, and the efficiency of starting the ADB is improved.
- FIG. 1 is a flowchart of an embodiment of a method for starting an ADB according to the present application
- FIG. 2 is a flowchart of another embodiment of a method for starting an ADB according to the present application.
- FIG. 3 is a schematic structural diagram of an embodiment of an activation device of an ADB according to the present application.
- FIG. 4 is a schematic structural diagram of another embodiment of an activation device of an ADB according to the present application.
- FIG. 5 is a schematic structural diagram of a terminal provided by the present application.
- FIG. 1 is a flowchart of a method for starting an ADB according to the present application. As shown in FIG. 1 , the method for starting an ADB in this embodiment may include the following steps:
- each terminal includes a plurality of buttons, and the user can perform corresponding operations on the terminal by pressing different buttons, so that the terminal completes functions required by the user. Since the number of buttons on the terminal is limited and the corresponding operation functions are respectively assigned, if a plurality of functions are added to the terminal, the buttons in the terminal cannot meet the requirements of these functions, so one of the designated terminals can be specified. Or multiple buttons to execute the function buttons corresponding to each function. However, at this time, since the designated button also performs other functions, it is possible to perform different functions by detecting the pressing time of the designated function button by setting a different pressing time of the designated function button. In this embodiment, the first pressing duration of the first designated button of the terminal may be specifically detected to complete the function to be performed by the first designated button.
- first, second, etc. may be employed in the embodiments of the present application, these terminals are not limited to these terms, and these terms are only used to distinguish terminals from each other.
- first terminal may also be referred to as a second terminal
- second terminal may also be referred to as a first terminal, without departing from the scope of the embodiments of the present application.
- the ADB in the first terminal is started, so that the first terminal transmits a control command to the second terminal through the ADB, and the data transmission of the first terminal and the second terminal is completed.
- the ADB is a program for data transmission between two terminals. Therefore, when the first terminal and the second terminal need to perform data transmission, the ADB needs to be started, and the first terminal sends a control command to the second terminal through the ADB, for example, for example.
- the first terminal and the second terminal perform control commands for data transmission, and the like.
- the first designated button can be set to execute the function button for starting the ADB, and the first specified duration corresponding to the first designated button can be set to 5s, 8s, or 10s, etc. according to actual needs.
- the ADB may be started, so that the first terminal transmits a control command to the second terminal through the ADB, completing the first terminal and the second terminal. Data transmission of the terminal.
- the execution body of the ADB startup method of the embodiment may be specifically an ADB startup device, and the activation device of the ADB may be specifically integrated by software.
- the startup device of the ADB may specifically be an application; or
- the ADB boot device is integrated in the Android operating system of the terminal.
- the ADB in the first terminal is started, and the USB or TP cannot be used normally. In this case, ADB can still be started, which improves the reliability of starting ADB. In addition, with the technical solution of the present application, the ADB can be started quickly, and the ADB effect is improved. rate.
- FIG. 2 is a flowchart of another embodiment of the method for starting the ADB of the present application. As shown in FIG. 2, the method for starting the ADB in this embodiment further applies the technical solution of the present application in more detail on the basis of the embodiment shown in FIG. Describe.
- the method for starting the ADB in this embodiment may specifically include the following steps:
- the first designated button in this embodiment may be a volume +/- button on the first terminal.
- step 201 Determine whether the first pressing duration reaches the first specified duration; if the first pressing duration reaches the first specified duration, perform step 202; otherwise, perform step 200.
- the first specified duration is set to 8 s. If the first pressing duration of pressing the volume +/- button on the first terminal is detected to be 8 s, the ADB in the first terminal is activated, so that the first terminal passes through the ADB. The second terminal transmits a control command to complete data transmission of the first terminal and the second terminal.
- the ADB is actually a background process running on the first terminal, which excelsly coordinates data exchange between the client, the service and the device, and the ADBD is used to connect the ADB in the first terminal, and when the first terminal and the first terminal When the second terminal establishes a connection or performs transmission, it provides a service for the second terminal. Therefore, after the ADB is started, the attribute of the port of the ADBD corresponding to the ADB is set according to the actual connection situation of the two terminals. In this embodiment, the technical solution of the present application is performed by taking the wireless connection between the first terminal and the second terminal as an example. description. After the ADB is started, the port attribute of the ADBD in the first terminal is set to the port number of the wireless transmission.
- the service.adb.tcp.port may be set to 5555 or service.adb.tcp.port to 8888 or the like according to different terminals.
- the ADBD After the port number of the wireless transmission is set, the ADBD cannot obtain the data of the port number in the actual application. Therefore, the ADBD needs to be restarted, so that the ADBD can save the port number of the wireless transmission during the restart process.
- a second terminal with a port number for wireless transmission and an Internet Protocol (IP) address interconnected between the networks of the ADBD, so that the second terminal establishes with the first terminal according to the port number of the ADBD and the IP address of the ADBD.
- IP Internet Protocol
- the port number of the ADBD and the IP address of the ADBD can be read from the ADBD, and the port number of the wireless transmission and the IP address of the ADBD can be provided to the second terminal.
- the port number and the IP address of the displayed ADBD can be read by the user on the interface in the first terminal, so that the second terminal establishes the first terminal with the port number of the ADBD and the IP address of the ADBD.
- Wireless connection between the two can be Alternatively, the second terminal may directly acquire the port number of the ADBD and the IP address of the ADBD from the ADBD, and establish a wireless connection with the first terminal.
- the first designated button is the same as or different from the second designated button. That is, the first designated button and the second designated button may adopt the same designated button or button combination, or may use different buttons or button combinations.
- the first designated button may include at least one of a button on the TP of the first terminal and a button on the rear case of the first terminal.
- the second designated button may include at least one of a button on the TP of the first terminal and a button on the rear case of the first terminal. In the embodiment, it is preferable that the first designated button is the same as the second designated button.
- step 207 Determine whether the second pressing duration reaches the second specified duration; if the second pressing duration reaches the second specified duration, perform step 208; otherwise, perform step 206.
- the ADB needs to be closed. If the second pressing duration reaches the second specified duration, the ADB in the first terminal is closed, so as to control the first terminal and the second terminal to terminate the data transmission, so that the first terminal works better.
- the first pressing duration is the same as or different from the second pressing duration; the first specified duration is the same as or different from the second specified duration.
- the first pressing duration is the same as the second pressing duration; the first specified duration is the same as the second specified duration.
- first pressing duration and the second pressing duration in this embodiment are only for the pair.
- the duration of the operation of the button is specified, and when the first specified duration is the same as the second specified duration, the first pressing duration and the second pressing duration are necessarily the same when the satisfaction condition of starting or closing the ADB is reached.
- the ADB startup method of the embodiment may also be applied when the USB and the TP can be used, and when the ADB is started, the connection with the second terminal is established, and the data transmission method is implemented.
- the ADB in the first terminal when detecting that the pressing time of the designated button in the first terminal reaches the specified duration, the ADB in the first terminal is started or closed, and the USB or TP cannot be used normally.
- the ability to enable or disable ADB improves the reliability of starting or shutting down ADB.
- it does not rely too much on USB and TP, so that when ADB is started or shut down, it is not between the first terminal and the second terminal.
- the distance limitation is adopted.
- the technical solution of the embodiment can be used to quickly start or shut down the ADB without using USB and TP, thereby improving the efficiency of starting or shutting down the ADB.
- the aforementioned program can be stored in a computer readable storage medium.
- the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
- FIG. 3 is a schematic structural diagram of an embodiment of an ADB starting device according to an embodiment of the present invention. As shown in FIG. 3, the ADB starting device of the present embodiment includes a detecting module 10 and a control module 11.
- the detecting module 10 and the control module 11 can transmit information data and the like, and the detecting module 10 is configured to detect a first pressing duration of the first designated button on the first terminal, and the first terminal is detected. After the first pressing time of the first designated button is transmitted to the control module 11, the control module 11 is configured to start the ADB in the first terminal if the first pressing duration reaches the first specified duration, so that the first terminal passes the ADB to the second The terminal transmits control commands.
- the activation mechanism of the ADB in this embodiment is the same as the implementation mechanism of the embodiment shown in FIG. 1 by using the above-mentioned module.
- the detecting module 10 detects that the first pressing duration of the first designated button on the first terminal reaches the first specified duration, the detecting module 11 starts the first time by the control module 11 ADB in a terminal enables ADB to be started even if USB or TP cannot be used normally. Improve the reliability of starting ADB. In addition, with the technical solution of the present application, the ADB can be started quickly, and the efficiency of starting the ADB is improved.
- FIG. 4 is a schematic structural diagram of another embodiment of the ADB activation device of the present application.
- the ADB startup device of the present embodiment further includes a setting module 12 based on the embodiment shown in FIG.
- the setting module 12 is configured to set the attribute of the port of the ADBD in the first terminal to the port number of the wireless transmission; the control module 11 is further used for the ADBD, and saves the port number of the wireless transmission during the restarting process.
- control module 11 is further configured to provide the second terminal with the port number of the wireless transmission of the ADBD and the IP address of the ADBD, so that the second terminal is configured according to The port number of the wireless transmission of the ADBD and the IP address of the ADBD establish a wireless connection with the first terminal.
- the detecting module 10 is further configured to detect a second pressing duration of the second designated button on the first terminal, the first designated button and the second designating The buttons are the same or different.
- the first designated button includes at least one of a button on the TP of the first terminal and a button on the rear case of the first terminal;
- the second designated button includes a button on the TP of the first terminal and a rear case of the first terminal At least one of the buttons.
- the control module 11 is further configured to: when the second pressing duration reaches a second specified duration, the Android debugging bridge in the first terminal is closed, so as to control the first terminal and the second terminal to terminate data transmission; the first pressing duration and the second pressing duration The same or different; the first specified duration is the same as or different from the second specified duration.
- the activation mechanism of the ADB in this embodiment is the same as the implementation mechanism of the embodiment shown in FIG. 2 by using the above-mentioned module.
- the ADB startup method of the embodiment when the detection module 10 detects that the pressing time of the designated button in the first terminal reaches the specified duration, the ADB in the first terminal is started or closed, and the USB or TP cannot be normally used. Under, can still start or close ADB, improve the reliability of starting or shutting down ADB; at the same time, because starting or closing ADB, no longer excessive Depending on the USB and TP, the ADB is not limited by the distance between the first terminal and the second terminal. In addition, the technical solution of the embodiment can be used to quickly start or not use USB and TP. Turn off ADB to improve the efficiency of starting or shutting down ADB.
- the present application further provides a terminal, and the ADB startup device of the embodiment shown in FIG. 3 or FIG. 4 is disposed on the terminal, and the ADB startup method of the embodiment shown in FIG. 1 or FIG. 2 may be specifically used.
- the ADB startup device of the embodiment shown in FIG. 3 or FIG. 4 is disposed on the terminal, and the ADB startup method of the embodiment shown in FIG. 1 or FIG. 2 may be specifically used.
- FIG. 5 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
- the terminal includes a memory 51, and one or more processors 52.
- the terminal further includes:
- One or more units the one or more units being stored in the memory and configured to be executed by the one or more processors, the one or more units including instructions for performing the following steps :
- the Android debugging bridge in the first terminal is activated, so that the first terminal transmits a control command to the second terminal through the Android debugging bridge.
- the one or more units further include an instruction for performing the following steps:
- the service module of the Android debug bridge is restarted, and after saving the port number of the wireless transmission during the restart, the one or more units further includes an instruction for performing the following steps:
- one or more units further comprise instructions for performing the following steps:
- the Android debugging bridge in the first terminal is closed, so as to control the first terminal and the second terminal to terminate data transmission; the first pressing The duration is the same as or different from the second pressing duration; the first specified duration is the same as or different from the second specified duration.
- the first designated button includes at least one of a button on the touch panel of the first terminal and a button on a rear shell of the first terminal;
- the second designated button includes at least one of a button on the touch panel of the first terminal and a button on a rear case of the first terminal.
- the embodiment of the present application provides a computer program product for use in conjunction with a terminal, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising instructions for performing the following steps:
- the Android debugging bridge in the first terminal is activated, so that the first terminal transmits a control command to the second terminal through the Android debugging bridge.
- the computer program mechanism further includes an instruction to perform the following steps:
- the computer program mechanism further includes an instruction to perform the following steps:
- the computer program mechanism further comprises an instruction to perform the following steps:
- the Android debugging bridge in the first terminal is closed, so as to control the first terminal and the second terminal to terminate data transmission; the first pressing The duration is the same as or different from the second pressing duration; the first specified duration is the same as or different from the second specified duration.
- the first designated button includes at least one of a button on the touch panel of the first terminal and a button on a rear shell of the first terminal;
- the second designated button includes at least one of a button on the touch panel of the first terminal and a button on a rear case of the first terminal.
- the device embodiments described above are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located in one place. Or it can be distributed to at least two network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
- Debugging And Monitoring (AREA)
Abstract
一种安卓调试桥的启动方法、装置及终端,其中安卓调试桥的启动方法包括:检测第一终端上第一指定按键的第一按压时长(100);若所述第一按压时长达到第一指定时长,启动第一终端中的安卓调试桥,以便于所述第一终端通过所述安卓调试桥向第二终端传输控制命令(101)。通过检测到第一终端上第一指定按键的第一按压时长达到第一指定时长时,启动第一终端中的ADB,实现了在USB或者TP无法正常使用的情况下,仍能启动ADB。能够快速的在不利用USB和TP的情况下,快速启动ADB,提高启动ADB的可靠性和效率。
Description
本专利申请要求申请日为2015年11月6日、申请号为2015107563717的中国专利申请的优先权,并将上述专利申请以引用的方式全文引入本文中。
本申请涉及安卓调试桥技术领域,尤其涉及一种安卓调试桥的启动方法、装置及终端。
安卓调试桥(Android Debug Bridge,ADB)是两个终端之间进行数据传输的一个程序。因此ADB在手机、平板和电脑等之间的实现数据传输的过程中,是必不可少的手段。
目前常用的安卓操作系统的终端中的ADB既可以使用通用串行总线(Universal Serial Bus,USB)作为传输层,又可以使用无线网络作为传输层,使手机、平板和电脑等之间能够建立有效连接,完成数据传输。
在实现本申请的过程中,发明人发现现有技术中至少存在以下问题:
现有技术中,在ADB通过无线网络作为传输层时,需要通过USB接口和触摸面板(Touch Panel,TP)启动ADB,因此当USB接口或者TP无法正常使用时,导致无法启动ADB,从而降低了启动ADB的可靠性和效率。
发明内容
有鉴于此,本申请提供一种安卓调试桥的启动方法、装置及终端,实现提高启动ADB的可靠性和效率。
本申请提供一种安卓调试桥的启动方法,包括:
检测第一终端上第一指定按键的第一按压时长;
若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥,以便于所述第一终端通过所述安卓调试桥向第二终端传输控制命令。
本申请还提供一种安卓调试桥的启动装置,包括:
检测模块,用于检测第一终端上第一指定按键的第一按压时长;
控制模块,用于若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥,以便于所述第一终端通过所述安卓调试桥向第二终端传输控制命令。
本申请还提供一种终端,所述终端上设置有如上所述的安卓调试桥的启动装置。
本申请实施例提供一种终端,包括存储器,以及一个或者多个处理器,其中,终端还包括:
一个或多个单元,所述一个或多个单元被存储在所述存储器中并被配置成由所述一个或多个处理器执行,所述一个或多个单元包括用于执行以下步骤的指令:
检测第一终端上第一指定按键的第一按压时长;
若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥,以便于所述第一终端通过所述安卓调试桥向第二终端传输控制命令。
本申请实施例提供一种与终端结合使用的计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括执行以下步骤的指令:
检测第一终端上第一指定按键的第一按压时长;
若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥,以便于所述第一终端通过所述安卓调试桥向第二终端传输控制命令。
本申请的ADB的启动方法、装置及终端,通过检测到第一终端上第一指定按键的第一按压时长达到第一指定时长时,启动第一终端中的ADB,实现了在USB或者TP无法正常使用的情况下,仍能启动ADB,提高了启动ADB的可靠性。另外,采用本申请的技术方案,能够快速的启动ADB,提高了启动ADB效率。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请ADB的启动方法一实施例的流程图;
图2为本申请ADB的启动方法另一实施例的流程图;
图3为本申请ADB的启动装置一实施例的结构示意图;
图4为本申请ADB的启动装置另一实施例的结构示意图;
图5为本申请提供的终端的结构示意图。
附图标记;
10-检测模块
11-控制模块
12-设置模块
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例一
图1为本申请ADB的启动方法一实施例的流程图,如图1所示,本实施例的ADB的启动方法,可以包括如下步骤:
100、检测第一终端上第一指定按键的第一按压时长;
例如,每个终端上包括多个按键,用户可以通过按压不同的按键,对终端进行对应的操作,以使终端完成用户需要的功能。由于终端上按键的数量有限,且分别赋予了对应的操作功能,若在终端再加入若干功能时,终端中的按键无法满足这些功能的需求,因此可以通过指定终端中的一个
或者多个按键去执行作为各功能对应的功能按键。但此时由于指定的按键还对应执行其它功能,则可以通过将指定的功能按键设定不同的按压时长,以通过检测指定的功能按键的按压时长执行不同的功能。本实施例中,具体可以检测终端的第一指定按键的第一按压时长,以完成该第一指定按键要执行的功能。
应当理解的是,尽管在本申请实施例中可能采用术语第一、第二等描述终端,但这些终端不应限于这些术语,这些术语仅用来将终端彼此区分开。例如在不脱离本申请实施例范围的情况下,第一终端也可以被称为第二终端,同理第二终端也可以被称为第一终端。
101、若第一按压时长达到第一指定时长,启动第一终端中的ADB,以便于第一终端通过ADB向第二终端传输控制命令,完成第一终端和第二终端的数据传输。
例如,ADB是两个终端之间进行数据传输的一个程序,所以第一终端和第二终端需要进行数据传输时,需要启动ADB,并由第一终端通过ADB向第二终端发送控制命令,例如第一终端与第二终端进行数据传输的控制指令等。
本实施例中,可以将第一指定按键设置为执行启动ADB的功能按键,并且可以根据实际需求,设定第一指定按键对应的第一指定时长为5s、8s或10s等。
若检测到按压第一终端的第一指定按键的第一按压时长达到第一指定时长,则可以启动ADB,以便于第一终端通过ADB向第二终端传输控制命令,完成第一终端和第二终端的数据传输。
本实施例的ADB的启动方法的执行主体具体可以为ADB的启动装置,该ADB的启动装置具体可以通过软件来集成,例如该ADB的启动装置具体可以为一个应用程序;或者,也可以将该ADB的启动装置集成在终端的安卓操作系统中。
本实施例的ADB的启动方法,通过检测到第一终端上第一指定按键的第一按压时长达到第一指定时长时,启动第一终端中的ADB,实现了在USB或者TP无法正常使用的情况下,仍能启动ADB,提高了启动ADB的可靠性。另外,采用本申请的技术方案,能够快速的启动ADB,提高了启动ADB效
率。
实施例二
图2为本申请ADB的启动方法另一实施例的流程图,如图2所示,本实施例的ADB的启动方法在图1所示实施例的基础上进一步更加详细地对本申请的技术方案进行描述。
如图2所示,本实施例的ADB的启动方法,具体可以包括如下步骤:
200、检测第一终端上第一指定按键的第一按压时长。
例如,本实施例中的第一指定按键可以为第一终端上的音量+/-键。
201、确定第一按压时长是否达到第一指定时长;若第一按压时长达到第一指定时长,执行步骤202;否则,执行步骤200。
202、启动第一终端中的ADB。
例如,设定第一指定时长为8s,若检测到按住第一终端上的音量+/-键的第一按压时长达到8s,启动第一终端中的ADB,以便于第一终端通过ADB向第二终端传输控制命令,完成第一终端和第二终端的数据传输。
203、将第一终端中安卓调试桥的服务模块(ADB Device,ADBD)的端口的属性设置为无线传输的端口号。
具体地,ADB实际上是第一终端上运行的后台进程,它精妙的协调客户端、服务与设备之间的数据交换,而ADBD用于连接第一终端中ADB,并当第一终端与第二终端建立连接或者进行传输时,为第二终端提供服务。因此ADB在启动以后,根据两个终端的实际连接情况将ADB对应的ADBD的端口的属性设置相应的数据,本实施例中以第一终端与第二终端无线连接为例对本申请的技术方案进行描述。ADB在启动以后,将第一终端中ADBD的端口属性设置为无线传输的端口号。
例如,当无线传输为无线保真(Wireless-Fidelity,Wi-Fi)时,可以根据不同的终端设置service.adb.tcp.port为5555或者service.adb.tcp.port为8888等。
204、重启ADBD,在重启过程中保存无线传输的端口号。
在设置好无线传输的端口号后,实际应用中ADBD无法获取到该端口号的数据,因此需要重启ADBD,使ADBD在重启过程中能够保存该无线传输的端口号。
205、向第二终端提供无线传输的端口号以及ADBD的网络之间互连的协议(Internet Protocol,IP)地址,以便第二终端根据ADBD的端口号和ADBD的IP地址,建立与第一终端之间的无线连接。
ADBD重启完成后,就可以从ADBD中读取ADBD的端口号和ADBD的IP地址,进而能够向第二终端提供无线传输的端口号以及ADBD的IP地址。
例如,可以显示在第一终端中的界面上,由用户读取显示的ADBD的端口号和IP地址,以便于第二终端通过该ADBD的端口号和ADBD的IP地址,建立与第一终端之间的无线连接。或者,也可由第二终端直接获取从ADBD中读取ADBD的端口号和ADBD的IP地址,建立与第一终端之间的无线连接。
206、检测第一终端上第二指定按键的第二按压时长。
例如,第一指定按键与第二指定按键相同或者不同。即第一指定按键和第二指定按键可以采用同一个指定的按键或者按键组合,也可以采用不同的按键或者按键组合。
具体地,第一指定按键可以包括第一终端的TP上的按键和第一终端的后壳上的按键中至少一个。
第二指定按键可以包括第一终端的TP上的按键和第一终端的后壳上的按键中至少一个。本实施例中优选第一指定按键与第二指定按键相同。
207、确定第二按压时长是否达到第二指定时长;若第二按压时长达到第二指定时长,执行步骤208;否则,执行步骤206。
208、关闭第一终端中的安卓调试桥。
例如,第一终端和第二终端数据传输完成后,为了降低第一终端的内存运行负荷或者节省第一终端的电量等,需要将ADB关闭。若第二按压时长达到第二指定时长,关闭第一终端中的ADB,以便于控制第一终端与第二终端终止数据传输,使第一终端工作性能较优。
同理,第一按压时长与第二按压时长相同或者不同;第一指定时长与第二指定时长相同或者不同。
优选地,第一按压时长与第二按压时长相同;第一指定时长与第二指定时长相同。
需要说明的是,本实施例中的第一按压时长和第二按压时长仅针对对
指定按键进行操作的时长,而第一指定时长与第二指定时长相同时,达到启动或者关闭ADB的满足条件时,第一按压时长与第二按压时长必然相同。
进一步地,在一个具体的实现过程中,本实施例的ADB的启动方法,也可以应用在USB和TP能使用时,当ADB启动以后,与第二终端建立连接,并实现数据传输的方法请参考现有技术相关记载,在此不再赘述。
本实施例的ADB的启动方法,通过检测到第一终端中指定按键的按压时长达到指定时长时,启动或者关闭第一终端中的ADB,实现了在USB或者TP无法正常使用的情况下,仍能启动或者关闭ADB,提高了启动或者关闭ADB的可靠性;同时由于启动或者关闭ADB时,不再过度依赖USB和TP,使启动或者关闭ADB时,不受第一终端和第二终端之间的距离限制;另外采用本实施例的技术方案,能够在不利用USB和TP的情况下,快速启动或者关闭ADB,提高启动或者关闭ADB的效率。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
实施例三
图3为本申请ADB的启动装置一实施例的结构示意图,如图3所示,本实施例的ADB的启动装置包括检测模块10和控制模块11。
在一个具体的实现过程中,检测模块10和控制模块11能够传递信息数据等,检测模块10用于检测第一终端上第一指定按键的第一按压时长,并将检测到的第一终端上第一指定按键的第一按压时长传递给控制模块11之后,控制模块11用于若第一按压时长达到第一指定时长,启动第一终端中的ADB,以便于第一终端通过ADB向第二终端传输控制命令。
本实施例的ADB的启动装置,通过采用上述模块实现ADB的启动的实现机制与上述图1所示实施例的实现机制相同,详细可以参考上述图1所示实施例的记载,在此不再赘述。
本实施例的ADB的启动装置,通过检测模块10检测到第一终端上第一指定按键的第一按压时长达到第一指定时长时,由控制模块11启动第
一终端中的ADB,实现了在USB或者TP无法正常使用的情况下,仍能启动ADB。提高了启动ADB的可靠性。另外,采用本申请的技术方案,能够快速的启动ADB,提高了启动ADB效率。
实施例四
图4为本申请ADB的启动装置另一实施例的结构示意图,如图4所示,本实施例的ADB的启动装置在图3所示实施例的基础上进一步还包括设置模块12。
在一个具体的实现过程中,设置模块12用于将第一终端中ADBD的端口的属性设置为无线传输的端口号;控制模块11还用于ADBD,在重启过程中保存无线传输的端口号。
进一步地,在一个具体的实现过程中,上述实施例的ADB的启动装置中,控制模块11还用于向第二终端提供ADBD的无线传输的端口号以及ADBD的IP地址,以便第二终端根据ADBD的无线传输的端口号和ADBD的IP地址,建立与第一终端之间的无线连接。
进一步地,在一个具体的实现过程中,上述实施例的ADB的启动装置中,检测模块10还用于检测第一终端上第二指定按键的第二按压时长,第一指定按键与第二指定按键相同或者不同。例如,第一指定按键包括第一终端的TP上的按键和第一终端的后壳上的按键中至少一个;第二指定按键包括第一终端的TP上的按键和第一终端的后壳上的按键中至少一个。控制模块11还用于若第二按压时长达到第二指定时长,关闭第一终端中的安卓调试桥,以便于控制第一终端与第二终端终止数据传输;第一按压时长与第二按压时长相同或者不同;第一指定时长与第二指定时长相同或者不同。
本实施例的ADB的启动装置,通过采用上述模块实现ADB的启动的实现机制与上述图2所示实施例的实现机制相同,详细可以参考上述图2所示实施例的记载,在此不再赘述。
本实施例的ADB的启动方法,通过检测模块10检测到第一终端中指定按键的按压时长达到指定时长时,启动或者关闭第一终端中的ADB,实现了在USB或者TP无法正常使用的情况下,仍能启动或者关闭ADB,提高了启动或者关闭ADB的可靠性;同时由于启动或者关闭ADB时,不再过度
依赖USB和TP,使启动或者关闭ADB时,不受第一终端和第二终端之间的距离限制;另外采用本实施例的技术方案,能够在不利用USB和TP的情况下,快速启动或者关闭ADB,提高启动或者关闭ADB的效率。
本申请还提供一种终端,并在该终端上设置有如上图3或者图4所示实施例的ADB的启动装置,并具体可以采用上述图1或图2所述实施例的ADB的启动方法实现启动或关闭ADB,详细可以参考上述相关实施例的相关记载,在此不再赘述。
实施例五
如图5所示,为本申请实施例提供的一种终端的结构示意图,该终端包括存储器51,以及一个或者多个处理器52,其中,终端还包括:
一个或多个单元,所述一个或多个单元被存储在所述存储器中并被配置成由所述一个或多个处理器执行,所述一个或多个单元包括用于执行以下步骤的指令:
检测第一终端上第一指定按键的第一按压时长;
若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥,以便于所述第一终端通过所述安卓调试桥向第二终端传输控制命令。
其中,若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥之后,所述一个或多个单元还包括用于执行以下步骤的指令:
将所述第一终端中所述安卓调试桥的服务模块的端口的属性设置为无线传输的端口号;
重启所述安卓调试桥的服务模块,在重启过程中保存所述无线传输的端口号。
其中,重启所述安卓调试桥的服务模块,在重启过程中保存所述无线传输的端口号之后,所述一个或多个单元还包括用于执行以下步骤的指令:
向所述第二终端提供所述无线传输的所述端口号以及所述安卓调试桥的服务模块的网络之间互连的协议地址,以便所述第二终端根据所述端口号和所述网络之间互连的协议地址,建立与所述第一终端之间的无线连
接。
其中,所述一个或多个单元还包括用于执行以下步骤的指令:
检测所述第一终端上第二指定按键的第二按压时长,所述第一指定按键与所述第二指定按键相同或者不同;
若所述第二按压时长达到第二指定时长,关闭所述第一终端中的所述安卓调试桥,以便于控制所述第一终端与所述第二终端终止数据传输;所述第一按压时长与所述第二按压时长相同或者不同;所述第一指定时长与所述第二指定时长相同或者不同。
其中,所述第一指定按键包括所述第一终端的触摸面板上的按键和所述第一终端的后壳上的按键中至少一个;
所述第二指定按键包括所述第一终端的触摸面板上的按键和所述第一终端的后壳上的按键中至少一个。
本申请实施例提供一种与终端结合使用的计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括执行以下步骤的指令:
检测第一终端上第一指定按键的第一按压时长;
若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥,以便于所述第一终端通过所述安卓调试桥向第二终端传输控制命令。
其中,若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥之后,所述计算机程序机制还包括执行以下步骤的指令:
将所述第一终端中所述安卓调试桥的服务模块的端口的属性设置为无线传输的端口号;
重启所述安卓调试桥的服务模块,在重启过程中保存所述无线传输的端口号。
其中,重启所述安卓调试桥的服务模块,在重启过程中保存所述无线传输的端口号之后,所述计算机程序机制还包括执行以下步骤的指令:
向所述第二终端提供所述无线传输的所述端口号以及所述安卓调试桥的服务模块的网络之间互连的协议地址,以便所述第二终端根据所述端
口号和所述网络之间互连的协议地址,建立与所述第一终端之间的无线连接。
其中,所述计算机程序机制还包括执行以下步骤的指令:
检测所述第一终端上第二指定按键的第二按压时长,所述第一指定按键与所述第二指定按键相同或者不同;
若所述第二按压时长达到第二指定时长,关闭所述第一终端中的所述安卓调试桥,以便于控制所述第一终端与所述第二终端终止数据传输;所述第一按压时长与所述第二按压时长相同或者不同;所述第一指定时长与所述第二指定时长相同或者不同。
其中,所述第一指定按键包括所述第一终端的触摸面板上的按键和所述第一终端的后壳上的按键中至少一个;
所述第二指定按键包括所述第一终端的触摸面板上的按键和所述第一终端的后壳上的按键中至少一个。
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到至少两个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
Claims (11)
- 一种安卓调试桥的启动方法,其特征在于,包括:检测第一终端上第一指定按键的第一按压时长;若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥,以便于所述第一终端通过所述安卓调试桥向第二终端传输控制命令。
- 根据权利要求1所述的方法,其特征在于,若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥之后,所述方法还包括:将所述第一终端中所述安卓调试桥的服务模块的端口的属性设置为无线传输的端口号;重启所述安卓调试桥的服务模块,在重启过程中保存所述无线传输的端口号。
- 根据权利要求2所述的方法,其特征在于,重启所述安卓调试桥的服务模块,在重启过程中保存所述无线传输的端口号之后,所述方法还包括:向所述第二终端提供所述无线传输的所述端口号以及所述安卓调试桥的服务模块的网络之间互连的协议地址,以便所述第二终端根据所述端口号和所述网络之间互连的协议地址,建立与所述第一终端之间的无线连接。
- 根据权利要求1-3任一所述的方法,其特征在于,所述方法还包括:检测所述第一终端上第二指定按键的第二按压时长,所述第一指定按键与所述第二指定按键相同或者不同;若所述第二按压时长达到第二指定时长,关闭所述第一终端中的所述安卓调试桥,以便于控制所述第一终端与所述第二终端终止数据传输;所述第一按压时长与所述第二按压时长相同或者不同;所述第一指定时长与所述第二指定时长相同或者不同。
- 根据权利要求4所述的方法,其特征在于,所述第一指定按键包括所述第一终端的触摸面板上的按键和所述第 一终端的后壳上的按键中至少一个;所述第二指定按键包括所述第一终端的触摸面板上的按键和所述第一终端的后壳上的按键中至少一个。
- 一种安卓调试桥的启动装置,其特征在于,包括:检测模块,用于检测第一终端上第一指定按键的第一按压时长;控制模块,用于若所述第一按压时长达到第一指定时长,启动所述第一终端中的安卓调试桥,以便于所述第一终端通过所述安卓调试桥向第二终端传输控制命令。
- 根据权利要求6所述的装置,其特征在于,所述装置还包括:设置模块,用于将所述第一终端中所述安卓调试桥的服务模块的端口的属性设置为无线传输的端口号;所述控制模块,还用于重启所述安卓调试桥的服务模块,在重启过程中保存所述无线传输的端口号。
- 根据权利要求7所述的装置,其特征在于,所述控制模块,还用于向所述第二终端提供所述无线传输的所述端口号以及所述安卓调试桥的服务模块的网络之间互连的协议地址,以便所述第二终端根据所述端口号和所述网络之间互连的协议地址,建立与所述第一终端之间的无线连接。
- 根据权利要求6-8任一所述的装置,其特征在于,所述检测模块,还用于检测所述第一终端上第二指定按键的第二按压时长,所述第一指定按键与所述第二指定按键相同或者不同;所述控制模块,还用于若所述第二按压时长达到第二指定时长,关闭所述第一终端中的所述安卓调试桥,以便于控制所述第一终端与所述第二终端终止数据传输;所述第一按压时长与所述第二按压时长相同或者不同;所述第一指定时长与所述第二指定时长相同或者不同。
- 根据权利要求9所述的装置,其特征在于,所述第一指定按键包括所述第一终端的触摸面板上的按键和所述第一终端的后壳上的按键中至少一个;所述第二指定按键包括所述第一终端的触摸面板上的按键和所述第一终端的后壳上的按键中至少一个。
- 一种终端,所述终端上设置有如上权利要求6-10任一所述的安卓调试桥的启动装置。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510756371.7 | 2015-11-06 | ||
CN201510756371.7A CN105868098A (zh) | 2015-11-06 | 2015-11-06 | 安卓调试桥的启动方法、装置及终端 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017075997A1 true WO2017075997A1 (zh) | 2017-05-11 |
Family
ID=56624249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/085829 WO2017075997A1 (zh) | 2015-11-06 | 2016-06-15 | 安卓调试桥的启动方法、装置及终端 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105868098A (zh) |
WO (1) | WO2017075997A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109683791A (zh) * | 2018-12-20 | 2019-04-26 | 惠州Tcl移动通信有限公司 | 移动终端调试功能启动方法、装置及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020162052A1 (en) * | 2001-04-25 | 2002-10-31 | Lewis Timothy A. | Method for entering system firmware recovery mode using software-detectable buttons |
CN103401997A (zh) * | 2013-07-15 | 2013-11-20 | 东软集团股份有限公司 | 车载终端与智能手机在usb连接下的数据传输方法及系统 |
CN104184875A (zh) * | 2013-05-20 | 2014-12-03 | 中兴通讯股份有限公司 | 终端调试端口的开启方法、装置与终端 |
CN104468260A (zh) * | 2014-11-13 | 2015-03-25 | 百度在线网络技术(北京)有限公司 | 一种移动终端设备的识别方法、装置及系统 |
CN104834612A (zh) * | 2015-04-20 | 2015-08-12 | 杭州魔品科技有限公司 | 一种安卓手机usb调试模式的启动方法 |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102117166A (zh) * | 2009-12-31 | 2011-07-06 | 联想(北京)有限公司 | 电子设备及其实现预设操作指令的方法及一种手机 |
KR101027971B1 (ko) * | 2010-12-10 | 2011-04-13 | (주)헬릭스테크 | 애플리케이션 검사 가능한 이동통신 단말기 및 그 검사 방법 |
CN103135818B (zh) * | 2011-11-28 | 2016-03-30 | 联想(北京)有限公司 | 快速响应操作方法及电子设备 |
CN103269292B (zh) * | 2013-04-19 | 2015-10-21 | 福州瑞芯微电子有限公司 | 利用短距离微波通信设备进行调试工具adb调试的方法 |
CN103269291B (zh) * | 2013-04-19 | 2016-02-24 | 福州瑞芯微电子股份有限公司 | android平台上利用点对点射频设备进行ADB调试的方法 |
CN103269293B (zh) * | 2013-04-19 | 2015-10-14 | 福州瑞芯微电子有限公司 | android平台上利用微波通信设备进行调试工具ADB调试的方法 |
CN104238759B (zh) * | 2014-09-04 | 2017-11-10 | 广东欧珀移动通信有限公司 | 实体按键控制终端的方法及装置 |
CN104978248B (zh) * | 2014-10-15 | 2017-09-29 | 武汉安天信息技术有限责任公司 | 一种基于adb远程管理移动终端app的方法及系统 |
-
2015
- 2015-11-06 CN CN201510756371.7A patent/CN105868098A/zh active Pending
-
2016
- 2016-06-15 WO PCT/CN2016/085829 patent/WO2017075997A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020162052A1 (en) * | 2001-04-25 | 2002-10-31 | Lewis Timothy A. | Method for entering system firmware recovery mode using software-detectable buttons |
CN104184875A (zh) * | 2013-05-20 | 2014-12-03 | 中兴通讯股份有限公司 | 终端调试端口的开启方法、装置与终端 |
CN103401997A (zh) * | 2013-07-15 | 2013-11-20 | 东软集团股份有限公司 | 车载终端与智能手机在usb连接下的数据传输方法及系统 |
CN104468260A (zh) * | 2014-11-13 | 2015-03-25 | 百度在线网络技术(北京)有限公司 | 一种移动终端设备的识别方法、装置及系统 |
CN104834612A (zh) * | 2015-04-20 | 2015-08-12 | 杭州魔品科技有限公司 | 一种安卓手机usb调试模式的启动方法 |
Also Published As
Publication number | Publication date |
---|---|
CN105868098A (zh) | 2016-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8909910B2 (en) | Computer system for selectively accessing bios by a baseboard management controller | |
TWI477970B (zh) | 電子裝置的模式切換方法與相關的電子裝置 | |
US9461927B2 (en) | Method, device, and system for delaying packets during a network-triggered wake of a computing device | |
JP2010520528A5 (zh) | ||
US10761730B2 (en) | Method for configuring disk array of electronic device and related electronic device | |
WO2013123863A1 (zh) | 一种休眠方法、唤醒方法和移动终端设备 | |
JP2009532783A (ja) | 共用不揮発性メモリ・アーキテクチャ | |
WO2018010596A1 (zh) | 一种模式切换方法及装置 | |
US20140019496A1 (en) | Data transfer method | |
US10824488B2 (en) | Device detection method and system, electronic device, cloud robot system, and computer program product | |
WO2020034908A1 (zh) | 一种遥控器与移动终端的通信方法、装置和遥控器 | |
WO2014161512A1 (zh) | 一种网络连接方法及装置 | |
WO2021077742A1 (zh) | 一种业务处理方法、系统、装置及可读存储介质 | |
CN109344104A (zh) | 电子设备及信号传输方法 | |
TW201305772A (zh) | 連續處理網路資料的系統及方法 | |
WO2020102940A1 (zh) | 一种异常处理方法、终端设备及存储介质 | |
WO2013167010A2 (zh) | 一种移动终端及其开机方法 | |
WO2017075997A1 (zh) | 安卓调试桥的启动方法、装置及终端 | |
TWI637616B (zh) | 基於快取一致性之控制方法 | |
WO2021155551A1 (zh) | 芯片下载固件的方法和芯片 | |
WO2013182123A1 (zh) | 一种数据终端的运行模式切换方法、装置及数据终端 | |
WO2013004175A1 (zh) | 一种电子设备的软件升级方法及装置 | |
CN112860144B (zh) | 一种控制方法及系统 | |
TWI461905B (zh) | 可遠端當機復原的運算裝置、用於運算裝置之遠端當機復原之方法及電腦可讀取媒體 | |
US10104619B2 (en) | Retrieval of a command from a management server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16861267 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16861267 Country of ref document: EP Kind code of ref document: A1 |