Vehicle machine application debugging method, electronic equipment and storage medium

By installing Android simulator and on-board hardware simulation tools in electronic devices, using port mapping relationships to debug the vehicle and computer applications, the problems of poor debugging convenience and high cost in the existing technology are solved, and efficient without real vehicles and CAN tools are achieved debug.

CN119127694APending Publication Date: 2024-12-13SAIC GM WULING AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411204228.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the prior art, debugging of vehicle applications depends on real vehicles and CAN tools, resulting in poor convenience and high software and hardware costs.

Method used

Install Android simulator and on-board hardware simulation tools in electronic devices to debug the vehicle application through port mapping relationships without the need for real vehicles and CAN tools.

Benefits of technology

It improves the convenience of vehicle application debugging, reduces the cost of software and hardware, and realizes vehicle application debugging in a real-life environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127694A_ABST
    Figure CN119127694A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a debugging method of an in-vehicle entertainment product application, electronic equipment and a storage medium, which can debug the in-vehicle entertainment product application without depending on a real vehicle environment, a real in-vehicle entertainment product and a CAN network tool, so that the convenience of debugging the in-vehicle entertainment product application is improved, and meanwhile, the software and hardware cost of debugging the in-vehicle entertainment product application is also reduced. The debugging method for the vehicle-mounted terminal application comprises the steps that if the vehicle-mounted terminal application in an Android simulator detects a selection operation for a target test item, the Android simulator sends a first target control instruction to a first preset port of a first IP address corresponding to the Android simulator; wherein the first target control instruction is generated based on the target test item, and a port mapping relationship is preset between the first preset port and a second preset port of a second IP address corresponding to the electronic equipment; and if the vehicle-mounted hardware simulation tool monitors the first target control instruction at the second preset port, executing the first target control instruction, and displaying a first instruction execution result.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The embodiments of the present application relate to the field of vehicle control technology, and in particular to a debugging method for vehicle computer applications, an electronic device, and a storage medium. [Background technology]

[0002] At present, debugging of application programs (Application, APP) in vehicle computers often relies on real vehicle computers and controller area network (Controller Area Network, CAN) tools for implementation, or relies on real vehicles for implementation, which makes debugging less convenient and the software and hardware costs required for debugging are high. [Summary of the invention]

[0003] The embodiment of the present application proposes a debugging method, electronic device and storage medium for vehicle-machine applications, which can debug vehicle-machine applications without relying on a real vehicle environment, a real vehicle-machine and a CAN network tool, thereby improving the convenience of debugging vehicle-machine applications and reducing the software and hardware costs of debugging vehicle-machine applications.

[0004] In a first aspect, an embodiment of the present application provides a method for debugging a vehicle-mounted application, which is applied to an electronic device, wherein an Android simulator and a vehicle-mounted hardware simulation tool are running in the electronic device, wherein the Android simulator is installed with the vehicle-mounted application and an operating environment required by the vehicle-mounted application, and the method includes:

[0005] If the vehicle application in the Android simulator detects a selection operation for a target test item, the Android simulator sends a first target control instruction to a first preset port of a first IP address corresponding to the Android simulator; wherein the first target control instruction is generated based on the target test item, and a port mapping relationship is pre-set between the first preset port and a second preset port of a second IP address corresponding to the electronic device;

[0006] If the vehicle-mounted hardware simulation tool monitors the first target control instruction at the second preset port, the first target control instruction is executed and the first instruction execution result is displayed.

[0007] In the embodiment of the present application, an Android simulator and a vehicle-mounted hardware simulation tool are installed in the electronic device at the same time, the Android simulator has a first IP address, the electronic device has a second IP address, and the first preset port of the first IP address of the Android simulator and the second preset port of the second IP address of the electronic device are pre-set with a port mapping relationship. On this basis, if the debugger wants to debug whether the relevant instructions sent by the vehicle-mounted application can be normally transmitted to the vehicle-mounted hardware end, then the debugger can select the target test item in the vehicle-mounted application installed in the Android simulator, and the Android simulator will send the first target control instruction to its first preset port. Due to the port mapping relationship, the first target control instruction will be forwarded to the second preset port of the electronic device. Since the vehicle-mounted hardware simulation tool can monitor the second preset port of the electronic device. Therefore, if the vehicle-mounted hardware simulation tool monitors the above-mentioned first target control instruction at the second preset port, it will execute the first target control instruction and display the first instruction execution result. The debugger can judge whether the relevant instructions sent from the vehicle-mounted application can be normally transmitted to the vehicle-mounted hardware end through the first instruction execution result displayed by the vehicle-mounted hardware simulation tool. This method can debug the vehicle computer application without relying on the real vehicle environment, the vehicle computer and the CAN network tool, thereby improving the convenience of debugging the vehicle computer application and reducing the software and hardware costs of debugging the vehicle computer application.

[0008] Optionally, after the vehicle-mounted hardware simulation tool executes the first target control instruction, the method further includes:

[0009] If the vehicle-mounted hardware simulation tool determines that the first target control instruction is executed successfully, sending an instruction execution response to the second preset port;

[0010] If the Android simulator monitors the command execution response at the first preset port, the vehicle computer application in the Android simulator displays a preset display effect.

[0011] In an embodiment of the present application, if the vehicle-mounted hardware simulation tool successfully executes the first target control instruction sent by the Android simulator, the vehicle-mounted hardware simulation tool can send a command execution response to the second preset port of the electronic device. Due to the port mapping relationship, the command execution response will be forwarded to the first preset port of the Android simulator. If the Android simulator monitors the command execution response at the first preset port, the vehicle-mounted application in the Android simulator can display the preset display effect, so that the debugging personnel can determine whether the response information fed back by the vehicle-mounted hardware end to the vehicle-mounted application is received by the vehicle-mounted application.

[0012] Optionally, the method further includes:

[0013] If the vehicle-mounted hardware simulation tool detects a target simulation key selection operation, the vehicle-mounted hardware simulation tool sends a second target control instruction to the second preset port, where the second target control instruction is generated based on a function corresponding to the target simulation key;

[0014] If the Android simulator monitors the second target control instruction at the first preset port, the vehicle machine application in the Android simulator executes the second target control instruction and displays the second instruction execution result.

[0015] In an embodiment of the present application, if the debugging personnel want to know whether the relevant instructions sent by the vehicle hardware end can be normally transmitted to the vehicle application, then the debugging personnel can select the target simulation button in the vehicle hardware simulation tool, and the vehicle hardware simulation tool will send the second target control instruction to the second preset port of the electronic device. Due to the port mapping relationship, the second target control instruction will be forwarded to the first preset port of the Android simulator. After the Android simulator monitors the second target control instruction at the first preset port, the vehicle application in the Android simulator will execute the second target control instruction and display the second instruction execution result. The debugging personnel can judge whether the relevant instructions sent from the vehicle hardware end can be normally transmitted to the vehicle application through the second instruction execution result displayed by the vehicle application. This method can debug the vehicle application without relying on the real vehicle environment, vehicle and CAN network tools, thereby improving the convenience of debugging the vehicle application, and also reducing the software and hardware costs of debugging the vehicle application.

[0016] Optionally, the Android emulator executes a port mapping command based on an Android Debug Bridge ADB, where the port mapping command is used to map the first preset port to the second preset port.

[0017] In the embodiment of the present application, the Android simulator can execute a port mapping command based on ADB to more conveniently map the first preset port to the second preset port.

[0018] Optionally, the first IP address is 10.0.2.15, and the second IP address is 127.0.0.1.

[0019] In the embodiment of the present application, the first IP address of the Android simulator is 10.0.2.15, and the second IP address of the electronic device is 127.0.0.1, so that communication between the Android simulator and the electronic device can be achieved.

[0020] Optionally, the first preset port is TCP port 33452, and the second preset port is TCP port 9000.

[0021] In an embodiment of the present application, a mapping relationship is established between the first preset port 33452 of the Android emulator and the second preset port 9000 of the electronic device, so that the Android emulator can send messages to the electronic device through the first preset port 33452, and it is also convenient for the vehicle-mounted hardware simulation tool to send messages to the Android emulator through the second preset port 9000.

[0022] Optionally, the Android simulator runs based on a simulator image file, and the simulator image file is generated by fully compiling the Android source code after adding custom vehicle attributes.

[0023] In an embodiment of the present application, the Android source code with the custom vehicle attributes added is fully compiled to generate a simulator image file, which can be run in a Windows system, so that the vehicle application can run without relying on a real vehicle computer.

[0024] In a second aspect, an embodiment of the present application provides a debugging device for a vehicle-mounted application, which is applied to an electronic device, wherein an Android emulator and a vehicle-mounted hardware simulation tool are running in the electronic device, wherein the Android emulator is installed with a vehicle-mounted application and is configured with an operating environment required by the vehicle-mounted application;

[0025] The Android simulator is used to send a first target control instruction to a first preset port of a first IP address corresponding to the vehicle application if the vehicle application detects a selection operation for a target test item; wherein the first target control instruction is generated based on the target test item, and a port mapping relationship is pre-set between the first preset port and a second preset port of a second IP address corresponding to the electronic device;

[0026] The vehicle-mounted hardware simulation tool is used to execute the first target control instruction and display the first instruction execution result when the second preset port monitors the first target control instruction.

[0027] Optionally, the vehicle-mounted hardware simulation tool is further configured to send an instruction execution response to the second preset port when determining that the first target control instruction is executed successfully;

[0028] The Android simulator is also used to display a preset display effect through the vehicle computer application if the command execution response is monitored at the first preset port.

[0029] Optionally, the vehicle-mounted hardware simulation tool is further configured to send a second target control instruction to the second preset port if a target simulation button selection operation is detected, where the second target control instruction is generated based on a function corresponding to the target simulation button;

[0030] The Android simulator is also used to execute the second target control instruction through the vehicle computer application and display the second instruction execution result when the first preset port monitors the second target control instruction.

[0031] Optionally, the Android emulator is further used to execute a port mapping command based on the Android Debug Bridge ADB, and the port mapping command is used to map the first preset port to the second preset port.

[0032] Optionally, the first IP address is 10.0.2.15, and the second IP address is 127.0.0.1.

[0033] Optionally, the first preset port is TCP port 33452, and the second preset port is TCP port 9000.

[0034] Optionally, the Android simulator runs based on a simulator image file, and the simulator image file is generated by fully compiling the Android source code after adding custom vehicle attributes.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the steps of the method described in any embodiment of the first aspect.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer instructions, and when the computer is running, the computer causes the computer to execute the steps of the method described in any embodiment of the first aspect.

[0037] It should be understood that the second to fourth aspects of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here.

Brief Description of the Drawings

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A schematic diagram of data transmission provided in an embodiment of the present application;

[0040] Figure 2A flowchart of a method for debugging a vehicle computer application provided in an embodiment of the present application;

[0041] Figure 3 A flowchart of a debugging method for feedback messages provided in an embodiment of the present application;

[0042] Figure 4 A flowchart of another method for debugging a vehicle computer application provided in an embodiment of the present application;

[0043] Figure 5 A schematic diagram of the structure of a debugging device for a vehicle-mounted computer application provided in an embodiment of the present application;

[0044] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. [Specific implementation method]

[0045] In order to better understand the technical solution of this specification, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0046] It should be clear that the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0047] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit this specification. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0048] At present, the debugging of APP in the car computer often relies on the real car computer and CAN tools, or relies on the real vehicle to implement, which makes the debugging less convenient and the software and hardware costs required for debugging are high.

[0049] In view of this, an embodiment of the present application provides a debugging method for vehicle-mounted applications, in which an Android emulator and a vehicle-mounted hardware simulation tool can be installed in the same electronic device, the Android emulator is installed with the vehicle-mounted application and is configured with the operating environment required for the vehicle-mounted application, and through the pre-configured port mapping relationship between the Android emulator and the electronic device, and the vehicle-mounted hardware simulation tool is configured to monitor the electronic device port, the process of the vehicle-mounted application sending relevant instructions to the vehicle-mounted hardware end can be debugged, that is, the vehicle-mounted application can be debugged without relying on the real vehicle environment, the real vehicle-mounted computer and the CAN tool, thereby improving the convenience of debugging the vehicle-mounted application, and also reducing the software and hardware costs of debugging the vehicle-mounted application.

[0050] For ease of understanding, an application scenario of the embodiment of the present application is first introduced. Figure 1 , is a schematic diagram of a data transmission provided in an embodiment of the present application. Figure 1 As shown, an Android simulator 101 and a vehicle hardware simulation tool 102 are installed in the electronic device 10. The generation process of the Android simulator 101 is described below.

[0051] First, add the custom vehicle attribute definition to the relevant source file. For example, the custom vehicle attributes include seat ventilation, seat heating, ambient light, sunshade, rearview mirror heating, rearview mirror folding, etc. The source files involved include: VehiclePropertyIds.java, PropertyHalServiceIds.java, types.hal and DefaultConfig.h. Then, perform a full compilation on the Android source file with the custom vehicle attributes added, generate a simulator image file, and import it into the Android Studio development software of the electronic device 10, and then the Android simulator 101 can be started. Among them, the Android simulator 101 includes an application layer, a framework layer and a hardware abstraction layer. The car machine application can be installed in the Android simulator 101 and run in the application layer.

[0052] The Android simulator 101 is assigned a first IP address, for example, the first IP address is 10.0.2.15. The electronic device has a second IP address, for example, the second IP address is 127.0.0.1. On this basis, the Android simulator 101 can establish a port mapping relationship between the first preset port of the first IP address of the Android simulator 101 and the second preset port of the second IP address of the electronic device 10 by executing a port mapping command based on the Android debug bridge ADB. For example, the first preset port is TCP port 33452, and the second preset port is TCP port 9000. The Android simulator 101 can execute the adbforward tcp:9000tcp:33452 command to map the first preset port (TCP port 33452) to the second preset port (TCP port 9000). That is, the message sent to the first preset port will be forwarded to the second preset port; similarly, the message sent to the second preset port will be forwarded to the first preset port. The hardware abstraction layer in the Android emulator 101 is configured to listen to the first preset port, and the on-board hardware simulation tool 102 is configured to listen to the second preset port. Therefore, as long as the hardware abstraction layer in the Android emulator 101 sends a message to the first preset port, the message will be forwarded to the second preset port and thus be listened to by the on-board hardware simulation tool; similarly, as long as the on-board hardware simulation tool 102 sends a message to the second preset port, the message will be forwarded to the first preset port and thus be listened to by the hardware abstraction layer in the Android emulator 101, thereby realizing communication between the Android emulator 101 and the on-board hardware simulation tool 102 in the same electronic device 10.

[0053] It should be understood that the complete communication link between the vehicle hardware end and the vehicle application is: hardware-hardware controller-on-board CAN network-vehicle MCU-vehicle SOC (Android system runs on SOC), and the link on SOC is: Android system hardware abstraction layer-Android system framework layer-vehicle APP. The above-mentioned Android simulator 101 can be considered to be able to simulate: the communication link between the Android system hardware abstraction layer-Android system framework layer-vehicle APP, and the on-board hardware simulation tool 102 can simulate: hardware-hardware controller-on-board CAN network-vehicle MCU. The communication link, where the simulated hardware type is consistent with the real vehicle, will not be repeated here.

[0054] In the above scenario, the electronic device 10 can be a personal computer (PC), a server, a workstation, a tablet computer, etc., and this application does not impose any special restrictions on this.

[0055] The technical solution provided by the embodiments of the present application is introduced below in conjunction with the accompanying drawings.

[0056] Debugging scenario 1: Sending instructions to the simulated hardware for debugging.

[0057] See also Figure 2 , is a flow chart of a debugging method for a vehicle-mounted computer application provided in an embodiment of the present application. The flow of the method is described as follows:

[0058] Step 201: If the vehicle computer application in the Android simulator detects a selection operation for a target test item, the Android simulator sends a first target control instruction to a first preset port of a first IP address corresponding to the Android simulator.

[0059] In an embodiment of the present application, if the debugger wants to debug whether the relevant instructions sent by the vehicle-mounted application can be normally transmitted to the vehicle-mounted hardware end, the debugger can select the target test item in the vehicle-mounted application installed in the Android simulator. When the vehicle-mounted application detects the selection operation for the target test item, the application layer where the vehicle-mounted application is located will send the first target control instruction corresponding to the target test item to the framework layer, and then the framework layer will forward it to the hardware abstraction layer. In the hardware abstraction layer, the first target control instruction will be serialized according to a predefined protocol format, and the serialized first target control instruction will be sent to the first preset port of the Android simulator.

[0060] Step 202: If the vehicle-mounted hardware simulation tool monitors the first target control instruction at the second preset port, the first target control instruction is executed and the execution result of the first instruction is displayed.

[0061] In the embodiment of the present application, since there is a port mapping relationship between the first preset port and the second preset port, the serialized first target control instruction sent by the hardware abstraction layer in the Android simulator to the first preset port will actually be forwarded to the second preset port. Since the vehicle-mounted hardware simulation tool is configured to listen to the second preset port, the vehicle-mounted hardware simulation tool can receive the serialized first target control instruction, deserialize it, and regain the first target control instruction. The vehicle-mounted hardware simulation tool will then execute the first target control instruction and display the corresponding first instruction execution result. The debugging personnel can judge whether the relevant instructions sent from the vehicle-mounted application can be normally transmitted to the vehicle-mounted hardware end through the first instruction execution result displayed by the vehicle-mounted hardware simulation tool.

[0062] For example, if the first target control instruction is “turn on heating”, the first instruction execution result displayed by the vehicle hardware simulation tool is “heating is turned on”.

[0063] In some embodiments, considering the real vehicle environment, if the vehicle hardware successfully executes the relevant instructions sent by the vehicle application, it will feedback the successful execution result to the vehicle application. Therefore, in the embodiment of the present application, the feedback process can also be debugged to determine whether the vehicle application can receive the feedback message from the vehicle hardware.

[0064] See also Figure 3 , which is a flow chart of a debugging method for feedback messages provided in an embodiment of the present application. After executing step 202, steps 203 to 204 may be continued:

[0065] Step 203: If the vehicle-mounted hardware simulation tool determines that the first target control instruction is executed successfully, a command execution response is sent to the second preset port.

[0066] In an embodiment of the present application, after determining that the first target control instruction is executed successfully, the vehicle-mounted hardware simulation tool will serialize the instruction execution response required for feedback according to a preset protocol format, and then send the serialized instruction execution response to the second preset port of the electronic device.

[0067] Step 204: If the Android simulator monitors a command execution response at the first preset port, the vehicle computer application in the Android simulator displays a preset display effect.

[0068] In the embodiment of the present application, since there is a port mapping relationship between the first preset port and the second preset port, the serialized instruction execution response sent by the vehicle-mounted hardware simulation tool to the second preset port will actually be forwarded to the first preset port. Since the hardware abstraction layer in the Android simulator is configured to monitor the first preset port, the hardware abstraction layer can receive the serialized instruction execution response, deserialize it, and regain the instruction execution response. It is then sent to the framework layer, and forwarded by the framework layer to the vehicle-mounted application in the application layer. After receiving the instruction execution response, the vehicle-mounted application can display the preset display effect.

[0069] Continuing with the example of the first target control instruction being "turn on the heating", after the vehicle computer application receives the instruction execution response representing "the heating is turned on", the preset display effect displayed by the vehicle computer application may be: the heating icon of the air conditioner becomes brighter, and / or, an animation of blowing hot air is displayed. This application does not impose any special restrictions on the displayed effects.

[0070] Debugging scenario 2: Sending instructions to the vehicle computer application for debugging.

[0071] See also Figure 4 , is a flow chart of another method for debugging a vehicle-mounted computer application provided in an embodiment of the present application. The flow chart of the method is described as follows:

[0072] Step 301: If the vehicle-mounted hardware simulation tool detects a target simulation key selection operation, the vehicle-mounted hardware simulation tool sends a second target control instruction to a second preset port.

[0073] In the embodiment of the present application, if the debugging personnel want to debug whether the relevant instructions sent by the vehicle hardware end can be normally transmitted to the vehicle computer application, then the debugging personnel can select the target simulation button in the vehicle hardware simulation tool, and the vehicle hardware simulation tool will generate a second control instruction corresponding to the target simulation button, and serialize the second control instruction according to the preset protocol format. Then, the vehicle hardware simulation tool will send the serialized second target control instruction to the second preset port of the electronic device.

[0074] Step 302: If the Android simulator monitors the second target control instruction at the first preset port, the vehicle machine application in the Android simulator executes the second target control instruction and displays the second instruction execution result.

[0075] In the embodiment of the present application, since there is a port mapping relationship between the first preset port and the second preset port, the serialized second target control instruction sent by the vehicle-mounted hardware simulation tool to the second preset port of the electronic device will actually be forwarded to the first preset port. Since the hardware abstraction layer in the Android simulator is configured to monitor the first preset port, the hardware abstraction layer can receive the serialized second target control instruction, deserialize it, and regain the second target control instruction. It is then sent to the framework layer, and forwarded by the framework layer to the vehicle-mounted application in the application layer. After receiving the second target control instruction, the vehicle-mounted application can execute the second target control instruction and display the second instruction execution result. The debugging personnel can judge whether the relevant instructions sent from the vehicle-mounted hardware end can be normally transmitted to the vehicle-mounted application through the second instruction execution result displayed by the vehicle-mounted application.

[0076] For example, if the second target control instruction is "turn on the air conditioner", the second instruction execution result displayed by the vehicle application is "the air conditioner switch icon in the vehicle application becomes brighter, and / or the vehicle application interface plays a blowing animation."

[0077] See also Figure 5 Based on the same inventive concept, an embodiment of the present application provides a debugging device 40 for a vehicle-mounted application, which is applied to an electronic device, in which an Android simulator 401 and a vehicle-mounted hardware simulation tool 402 are running, and the Android simulator 401 is installed with a vehicle-mounted application and is configured with a running environment required by the vehicle-mounted application;

[0078] The Android simulator 401 is used to send a first target control instruction to a first preset port of a first IP address corresponding to the vehicle application if the vehicle application detects a selection operation for a target test item; wherein the first target control instruction is generated based on the target test item, and a port mapping relationship is pre-set between the first preset port and a second preset port of a second IP address corresponding to the electronic device;

[0079] The vehicle-mounted hardware simulation tool 402 is used to execute the first target control instruction and display the first instruction execution result when the first target control instruction is monitored at the second preset port.

[0080] Optionally, the vehicle-mounted hardware simulation tool 402 is further configured to send an instruction execution response to the second preset port when determining that the first target control instruction is executed successfully;

[0081] The Android simulator 401 is also used to display a preset display effect through the vehicle computer application if a command execution response is monitored at the first preset port.

[0082] Optionally, the vehicle-mounted hardware simulation tool 402 is further configured to send a second target control instruction to a second preset port if a target simulation button selection operation is detected, where the second target control instruction is generated based on a function corresponding to the target simulation button;

[0083] The Android simulator 401 is also used to execute the second target control instruction through the vehicle computer application and display the execution result of the second instruction when the second target control instruction is monitored at the first preset port.

[0084] Optionally, the Android emulator 401 is further used to execute a port mapping command based on the Android Debug Bridge ADB, where the port mapping command is used to map the first preset port to the second preset port.

[0085] Optionally, the first IP address is 10.0.2.15 and the second IP address is 127.0.0.1.

[0086] Optionally, the first preset port is TCP port 33452, and the second preset port is TCP port 9000.

[0087] Optionally, the Android simulator 401 runs based on a simulator image file, which is generated by fully compiling the Android source code after adding custom vehicle attributes.

[0088] See also Figure 6 Based on the same inventive concept, an embodiment of the present application further provides an electronic device, the electronic device comprising at least one processor 501, the processor 501 is used to execute a computer program stored in a memory, and implement the embodiment of the present application as provided in Figure 2-4The flowchart diagram steps of the debugging method of the vehicle computer application are shown.

[0089] Optionally, the processor 501 may specifically be a central processing unit, a specific ASIC, or one or more integrated circuits for controlling program execution.

[0090] Optionally, the electronic device may further include a memory 502 connected to the at least one processor 501, and the memory 502 may include a ROM, a RAM, and a disk memory. The memory 502 is used to store data required by the processor 501 when it is running, that is, it stores instructions that can be executed by the at least one processor 501. The at least one processor 501 executes the instructions stored in the memory 502 to execute the following. Figure 2-4 The method shown. Wherein, the number of the memory 502 is one or more. Wherein, the number of the memory 502 is one or more.

[0091] The present application also provides a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer executes Figure 2-4 method.

[0092] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A debugging method for a vehicle computer application, characterized in that: Applied to an electronic device, wherein an Android simulator and a vehicle hardware simulation tool are running in the electronic device, wherein the Android simulator is installed with a vehicle application and is configured with an operating environment required by the vehicle application, the method comprises: If the vehicle application in the Android simulator detects a selection operation for a target test item, the Android simulator sends a first target control instruction to a first preset port of a first IP address corresponding to the Android simulator; wherein the first target control instruction is generated based on the target test item, and a port mapping relationship is pre-set between the first preset port and a second preset port of a second IP address corresponding to the electronic device; If the vehicle-mounted hardware simulation tool monitors the first target control instruction at the second preset port, the first target control instruction is executed and the first instruction execution result is displayed.

2. The method according to claim 1, characterized in that After the vehicle-mounted hardware simulation tool executes the first target control instruction, the method further includes: If the vehicle-mounted hardware simulation tool determines that the first target control instruction is executed successfully, sending an instruction execution response to the second preset port; If the Android simulator monitors the instruction execution response at the first preset port, the vehicle application in the Android simulator displays a preset display effect.

3. The method according to claim 1, characterized in that The method further comprises: If the vehicle-mounted hardware simulation tool detects a target simulation key selection operation, the vehicle-mounted hardware simulation tool sends a second target control instruction to the second preset port, where the second target control instruction is generated based on a function corresponding to the target simulation key; If the Android simulator monitors the second target control instruction at the first preset port, the vehicle machine application in the Android simulator executes the second target control instruction and displays the second instruction execution result.

4. The method according to claim 1, characterized in that: The method further comprises: The Android simulator executes a port mapping command based on the Android Debug Bridge ADB, and the port mapping command is used to map the first preset port to the second preset port.

5. The method according to any one of claims 1 to 4, characterized in that: The first IP address is 10.0.2.15, and the second IP address is 127.0.0.

1.

6. The method according to any one of claims 1 to 4, characterized in that: The first preset port is TCP port 33452, and the second preset port is TCP port 9000.

7. The method according to claim 1, characterized in that The Android simulator runs based on a simulator image file, and the simulator image file is generated by fully compiling the Android source code after adding custom vehicle attributes.

8. A debugging device for vehicle computer application, characterized in that: Applied to electronic devices, wherein an Android simulator and a vehicle hardware simulation tool are running in the electronic devices, and the Android simulator is installed with a vehicle application and is configured with an operating environment required by the vehicle application; The Android simulator is used to send a first target control instruction to a first preset port of a first IP address corresponding to the vehicle application if the vehicle application detects a selection operation for a target test item; wherein the first target control instruction is generated based on the target test item, and a port mapping relationship is pre-set between the first preset port and a second preset port of a second IP address corresponding to the electronic device; The vehicle-mounted hardware simulation tool is used to execute the first target control instruction and display the first instruction execution result when the second preset port monitors the first target control instruction.

9. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the steps of the method as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed in a computer, the computer is caused to execute the steps of the method according to any one of claims 1 to 7.