CN109871288A - Execute method, apparatus, equipment and the medium of android system order - Google Patents

Execute method, apparatus, equipment and the medium of android system order Download PDF

Info

Publication number
CN109871288A
CN109871288A CN201811595613.9A CN201811595613A CN109871288A CN 109871288 A CN109871288 A CN 109871288A CN 201811595613 A CN201811595613 A CN 201811595613A CN 109871288 A CN109871288 A CN 109871288A
Authority
CN
China
Prior art keywords
android
android system
adbd
jadb
wireless communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811595613.9A
Other languages
Chinese (zh)
Other versions
CN109871288B (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.)
Shanghai Rui Jia Information Technology Co Ltd
Original Assignee
Shanghai Rui Jia Information 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 Shanghai Rui Jia Information Technology Co Ltd filed Critical Shanghai Rui Jia Information Technology Co Ltd
Priority to CN201811595613.9A priority Critical patent/CN109871288B/en
Publication of CN109871288A publication Critical patent/CN109871288A/en
Application granted granted Critical
Publication of CN109871288B publication Critical patent/CN109871288B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention provides a kind of method, apparatus, Android device, electronic equipment and media for executing android system order, this method comprises: opening the adbd service of android system;It is established by adbd service and is connect with the wireless communication of JADB;It receives JADB and connects the android system order of transmission by wireless communication, and execute android system order;The implementing result of android system order is connected by wireless communication and is sent to JADB.The embodiment of the present invention realizes connection transmission android system order and corresponding implementing result by wireless communication, USB data line need not be connected, Android device does not need to be located near JADB, the position of Android device is unrestricted, improve the convenience of equipment manipulation, it does not need ADB server and carrys out forward command, improve versatility.

Description

Execute method, apparatus, equipment and the medium of android system order
Technical field
The present invention relates to android system technical fields, more particularly to a kind of side for executing android system order Method, device, Android device, electronic equipment and medium.
Background technique
ADB (Android Debug Bridge, Android debug bridge) is that Android exploitation and tester are irreplaceable Strong tools.When needing to be implemented android system order, order can be executed in Android device by ADB, so as to To carry out Cmd Shell etc. with Android first floor system.
In the prior art, when executing android system order, computer, which needs to dispose an ADB server, to be responsible for connecing It receives on command messages, then forward command message to Android device.But the ADB server of computer terminal is wanted and Android Equipment keeps USB connection, causes the position of Android device limited, and since ADB server is responsible for order forwarding, needs The code for writing a large amount of forward rules causes versatility poor.
Summary of the invention
In view of the above problems, it proposes the embodiment of the present invention and overcomes the above problem or at least partly in order to provide one kind Method, apparatus, Android device, electronic equipment and the medium of a kind of execution android system order to solve the above problems.
According to an embodiment of the present invention in a first aspect, provide it is a kind of execute android system order method, comprising:
Open the adbd service of android system;
It is established by adbd service and is connect with the wireless communication of JADB, wherein the JADB is Java editions ADB visitors Family end;
The android system order that the JADB is sent by the wireless communication connection is received, and described in execution Android system order;
The implementing result of the android system order is sent to the JADB by wireless communication connection.
Optionally, the adbd service for opening android system, comprising:
It opens developer's mode and establishes and connect with the USB of computer terminal;
The adbd open command that the computer terminal is sent by the USB connection is received, and executes the adbd and opens Order, to open the adbd service of android system.
Optionally, after opening the adbd service of android system, further includes:
Disconnection is connect with the USB of the computer terminal.
Optionally, the adbd service for opening android system, comprising:
Developer's mode is opened, and opens the adbd service of android system by the application program of starting adbd service, The application program has root authority and the Android device is the equipment that root is crossed.
Optionally, described established by adbd service connect with the wireless communication of JADB, comprising:
Connect wireless network;
Obtain the port numbers of IP address and adbd service, and the port numbers that the IP address and the adbd are serviced As device identification;
According to the device identification, foundation is connect with the wireless communication of JADB.
Optionally, the form of the android system order is the form of Java code.
Second aspect according to an embodiment of the present invention provides a kind of method for executing android system order, comprising:
It is established by the adbd service of Android device and is connect with the wireless communication of the Android device, it is described The adbd service of the android system of Android device has turned on;
The android system order of user's input is received, and the android system order is passed through into the wireless communication Connection is sent to the Android device;
The Android device is received to the implementing result of the android system order, and shows and described executes knot Fruit.
Optionally, the adbd service by Android device is established connects with the wireless communication of the Android device It connects, comprising:
The device identification that user specifies is obtained, the device identification includes the IP address and adbd service of Android device Port numbers;
According to the device identification, foundation is connect with the wireless communication of the Android device.
Optionally, the form of the android system order is the form of Java code.
The third aspect according to an embodiment of the present invention provides a kind of device for executing android system order, comprising:
Adbd services opening module, and the adbd for opening android system is serviced;
Module is established in communication connection, is connect for being established by adbd service with the wireless communication of JADB, wherein institute State the ADB client that JADB is Java editions;
Android system command execution module passes through the wireless communication connection transmission for receiving the JADB Android system order, and execute the android system order;
Implementing result feedback module, for the implementing result of the android system order to be passed through the wireless communication Connection is sent to the JADB.
Optionally, the adbd service opening module includes:
USB connection unit is connect for opening developer's mode and establishing with the USB of computer terminal;
Adbd services opening unit, opens life by the adbd that the USB connection is sent for receiving the computer terminal It enables, and executes the adbd open command, to open the adbd service of android system.
Optionally, further includes:
USB connection disconnects module, for disconnecting and the computer after opening the adbd service of android system The USB connection at end.
Optionally, the adbd service opening module is specifically used for:
Developer's mode is opened, and opens the adbd service of android system by the application program of starting adbd service, The application program has root authority and the Android device is the equipment that root is crossed.
Optionally, the communication connection establishes module and includes:
Wireless network connection unit, for connecting wireless network;
Device identification determination unit, for obtaining the port numbers of IP address and adbd service, and by the IP address Port numbers with adbd service are as device identification;
Communication connection establishment unit, for according to the device identification, foundation to be connect with the wireless communication of JADB.
Optionally, the form of the android system order is the form of Java code.
Fourth aspect according to an embodiment of the present invention provides a kind of device for executing android system order, comprising:
Module is established in communication connection, is established and the Android device for the adbd service by Android device Wireless communication connection, the adbd service of the android system of the Android device have turned on;
Android system command sending module, for receiving the android system order of user's input, and will be described Android system order is sent to the Android device by wireless communication connection;
Implementing result display module, for receiving the Android device to the execution knot of the android system order Fruit, and show the implementing result.
Optionally, the communication connection establishes module and includes:
Device identification acquiring unit, the device identification specified for obtaining user, the device identification include that Android is set The port numbers of standby IP address and adbd service;
Communication connection establishment unit, for establishing the wireless communication with the Android device according to the device identification Connection.
Optionally, the form of the android system order is the form of Java code.
According to an embodiment of the present invention the 5th aspect, provide a kind of Android device, comprising: processor, memory and It is stored in the computer program that can be run on the memory and on the processor, the computer program is by the processing The method of the execution android system order as described in first aspect is realized when device executes.
The 6th aspect according to an embodiment of the present invention, provides a kind of electronic equipment, comprising: processor, memory and deposit The computer program that can be run on the memory and on the processor is stored up, the computer program is by the processor The method of the execution android system order as described in second aspect is realized when execution.
The 7th aspect according to an embodiment of the present invention, provides a kind of computer readable storage medium, the computer can It reads to be stored with computer program on storage medium, such as first aspect or second is realized when the computer program is executed by processor The method of execution android system order described in aspect.
Method, apparatus, the Android device, electronic equipment provided in an embodiment of the present invention for executing android system order And medium, it is serviced by the adbd that Android device opens android system, is established by adbd service with JADB's Wireless communication connection receives JADB and connects the android system order of transmission by wireless communication, and executes the Android The implementing result of android system order is connected by wireless communication and is sent to JADB, passed through to realize by system command Wireless communication connection transmission android system order and corresponding implementing result, it is not necessary to connect USB data line, Android device It does not need to be located near JADB, the position of Android device is unrestricted, improves the convenience of equipment manipulation, does not need ADB Server carrys out forward command, improves versatility.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.
Fig. 1 is a kind of step flow chart of method for executing android system order provided in an embodiment of the present invention;
Fig. 2 is a kind of step flow chart of method for executing android system order provided in an embodiment of the present invention;
Fig. 3 is a kind of step flow chart of method for executing android system order provided in an embodiment of the present invention;
Fig. 4 is a kind of step flow chart of method for executing android system order provided in an embodiment of the present invention;
Fig. 5 is a kind of structural block diagram of device for executing android system order provided in an embodiment of the present invention;
Fig. 6 is a kind of structural block diagram of device for executing android system order provided in an embodiment of the present invention;
Fig. 7 is a kind of structural block diagram of Android device provided in an embodiment of the present invention;
Fig. 8 is the structural block diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
The exemplary embodiment that the present invention will be described in more detail below with reference to accompanying drawings.Although showing the present invention in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here It is limited.It is to be able to thoroughly understand the present invention on the contrary, providing these embodiments, and can be by the scope of the present invention It is fully disclosed to those skilled in the art.
In various embodiments of the present invention, Android device is the electronic equipment for being equipped with android system, such as Android Mobile phone or the tablet computer etc. for being equipped with android system.ADB is Android debugging tool, and adbd is to operate in Android ADB background process in equipment.JADB is Java editions ADB clients.
It should be noted that root authority is one kind of system permission in various embodiments of the present invention, it is also root authority, The equipment that root is crossed is the equipment for having carried out root operation.Root be one kind be present in unix system (such as AIX, BSD) and Unique power user in class unix system (such as Linux and android system), is equivalent in Windows system SYSTEM (XP and following version) user or TrustedInstaller (Vista and the above version) user.It is with system In all permission, such as start or stop a process, delete or increase user, increase or disabling hardware etc..
Root authority is the administration authority of Android device highest level, can be set to Android after obtaining root authority Standby file is managed, including deletion system file etc..Android device is that the equipment that root is crossed shows to relieve this Original limitation of Android device.
Fig. 1 is a kind of step flow chart of method for executing android system order provided in an embodiment of the present invention, the party Method can be applied in Android device, as shown in Figure 1, this method may include:
Step 101, the adbd service of android system is opened.
In the embodiment of the present invention, after Android device opens the adbd service of android system, it can be taken by adbd Business receives the android system order that JADB is sent, and feeds back the implementing result of android system order to JADB.Android After the adbd service of equipment is opened, it can be always maintained at open state, unless Android device shutdown can just close adbd clothes Business, thus after opening an adbd service, as long as adbd service is in open state, so that it may execute subsequent and JADB and establish nothing Line communicates to connect and transmits android system order and the operation of execution result back.
Step 102, it is established by adbd service and is connect with the wireless communication of JADB, wherein the JADB is Java The ADB client of version.
Wherein, wireless communication connection is for Android device, and Android device passes through wireless network connection Into internet, while JADB is also connected in internet, and the two can establish wireless communication connection.The wireless communication connects It is connected in TCP (Transmission Control Protocol, transmission control protocol) connection.
Android device directly can establish wireless communication connection by adbd service and JADB, establish the nothing with JADB After line communication connection, the android system order of directly transmission JADB can be connected by wireless communication to Android device, And Android device is fed back to the implementing result of android system order to JADB, without carrying out by ADB server The forwarding of message, and Android device needs not necessarily lie near JADB.For example, Android device is on some ground of Pekinese Side, and JADB is located at Shanghai somewhere, as long as the two establishes communication connection, so that it may transmit android system order And corresponding implementing result.
Android device by the control of ADB server, can not establish wireless communication connection, thus more with multiple JADB A JADB can control an Android device simultaneously.
Optionally, described established by adbd service connect with the wireless communication of JADB, comprising:
Connect wireless network;
Obtain the port numbers of IP address and adbd service, and the port numbers that the IP address and the adbd are serviced As device identification;
According to the device identification, foundation is connect with the wireless communication of JADB.
Wherein, the wireless network for example can be WiFi (Wireless-Fidelity, Wireless Fidelity).
Android device has connected in internet after being connected to wireless network, can in same network segment JADB establishes communication connection.Android device obtains the IP address of itself, and obtains the port numbers of adbd service, with IP address Device identification of the port numbers serviced with adbd as Android device, Android device can be according to the request instruction of user The device identification is shown, consequently facilitating device identification and Android device that JADB is specified according to user are established and communicated to connect.
Step 103, the android system order that the JADB is sent by the wireless communication connection is received, and is executed The android system order.
JADB can receive the android system order of user's input, and by wireless communication by android system order Connection is sent to the adbd service of Android device, and Android device receives android system order by adbd service Afterwards, the android system order is executed.
Wherein, the form of android system order is the form of Java code, rather than the form of existing order line, To facilitate the system integration.Android system order is order relevant to android system, since android system is base In linux system, so, android system order is the order under linux system.For example, top order, ps order or cd Order etc..Top order is common performance analysis tool under linux system, can in real-time display system each process money Source occupancy, similar to the task manager of Windows.Ps order is for reporting the process status of current system.cd (Change Directory switches catalogue) order is the order for switch operating catalogue.
Step 104, the implementing result of the android system order is sent to by wireless communication connection described JADB。
After executing android system order, being connect by the wireless communication between JADB will execute Android device As a result it is sent to JADB, checks implementing result convenient for user.
For example, Android device obtains Android if the android system order that JADB is sent is top order The resource occupation situation of each process in system, the resource occupation situation of each process is made in the android system that will acquire For implementing result, and the implementing result is sent to JADB.If the android system order that JADB is sent is ps order, Android device obtains the process status of current android system, the process status for the current android system that will acquire JADB is sent to as implementing result, and by the implementing result.If the android system order that JADB is sent is cd order, Then Android device, if switched successfully, is incited somebody to action according under cd order switch operating catalogue to the specified working directory of cd order The implementing result is sent to JADB as implementing result by the working directory after switching, if switching is unsuccessful, will be switched not The implementing result is sent to JADB as implementing result by successful information.
The method provided in this embodiment for executing android system order, the adbd by opening android system take Business is established by adbd service and is connect with the wireless communication of JADB, is received JADB and is connected transmission by wireless communication Android system order, and the android system order is executed, the implementing result of android system order is passed through wireless Communication connection is sent to JADB, to realize connection transmission android system order and corresponding execution by wireless communication As a result, USB data line need not be connected, Android device is not needed to be located near JADB, and the position of Android device is unrestricted, is mentioned The high convenience of equipment manipulation, does not need ADB server and carrys out forward command, improve versatility.
Fig. 2 is a kind of step flow chart of method for executing android system order provided in an embodiment of the present invention, is such as schemed Shown in 2, this method may include:
Step 201, it opens developer's mode and establishes and connect with the USB of computer terminal.
Wherein, developer's mode is mainly used for debugging Android device.
Android device instructs the developer's mode for opening Android device depending on the user's operation.Different model The mode that Android device opens developer's mode is different.For example, user can click in the setting page for Huawei's mobile phone ' about mobile phone ' option finds ' version number ' option in ' about mobile phone ' page, quickly clicks ' version number ' option 3 times or more Secondary, Huawei's mobile phone just prompts developer's option to open;For millet mobile phone, page click ' my equipment ' option is being set, In ' my equipment ' page find ' whole parameters ' option, after ' whole parameters ' finds MIUI version, continuous four clicks, It just will appear prompt below mobile phone, then just can enter developer's mode.
Android device is connected by USB (Universal Serial Bus, universal serial bus) in user and is calculated After generator terminal, the USB connection of Android device and computer terminal is just established.
Step 202, the adbd open command that the computer terminal is sent by the USB connection is received, and described in execution Adbd open command, to open the adbd service of android system.
User can input adbd open command in the ADB client of computer terminal, and the adbd open command is adb Adbd open command is transmitted to Android device by the ADB server of tcpip 5555, computer terminal, and Android device connects After receiving adbd open command, the order is executed, to open the adbd service of android system.Wherein, ADB client here End is traditional ADB client, that is, when executing ADB order, needs to be executed by C-S framework, that is, be configured at the ADB of computer terminal Client and ADB server are executed jointly, by ADB server forward order between ADB client and Android device and Feedback.In the embodiment of the present invention, it is only necessary to open the adbd service of Android device using traditional ADB client, later There is no need to use ADB client, the transmission of android system order is directly carried out by JADB.
Step 203, it is established by adbd service and is connect with the wireless communication of JADB, wherein the JADB is Java The ADB client of version.
The particular content of this step is identical as the particular content of the step 102 in above-described embodiment, and which is not described herein again.
Step 204, the android system order that the JADB is sent by the wireless communication connection is received, and is executed The android system order.
The particular content of this step is identical as the particular content of the step 103 in above-described embodiment, and which is not described herein again.
Step 205, the implementing result of the android system order is sent to by wireless communication connection described JADB。
The particular content of this step is identical as the particular content of the step 104 in above-described embodiment, and which is not described herein again.
Optionally, after opening the adbd service of android system, further includes:
Disconnection is connect with the USB of the computer terminal.
As long as the transmission of subsequent android system order can lead to after the adbd service for opening android system The wireless communication crossed between Android device and JADB connects to transmit, and USB connection is no longer dependent on, so as to disconnect USB Connection, and Android device can also be moved arbitrarily, without being located near computer terminal.Wherein, JADB can be mounted to The client of the computer terminal is also possible to be installed on the client of other equipment.Other equipment can be computer, can also be with It is the equipment such as mobile phone or tablet computer.
It is provided in this embodiment execute android system order method, pass through open developer and establish and computer The USB connection at end receives the adbd open command that computer terminal is sent by USB connection, and executes adbd open command, to open The adbd service for opening android system can be directly logical independent of USB connection after the service for opening android system It crosses and is connect with the wireless communication of JADB to transmit android system order and execution result back, improve equipment manipulation just Victory.
Fig. 3 is a kind of step flow chart of method for executing android system order provided in an embodiment of the present invention, is such as schemed Shown in 3, this method may include:
Step 301, developer's mode is opened, and android system is opened by the application program of starting adbd service Adbd service, the application program has root authority and the Android device is the equipment that root is crossed.
Wherein, the process of developer's mode and the process phase that developer's mode is opened in above-described embodiment step 201 are opened Together, which is not described herein again.
The application program of starting adbd service is installed in Android device, and to assign application program root power Limit after the application program has root authority, can be serviced according to the adbd that android system is opened in the instruction of user.
Step 302, it is established by adbd service and is connect with the wireless communication of JADB, wherein the JADB is Java The ADB client of version.
The particular content of this step is identical as the particular content of the step 102 in above-described embodiment, and which is not described herein again.
Step 303, the android system order that the JADB is sent by the wireless communication connection is received, and is executed The android system order.
The particular content of this step is identical as the particular content of the step 103 in above-described embodiment, and which is not described herein again.
Step 304, the implementing result of the android system order is sent to by wireless communication connection described JADB。
The particular content of this step is identical as the particular content of the step 104 in above-described embodiment, and which is not described herein again.
The method provided in this embodiment for executing android system order passes through unlatching on the basis of the above embodiments Developer's mode and the adbd service that android system is opened by the application program of starting adbd service, are set by Android Adbd service can be opened for the application program of itself, avoids the need for opening adbd clothes by USB connection computer terminal Business further improves the convenience of equipment manipulation.
Fig. 4 is a kind of step flow chart of method for executing android system order provided in an embodiment of the present invention, the party Method can be applied in JADB, as shown in figure 4, the method for the execution android system order may include:
Step 401, it is established by the adbd service of Android device and is connect with the wireless communication of the Android device, The adbd service of the android system of the Android device has turned on.
Wherein, JADB is Java editions ADB clients, can be installed in computer, and smart phone can also be installed on Or in the equipment such as tablet computer.Wireless communication connection is for Android device, and Android device passes through wireless network Network is connected in internet, while JADB is also connected in internet, and the two can establish wireless communication connection.It is described wireless Communication connection is TCP connection.
After Android device accesses wireless network, JADB can directly by the adbd of Android device service with Android device establishes wireless communication connection, after establishing wireless communication connection, can connect direct transmission by wireless communication Android system order receives the implementing result of Android device feedback to Android device, without passing through ADB Server carries out the forwarding of message, and Android device needs not necessarily lie near JADB.For example, Android device is in Beijing Somewhere, and JADB is located at Shanghai somewhere, as long as the two establishes communication connection, so that it may transmit Android System command and corresponding implementing result.
Optionally, the adbd service by Android device is established connects with the wireless communication of the Android device It connects, comprising:
The device identification that user specifies is obtained, the device identification includes the IP address and adbd service of Android device Port numbers;
According to the device identification, foundation is connect with the wireless communication of the Android device.
User knows the IP address for the Android device to be manipulated and the port numbers of adbd service, by the IP address and Device identification of the port numbers of adbd service as Android device.JADB can provide the input interface of device identification, pass through The input interface receives the device identification that user specifies, and the device identification that JADB is specified according to user is built with the Android device Vertical wireless communication connection, connects by wireless communication convenient for subsequent JADB and manipulates to Android device.
Step 402, the android system order of user's input is received, and by the android system order described in Wireless communication connection is sent to the Android device.
JADB can provide android system order input page, and receive user's input by input page Android system order is connected the adbd service for being sent to Android device by android system order by wireless communication, After Android device receives android system order by adbd service, the android system order is executed.
Wherein, the form of android system order is the form of Java code, rather than the form of existing order line, To facilitate the system integration.Android system order is order relevant to android system, since android system is base In linux system, so, android system order is the order under linux system.For example, top order, ps order or cd Order etc..Top order is common performance analysis tool under linux system, can in real-time display system each process money Source occupancy, similar to the task manager of Windows.Ps order is for reporting the process status of current system.cd (Change Directory switches catalogue) order is the order for switch operating catalogue.
Step 403, the Android device is received to the implementing result of the android system order, and described in display Implementing result.
After Android device executes android system order, the implementing result of android system order can be passed through nothing Line communication connection is sent to JADB, after JADB receives the implementing result, the implementing result is shown, so that user can view The implementing result of android system order.
For example, if the android system order that JADB is sent to Android device is top order, Android device It executes the top order, obtains the resource occupation situation of each process in android system, in the android system that will acquire The resource occupation situation of each process is sent to JADB as implementing result, and by the implementing result.If JADB is sent to The android system order of Android device is ps order, then Android device executes ps order, obtains current Android The process status of system, the process status for the current android system that will acquire is as implementing result, and by the implementing result It is sent to JADB.If JADB be sent to Android device android system order be cd order, Android device according to Under the working directory that cd order switch operating catalogue is specified to cd order, if switched successfully, by the working directory after switching As implementing result, which is sent to JADB, if switching is unsuccessful, unsuccessful information will be switched as holding Row is as a result, be sent to JADB for the implementing result.
The method provided in this embodiment for executing android system order is serviced by the adbd of Android device and is established It is connect with the wireless communication of Android device, receives the android system order of user's input, and by the android system Order is sent to Android device by wireless communication connection, receives Android device and orders the android system The implementing result of order, and show the implementing result, to realize connection transmission android system order by wireless communication And corresponding implementing result, it is not necessary to connect USB data line, Android device does not need to be located near JADB, Android device Position is unrestricted, improves the convenience of equipment manipulation, and does not need ADB server and carry out forward command, improves general Property.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method It closes, but those skilled in the art should understand that, embodiment of that present invention are not limited by the describe sequence of actions, because according to According to the embodiment of the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and the related movement not necessarily present invention is implemented Necessary to example.
Fig. 5 is a kind of structural block diagram of device for executing android system order provided in an embodiment of the present invention, the execution The device of android system order can be applied in Android device, as shown in figure 5, the execution android system order Device may include:
Adbd services opening module 501, and the adbd for opening android system is serviced;
Module 502 is established in communication connection, is connect for being established by adbd service with the wireless communication of JADB, In, the JADB is Java editions ADB clients;
Android system command execution module 503 passes through the wireless communication connection transmission for receiving the JADB Android system order, and execute the android system order;
Implementing result feedback module 504, for the implementing result of the android system order to be passed through the channel radio Letter connection is sent to the JADB.
Optionally, the adbd service opening module includes:
USB connection unit is connect for opening developer's mode and establishing with the USB of computer terminal;
Adbd services opening unit, opens life by the adbd that the USB connection is sent for receiving the computer terminal It enables, and executes the adbd open command, to open the adbd service of android system.
Optionally, further includes:
USB connection disconnects module, for disconnecting and the computer after opening the adbd service of android system The USB connection at end.
Optionally, the adbd service opening module is specifically used for:
Developer's mode is opened, and opens the adbd service of android system by the application program of starting adbd service, The application program has root authority and the Android device is the equipment that root is crossed.
Optionally, the communication connection establishes module and includes:
Wireless network connection unit, for connecting wireless network;
Device identification determination unit, for obtaining the port numbers of IP address and adbd service, and by the IP address Port numbers with adbd service are as device identification;
Communication connection establishment unit, for according to the device identification, foundation to be connect with the wireless communication of JADB.
Optionally, the form of the android system order is the form of Java code.
The device provided in this embodiment for executing android system order services opening module by adbd and opens The adbd of android system is serviced, and communication connection is established module and connected by the wireless communication that adbd service builds on JADB, Android system command execution module receives JADB and connects the android system order of transmission by wireless communication, and executes institute Android system order is stated, implementing result feedback module passes through the implementing result of the android system order described wireless Communication connection is sent to JADB, to realize connection transmission android system order and corresponding execution by wireless communication As a result, USB data line need not be connected, Android device is not needed to be located near JADB, and the position of Android device is unrestricted, is mentioned The high convenience of equipment manipulation, does not need ADB server and carrys out forward command, improve versatility.
Fig. 6 is a kind of structural block diagram of device for executing android system order provided in an embodiment of the present invention, the execution The device of android system order can be applied in JADB, as shown in fig. 6, the device of the execution android system order can To include:
Module 601 is established in communication connection, is established for the adbd service by Android device and is set with the Android Standby wireless communication connection, the adbd service of the android system of the Android device have turned on;
Android system command sending module 602, for receiving the android system order of user's input, and will be described Android system order is sent to the Android device by wireless communication connection;
Implementing result display module 603 holds the android system order for receiving the Android device Row is as a result, and show the implementing result.
Optionally, the communication connection establishes module and includes:
Device identification acquiring unit, the device identification specified for obtaining user, the device identification include that Android is set The port numbers of standby IP address and adbd service;
Communication connection establishment unit, for establishing the wireless communication with the Android device according to the device identification Connection.
Optionally, the form of the android system order is the form of Java code.
The device provided in this embodiment for executing android system order, establishes module by communication connection and passes through The adbd service of Android device builds on the wireless communication connection of Android device, android system command sending module The android system order of user's input is received, and the android system order is sent by wireless communication connection To Android device, implementing result display module receives Android device to the implementing result of the android system order, And show the implementing result, to realize connection transmission android system order and corresponding execution by wireless communication As a result, USB data line need not be connected, Android device is not needed to be located near JADB, and the position of Android device is unrestricted, is mentioned The high convenience of equipment manipulation, and do not need ADB server and carry out forward command, improve versatility.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
Fig. 7 is a kind of structural block diagram of Android device provided in an embodiment of the present invention, which is equipped with Android system.As shown in fig. 7, the Android device 700 may include one or more processors 701 and and processor One or more memories 702 of 701 connections.Android device 700 can also include input interface 703 and output interface 704, for being communicated with another device or system.Memory is storable in by the CPU of processor 701 program code executed In 702.
Processor 701 in Android device 700 calls the program code for being stored in memory 702, to execute above-mentioned reality The method for applying the execution android system order in example.
Processor is the control centre of above-mentioned Android device, and provides processing unit, for executing instruction, in progress Disconnected operation, provides clocking capability and various other functions.Processor can be monokaryon (single CPU) processor or multicore (multi -CPU) Processor.Unless otherwise stated, the component for being described as such as processor or memory for executing task can realize to be general Component is temporarily used for executing task in given time, or is embodied as being manufactured specifically for executing the particular elements of the task.This The term " processor " in place refers to one or more devices, circuit and/or processing core, for handling data, such as computer Program instruction.
Said elements in above-mentioned Android device can be connected to each other by bus, and bus such as data/address bus, address is total One of line, control bus, expansion bus and local bus or any combination thereof.
Fig. 8 is the structural block diagram of a kind of electronic equipment provided in an embodiment of the present invention.As shown in figure 8, the electronic equipment 800 The one or more memories 802 that may include one or more processors 801 and connect with processor 801.Electronic equipment 800 can also include input interface 803 and output interface 804, for being communicated with another device or system.By processor The program code that 801 CPU is executed is storable in memory 802.
Processor 801 in electronic equipment 800 calls the program code for being stored in memory 802, to execute above-mentioned implementation The method of execution android system order in example.
Processor is the control centre of above-mentioned electronic equipment, and provides processing unit, for executing instruction, carries out interruption behaviour Make, clocking capability and various other functions are provided.Processor can be handled for monokaryon (single CPU) processor or multicore (multi -CPU) Device.Unless otherwise stated, the component for being described as such as processor or memory for executing task can realize as universal component, It is temporarily used for executing task in given time, or is embodied as being manufactured specifically for executing the particular elements of the task.This place Term " processor " refers to one or more devices, circuit and/or processing core, for handling data, such as computer program Instruction.
Said elements in above-mentioned electronic equipment can be connected to each other by bus, bus for example data/address bus, address bus, One of control bus, expansion bus and local bus or any combination thereof.
According to one embodiment of present invention, a kind of computer readable storage medium is additionally provided, it is described computer-readable Computer program is stored on storage medium, storage medium can be read-only memory (Read-Only Memory, ROM), or It is read-write, such as hard disk, flash memory.The execution of previous embodiment is realized when the computer program is executed by processor The method of android system order.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Above to a kind of method, apparatus, Android device, electricity for executing android system order provided by the present invention Sub- equipment and medium, are described in detail, and specific case used herein carries out the principle of the present invention and embodiment It illustrates, the above description of the embodiment is only used to help understand the method for the present invention and its core ideas;Meanwhile for ability The those skilled in the art in domain, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, comprehensive Upper described, the contents of this specification are not to be construed as limiting the invention.

Claims (21)

1. a kind of method for executing android system order characterized by comprising
Open the adbd service of android system;
It is established by adbd service and is connect with the wireless communication of JADB, wherein the JADB is Java editions Android debugging Bridge ADB client;
The android system order that the JADB is sent by the wireless communication connection is received, and executes the Android system System order;
The implementing result of the android system order is sent to the JADB by wireless communication connection.
2. the method according to claim 1, wherein the adbd service for opening android system, comprising:
It opens developer's mode and establishes and connect with the USB of computer terminal;
The adbd open command that the computer terminal is sent by the USB connection is received, and executes the adbd open command, To open the adbd service of android system.
3. according to the method described in claim 2, it is characterized in that, also being wrapped after opening the adbd service of android system It includes:
Disconnection is connect with the USB of the computer terminal.
4. the method according to claim 1, wherein the adbd service for opening android system, comprising:
Developer's mode is opened, and opens the adbd service of android system by the application program of starting adbd service, it is described Application program has root authority and the Android device is the equipment that root is crossed.
5. the method according to claim 1, wherein it is described established by adbd service it is wireless with JADB Communication connection, comprising:
Connect wireless network;
Obtain the port numbers of IP address and adbd service, and the port numbers that the IP address and the adbd are serviced as Device identification;
According to the device identification, foundation is connect with the wireless communication of JADB.
6. the method according to claim 1, wherein the form of the android system order is Java code Form.
7. a kind of method for executing android system order characterized by comprising
It is established by the adbd service of Android device and is connect with the wireless communication of the Android device, the Android The adbd service of the android system of equipment has turned on;
The android system order of user's input is received, and the android system order is connected by the wireless communication It is sent to the Android device;
The Android device is received to the implementing result of the android system order, and shows the implementing result.
8. the method according to the description of claim 7 is characterized in that the adbd service by Android device establish with The wireless communication of the Android device connects, comprising:
The device identification that user specifies is obtained, the device identification includes the IP address of Android device and the end of adbd service Slogan;
According to the device identification, foundation is connect with the wireless communication of the Android device.
9. the method according to the description of claim 7 is characterized in that the form of the android system order is Java code Form.
10. a kind of device for executing android system order characterized by comprising
Adbd services opening module, and the adbd for opening android system is serviced;
Module is established in communication connection, is connect for being established by adbd service with the wireless communication of JADB, wherein described JADB is Java editions ADB clients;
Android system command execution module, the Android sent for receiving the JADB by the wireless communication connection System command, and execute the android system order;
Implementing result feedback module, for connecting the implementing result of the android system order by the wireless communication It is sent to the JADB.
11. device according to claim 10, which is characterized in that the adbd services opening module and includes:
USB connection unit is connect for opening developer's mode and establishing with the USB of computer terminal;
Adbd service opening unit, the adbd open command sent for receiving the computer terminal by the USB connection, and The adbd open command is executed, to open the adbd service of android system.
12. device according to claim 11, which is characterized in that further include:
USB connection disconnects module, for disconnecting and the computer terminal after opening the adbd service of android system USB connection.
13. device according to claim 10, which is characterized in that the adbd service opening module is specifically used for:
Developer's mode is opened, and opens the adbd service of android system by the application program of starting adbd service, it is described Application program has root authority and the Android device is the equipment that root is crossed.
14. device according to claim 10, which is characterized in that the communication connection establishes module and includes:
Wireless network connection unit, for connecting wireless network;
Device identification determination unit, for obtaining the port numbers of IP address and adbd service, and by the IP address and institute The port numbers of adbd service are stated as device identification;
Communication connection establishment unit, for according to the device identification, foundation to be connect with the wireless communication of JADB.
15. device according to claim 10, which is characterized in that the form of the android system order is Java generation The form of code.
16. a kind of device for executing android system order characterized by comprising
Module is established in communication connection, is established for the adbd service by Android device wireless with the Android device Communication connection, the adbd service of the android system of the Android device have turned on;
Android system command sending module, for receiving the android system order of user's input, and by the Android System command is sent to the Android device by wireless communication connection;
Implementing result display module, for receiving the Android device to the implementing result of the android system order, And show the implementing result.
17. device according to claim 16, which is characterized in that the communication connection establishes module and includes:
Device identification acquiring unit, the device identification specified for obtaining user, the device identification includes Android device The port numbers of IP address and adbd service;
Communication connection establishment unit, for establishing and connecting with the wireless communication of the Android device according to the device identification It connects.
18. device according to claim 16, which is characterized in that the form of the android system order is Java generation The form of code.
19. a kind of Android device characterized by comprising processor, memory and be stored on the memory and can The computer program run on the processor realizes such as claim when the computer program is executed by the processor The described in any item methods for executing android system order of 1-6.
20. a kind of electronic equipment characterized by comprising processor, memory and be stored on the memory and can be in institute The computer program run on processor is stated, such as claim 7-9 is realized when the computer program is executed by the processor Described in any item methods for executing android system order.
21. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program is realized when the computer program is executed by processor such as any one of claim 1-6 or any one of claim 7-9 institute The method for the execution android system order stated.
CN201811595613.9A 2018-12-25 2018-12-25 Method, device, equipment and medium for executing Android system command Active CN109871288B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811595613.9A CN109871288B (en) 2018-12-25 2018-12-25 Method, device, equipment and medium for executing Android system command

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811595613.9A CN109871288B (en) 2018-12-25 2018-12-25 Method, device, equipment and medium for executing Android system command

Publications (2)

Publication Number Publication Date
CN109871288A true CN109871288A (en) 2019-06-11
CN109871288B CN109871288B (en) 2021-11-23

Family

ID=66917106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811595613.9A Active CN109871288B (en) 2018-12-25 2018-12-25 Method, device, equipment and medium for executing Android system command

Country Status (1)

Country Link
CN (1) CN109871288B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764840A (en) * 2019-09-29 2020-02-07 北京东软望海科技有限公司 Method, device and system for wirelessly debugging android device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881283A (en) * 2015-05-20 2015-09-02 深圳市创维电器科技有限公司 Method and system for obtaining root privilege of terminal device based on android
CN105868109A (en) * 2016-03-28 2016-08-17 北京奇虎科技有限公司 Improved mobile terminal application testing method and system
CN105893193A (en) * 2015-12-08 2016-08-24 乐视移动智能信息技术(北京)有限公司 Connection control method of adb (Android Debug Bridge) and related equipment
CN107544900A (en) * 2016-06-27 2018-01-05 北京优朋普乐科技有限公司 Android device and its open method and device, control system for debugging bridge
US20180253396A1 (en) * 2015-09-14 2018-09-06 Baidu Online Network Technology (Beijing) Co., Ltd. Method and device for interconnecting terminals, and storage medium
CN108536491A (en) * 2018-02-07 2018-09-14 武汉光庭信息技术股份有限公司 A kind of processing method and system of mobile unit Reverse Turning Control Android mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881283A (en) * 2015-05-20 2015-09-02 深圳市创维电器科技有限公司 Method and system for obtaining root privilege of terminal device based on android
US20180253396A1 (en) * 2015-09-14 2018-09-06 Baidu Online Network Technology (Beijing) Co., Ltd. Method and device for interconnecting terminals, and storage medium
CN105893193A (en) * 2015-12-08 2016-08-24 乐视移动智能信息技术(北京)有限公司 Connection control method of adb (Android Debug Bridge) and related equipment
CN105868109A (en) * 2016-03-28 2016-08-17 北京奇虎科技有限公司 Improved mobile terminal application testing method and system
CN107544900A (en) * 2016-06-27 2018-01-05 北京优朋普乐科技有限公司 Android device and its open method and device, control system for debugging bridge
CN108536491A (en) * 2018-02-07 2018-09-14 武汉光庭信息技术股份有限公司 A kind of processing method and system of mobile unit Reverse Turning Control Android mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BOBO: "《ADB连接手机的两种方式(usb数据线连接和wifi连接)》", 7 September 2017 *
C1063891514: "《ADB连接Android设备的三种方法》", 11 January 2018 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764840A (en) * 2019-09-29 2020-02-07 北京东软望海科技有限公司 Method, device and system for wirelessly debugging android device
CN110764840B (en) * 2019-09-29 2023-11-03 望海康信(北京)科技股份公司 Method, device and system for wirelessly debugging android device

Also Published As

Publication number Publication date
CN109871288B (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN107431651B (en) Life cycle management method and equipment for network service
CN104967585B (en) A kind of method and apparatus of remote debugging mobile terminal
WO2022227818A1 (en) Method and apparatus for network configuration, and smart home device
CN110677383B (en) Firewall wall opening method and device, storage medium and computer equipment
CN107770269A (en) A kind of service response method and its terminal
JP2022517973A (en) User identification card authentication method, devices, electronic devices and storage media
CN103812900A (en) Data synchronization method, device and system
CN103944961A (en) Application sharing method, device and system
CN104424036A (en) Synchronous operation method and device of smart terminal
CN104092661A (en) Serial port communication method and apparatus of virtual machines
CN208188814U (en) A kind of embedded device and its remote update system
CN106850554B (en) Method and device for dual-system directional connection
EP2445171B1 (en) File transfer protocol client and implementing method thereof
CN104570967B (en) Long-range control method and system based on android system
CN103560918A (en) Method and system for managing CPE port
CN109871288A (en) Execute method, apparatus, equipment and the medium of android system order
CN104751046B (en) A kind of user authen method and mobile terminal device of application program
CN112954770A (en) Device binding method and device, storage medium and electronic device
CN104301419A (en) Non-local-machine remote download control system and method
CN109104472B (en) Block chain network networking method, device, equipment and computer readable storage medium
CN114328026B (en) Virtual disk backup method, device, equipment and medium
CN106331051A (en) File transmission method and system, file receiving device and file transmission device
CN103138961A (en) Server control method, controlled server and central control server
CN112367362B (en) Data processing method, device, equipment and computer storage medium
CN113542282A (en) Cross-computing center file transmission method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant