Android equipment repairing method and device, equipment and storage medium
Through the cooperation of the OTG line and the reset pin, the automatic repair of Android devices by Windows devices is achieved, solving the problem that Android devices cannot directly restore and set up in the existing technology, and improving the repair efficiency.
Patent Information
- Application Number
- CN202311326516.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, when there is a problem with Android devices, it is impossible to restore and set up directly through Windows devices, resulting in low repair efficiency and requires professionals to perform complex flash operations.
Connect Windows devices and Android devices through OTG lines, and send signals using the reset pin to make the Android device enter the state to be restored, for user data transmission and system restoration.
Simplifies the recovery setting operation of Android devices, improves repair efficiency, and enables Windows devices to automatically perform the repair process of Android devices without manual operations or professional knowledge.
Smart Images

Figure CN119829326A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an Android device repair method, apparatus, device, and storage medium. Background Art
[0002] In the dual system architecture of Windows devices and Android devices, the two communicate with each other through a serial port or a network. When a problem occurs on a Windows device, the Android device can restore the settings of the Windows device to restore and repair the Windows device.
[0003] In the prior art, when an Android device has a problem, both the Android device and the Windows device cannot be used normally, and the Windows device cannot restore the settings of the Android device. Therefore, it is necessary to seek more professional technicians to restore the settings of the Android device through complex flashing operations, which consumes a lot of time and energy and affects the repair efficiency of the Android device. Summary of the invention
[0004] The present application provides an Android device repair method, apparatus, device and storage medium to solve the problem in the prior art that the Android device cannot be directly restored through a Windows device, simplifies the operational complexity of restoring the settings of the Android device, and improves the repair efficiency of the Android device.
[0005] In a first aspect, the present application provides an Android device repair method, the method is applied to a Windows device, the Windows device is connected to the Android device via an OTG cable, the Windows device is connected to a reset pin of the Android device, the method comprises:
[0006] When a system failure of the Android device is detected, a first signal is sent to the reset pin, so that the Android device enters a waiting-for-restore state based on the first signal and transmits user data to the Windows device through the OTG line;
[0007] The received user data is saved to an upgrade file, and a second signal is sent to the Android device via the OTG line, so that the Android device configures a restore environment based on the second signal, and after the restore environment configuration is completed, the Android device switches to a download mode and sets the OTG line to a burning mode;
[0008] When it is detected that the OTG cable is in the burning mode, the upgrade file is transmitted to the Android device in the download mode via the OTG cable, so that the Android device restores the system based on the upgrade file.
[0009] In a second aspect, the present application provides an Android device repair device, the device is applied to a Windows device, the Windows device is connected to the Android device via an OTG cable, the Windows device is connected to the reset pin of the Android device, and the device includes:
[0010] The data transmission module is configured to send a first signal to the reset pin when a system failure of the Android device is detected, so that the Android device enters a waiting-for-restore state based on the first signal and transmits user data to the Windows device through the OTG line;
[0011] A mode switching module is configured to save the received user data to an upgrade file, send a second signal to the Android device through the OTG line, so that the Android device configures a restore environment based on the second signal, and after the restore environment configuration is completed, switches to a download mode and sets the OTG line to a burning mode;
[0012] The system restoration module is configured to transfer the upgrade file to the Android device in the download mode via the OTG cable when detecting that the OTG cable is in the burning mode, so that the Android device restores the system based on the upgrade file.
[0013] In a third aspect, the present application provides an Android device repair device, comprising:
[0014] One or more processors; a memory 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 Android device repair method as described in the first aspect.
[0015] In a fourth aspect, the present application provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the Android device repair method as described in the first aspect.
[0016] In the present application, when a problem occurs on the Android device, the reset pin can receive the first signal sent by the Windows device. Under the action of the first signal, the Android device enters a state to be restored. The Android device in the state to be restored can use the OTG line to communicate data with the Windows device. At this time, the Android device can transfer user data to the Windows device through the OTG line. The Windows device stores the user data in the upgrade file, and after configuring the restore environment on the Android device and switching to the download mode, and setting the OTG to the burning mode first, the upgrade file containing the user data is sent to the Android device through the OTG line, so that the Android device restores the system to the running state before the problem occurs based on the upgrade file. Through the above technical means, the Android device is triggered to enter the state to be restored by the Windows device when a problem occurs on the Android device, so that the Android device in the state to be restored can establish a two-way communication connection with the Windows device through the OTG line, and the Windows device can restore the Android device based on the two-way communication connection, solving the problem that the Android device cannot be directly restored through the Windows device in the prior art. The operation process of the Windows device repairing the Android device can be automatically executed without manual operation, without additional professional knowledge or technical support, simplifying the complexity of the operation of restoring the settings of the Android device, and improving the repair efficiency of the Android device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flow chart of an Android device repair method provided by an embodiment of the present application;
[0018] Figure 2 is a schematic diagram of a dual system architecture provided in an embodiment of the present application;
[0019] Figure 3 This is a flowchart of detecting whether a system failure occurs in an Android device through a heartbeat packet provided in an embodiment of the present application;
[0020] Figure 4 It is a schematic diagram of the dual-system heartbeat packet interaction process provided by an embodiment of the present application;
[0021] Figure 5 This is a flowchart of a Windows device triggering an Android device to send user data provided by an embodiment of the present application;
[0022] Figure 6 is a schematic diagram of an Android device restoration process provided by an embodiment of the present application;
[0023] Figure 7 is a flowchart of a mode for setting an Android device and an OTG cable provided in an embodiment of the present application;
[0024] Figure 8It is a structural schematic diagram of an Android device repair device provided in an embodiment of the present application;
[0025] Fig. 9 It is a structural schematic diagram of an Android device repair device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] In the more common existing implementation methods, since the Windows device and the Android device in the dual-system architecture communicate through a serial port or a network, when a problem occurs in the Android device's system, both the Android device and the Windows device cannot be used normally, and the Windows device cannot restore the settings of the Android device. Traditionally, when a problem occurs in the Android device's system, it is usually necessary to repair the Android device through complex operations or professional technicians. For example, technicians restore the settings of the Android device through complex flashing operations. However, whether it is repairing the Android device through complex operations or technicians, it takes a lot of time and energy, which affects the repair efficiency of the Android device.
[0029] To solve the above problem, the present embodiment provides an Android device repair method, so that when a problem occurs on the Android device, the Android device can be awakened by a Windows device to enter a waiting-to-restore state. The Android device in the waiting-to-restore state can establish a two-way communication connection with the Windows device via an OTG cable, so that the Windows device can repair the Android device through the two-way communication connection.
[0030] The Android device repair method provided in this embodiment can be executed by an Android device repair device, which can be implemented by software and / or hardware, and can be composed of two or more physical entities, or one physical entity. For example, the Android device repair device can be a Windows device, or a processor of a Windows device. Among them, an Android device refers to an electronic device installed with an Android system, and a Windows device refers to an electronic device installed with a Windows system.
[0031] The Android device repairing device can install at least one application based on the Windows system, and the application can be an application that comes with the Windows system, or an application that is downloaded from a third-party device or server. In this embodiment, the Android device repairing device has at least an application that can execute the Android device repairing method.
[0032] For ease of understanding, this embodiment is described by taking a Windows device as an example of a subject that executes the Android device repair method.
[0033] Figure 1 Flowchart of a method for repairing an Android device provided by an embodiment of the present application. Figure 1 As shown, the steps of the Android device repair method include:
[0034] S110. When a system failure is detected in the Android device, a first signal is sent to a reset pin, so that the Android device enters a waiting-for-restore state based on the first signal and transmits user data to the Windows device through an OTG line.
[0035] Figure 2 Schematic diagram of the dual system architecture provided by the embodiment of the present application. Figure 2As shown, the Windows device is connected to the Android device via an OTG (On The Go) cable, wherein OTG is a data exchange technology for electronic devices, which can realize the connection and data exchange between various different devices or mobile devices without a computer as a transfer station. The Windows device is connected to the reset pin of the Android device. The Windows device is provided with a USB interface (Universal Serial Bus), and the Android device can be connected to the USB interface of the Windows device via the OTG cable. The OTG cable and the USB interface establish a two-way communication connection between the Android device and the Windows device. During the normal operation of the Android device and the Windows device, the Android device can transmit data to the Windows device via the OTG cable and the USB interface. Similarly, the Windows device can also transmit data to the Android device via the USB interface and the OTG cable.
[0036] The Windows device can detect whether the Android device has a system failure problem through the communication connection between the USB interface and the OTG line. Exemplarily, if the Windows device does not receive data or other signals transmitted by the Android device for more than a certain period of time, it is determined that the Android device has a system failure problem. In another embodiment, the Windows device can send a heartbeat packet to the Android device and determine whether the Android device has a system failure based on the feedback result of the heartbeat packet. Figure 3 This is a flow chart of detecting whether an Android device has a system failure by using a heartbeat packet provided by an embodiment of the present application. Figure 3 As shown, the step of detecting whether a system failure occurs in an Android device through a heartbeat packet specifically includes S1101-S1103:
[0037] S1101. Send a heartbeat packet to the Android device via the OTG line, so that the Android device sends a confirmation instruction to the Windows device when receiving the heartbeat packet.
[0038] This embodiment combines Figure 4 The heartbeat packet interaction process of the dual system is described as shown in FIG. Among them, the heartbeat packet is a custom command word used by the Windows device to notify the Android device of its own status. The heartbeat packet can be sent at a preset periodic interval. Figure 4, the Windows device can send a heartbeat packet to the Android device through the USB interface and the OTG line based on a preset cycle. If there is no problem with the Android system of the Android device, the Android device will send a confirmation instruction to the Windows device through the OTG line and the USB interface when receiving the heartbeat packet. Among them, the confirmation instruction (ACK, Acknowledge character) is a confirmation character, which can indicate that the Android device has confirmed that it has received the heartbeat packet sent by the Windows device. When the Windows device receives the confirmation instruction sent by the Android device within the preset time after sending the heartbeat packet, it can be confirmed that the Android device has received the heartbeat packet, and it can be determined that there is no problem with the Android system of the Android device. At this time, the Windows device can send a heartbeat packet to the Android device in the next cycle.
[0039] S1102: If no confirmation instruction is received within a preset time after the heartbeat packet is sent, resend the heartbeat packet to the Android device via the OTG line.
[0040] If there is a problem with the Android system of the Android device, the Android device will not send a confirmation command to the Windows device, and accordingly, the Windows device will not receive the confirmation command. Therefore, when the Windows device does not receive the confirmation command within the preset time after sending the heartbeat packet, that is, the confirmation command is not received within the time limit, the Android device may have a system failure. In order to further confirm the system status of the Android device, the heartbeat packet can be resent to the Android device through the USB interface and the OTG cable.
[0041] S1103: If no confirmation instruction is received within a preset time period after the heartbeat packet is resent, send a first signal to the reset pin.
[0042] If the confirmation instruction is not received after the heartbeat packet is resent, it can be determined that the Android device has no response to the heartbeat packet, and then it can be determined that the Android device has a system failure. At this time, in order to repair the system failure of the Android device, the Windows device can send a first signal to the reset pin of the Android device, so that the Android device can enter the waiting state after the reset pin receives the first signal. The first signal can be a high-level signal or a low-level signal. For example, when the first signal is a high-level signal, the Windows device can pull up the reset pin so that the reset pin inputs a high-level signal. Under the action of the high-level signal, the Android device enters the waiting state.
[0043] In this embodiment, the Windows device sends a heartbeat packet to the Android device via an OTG cable to detect the system status of the Android device in real time, so as to promptly trigger the system restore setting of the Android device when a system failure of the Android device is detected, thereby automatically starting the system restore setting of the Android device and improving the recovery efficiency of the Android device.
[0044] It should be noted that when an Android device has a system failure, the OTG cable cannot be used, that is, the Windows device cannot communicate with the Android device through the OTG cable. When the Android device enters the waiting state, the OTG cable is restored, and then the Android device can communicate with the Windows device through the OTG cable and USB interface.
[0045] The Android device in the state of being restored can read the user data from the user data partition and transmit the user data to the Windows device through the OTG line and the USB interface, so that the Windows device can save the user data to the upgrade file, so that the system of the Android device can be restored to the state before the failure based on the upgrade file. Figure 5 This is a flow chart of a Windows device triggering an Android device to send user data provided by an embodiment of the present application. Figure 5 As shown, the steps of the Windows device triggering the Android device to send user data specifically include S1104-S1105:
[0046] S1104, sending a first signal to the reset pin, so that the Android device enters a waiting-to-restore state when receiving the first signal, and after entering the waiting-to-restore state, sending a third signal to the Windows device through the OTG line and storing the user data in the cache area.
[0047] This embodiment combines Figure 6 The restoration process of the Android device shown is described. After the Windows device detects that a system failure has occurred in the Android device, a first signal may be sent to the reset pin of the Android device to set the Android device to a state to be restored. When the reset pin of the Android device receives the first signal, it automatically enters the state to be restored, and the Android device in the state to be restored can normally use the OTG line to communicate with the Windows device in both directions. The Android device can send a third signal to the Windows device via the OTG line and the USB interface, wherein the third signal is a signal used by the Android device to notify the Windows device that it is in a state to be restored. At the same time, the Android device can read user data from the user data partition, and store the read user data in the cache area, so that the user data in the cache area can be subsequently transferred to the Windows device via the OTG line.
[0048] S1105. When the Windows device receives the third signal, it sends a data backup operation instruction to the Android device through the OTG line, so that the Android device sends the user data in the cache area to the Windows device through the OTG line based on the data backup operation instruction.
[0049] refer to Figure 6, the Android device sends a third signal through the OTG line, and after the OTG line transmits the third signal to the USB interface, the Windows device receives the third signal from the USB interface and confirms that the Android device is in a state to be restored. In order to prevent the Android device from clearing user data during subsequent system restoration, user data can be obtained from the Android device to back up the user data, so that when the Android device performs a subsequent system restoration, it can be restored to a state before the problem occurs based on the backed-up user data. The Windows device sends a data backup operation instruction through the USB interface, and the OTG line transmits the data backup operation instruction to the Android device. Among them, the data backup operation instruction is an operation instruction for controlling the Android device to back up user data. The Android device can send the user data stored in the cache area to the OTG line based on the data backup operation instruction received from the OTG line. The OTG line transmits the user data to the USB interface, and the Windows device receives the user data from the USB interface.
[0050] This embodiment sends a third signal to the Windows device when the Android device is in the state to be restored, so that the Windows device sends the data backup operation instruction to the Android device after confirming that the Android device is in the state to be restored, thereby ensuring that the Android device can normally respond to the data backup operation instruction to send user data to the Windows device for backup, thereby improving the reliability of the restore settings for the Android device.
[0051] S120, saving the received user data to an upgrade file, sending a second signal to the Android device via the OTG line, so that the Android device configures a restore environment based on the second signal, and after the restore environment configuration is completed, switching to a download mode and setting the OTG line to a burning mode.
[0052] Exemplarily, after receiving the user data from the USB interface, the Windows device saves the user data to an upgrade file. The upgrade file is a data file stored in the Windows device that can be used to restore the system of the Android device. Afterwards, the Windows device sends a second signal to the Android device via the USB interface and the OTG cable. The second signal is a signal used by the Windows device to notify the Android device that it has completed backing up the user data. When the Android device receives the second signal, it confirms that the Windows device has completed the data backup. The Android device can configure the restore environment of the Android system to ensure that the subsequent Android device can run the upgrade file in the restore environment to restore the Android system. After the restore environment configuration is completed, it switches itself to download mode and sets the OTG cable to burning mode, so that the subsequent Windows device can transfer the upgrade file to the Android device via the OTG cable.
[0053] In this embodiment, Figure 71 is a flow chart of the mode of setting an Android device and an OTG line provided by an embodiment of the present application. Figure 7 As shown, the steps of setting the mode of the Android device and the OTG line specifically include S1201-S1202:
[0054] S1201. Send a second signal to the Android device via the OTG line, so that the Android device configures a restoration environment based on the second signal, and send a fourth signal to the Windows device via the OTG line after the restoration environment configuration is completed.
[0055] This embodiment combines Figure 6 The restoration process of the Android device shown is described. After the Windows device saves the user data to the upgrade file, it sends a second signal to the OTG line through the USB interface, and the OTG line transmits the second signal to the Android device. When the Android device receives the second signal, it configures the restoration environment of the Android system. After the restoration environment configuration is completed, the Android device sends a fourth signal to the OTG line, and the fourth signal is a signal used by the Android device to notify the Windows device that it has completed the environment configuration. The OTG line transmits the fourth signal to the USB interface, and the Windows device receives the fourth signal from the USB interface.
[0056] S1202: When the Windows device receives the fourth signal, a system restore operation instruction is sent to the Android device via the OTG line, so that the Android device switches to the download mode based on the system restore operation instruction and sets the OTG line to the burning mode.
[0057] refer to Figure 6 When the Windows device receives the fourth signal, it confirms that the restore environment configuration of the Android device is complete. In order to transfer the upgrade file to the Android device later, the system restore operation instruction is sent to the OTG line through the USB interface, and the OTG line transmits the system restore operation instruction to the Android device. Among them, the system restore operation instruction is an operation instruction that controls the Android device to set the mode for transferring the upgrade file. After receiving the system restore operation instruction, the Android device switches itself to the download mode and switches the OTG line to the burning mode based on the system restore operation instruction.
[0058] In this embodiment, the Android device sends a fourth signal to the Windows device after completing the configuration of the restore environment, so that the Windows device sends a system restore operation instruction to the Android device after confirming that the Android device has completed the configuration of the restore environment, ensuring that the Android device configures the environment first and then sets the mode of downloading the upgrade file, thereby improving the reliability of the restore settings for the Android device.
[0059] S130: When it is detected that the OTG cable is in the burning mode, the upgrade file is transmitted to the Android device in the downloading mode via the OTG cable, so that the Android device restores the system based on the upgrade file.
[0060] Exemplarily, the Windows device detects whether the OTG cable is in the burning mode through the OTG cable. When the OTG cable is detected to be in the burning mode, it is confirmed that the Android device is also currently in the download mode. At this time, the conditions for transmitting the upgrade file to the Android device through the OTG cable are met, so the upgrade file containing user data can be transmitted to the Android device through the USB interface and the OTG cable. After the Android device receives the OTG cable, it runs the upgrade file in the restore environment to restore the Android system to the state before the problem occurred based on the user data in the upgrade file and other data required for restoration. The entire restoration process is automatically executed without manual intervention, realizing the automatic restoration settings of the Android device by the Windows device.
[0061] In this embodiment, the upgrade file is transmitted to the Android device via the OTG line, so that the Android device stores the received upgrade file in the backup partition and then starts the system of the Android device based on the upgrade file in the backup partition. Exemplarily, the Android device divides the storage space into two partitions. When the Android device receives the upgrade file, since the problematic Android system occupies one of the partitions, the unoccupied partition is the backup partition of the other partition, so the upgrade file can be stored in the unoccupied backup partition to start the Android system from the backup partition. For example, the Android device divides the storage space into two partitions. If the problematic Android system occupies the first partition when the Android device receives the upgrade file, the upgrade file is stored in the second partition, and the Android device starts the Android system from the second partition. The next time the Android system has a problem, the Android system occupies the second partition, that is, the backup partition at this time is the first partition, and the Android device stores the received upgrade file in the first partition and starts the Android system from the first partition. In this embodiment, by storing the upgrade file in the backup partition to start the Android system from the backup partition, it is ensured that the Android system can be started normally, and the reliability of restoring settings for the Android device is improved.
[0062] It should be noted that the upgrade file includes various types of data. Similarly, the backup partition also includes multiple partitions. Storing the upgrade file in the second file means storing various types of data in the upgrade file in the partitions corresponding to the second partition, such as storing user data in the upgrade file in the user data partition in the second partition.
[0063] refer to Figure 6After the Android device receives the upgrade file from the OTG line, it verifies the integrity of the received upgrade file. When the verification passes, that is, after receiving the complete upgrade file, the upgrade file is saved to the backup partition to start the Android system from the backup partition. In this embodiment, the process of the Android device verifying the upgrade file is as follows: the Android device determines whether the complete upgrade file is received based on the verification code in the received upgrade file; when the complete upgrade file is received, the Android device stores the upgrade file to the backup partition. Exemplarily, after the Android device completely receives the upgrade file from the OTG line, the verification code is obtained from the upgrade file. If the verification code is the same as the preset verification code, it can be determined that the upgrade file is complete, and then the upgrade file can be stored in the backup partition. If the verification code is different from the preset verification code, it can be determined that the upgrade file is not complete, and a sixth signal can be sent to the Windows device through the OTG line to notify the Windows device that the upgrade file sent by the Windows device is incomplete, so that Windows can retransmit the upgrade file or prompt the user that there is a problem with the upgrade file. This embodiment verifies the integrity of the received upgrade file and stores the upgrade file in the backup partition for system startup when the verification passes, thereby avoiding more serious malfunctions of the Android device when the system is started based on an incomplete upgrade file, and improving the reliability of restoring settings of the Android device.
[0064] refer to Figure 6 After the upgrade file is verified, the Android device sends a fifth signal to the Windows device via the OTG cable. When the Windows device receives the fifth signal, it confirms that the Android device's system has been restored. The fifth signal is a signal used by the Android device to notify the Windows device that its own system has completed the restoration settings. When the Windows device receives the fifth signal, it confirms that the Android device's system has completed the restoration settings, and can prompt the user that the Android device's system has repaired the fault and returned to normal, or communicate data with the Android device via the USB interface and the OTG cable to continue processing unfinished tasks together with the Android device, thereby improving task processing efficiency.
[0065] In summary, the Android device repair method provided by the embodiment of the present application can receive the first signal sent by the Windows device through the reset pin when a problem occurs on the Android device. Under the action of the first signal, the Android device enters a waiting state to be restored. The Android device in the waiting state can use the OTG line to communicate data with the Windows device. At this time, the Android device can transfer user data to the Windows device through the OTG line. The Windows device stores the user data in the upgrade file, and after configuring the restore environment on the Android device and switching to the download mode, and setting the OTG to the burning mode first, the upgrade file containing the user data is sent to the Android device through the OTG line, so that the Android device restores the system to the running state before the problem occurs based on the upgrade file. Through the above technical means, the Android device is triggered to enter the waiting state to be restored by the Windows device when a problem occurs on the Android device, so that the Android device in the waiting state to be restored can establish a two-way communication connection with the Windows device through the OTG line, and the Windows device can restore the Android device based on the two-way communication connection, solving the problem that the Android device cannot be directly restored through the Windows device in the prior art. The operation process of repairing Android devices with Windows devices can be performed automatically without manual operation and without the need for additional expertise or technical support, which simplifies the complexity of restoring settings on Android devices and improves the efficiency of repairing Android devices.
[0066] Based on the above embodiments, Figure 8 This is a schematic diagram of the structure of an Android device repair device provided in an embodiment of the present application. Figure 8 The Android device repairing device provided in this embodiment specifically includes: a data transmission module 21, a mode switching module 22 and a system restoration module 23.
[0067] The data transmission module 21 is configured to send a first signal to the reset pin when a system failure of the Android device is detected, so that the Android device enters a waiting-to-restore state based on the first signal and transmits user data to the Windows device through the OTG line;
[0068] The mode switching module 22 is configured to save the received user data to the upgrade file, send a second signal to the Android device through the OTG line, so that the Android device configures the restore environment based on the second signal, and switches to the download mode and sets the OTG line to the burning mode after the restore environment configuration is completed;
[0069] The system restoration module 23 is configured to transfer the upgrade file to the Android device in the download mode via the OTG cable when it is detected that the OTG cable is in the burning mode, so that the Android device restores the system based on the upgrade file.
[0070] Based on the above embodiment, the data transmission module 21 includes: a heartbeat packet sending unit, configured to send a heartbeat packet to the Android device via the OTG line, so that the Android device sends a confirmation instruction to the Windows device when receiving the heartbeat packet; a resending unit, configured to resend the heartbeat packet to the Android device via the OTG line if no confirmation instruction is received within a preset time after sending the heartbeat packet; a first signal sending unit, configured to send a first signal to the reset pin if no confirmation instruction is received within a preset time after resending the heartbeat packet.
[0071] On the basis of the above embodiment, the data transmission module 21 includes: a third signal sending unit, configured to send a first signal to the reset pin, so that the Android device enters a waiting-for-restore state when receiving the first signal, and after entering the waiting-for-restore state, sends a third signal to the Windows device through the OTG line and stores the user data in the cache area; a user data sending unit, configured to send a data backup operation instruction to the Android device through the OTG line when the Windows device receives the third signal, so that the Android device sends the user data in the cache area to the Windows device through the OTG line based on the data backup operation instruction.
[0072] Based on the above embodiment, the mode switching module 22 includes: an environment configuration unit, configured to send a second signal to the Android device via the OTG line, so that the Android device configures the restore environment based on the second signal, and sends a fourth signal to the Windows device via the OTG line after the restore environment configuration is completed; a mode setting unit, configured to send a system restore operation instruction to the Android device via the OTG line when the Windows device receives the fourth signal, so that the Android device switches to the download mode based on the system restore operation instruction and sets the OTG line to the burning mode.
[0073] Based on the above embodiment, the system restore module 23 includes: an upgrade file storage unit, which is configured to transfer the upgrade file to the Android device via an OTG line, so that the Android device stores the received upgrade file in the backup partition and then starts the system of the Android device based on the upgrade file in the backup partition.
[0074] Based on the above embodiment, the upgrade file storage unit includes: a verification subunit, which is configured for the Android device to determine whether a complete upgrade file has been received based on a verification code in the received upgrade file; and a storage subunit, which is configured for the Android device to store the upgrade file in a backup partition when a complete upgrade file is received.
[0075] Based on the above embodiment, the system restoration module 23 includes: a fifth signal sending unit, configured to send a fifth signal from the Android device to the Windows device via the OTG cable after the Android device receives the complete upgrade file; a status confirmation unit, configured to confirm that the system restoration of the Android device is completed when the Windows device receives the fifth signal.
[0076] As mentioned above, the Android device repair device provided in the embodiment of the present application can receive the first signal sent by the Windows device through the reset pin when a problem occurs in the Android device. Under the action of the first signal, the Android device enters the waiting state to be restored. The Android device in the waiting state can use the OTG line to communicate data with the Windows device. At this time, the Android device can transfer user data to the Windows device through the OTG line. The Windows device stores the user data in the upgrade file, and after configuring the restore environment on the Android device and switching to the download mode, and setting the OTG to the burning mode first, the upgrade file containing the user data is sent to the Android device through the OTG line, so that the Android device restores the system to the running state before the problem occurs based on the upgrade file. Through the above technical means, the Android device is triggered to enter the waiting state to be restored by the Windows device when a problem occurs in the Android device, so that the Android device in the waiting state to be restored can establish a two-way communication connection with the Windows device through the OTG line, and the Windows device can restore the Android device based on the two-way communication connection, solving the problem that the Android device cannot be directly restored through the Windows device in the prior art. The operation process of repairing Android devices with Windows devices can be performed automatically without manual operation and without the need for additional expertise or technical support, which simplifies the complexity of restoring settings on Android devices and improves the efficiency of repairing Android devices.
[0077] The Android device repairing apparatus provided in the embodiment of the present application can be used to execute the Android device repairing method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0078] Fig. 9 This is a schematic diagram of the structure of an Android device repair device provided in an embodiment of the present application, referring to Fig. 9 The Android device repairing device includes: a processor 31, a memory 32, a communication device 33, an input device 34 and an output device 35. The number of the processor 31 in the Android device repairing device can be one or more, and the number of the memory 32 in the Android device repairing device can be one or more. The processor 31, the memory 32, the communication device 33, the input device 34 and the output device 35 of the Android device repairing device can be connected through a bus or other methods.
[0079] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the Android device repair method of any embodiment of the present application (for example, the data transmission module 21, the mode switching module 22 and the system restore module 23 in the Android device repair device). The memory 32 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to the use of the device, etc. In addition, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0080] The communication device 33 is used for data transmission.
[0081] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 32, that is, implements the above-mentioned Android device repair method.
[0082] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.
[0083] The Android device repairing device provided above can be used to execute the Android device repairing method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0084] The embodiment of the present application also provides a storage medium containing computer executable instructions, which are used to execute an Android device repair method when executed by a computer processor. The Android device repair method includes: when a system failure is detected in the Android device, sending a first signal to the reset pin, so that the Android device enters a waiting-for-restore state based on the first signal and transmits user data to the Windows device via an OTG line; saving the received user data to an upgrade file, sending a second signal to the Android device via the OTG line, so that the Android device configures a restore environment based on the second signal, and after the restore environment configuration is completed, switching to download mode and setting the OTG line to burning mode; when it is detected that the OTG line is in burning mode, transmitting the upgrade file to the Android device in download mode via the OTG line.
[0085] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.
[0086] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application is not limited to the above Android device repair method, and the computer executable instructions can also execute the relevant operations in the Android device repair method provided in any embodiment of the present application.
[0087] The Android device repair apparatus, storage medium, and Android device repair device provided in the above embodiments can execute the Android device repair method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the Android device repair method provided in any embodiment of the present application.
[0088] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the embodiments herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for repairing an Android device, characterized in that: The method is applied to a Windows device, the Windows device is connected to an Android device via an OTG line, and the Windows device is connected to a reset pin of the Android device, and the method includes: When a system failure of the Android device is detected, a first signal is sent to the reset pin, so that the Android device enters a waiting-for-restore state based on the first signal and transmits user data to the Windows device through the OTG line; The received user data is saved to an upgrade file, and a second signal is sent to the Android device via the OTG line, so that the Android device configures a restore environment based on the second signal, and after the restore environment configuration is completed, the Android device switches to a download mode and sets the OTG line to a burning mode; When it is detected that the OTG cable is in the burning mode, the upgrade file is transmitted to the Android device in the download mode via the OTG cable, so that the Android device restores the system based on the upgrade file.
2. The method for repairing an Android device according to claim 1, characterized in that: When a fault is detected in the Android device, sending a first signal to the reset pin includes: Send a heartbeat packet to the Android device via the OTG line, so that the Android device sends a confirmation instruction to the Windows device when receiving the heartbeat packet; If the confirmation instruction is not received within a preset time after sending the heartbeat packet, resending the heartbeat packet to the Android device via the OTG line; When the confirmation instruction is not received within a preset time period after the heartbeat packet is resent, a first signal is sent to the reset pin.
3. The method for repairing an Android device according to claim 1, characterized in that: The sending of a first signal to the reset pin so that the Android device enters a waiting-for-restoration state based on the first signal and transmits user data to the Windows device through the OTG line includes: Sending a first signal to the reset pin, so that the Android device enters a waiting-to-restore state when receiving the first signal, and after entering the waiting-to-restore state, sending a third signal to the Windows device through the OTG line and storing the user data in a cache area; When the Windows device receives the third signal, a data backup operation instruction is sent to the Android device via the OTG line, so that the Android device sends the user data in the cache area to the Windows device via the OTG line based on the data backup operation instruction.
4. The method for repairing an Android device according to claim 1, characterized in that: The sending of a second signal to the Android device through the OTG line so that the Android device configures a restore environment based on the second signal, and after the restore environment configuration is completed, switching to a download mode and setting the OTG line to a burning mode includes: Sending a second signal to the Android device through the OTG line, so that the Android device configures a restore environment based on the second signal, and sending a fourth signal to the Windows device through the OTG line after the restore environment configuration is completed; When the Windows device receives the fourth signal, a system restore operation instruction is sent to the Android device via the OTG line, so that the Android device switches to the download mode based on the system restore operation instruction and sets the OTG line to the burning mode.
5. The method for repairing an Android device according to claim 1, characterized in that: The step of transmitting the upgrade file to the Android device in the download mode through the OTG line so that the Android device restores the system based on the upgrade file includes: The upgrade file is transmitted to the Android device via the OTG line, so that the Android device stores the received upgrade file in the backup partition and then starts the system of the Android device based on the upgrade file in the backup partition.
6. The method for repairing an Android device according to claim 5, characterized in that: The Android device stores the upgrade file in a backup partition, including: The Android device determines whether a complete upgrade file is received based on a verification code in the received upgrade file; When a complete upgrade file is received, the Android device stores the upgrade file in a backup partition.
7. The method for repairing an Android device according to claim 6, characterized in that: After the Android device receives the complete upgrade file, the method further includes: The Android device sends a fifth signal to the Windows device via the OTG cable; When the Windows device receives the fifth signal, it is confirmed that the system of the Android device has been restored.
8. An Android device repair device, characterized in that: The device is applied to a Windows device, the Windows device is connected to an Android device via an OTG line, and the Windows device is connected to a reset pin of the Android device. The device includes: The data transmission module is configured to send a first signal to the reset pin when a system failure of the Android device is detected, so that the Android device enters a waiting-for-restore state based on the first signal and transmits user data to the Windows device through the OTG line; A mode switching module is configured to save the received user data to an upgrade file, send a second signal to the Android device through the OTG line, so that the Android device configures a restore environment based on the second signal, and after the restore environment configuration is completed, switches to a download mode and sets the OTG line to a burning mode; The system restoration module is configured to transfer the upgrade file to the Android device in the download mode via the OTG cable when it is detected that the OTG cable is in the burning mode, so that the Android device restores the system based on the upgrade file.
9. An Android device repair device, characterized in that: include: one or more processors; A memory stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the Android device repair method as described in any one of claims 1-7.
10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the Android device repair method as described in any one of claims 1-7 when executed by a computer processor.