CN107256188B - Android device control method and device, terminal and storage medium - Google Patents

Android device control method and device, terminal and storage medium Download PDF

Info

Publication number
CN107256188B
CN107256188B CN201710527204.4A CN201710527204A CN107256188B CN 107256188 B CN107256188 B CN 107256188B CN 201710527204 A CN201710527204 A CN 201710527204A CN 107256188 B CN107256188 B CN 107256188B
Authority
CN
China
Prior art keywords
adb
android device
command
android
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710527204.4A
Other languages
Chinese (zh)
Other versions
CN107256188A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201710527204.4A priority Critical patent/CN107256188B/en
Publication of CN107256188A publication Critical patent/CN107256188A/en
Application granted granted Critical
Publication of CN107256188B publication Critical patent/CN107256188B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a control method, a control device, a control terminal and a storage medium of an android device, wherein the method comprises the following steps: the control equipment sets a USB port connected with the android equipment to be in a USB Host mode; receiving an authentication password sent by the android device, and generating an authentication response password according to the authentication password; returning the authentication response password to the android device to realize the authentication of the android device on the control device; and generating an ADB command by utilizing an ADB protocol, and sending the ADB command to the android device so that the android device executes the ADB command. The technical problem that android equipment cannot be controlled through a WinCE operating system is solved, and control over the android equipment through a vehicle-mounted terminal can be achieved on the premise that hardware improvement of the existing vehicle-mounted terminal and the existing android equipment is not needed.

Description

Android device control method and device, terminal and storage medium
Technical Field
The embodiment of the invention relates to the technical field of vehicle networking, in particular to a control method and device of an android device, a terminal and a storage medium.
Background
According to the definition of the technical innovation strategy alliance of the car networking industry, the car networking is based on an in-car network, an inter-car network and a vehicle-mounted mobile internet and is based on an agreed communication protocol and a data interaction standard. A large system network for wireless communication and information exchange among vehicles-X (X: vehicles, roads, pedestrians, the Internet and the like) is an integrated network capable of realizing intelligent traffic management, intelligent dynamic information service and intelligent vehicle control, and is a typical application of the Internet of things technology in the field of traffic systems.
In the car networking system, the interconnection and intercommunication of the vehicle-mounted terminal and the intelligent terminal, especially the intelligent mobile phone, have great significance at the present stage. Since the in-vehicle terminal is defined at an early stage as a terminal for collecting and acquiring information of a vehicle, sensing a driving state and environment, and providing a simple entertainment and navigation service to a user, its information processing capability is weak and its operation capability is low. Interaction with a smart phone is needed to realize data communication with other vehicles or car networking platforms, and more application services are provided for users.
Because the WinCE operating system is generally adopted by the current vehicle-mounted terminal, and an Android (Android) system is adopted by the current smart phone, information interaction between the two systems cannot be carried out. At present, the mirrorlink vehicle networking standard is usually adopted to realize the connection of the android device and the vehicle-mounted terminal, and the standard can be utilized to control the android device through the vehicle-mounted terminal. However, the method requires that both the vehicle-mounted terminal and the android device support the standard, and only a small number of vehicle-mounted terminals support the standard at present, and the android device cannot be controlled by most vehicle-mounted terminals.
Disclosure of Invention
The invention provides a method, a device, a terminal and a storage medium for controlling an android device, and aims to solve the technical problem that the android device cannot be controlled through a WinCE operating system in the prior art.
In a first aspect, an embodiment of the present invention provides a method for controlling an android device, where the method includes:
the control equipment sets a USB port connected with the android equipment to be in a USB Host mode;
receiving an authentication password sent by the android device, and generating an authentication response password according to the authentication password;
returning the authentication response password to the android device to realize the authentication of the android device on the control device;
and generating an ADB command by utilizing an ADB protocol, and sending the ADB command to the android device so that the android device executes the ADB command. .
In a second aspect, an embodiment of the present invention further provides a control apparatus for an android device, where the control apparatus includes:
the setting module is used for controlling equipment to set a USB port connected with the android equipment to be in a USB Host mode;
the authentication response password generation module is used for receiving an authentication password sent by the android device and generating an authentication response password according to the authentication password;
the return module is used for returning the authentication response password to the android device so as to realize the authentication of the android device on the control device;
the command generation module is used for generating an ADB command by using an ADB protocol and sending the ADB command to the android device so that the android device can execute the ADB command.
In a third aspect, an embodiment of the present invention further provides a terminal, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the control method of the android device provided by the above embodiments.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for the method for controlling the android device provided in the above embodiments.
According to the control method, device, terminal and storage medium for the android device, provided by the embodiment of the invention, the USB port is set to be in the USB Host mode, the ADB protocol is utilized to generate the corresponding ADB virtual machine in the vehicle-mounted terminal after the authentication with the android device is passed, and the ADB virtual machine can generate the ADB command which can be executed by the android device, so that the android device can execute the generated ADB command. The technical problem that android equipment cannot be controlled through a WinCE operating system is solved, and control over the android equipment through a vehicle-mounted terminal can be achieved on the premise that hardware improvement of the existing vehicle-mounted terminal and the existing android equipment is not needed.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a flowchart of a control method for an android device according to an embodiment of the present invention;
fig. 2 is a flowchart of a control method for an android device according to a second embodiment of the present invention;
fig. 3 is a flowchart of a control method for an android device according to a third embodiment of the present invention;
fig. 4 is a flowchart of a control method for an android device according to a fourth embodiment of the present invention;
fig. 5 is a flowchart of a control method for an android device according to a fifth embodiment of the present invention;
fig. 6 is a structural diagram of a control apparatus of an android device according to a sixth embodiment of the present invention;
fig. 7 is a block diagram of a terminal according to a seventh embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a control method for an android device according to an embodiment of the present invention, where this embodiment is applicable to a situation where the android device is controlled by a vehicle-mounted terminal, and the method may be executed by a control device of the android device, and specifically includes the following steps:
and step 110, controlling the device to set a USB port connected with the android device to be in a USB Host mode.
Currently, a Universal Serial Bus (USB) port is configured on a vehicle-mounted terminal, and is used for data transmission with a USB disk drive or charging connected devices according to an electrical standard of USB. The Human Interface Device (HID) protocol utilizing the USB can interact with other external devices without installing drivers.
For the android device, the android device does not belong to plug-and-play external equipment, the HID protocol cannot be used, and the android device can be identified only after the corresponding driver is installed on the vehicle-mounted terminal. In the embodiment, the common configuration of the vehicle-mounted terminal is low, and the drivers of all the android devices are different, so that the vehicle-mounted terminal cannot be provided with the drivers of all the android devices in advance. Therefore, in this embodiment, the USB port connected to the android device needs to be set to the USB Host mode, so as to perform information interaction with the android device on the premise that the android device is not identified.
The USB Host mode is a mode in USB communication, and aims to take a current device as a master device (Host) that can fetch data from a Slave device (Slave). The connected USB device can be regarded as an end point which can be accessed, and therefore communication can be carried out with the vehicle-mounted terminal under the condition that the android device does not need to be identified. Compared with other communication modes, the USB Host mode is adopted to access the android device, and the communication is one-to-one, so that the adopted data protocol is simpler and more effective, and particularly, the high-efficiency communication with the android device can be realized under the condition that the configuration of a WinCE vehicle-mounted terminal is lower.
And 120, receiving an authentication password sent by the android device, and generating an authentication response password according to the authentication password.
When a debugging Bridge (Android Debug Bridge, ADB) is used to manage a simulated Android system, a real Android device, such as an Android mobile phone, needs to authenticate the ADB. So as to ensure the safety to the maximum extent. The current authentication strategy is that the android device sends out a corresponding authentication password and requires to obtain corresponding confirmation within a preset specified time limit. Therefore, the authentication password of the android device is received through the corresponding communication interface, and the corresponding authentication response password is generated according to the authentication password.
And step 130, returning the authentication response password to the android device so as to realize the authentication of the android device on the control device.
And sending the authentication response password generated in the above step to the android device, wherein the android device can judge the received authentication response password after receiving the authentication response password, and completes authentication on the control device, such as a vehicle-mounted terminal of a WinCE system, after confirming that no error exists.
Step 140, generating an ADB command by using an ADB protocol, and sending the ADB command to the android device, so that the android device executes the ADB command.
The ADB can be regarded as a client-server program, where the client can be a vehicle-mounted terminal, and the server is an android device. By means of the ADB protocol installed on the vehicle-mounted terminal, an android virtual machine can be generated in the vehicle-mounted terminal. A corresponding ADB command may be generated. Illustratively, the ADB command can be generated according to the operation of the user on the vehicle-mounted terminal. For example, the user performs the start operation of dialing 10086 through an external input device of the in-vehicle terminal, such as a key. And the android virtual machine in the vehicle-mounted terminal generates an ADB start-a android.intent.call-d.tel 10086 command according to the operation, sends the command to the android device, and executes the command for dialing 10086 by the android device to generate an active process for dialing 10086. Through the ADB order, can reach the purpose that controls android device through on-vehicle terminal.
For example, the generating a corresponding ADB command according to the operation of the user, and sending the ADB command to the android device, so that the android device executes the ADB command may include: generating a push command so that the android device can copy the file stored by the control device; generating a pull command to enable the control device to copy a file stored by the android device; and/or generating a shell command to inquire and/or manage the running state of the android device.
Illustratively, when a file of a WinCE vehicle-mounted terminal needs to be copied to an android device, a corresponding ADB push command may be generated, and a specific format of the ADB push command may be as follows:
ADB push-copy file/dir to device。
for example, the android device executes the command ADB push D: \ file.txt/system/temp, and the file.txt file in the D packing directory of the WinCE vehicle-mounted terminal can be copied to the/system/temp/directory of the android device.
Illustratively, when a file of a WinCE vehicle-mounted terminal needs to be copied to an android device, a corresponding ADB push command may be generated, and a specific format of the ADB push command may be as follows: ADB push-copy file/dir.
For example: the android device executes the command ADB pull/sdcard/. txt D \ can copy a certain file in the memory card of the android device to a D packing directory of a WinCE vehicle-mounted terminal.
The ADB shell can be regarded as a man-machine interaction program, and the shell can be used for completing corresponding control over an android terminal. And the detailed information of the android device can be acquired and the running state of the android device can be managed through the shell command. For example, the shell command may include: the method comprises the following steps: ps, kill, getprop, and am commands.
For example: the attribute information of the current android can be obtained through an ADB shell getprop command, and the version information of the device may include: version information of the device, etc.
The corresponding Activity, Boradcast, Service, etc. of the android device can be started through the ADB shell am command. Various active processes, broadcasts, and services may be initiated, etc.
The current process can be viewed through the ADB shell ps command. The commands can be used to determine which processes are running and the status of the running, whether a process is finished, whether a process is dead, which processes are occupying too much resources, and the like.
The process currently operated by the android device can be killed through an ADB shell kill command, a specific process can be killed independently, and certain processes can also be killed in batches.
The Shell command not only comprises the command, but also can inquire the running state of the android device and manage the running state of the android device by utilizing the command, and the control on the android device can be realized. For example, an am command may be utilized to run an application, kill some processes that unexpectedly stopped through kill, and so on.
According to the embodiment of the invention, the USB port is set to be in the USB Host mode, after the authentication with the android device is passed, the ADB protocol is utilized to generate the corresponding ADB virtual machine in the vehicle-mounted terminal, and the ADB virtual machine can be utilized to generate the ADB command which can be executed by the android device, so that the generated ADB command can be executed by the android device. The technical problem that android equipment cannot be controlled through a WinCE operating system is solved, and control over the android equipment through a vehicle-mounted terminal can be achieved on the premise that the existing vehicle-mounted terminal and the existing android equipment are not required to be improved.
Example two
Fig. 2 is a schematic flow chart of a control method for an android device according to a second embodiment of the present invention. In this embodiment, the generating of the authentication response password according to the authentication password is specifically optimized as follows: and generating an authentication response password corresponding to the authentication password by using a pre-installed password library. Correspondingly, the method for controlling the android device provided by the embodiment specifically includes:
and step 210, controlling the device to set a USB port connected with the android device to be in a USB Host mode.
And step 220, receiving an authentication password sent by the android device, and generating an authentication response password corresponding to the authentication password by using a pre-installed password library.
The authentication response password and the authentication password are in one-to-one mapping relationship, that is, each authentication password only has a unique authentication response password corresponding to the authentication response password. Therefore, the same rule needs to be set in the android device and the vehicle-mounted terminal of the WinCE system, so that the android device and the vehicle-mounted terminal of the WinCE system generate the same authentication response password according to the same rule. In this embodiment, the WinCE system vehicle-mounted terminal and the android device are pre-installed with the same password library, and the WinCE system vehicle-mounted terminal generates a corresponding authentication response password according to the received authentication password by using the password library. Illustratively, the pre-installed cryptographic library may be an OpenSSL cryptographic library, and OpenSSL is a secure socket layer cryptographic library, which includes a main cryptographic algorithm, a common key and certificate encapsulation management function, and an SSL protocol, and may provide secret transmission. The confidentiality and the reliability of communication are ensured, and the support can be realized at the server side and the user side simultaneously. The privacy of the authentication information can be effectively ensured.
Step 230, returning the authentication response password to the android device to realize the authentication of the android device on the control device;
step 240, generating an ADB command by using an ADB protocol, and sending the ADB command to the android device, so that the android device executes the ADB command.
In this embodiment, the generating of the authentication response password according to the authentication password is specifically optimized as follows: and generating an authentication response password corresponding to the authentication password by using a pre-installed password library. The password library can be used for automatically realizing the authentication of the vehicle-mounted terminal of the WinCE system, the security and the privacy of the authentication can be improved, and the reliability of the authentication is effectively improved.
EXAMPLE III
Fig. 3 is a schematic flow chart of a control method for an android device according to a second embodiment of the present invention. In this embodiment, the ADB command is generated and sent to an android device, so that the android device executes the ADB command, which is specifically optimized as follows: and generating a forward command, and establishing a data transmission channel for interacting specific information with the android device. Correspondingly, the method for controlling the android device provided by the embodiment specifically includes:
and 310, controlling the device to set a USB port connected with the android device to be in a USB Host mode.
And 320, receiving an authentication password sent by the android device, and generating an authentication response password according to the authentication password.
And step 330, returning the authentication response password to the android device to realize the authentication of the android device on the control device.
And 340, generating a forward command, and establishing a data transmission channel for interacting specific information with the android device.
With the ADB forward command, a data transfer channel with the android device can be established, which can be specific to a particular application, which can be currently user-specified, or currently running. That is, the data corresponding to the specific application can be transmitted through the established data transmission channel. Through the data transmission channel, the interactive data can be directly distributed to the application bottom port for processing the data, and the efficiency of data transmission and data processing is improved. Illustratively, an ADB forward command may be used to define a communication port by which data for applications implementing car networking functions may be received and transmitted to the android device.
In this embodiment, the ADB generation command is sent to the android device, so that the android device executes the ADB command, which is specifically optimized as follows: and generating a forward command, and establishing a data transmission channel for interacting specific information with the android device. Specific information can be interacted between the android terminal and the vehicle-mounted terminal through a channel established by a forward command, and data transmitted by each channel can be directionally handed to a specific application program for processing. Various information mixing is avoided, and the data processing efficiency is effectively improved.
Example four
Fig. 3 is a schematic flow chart of a control method for an android device according to a second embodiment of the present invention. In this embodiment, after a data transmission channel for exchanging specific information with the android device is established, the following steps are added: receiving audio and/or video data sent by the android device through the data transmission channel; and displaying the audio and/or video data. Correspondingly, the method for controlling the android device provided by the embodiment specifically includes:
and step 410, controlling the device to set a USB port connected with the android device to be in a USB Host mode.
And step 420, receiving the authentication password sent by the android device, and generating an authentication response password according to the authentication password.
And 430, returning the authentication response password to the android device to realize the authentication of the android device on the control device.
And step 440, generating a forward command, and establishing a data transmission channel for interacting specific information with the android device.
And 450, receiving audio and/or video data sent by the android device through the data transmission channel.
At present, a mainstream operating system interacts with a user in a graphical interface mode, the user does not need to master various complex operating commands, and the interaction with the operating system can be realized through other operations such as clicking the graphical interface. Therefore, in order to facilitate the user to control the android device through the operation of the vehicle-mounted terminal, a current image of the android device needs to be displayed in the vehicle-mounted terminal. Or when the android device is used for playing audio or video online, the audio or video needs to be displayed and played synchronously at the vehicle-mounted terminal. In order to achieve the purpose, at the android device end, the current image and/or the current played sound of the android device can be generated into corresponding video and/or audio data, and the video and/or audio data are sent to the vehicle-mounted terminal through the established data transmission channel.
And step 460, displaying the audio and/or video data.
As can be seen from the above disclosure, the received audio and/or video can be directly transmitted to the application program bottom layer for processing the audio and/or video through the data transmission channel. The application program can decode the received audio and/or video to generate corresponding images and sound, and display or play the images and the sound on the vehicle-mounted terminal. So that the vehicle-mounted terminal can display the currently displayed image and/or the currently played audio of the android device.
In this embodiment, after a data transmission channel for interacting specific information with the android device is established, the following steps are added: receiving audio and/or video data sent by the android device through the data transmission channel; and displaying the audio and/or video data. The image interface and the sound displayed by the android device at present can be directly sent to the application program bottom layer of the vehicle-mounted terminal for processing the data, so that the vehicle-mounted terminal can rapidly process the audio and/or video data, and the time delay for synchronously displaying the current image and/or playing the current audio of the android device can be reduced.
EXAMPLE five
Fig. 5 is a schematic flow chart of a control method for an android device according to a fifth embodiment of the present invention. In this embodiment, after the audio and/or video data is displayed, the following steps are added: and generating an ADB command according to user operation, and controlling the android device to run through the ADB command. Correspondingly, the method for controlling the android device provided by the embodiment specifically includes:
and step 510, controlling the device to set a USB port connected with the android device to be in a USB Host mode.
And step 520, receiving the authentication password sent by the android device, and generating an authentication response password according to the authentication password.
And step 530, returning the authentication response password to the android device so as to realize the authentication of the android device on the control device.
And 540, generating a forward command, and establishing a data transmission channel for interacting specific information with the android device.
And 550, receiving audio and/or video data sent by the android device through the data transmission channel.
And step 560, displaying the audio and/or video data.
And 570, generating an ADB command according to user operation, and controlling the android device to run through the ADB command.
According to the method, the image currently displayed by the android device can be synchronously displayed on the vehicle-mounted terminal, the user can operate the input device of the vehicle-mounted device through a navigation key, a confirmation key, a knob and the like, and the vehicle-mounted terminal generates the corresponding ADB command according to the operation of the user. And sending the ADB command to the android device, for example, a user may select a certain currently displayed application through a navigation key and click the application through a confirmation key. The vehicle-mounted terminal can generate an ADB am command according to the operation of the user by using an ADB protocol, and the ADB am command is sent to the android device, and the android device can execute the ADB am command and start the selected application.
For another example, a corresponding ADB push command may be generated according to an operation of a user to copy a file to an android device, and the ADB push command may be sent to the android device, and the android device may execute the ADB push command and copy a file specified in the command to a specified location of the android device.
Correspondingly, a corresponding ADB pull command can be generated according to the operation of copying files to the vehicle-mounted terminal by a user, the ADB pull command is sent to the android device, the android device can execute the ADB pull command, and the files specified in the command are copied to the specified position of the vehicle-mounted terminal.
Correspondingly, corresponding commands such as an ADB kill command, an ADB ps command, an ADB getprop command and the like can be generated according to the operation of the user, and the android device can respectively execute a killing process, a process viewing command and system information acquisition command through the commands.
In this embodiment, after displaying the audio and/or video data, the following steps are added: and generating an ADB command according to user operation, and controlling the android device to run through the ADB command. On the premise that the vehicle-mounted terminal provides an image interface, a corresponding ADB command can be generated according to the operation of a user on the vehicle-mounted terminal side, and the purpose of controlling the operation of the android device is achieved. The user can visually control the android device at the vehicle-mounted terminal, and the operation for controlling the android device is simplified.
EXAMPLE six
Fig. 6 is a schematic structural diagram of a control apparatus of an android device according to a sixth embodiment of the present invention, and as shown in fig. 6, the apparatus includes:
a setting module 610, configured to set, by a control device, a USB port connected to an android device to be in a USB port mode;
the authentication response password generating module 620 is configured to receive an authentication password sent by the android device, and generate an authentication response password according to the authentication password;
a returning module 630, configured to return the authentication response password to the android device, so as to implement authentication of the android device on the control device;
the command generating module 640 is configured to generate an ADB command by using an ADB protocol, and send the ADB command to the android device, so that the android device executes the ADB command.
On the basis of the above embodiments, the authentication response password generation module includes:
and the authentication response password generating unit is used for generating an authentication response password corresponding to the authentication password by utilizing a pre-installed password library.
On the basis of the foregoing embodiments, the command generation module includes:
and the data transmission channel establishing unit is used for generating a forward command and establishing a data transmission channel for interacting specific information with the android device.
On the basis of the above embodiments, the apparatus further includes:
the receiving module is used for receiving audio and/or video data sent by the android device through the data transmission channel;
and the display module is used for displaying the audio and/or video data.
On the basis of the foregoing embodiments, the command generating module is configured to:
generating a push command so that the android device can copy the file stored by the control device;
generating a pull command to enable the control device to copy a file stored by the android device; and/or
And generating a shell command to inquire and/or manage the running state of the android device.
On the basis of the above embodiments, the apparatus further includes:
and the operation control module is used for generating an ADB command according to user operation and controlling the android device to operate through the ADB command.
On the basis of the foregoing embodiments, the operation control module is configured to:
generating a pull command according to user operation so that the control equipment can copy files stored by the android equipment;
generating a push command according to user operation so that the android device can copy files stored by the control device;
and generating a shell command according to user operation so as to inquire and/or manage the running state of the android device.
On the basis of the foregoing embodiments, the shell command includes:
ps, kill, getprop, and am commands.
The android device control device provided by the embodiment of the invention can execute the android device control method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE seven
Fig. 7 is a schematic structural diagram of a termination according to a seventh embodiment of the present invention. Fig. 7 illustrates a block diagram of an exemplary terminal 12 suitable for use in implementing embodiments of the present invention. The terminal 12 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the terminal 12 is embodied in the form of a general purpose computing device. The components of the terminal 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Terminal 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by terminal 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The terminal 12 can further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, and commonly referred to as a "hard drive"). Although not shown in FIG. 7, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The terminal 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the device/terminal/server 12, and/or with any devices (e.g., network card, modem, etc.) that enable the terminal 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the terminal 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the terminal 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the control method of the android device provided by the embodiment of the present invention.
Example eight
An eighth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the method for controlling an android device provided in the foregoing embodiment.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (14)

1. A control method of an android device is characterized by comprising the following steps:
the control equipment sets a USB port connected with the android equipment to be in a USB Host mode; the control equipment and the android equipment adopt different operating systems;
receiving an authentication password sent by the android device, and generating an authentication response password according to the authentication password;
returning the authentication response password to the android device to realize the authentication of the android device on the control device;
generating an ADB command by using an ADB protocol, and sending the ADB command to android equipment so that the android equipment executes the ADB command;
wherein the generating an ADB command using the ADB protocol includes:
generating an ADB virtual machine in the control device using the ADB protocol;
and generating the ADB command which can be executed by the android device according to the ADB virtual machine.
2. The control method of claim 1, wherein generating an authentication response password according to the authentication password comprises:
and generating an authentication response password corresponding to the authentication password by using a pre-installed password library.
3. The method of claim 1, wherein generating the ADB command and sending the ADB command to an android device to cause the android device to execute the ADB command comprises:
and generating a forward command, and establishing a data transmission channel for interacting specific information with the android device.
4. The method of claim 3, after establishing a data transmission channel for interacting specific information with the android device, further comprising:
receiving audio and/or video data sent by the android device through the data transmission channel;
and displaying the audio and/or video data.
5. The method of claim 1, wherein generating an ADB command and sending the ADB command to an android device to cause the android device to execute the ADB command comprises:
generating a push command so that the android device can copy the file stored by the control device;
generating a pull command to enable the control device to copy a file stored by the android device; and/or
And generating a shell command to inquire and/or manage the running state of the android device.
6. The method of claim 4, after presenting the audio and/or video data, further comprising:
and generating an ADB command according to user operation, and controlling the android device to run through the ADB command.
7. The method of claim 6, wherein generating an ADB command according to the user operation, and controlling the android device to run through the ADB command comprises:
generating a pull command according to user operation so that the control equipment can copy files stored by the android equipment;
generating a push command according to user operation so that the android device can copy files stored by the control device;
and generating a shell command according to user operation so as to inquire and/or manage the running state of the android device.
8. The method of claim 5 or 7, wherein the shell command comprises:
ps, kill, getprop, and am commands.
9. A control device of an android device, comprising:
the setting module is used for controlling equipment to set a USB port connected with the android equipment to be in a USB Host mode; the control equipment and the android equipment adopt different operating systems;
the authentication response password generation module is used for receiving an authentication password sent by the android device and generating an authentication response password according to the authentication password;
the return module is used for returning the authentication response password to the android device so as to realize the authentication of the android device on the control device;
the command generation module is used for generating an ADB command by utilizing an ADB protocol and sending the ADB command to the android device so that the android device can execute the ADB command;
wherein the generating an ADB command using the ADB protocol includes:
generating an ADB virtual machine in the control device using the ADB protocol;
and generating the ADB command which can be executed by the android device according to the ADB virtual machine.
10. The apparatus of claim 9, wherein the command generation module comprises:
and the transmission channel establishing unit is used for generating a forward command and establishing a data transmission channel for interacting specific information with the android device.
11. The apparatus of claim 10, further comprising:
the receiving module is used for receiving audio and/or video data sent by the android device through the data transmission channel;
and the display module is used for displaying the audio and/or video data.
12. The apparatus of claim 11, further comprising:
and the operation control module is used for generating an ADB command according to user operation and controlling the android device to operate through the ADB command.
13. A terminal, characterized in that the terminal comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of controlling an android device as recited in any of claims 1-8.
14. A storage medium containing computer executable instructions which when executed by a computer processor are for performing the method of controlling an android device of any of claims 1-8.
CN201710527204.4A 2017-06-30 2017-06-30 Android device control method and device, terminal and storage medium Active CN107256188B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710527204.4A CN107256188B (en) 2017-06-30 2017-06-30 Android device control method and device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710527204.4A CN107256188B (en) 2017-06-30 2017-06-30 Android device control method and device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN107256188A CN107256188A (en) 2017-10-17
CN107256188B true CN107256188B (en) 2021-05-28

Family

ID=60024783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710527204.4A Active CN107256188B (en) 2017-06-30 2017-06-30 Android device control method and device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN107256188B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536491B (en) * 2018-02-07 2021-11-05 武汉光庭信息技术股份有限公司 Processing method and system for reversely controlling android mobile terminal by vehicle-mounted equipment
CN110244928A (en) * 2018-03-09 2019-09-17 上海大唐移动通信设备有限公司 A kind of extracting method and device of user terminal Volte information
CN108712415B (en) * 2018-05-17 2021-08-20 深圳市灵星雨科技开发有限公司 Data transmission method based on android system
CN111629020A (en) * 2019-12-03 2020-09-04 蘑菇车联信息科技有限公司 Remote input method, device, PC (personal computer) terminal, android device and system
CN113157500A (en) * 2020-01-23 2021-07-23 阿里巴巴集团控股有限公司 Equipment testing method, device, computer system and readable storage medium
CN114968456B (en) * 2022-05-07 2024-03-08 麒麟合盛网络技术股份有限公司 Method and device for controlling terminal
CN116204257B (en) * 2022-12-30 2024-03-15 珠海视熙科技有限公司 Image preview method and device, storage medium and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201845546U (en) * 2010-11-18 2011-05-25 西安龙飞软件有限公司 Device capable of controlling mobile phone through speech
CN103365688A (en) * 2013-06-28 2013-10-23 深圳市掌讯通讯设备有限公司 Method for automatic installation and synchronization of software between Android intelligent devices
CN105022949A (en) * 2015-07-02 2015-11-04 盘石软件(上海)有限公司 Handheld device for evidence fixing of Android phones and fixing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103377526A (en) * 2012-04-25 2013-10-30 方园 Method and device for achieving Android mobile device payment through USB interface
CN104391695B (en) * 2014-11-06 2017-11-24 北京凌阳益辉科技有限公司 A kind of method and its device that control is synchronized by external equipment
JP6488733B2 (en) * 2015-02-02 2019-03-27 株式会社ソシオネクスト Power supply circuit, charging circuit, charging system, power feeding method and charging method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201845546U (en) * 2010-11-18 2011-05-25 西安龙飞软件有限公司 Device capable of controlling mobile phone through speech
CN103365688A (en) * 2013-06-28 2013-10-23 深圳市掌讯通讯设备有限公司 Method for automatic installation and synchronization of software between Android intelligent devices
CN105022949A (en) * 2015-07-02 2015-11-04 盘石软件(上海)有限公司 Handheld device for evidence fixing of Android phones and fixing method

Also Published As

Publication number Publication date
CN107256188A (en) 2017-10-17

Similar Documents

Publication Publication Date Title
CN107256188B (en) Android device control method and device, terminal and storage medium
CN108958787B (en) Block chain system upgrading method, device, equipment and storage medium
US8762544B2 (en) Selectively communicating data of a peripheral device to plural sending computers
WO2021013242A1 (en) Method for starting mini program, device and computer storage medium
WO2021013243A1 (en) Method for starting mini program, device, and computer storage medium
CN107291456B (en) Multi-screen display control method and system
US20180107493A1 (en) Synchronous control method and device via external apparatus
WO2021013247A1 (en) Method and device for running applet, and computer storage medium
WO2020020202A1 (en) Account management method and apparatus of application program, and device and medium
US9525681B2 (en) Terminal authentication system and method for vehicle network connection
CN110190958A (en) A kind of auth method of vehicle, device, electronic equipment and storage medium
CN112911550A (en) Vehicle data configuration method and electronic equipment
CN111158857B (en) Data encryption method, device, equipment and storage medium
CN112055251A (en) Media data playing method, device, equipment and storage medium
KR102177407B1 (en) An AVN system of a vehicle using a virtualization and an operating method of the AVN system
CN108701045A (en) Client operating system screenshot method and device in computer equipment
CN110417798A (en) The communication means and device of terminal device and vehicle device
CN109981778B (en) Method, device, equipment and storage medium for realizing service of content distribution network
CN113923167B (en) Data transmission optimization method in federal learning
CN115827030A (en) Method and device for upgrading USB firmware of vehicle and vehicle
CN115607955A (en) Vehicle machine system, method for realizing extended display and storage medium
CN112165706B (en) Equipment connection management method and device and Bluetooth equipment
CN117544336A (en) Device access method, data exchange method and related devices
CN110868697B (en) Interconnection method and device of vehicle and multiple mobile devices and storage medium
WO2023015785A1 (en) Method for controlling external device, control apparatus, control system, and terminal

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