Summary of the invention
The technical problem to be solved in the present invention is to provide the method for utilizing microwave telecommunication devices to carry out the ADB debugging on a kind of android platform, can under the situation that existing debugging technique means all lost efficacy the debugged apparatus of android platform be debugged.
The present invention is achieved in that the method for utilizing microwave telecommunication devices to carry out the ADB debugging on a kind of android platform, described method need provide the debugged apparatus of a commissioning device and band android platform, and described commissioning device comprises: instruction input module, microwave telecommunication devices and data resolution module; Described debugged apparatus comprises: data memory module, debugging acid ADB, microwave telecommunication devices and command analysis module; This method specifically comprises the steps:
The microwave telecommunication devices of step 1, unlatching commissioning device and debugged apparatus, two microwave telecommunication devices all connect in the same microwave telecommunication devices WLAN (wireless local area network); In the wireless local net topology, distribute separately a device address number;
Step 2, need the order of debugging by instruction input module input one, instruction input module is created an empty file one, and with the demanded storage of described debugging in file one;
The microwave telecommunication devices of step 3, instruction input module notice commissioning device, device address by debugged apparatus number, and utilizing the ICP/IP protocol message, the data field that described file one is embedded into the ICP/IP protocol message sends to the microwave telecommunication devices of debugged apparatus;
After the microwave telecommunication devices of step 4, debugged apparatus receive the ICP/IP protocol message, the data field that obtains the ICP/IP protocol message obtains to extract debug command by command analysis module from this document one in the android plateform system that file is saved in debugged apparatus in the lump;
Step 5, the mechanism of the Inter-Process Communication by android plateform system socket send to debugging acid ADB with debug command;
After step 6, debugging acid ADB obtain debug command, carry out this debug command, form the system journal of debugging, create an empty file two, and system journal is stored in this empty file two;
The file that contains system journal two that step 7, data memory module will produce sends to the microwave telecommunication devices of debugged apparatus, the device address of the microwave telecommunication devices of debugged apparatus by commissioning device number, and utilizing the ICP/IP protocol message, the data field that described file two is embedded into the ICP/IP protocol message sends to the microwave telecommunication devices of commissioning device;
After the microwave telecommunication devices of step 8, commissioning device received the ICP/IP protocol message, the data field that obtains the ICP/IP protocol message obtained file two and is saved in the commissioning device;
Step 9, data resolution module extract system journal from this document two, resolve and obtain debug results.
The present invention has following advantage: after the present invention obtains debug command by the microwave telecommunication devices in the commissioning device, send in the debugged apparatus again, debugged apparatus is resolved debug command by command analysis module, and the debug command after will resolving is issued debugging acid ADB and debugged.The present invention can also can debug the debugged apparatus of android platform under the situation that existing debugging technique means all lost efficacy; And simple to operate, debugging efficiency is fast.
Embodiment
See also illustrated in figures 1 and 2, the present invention carries out the method for ADB debugging for utilizing microwave telecommunication devices on a kind of android platform, described method need provide the debugged apparatus of a commissioning device and band android platform, and described commissioning device comprises: instruction input module, microwave telecommunication devices and data resolution module; Described debugged apparatus comprises: data memory module, debugging acid ADB, microwave telecommunication devices and command analysis module; This method specifically comprises the steps:
The microwave telecommunication devices of step 1, unlatching commissioning device and debugged apparatus, two microwave telecommunication devices all connect in the same microwave telecommunication devices WLAN (wireless local area network); In the wireless local net topology, distribute separately a device address number; For example: the device address of the microwave telecommunication devices of debugged apparatus number is referred to as Addr_1, and the device address of the microwave telecommunication devices of commissioning device number is made as Addr_2;
Step 2, need the order of debugging by instruction input module input one, instruction input module is created an empty file one, and with the demanded storage of described debugging in file one;
The microwave telecommunication devices of step 3, instruction input module notice commissioning device, device address by debugged apparatus number, and utilizing the ICP/IP protocol message, the data field that described file one is embedded into the ICP/IP protocol message sends to the microwave telecommunication devices of debugged apparatus; This step is specially: the microwave telecommunication devices of instruction input module notice commissioning device, start the broadcasting of wireless local net topology, and the address of this broadcasting is the device address number of debugged apparatus; The microwave telecommunication devices of debugged apparatus receive the broadcasting of wireless local net topology, monitor the calling of commissioning device, then reply an ACK confirmation signal and give commissioning device, commissioning device is received this ACK confirmation signal, the microwave telecommunication devices of confirming debugged apparatus can have access to, commissioning device begins to send described file one, utilizes the ICP/IP protocol message, and the data field that described file one is embedded into the ICP/IP protocol message sends to the microwave telecommunication devices of debugged apparatus;
After the microwave telecommunication devices of step 4, debugged apparatus receive the ICP/IP protocol message, the data field that obtains the ICP/IP protocol message obtains to extract debug command by command analysis module from this document one in the android plateform system that file is saved in debugged apparatus in the lump;
Step 5, the mechanism of the Inter-Process Communication by android plateform system socket send to debugging acid ADB with debug command;
After step 6, debugging acid ADB obtain debug command, carry out this debug command, form the system journal of debugging, create an empty file two, and system journal is stored in this empty file two;
The file that contains system journal two that step 7, data memory module will produce sends to the microwave telecommunication devices of debugged apparatus, the device address of the microwave telecommunication devices of debugged apparatus by commissioning device number, and utilizing the ICP/IP protocol message, the data field that described file two is embedded into the ICP/IP protocol message sends to the microwave telecommunication devices of commissioning device; This step is specially: the file that contains system journal two that data memory module will produce sends to the microwave telecommunication devices of debugged apparatus, the microwave telecommunication devices of debugged apparatus start broadcasting in the wireless local net topology, the address of this broadcasting is the device address number of commissioning device; The microwave telecommunication devices of commissioning device receive the broadcasting of wireless local net topology, monitor the calling of debugged apparatus, then reply an ACK confirmation signal and give debugged apparatus, debugged apparatus is received this ACK confirmation signal, the microwave telecommunication devices of confirming commissioning device can have access to, debugged apparatus begins to send described file two, and utilizes the ICP/IP protocol message, and the data field that described file two is embedded into the ICP/IP protocol message sends to the microwave telecommunication devices of commissioning device;
After the microwave telecommunication devices of step 8, commissioning device received the ICP/IP protocol message, the data field that obtains the ICP/IP protocol message obtained file two and is saved in the commissioning device;
Step 9, data resolution module extract system journal from this document two, resolve and obtain debug results.
In the present invention, described commissioning device also comprises data disaply moudle, also comprises after described step 9: step 10, debug results is shown one by one by described data disaply moudle, finish debugging task one time.
Described microwave telecommunication devices are: home radio Home RF equipment, high performance radio local area network HiperLan equipment or interoperable radio communication WirelessHART equipment.
Wherein, microwave telecommunication devices: be responsible for realizing realizing between main frame and the mobile data devices communication.Be responsible in the present invention the debug command of commissioning device is sent to debugged apparatus, and obtain debug results from debugged apparatus and be transferred to commissioning device.
Instruction input module: be used for the input of commissioning staff's debug command.
Command analysis module: responsible debug command of sending from commissioning device by reading command in the microwave telecommunication devices of debugged apparatus and execution.
Socket: the communication mechanism between the process in the operating system is the important component of operating system; It is responsible for the data transmission between each module of device interior.
Debugging acid ADB:Android Debug Bridge is the debugging technique of Android platform internal standard, is responsible for receiving debug command, carries out debug command, obtains debug results, sends operations such as debug results.
Data memory module: be responsible for obtaining debug results from the debugging acid ADB of debugged apparatus, and be stored as file.
Data resolution module: be responsible for obtaining the file that contains debug results (being the file of data storage cell storage above-mentioned) that sends from debugged apparatus by the microwave telecommunication devices in the commissioning device, resolve.
Data disaply moudle: be responsible for showing the debug results that parses, obtain from debugged apparatus at the screen of commissioning device.
In a word, the present invention can also can debug the debugged apparatus of android platform under the situation that existing debugging technique means all lost efficacy; And simple to operate, debugging efficiency is fast.
The above only is preferred embodiment of the present invention, and all equalizations of doing according to the present patent application claim change and modify, and all should belong to covering scope of the present invention.