CN105045612B - Peripheral upgrading recovery method and system for Android terminal - Google Patents
Peripheral upgrading recovery method and system for Android terminal Download PDFInfo
- Publication number
- CN105045612B CN105045612B CN201510360697.8A CN201510360697A CN105045612B CN 105045612 B CN105045612 B CN 105045612B CN 201510360697 A CN201510360697 A CN 201510360697A CN 105045612 B CN105045612 B CN 105045612B
- Authority
- CN
- China
- Prior art keywords
- peripheral
- upgrading
- android terminal
- android
- terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a peripheral upgrading recovery method and system of an Android terminal, wherein a signature of an upgrading packet is verified by acquiring the upgrading packet on the peripheral; after the verification is successful, the upgrading is started, and whether the peripheral is pulled out or not is detected in the upgrading process; if the peripheral is detected to be unplugged, the Android terminal prompts that the peripheral is unplugged, whether the peripheral is plugged into the Android terminal again is detected, and if the peripheral is detected to be plugged into the Android terminal again, upgrading is continued; if the peripheral is detected not to be unplugged, the Android system is upgraded according to the upgrade package; the risk of upgrading the peripheral is effectively avoided, the event that the peripheral is pulled out can be monitored, the user is reminded to re-insert the peripheral, the upgrading can be automatically judged and continuously completed after the user inserts the peripheral, and the recovery efficiency of upgrading accidents is greatly improved.
Description
Technical Field
The invention relates to the technical field of intelligent terminals of Android systems, in particular to a peripheral upgrading recovery method and system of an Android terminal.
Background
With the continuous development of the intelligent terminal technology, the use of intelligent terminals such as televisions, mobile phones and tablet computers is more and more popular, and the Android systems are adopted in many of the intelligent terminals. The Android system-based device generally supports the upgrade of the upgrade package stored in the peripheral device, and finishes the upgrade action of system software by reading the upgrade package under the peripheral device (such as an SD card, a usb disk, a mobile hard disk, and the like). However, when the user accidentally unplugs the peripheral equipment to cause the upgrade to be interrupted, the existing upgrade process will report an error, and then the upgrade is exited and the Android system is entered. At this time, the system cannot be normally started due to incomplete upgrading, so that the terminal cannot be normally used. For the processing of peripheral upgrading, some manufacturers copy an upgrading packet in the peripheral to a storage space of the terminal before upgrading, so that the above problems can be avoided.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a peripheral upgrading recovery method and system for an Android terminal, and the method and system are used for solving the problem that the existing Android system terminal fails to be upgraded when peripherals are unplugged.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a peripheral upgrading recovery method for an Android terminal comprises the following steps:
A. acquiring an upgrade package on the peripheral equipment, and performing signature verification on the upgrade package;
B. after the verification is successful, the upgrading is started, and whether the peripheral is pulled out or not is detected in the upgrading process;
C. if the peripheral is detected to be unplugged, the Android terminal prompts that the peripheral is unplugged, and detects whether the peripheral is reinserted into the Android terminal, if so, the step A is returned; and if the peripheral is not detected to be unplugged, the Android system is upgraded according to the upgrade package.
The peripheral upgrading recovery method for the Android terminal comprises the following steps before the step A:
a11, an Android system of the Android terminal acquires an upgrade package of the peripheral equipment, and records the path of the upgrade package into an instruction file under a cache partition;
a12, restarting the system, reading a command entering a recovery system from the instruction file;
a13, starting loading judgment and entering a recovery system.
In the method for recovering the peripheral upgrading of the Android terminal, in the step B, detecting whether the peripheral is unplugged specifically includes:
b11, recording the uuid and the equipment node of the current peripheral equipment;
b12, acquiring a hot plug event of the terminal kernel, judging whether an external removal event exists, and if so, executing the step B13; if not, the peripheral is not removed;
b13, recording equipment nodes corresponding to the peripheral removing events; judging whether the equipment node corresponding to the peripheral removing event is consistent with the equipment node of the peripheral, and if so, considering that the peripheral is pulled out; if not, the peripheral is not removed.
In the method for recovering the peripheral upgrading of the Android terminal, in the step C, detecting whether the peripheral is reinserted into the Android terminal specifically includes:
c11, acquiring a hot plug event of the terminal kernel, and judging whether an external addition event exists; if yes, go to step C12;
c12, recording equipment nodes corresponding to the peripheral adding events, and acquiring uuids corresponding to the equipment nodes;
c13, judging whether the uuid corresponding to the peripheral adding event is consistent with the uuid of the pulled peripheral or not, and if so, considering that the peripheral is re-inserted into the Android terminal; if not, return to step C11.
In the step C, after detecting that the peripheral is reinserted into the Android terminal, the method further includes:
c21, if the peripheral is detected to be inserted into the Android terminal again, the mounting of the peripheral is completed again, and the equipment node of the peripheral which is inserted again is mounted under the path according to the path recorded in the instruction file;
c22, the Android terminal finishes prompting, re-enters the recovery system, acquires the upgrade package according to the mounted path, and performs re-signature verification on the upgrade package;
and C23, starting upgrading after verification is successful, erasing original data on the Android terminal, and copying upgrading data in the upgrading packet to the Android terminal to finish upgrading the Android system.
The utility model provides an external equipment upgrading recovery system of Android terminal, includes wherein:
the verification module is used for acquiring an upgrade package on the peripheral equipment and verifying the signature of the upgrade package;
the unplugging detection module is used for starting upgrading after the verification is successful and detecting whether the peripheral is unplugged or not in the upgrading process;
the upgrading module is used for prompting that the peripheral is pulled out by the Android terminal when the peripheral is detected to be pulled out, detecting whether the peripheral is inserted into the Android terminal again, if the peripheral is detected to be inserted into the Android terminal again, continuously acquiring an upgrading packet of the peripheral, re-signing and checking, starting upgrading after checking is successful, and finishing upgrading the Android system according to the upgrading packet; and when the peripheral is not unplugged, completing the Android system upgrade according to the upgrade package.
The peripheral upgrading and recovering system of the Android terminal comprises:
the system comprises an upgrade package acquisition module, a cache partition acquisition module and a cache partition management module, wherein the upgrade package acquisition module is used for acquiring an upgrade package of an external device through an Android system of an Android terminal and recording a path of the upgrade package into an instruction file under the cache partition;
the restarting module is used for restarting the system and reading a command entering a recovery system from the instruction file;
and the loading starting module is used for starting loading judgment and entering the recovery system.
The peripheral equipment upgrading and recovering system of the Android terminal comprises a unplugging detection module and a peripheral equipment upgrading and recovering module, wherein the unplugging detection module comprises:
the peripheral recording unit is used for recording the uuid and the equipment node of the current peripheral;
the removing event screening unit is used for acquiring a hot plug event of the terminal kernel, judging whether an external removing event exists in the hot plug event, and if so, triggering the removing judgment unit; if not, the peripheral is not removed;
the unplugging judging unit is used for recording equipment nodes corresponding to the peripheral removal events; judging whether the equipment node corresponding to the peripheral removing event is consistent with the equipment node of the peripheral, and if so, considering that the peripheral is pulled out; if not, the peripheral is not removed.
The peripheral equipment upgrading and recovering system of the Android terminal comprises an upgrading module and a recovering module, wherein the upgrading module comprises:
the adding event judging unit is used for acquiring a hot plug event of the terminal kernel, judging whether an external adding event exists or not, and triggering the universal unique identification code acquiring unit if the external adding event exists;
the universal unique identification code acquisition unit is used for recording equipment nodes corresponding to the peripheral adding events and acquiring uuids corresponding to the equipment nodes;
the reinsertion judging unit is used for judging whether the uuid corresponding to the peripheral adding event is consistent with the uuid of the pulled peripheral or not, and if so, the peripheral is considered to be reinserted into the Android terminal; if not, the adding event judgment unit is triggered.
The peripheral equipment upgrading and recovering system of the Android terminal comprises an upgrading module and a recovering module, wherein the upgrading module comprises:
the re-mounting unit is used for completing mounting of the peripheral equipment again if the peripheral equipment is detected to be re-inserted into the Android terminal, and mounting the equipment node of the re-inserted peripheral equipment to a path according to the path recorded in the instruction file;
the re-verification unit is used for ending the prompt of the Android terminal, reentering the recovery system, acquiring the upgrade package according to the mounted path and performing re-signature verification on the upgrade package;
and the continuous upgrading unit is used for starting upgrading after the verification is successful, erasing the original data on the Android terminal, and copying the upgrading data in the upgrading packet to the Android terminal so as to complete the upgrading of the Android system.
According to the method and the system for recovering the peripheral upgrading of the Android terminal, provided by the invention, the problem that the existing Android system terminal fails to upgrade when the peripheral is pulled out is effectively solved, and the signature verification is carried out on the upgrade package by acquiring the upgrade package on the peripheral; after the verification is successful, the upgrading is started, and whether the peripheral is pulled out or not is detected in the upgrading process; if the peripheral is detected to be removed, the Android terminal prompts that the peripheral is removed, whether the peripheral is inserted into the Android terminal again is detected, if the peripheral is detected to be inserted into the Android terminal again, an upgrade package of the peripheral is continuously obtained, signature verification is carried out again, upgrade is started after verification is successful, and Android system upgrade is completed according to the upgrade package; if the peripheral is detected not to be unplugged, the Android system is upgraded according to the upgrade package; the risk of upgrading the peripheral is effectively avoided, the event that the peripheral is pulled out can be monitored, meanwhile, the user is reminded to re-insert the peripheral, the upgrading can be automatically judged and continuously completed after the user inserts the peripheral, and great convenience is brought to the user.
Drawings
Fig. 1 is a flowchart of a peripheral upgrade recovery method for an Android terminal according to a preferred embodiment of the present invention.
Fig. 2 is a block diagram of a preferred embodiment of a peripheral upgrading and recovery system of an Android terminal provided in the present invention.
Detailed Description
The invention provides a method and a system for upgrading and recovering peripherals of an Android terminal, and in order to make the purpose, technical scheme and advantages of the invention clearer and clearer, the invention is further described in detail below by referring to the attached drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a peripheral upgrade recovery method for an Android terminal according to a preferred embodiment of the present invention, as shown in the figure, the method includes the following steps:
s100, obtaining an upgrade package on the peripheral equipment, and carrying out signature verification on the upgrade package;
s200, starting upgrading after successful verification, and detecting whether the peripheral is pulled out or not in the upgrading process;
step S300, if the peripheral is detected to be unplugged, the Android terminal prompts that the peripheral is unplugged, whether the peripheral is plugged into the Android terminal again is detected, and if the peripheral is detected to be plugged into the Android terminal again, the step S100 is returned; and if the peripheral is not detected to be unplugged, the Android system is upgraded according to the upgrade package.
The above steps are described in detail with reference to specific examples.
In step S100, the Android terminal obtains an upgrade package on the peripheral device, and performs signature verification on the upgrade package. Specifically, the method further includes, before step S100: s110, an Android system of the Android terminal obtains an external upgrade package, and records the path of the upgrade package into an instruction file under a cache partition; s120, restarting the system, and reading a command entering a recovery system from the instruction file; and S130, starting loading judgment and entering a recovery system.
The existing Android system upgrading roughly comprises the following steps: the Android system acquires an upgrade package from an external device, and records the path of the upgrade package into a command file under a cache partition; restarting the starting system, and reading a command entering a recovery system from a command file; then Bootloader (boot loading) judges and enters a recovery system to obtain an upgrade package, and signature verification is carried out on the upgrade package; and after the verification is successful, erasing the original data on the terminal, and copying the upgrading data in the upgrading packet to the equipment in sequence. And after the upgrade is finished, restarting the starting system to enter the Android system. Before the original data on the terminal is erased, the peripheral equipment is unplugged without influence, because the actual upgrading is not carried out; however, if the original data on the terminal is erased, the peripheral is unplugged, so that the upgrade is not completed, the system cannot be normally started, and the terminal cannot be normally used. As can be seen from the above, the steps S100 and the previous steps are the existing Android system upgrading process, and are not described herein too much. The English words appearing in the invention are common words in android system development, and the meanings thereof are well known to those skilled in the art and are not described herein too much.
In step S200, the upgrade is started after the verification is successful, and it is detected whether the peripheral device is unplugged in the upgrade process. Specifically, the original data on the Android terminal is erased, and after the original data is erased, the peripheral is pulled out, so that the Android system cannot be upgraded, and the terminal cannot be normally used. Further, detecting whether the peripheral is unplugged specifically includes: s210, recording the uuid and the equipment node of the current peripheral equipment; s220, acquiring a hot plug event of a terminal kernel, judging whether a peripheral removal event exists, and if so, executing a step S230; if not, the peripheral is not removed; s230, recording equipment nodes corresponding to the peripheral removing events; judging whether the equipment node corresponding to the peripheral removing event is consistent with the equipment node of the peripheral, and if so, considering that the peripheral is pulled out; if not, the peripheral is not removed. That is, it is detected whether the peripheral is unplugged during the upgrade process.
In actual application, the Android terminal records a uuid (universal Unique Identifier) and an equipment node corresponding to the current peripheral, where the uuid is a Unique Identifier for storing the peripheral. Establishing a netlink monitoring port, acquiring a hot plug event of a terminal system kernel, screening a remove event in the hot plug event, acquiring a device node corresponding to the remove event, and if the device node is consistent with the device node corresponding to the recorded peripheral, considering that the peripheral currently used for upgrading is removed; otherwise, the peripheral is considered not unplugged.
In the step S300, if it is detected that the peripheral is unplugged, the Android terminal prompts that the peripheral is unplugged, and detects whether the peripheral is reinserted into the Android terminal, and if it is detected that the peripheral is reinserted into the Android terminal, the step S100 is returned to; and if the peripheral is not detected to be unplugged, the Android system is upgraded according to the upgrade package.
Specifically, when the peripheral is detected to be unplugged, the Android terminal prompts that the peripheral is unplugged, and continues to detect whether the peripheral is plugged into the Android terminal again. The terminal prompt has various prompt modes, and can display prompts on an interface, also can broadcast prompts in voice, and can prompt by flashing light. And when the peripheral is not detected to be unplugged, the Android system is upgraded according to a normal upgrading program. The detecting whether the peripheral is inserted into the Android terminal again specifically includes: s311, acquiring a hot plug event of a terminal kernel, and judging whether a peripheral adding event exists; if yes, go to step S312; s312, recording equipment nodes corresponding to the peripheral adding events, and acquiring uuids corresponding to the equipment nodes; s313, judging whether the uuid corresponding to the peripheral adding event is consistent with the uuid of the pulled peripheral or not, and if so, determining that the peripheral is re-inserted into the Android terminal; if not, returning to step S311; i.e. continue to monitor whether there is a peripheral inserted.
In actual application, a netlink monitoring port is created, a hot plug event of a kernel is obtained, add (adding) events in the event are screened, a device node corresponding to the add event is recorded, then a uuid corresponding to the device node is obtained, whether the uuid is consistent with the uuid of the pulled peripheral before is judged, and if so, the pulled peripheral is represented to be inserted into the Android terminal again. Therefore, the peripheral which is pulled out is inserted into the Android terminal again, and upgrading is continued again.
When detecting that the peripheral is unplugged, the terminal sends an interrupt signal to inform the upgrading main thread to remind a user and start peripheral insertion monitoring. The interruption signal is sent to send a message to stop the operation of the upgrading main thread, data storage is not carried out, the original data of the Android system are completely erased when upgrading is started, and the new data are copied to half when the upgrading is interrupted, so that the upgrading is only needed again. The main functions of the user reminding are as follows: and popping up a prompt on an upgrading interface, reminding a user that the peripheral equipment is pulled out, and reminding the user to reinsert the pulled-out peripheral equipment until the peripheral equipment is detected to be reinserted, and then upgrading again, namely, the process of the invention is repeated until the upgrading is successful.
Further, in step S300, after detecting that the peripheral is reinserted into the Android terminal, the method further includes:
s310, if the peripheral is detected to be inserted into the Android terminal again, the mounting of the peripheral is completed again, and the equipment node of the peripheral which is inserted again is mounted under the path according to the path recorded in the instruction file;
s320, the Android terminal finishes prompting, reenters the recovery system, acquires the upgrade package according to the mounted path, and performs re-signature verification on the upgrade package;
and S330, starting upgrading after verification is successful, erasing original data on the Android terminal, and copying upgrading data in the upgrading packet to the Android terminal to finish upgrading the Android system.
Specifically, if the unplugged peripheral is detected to be inserted into the Android terminal again, the mounting of the peripheral is completed again, and a new device node is mounted to a path recorded in a command file before the peripheral is unplugged during mounting according to the path. Therefore, the mounting path is consistent with the path before the peripheral is pulled out, a continuous upgrading signal is sent out to enable the main thread to end the prompting interface, and the loop exits. And restarting the upgrading main thread, restarting the recovery program at the moment, acquiring the upgrading packet according to the mounted path, performing re-signature verification on the upgrading packet, entering upgrading erasing action if no problem exists, erasing original data on the Android terminal, and repeating the method of the invention to finally copy the upgrading data in the upgrading packet into the Android terminal so as to finish upgrading the Android system.
The peripheral upgrading recovery method of the Android terminal can effectively avoid the risk of using peripheral upgrading, can monitor the event that the peripheral is pulled out, simultaneously reminds the user to re-insert the peripheral, and can automatically judge and continue to finish upgrading after the user inserts the peripheral; and the results of the upgrade packet path and the like before interruption are further effectively utilized, and the recovery efficiency of the upgrade accident is greatly improved.
Based on the peripheral upgrading recovery method of the Android terminal, the invention also provides a peripheral upgrading recovery system of the Android terminal, as shown in fig. 2, the method comprises the following steps:
the verification module 10 is used for acquiring an upgrade package on the peripheral equipment and performing signature verification on the upgrade package; specifically, as shown in step S100;
the unplugging detection module 20 is used for starting upgrading after successful verification and detecting whether the peripheral is unplugged or not in the upgrading process; specifically, as described in step S200;
the upgrading module 30 is used for prompting that the peripheral is pulled out by the Android terminal when the peripheral is detected to be pulled out, detecting whether the peripheral is inserted into the Android terminal again, if the peripheral is detected to be inserted into the Android terminal again, continuously acquiring an upgrading packet of the peripheral, re-signing and checking, starting upgrading after checking is successful, and finishing upgrading the Android system according to the upgrading packet; when the fact that the peripheral is not pulled out is detected, Android system upgrading is completed according to the upgrading package; as described in step S300. The Android system upgrade is completed according to the upgrade package, namely the existing upgrade process is that the original data on the Android terminal is erased, and the upgrade data in the upgrade package is copied to the Android terminal so as to complete the Android system upgrade.
Further, the peripheral upgrading and restoring system of the Android terminal further includes:
the system comprises an upgrade package acquisition module, a cache partition acquisition module and a cache partition management module, wherein the upgrade package acquisition module is used for acquiring an upgrade package of an external device through an Android system of an Android terminal and recording a path of the upgrade package into an instruction file under the cache partition;
the restarting module is used for restarting the system and reading a command entering a recovery system from the instruction file;
and the loading starting module is used for starting loading judgment and entering the recovery system.
Further, the removal detection module 20 includes:
the peripheral recording unit is used for recording the uuid and the equipment node of the current peripheral;
the removing event screening unit is used for acquiring a hot plug event of the terminal kernel, judging whether an external removing event exists in the hot plug event, and if so, triggering the removing judgment unit; if not, the peripheral is not removed;
the unplugging judging unit is used for recording equipment nodes corresponding to the peripheral removal events; judging whether the equipment node corresponding to the peripheral removing event is consistent with the equipment node of the peripheral, and if so, considering that the peripheral is pulled out; if not, the peripheral is not removed.
Further, the upgrade module 30 includes:
the adding event judging unit is used for acquiring a hot plug event of the terminal kernel, judging whether an external adding event exists or not, and triggering the universal unique identification code acquiring unit if the external adding event exists;
the universal unique identification code acquisition unit is used for recording equipment nodes corresponding to the peripheral adding events and acquiring uuids corresponding to the equipment nodes;
the reinsertion judging unit is used for judging whether the uuid corresponding to the peripheral adding event is consistent with the uuid of the pulled peripheral or not, and if so, the peripheral is considered to be reinserted into the Android terminal; if not, the adding event judgment unit is triggered.
Further, the upgrade module 30 includes:
the re-mounting unit is used for completing mounting of the peripheral equipment again if the peripheral equipment is detected to be re-inserted into the Android terminal, and mounting the equipment node of the re-inserted peripheral equipment to a path according to the path recorded in the instruction file;
the re-verification unit is used for ending the prompt of the Android terminal, reentering the recovery system, acquiring the upgrade package according to the mounted path and performing re-signature verification on the upgrade package;
and the continuous upgrading unit is used for starting upgrading after the verification is successful, erasing the original data on the Android terminal, and copying the upgrading data in the upgrading packet to the Android terminal so as to complete the upgrading of the Android system.
The Android terminal is a terminal with an Android system, such as a mobile phone, a tablet personal computer and a smart television.
In summary, according to the method and the system for recovering the peripheral upgrading of the Android terminal provided by the invention, the signature of the upgrade package is verified by acquiring the upgrade package on the peripheral; after the verification is successful, the upgrading is started, and whether the peripheral is pulled out or not is detected in the upgrading process; if the peripheral is detected to be removed, the Android terminal prompts that the peripheral is removed, whether the peripheral is inserted into the Android terminal again is detected, if the peripheral is detected to be inserted into the Android terminal again, an upgrade package of the peripheral is continuously obtained, signature verification is carried out again, upgrade is started after verification is successful, and Android system upgrade is completed according to the upgrade package; if the peripheral is detected not to be unplugged, the Android system is upgraded according to the upgrade package; the risk of upgrading the peripheral is effectively avoided, the event that the peripheral is pulled out can be monitored, the user is reminded to re-insert the peripheral, the upgrading can be automatically judged and continuously completed after the user inserts the peripheral, and the recovery efficiency of upgrading accidents is greatly improved.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.
Claims (10)
1. A peripheral upgrading recovery method of an Android terminal is characterized by comprising the following steps:
A. acquiring an upgrade package on the peripheral equipment, and performing signature verification on the upgrade package;
B. after the verification is successful, the upgrading is started, and whether the peripheral is pulled out or not is detected in the upgrading process;
C. if the peripheral is detected to be unplugged, the Android terminal prompts that the peripheral is unplugged, whether the peripheral is inserted into the Android terminal again is detected, if the peripheral is detected to be inserted into the Android terminal again, a path of a new equipment node is mounted under a path recorded by a specified file before the peripheral is unplugged, and then the step A is returned; and if the peripheral is not detected to be unplugged, the Android system is upgraded according to the upgrade package.
2. The method for recovering the peripheral upgrading of the Android terminal according to claim 1, further comprising, before the step a:
a11, an Android system of the Android terminal acquires an upgrade package of the peripheral equipment, and records the path of the upgrade package into an instruction file under a cache partition;
a12, restarting the system, reading a command entering a recovery system from the instruction file;
a13, starting loading and entering a recovery system.
3. The method for recovering the peripheral upgrading of the Android terminal according to claim 1, wherein in the step B, detecting whether the peripheral is unplugged specifically includes:
b11, recording the uuid and the equipment node of the current peripheral equipment;
b12, acquiring a hot plug event of the terminal kernel, judging whether an external removal event exists, and if so, executing the step B13; if not, the peripheral is not removed;
b13, recording equipment nodes corresponding to the peripheral removing events; judging whether the equipment node corresponding to the peripheral removing event is consistent with the equipment node of the peripheral, and if so, considering that the peripheral is pulled out; if not, the peripheral is not removed.
4. The method for recovering the peripheral upgrading of the Android terminal according to claim 3, wherein in the step C, detecting whether the peripheral is reinserted into the Android terminal specifically includes:
c11, acquiring a hot plug event of the terminal kernel, and judging whether an external addition event exists; if yes, go to step C12;
c12, recording equipment nodes corresponding to the peripheral adding events, and acquiring uuids corresponding to the equipment nodes;
c13, judging whether the uuid corresponding to the peripheral adding event is consistent with the uuid of the pulled peripheral or not, and if so, considering that the peripheral is re-inserted into the Android terminal; if not, return to step C11.
5. The method for recovering the peripheral upgrade of the Android terminal according to claim 2, wherein in the step C, after detecting that the peripheral is reinserted into the Android terminal, the method further includes:
c21, if the peripheral is detected to be inserted into the Android terminal again, the mounting of the peripheral is completed again, and the equipment node of the peripheral which is inserted again is mounted under the path according to the path recorded in the instruction file;
c22, the Android terminal finishes prompting, re-enters the recovery system, acquires the upgrade package according to the mounted path, and performs re-signature verification on the upgrade package;
and C23, starting upgrading after verification is successful, erasing original data on the Android terminal, and copying upgrading data in the upgrading packet to the Android terminal to finish upgrading the Android system.
6. The utility model provides an external equipment upgrading recovery system of Android terminal which characterized in that includes:
the verification module is used for acquiring an upgrade package on the peripheral equipment and verifying the signature of the upgrade package;
the unplugging detection module is used for starting upgrading after the verification is successful and detecting whether the peripheral is unplugged or not in the upgrading process;
the upgrading module is used for prompting that the peripheral is pulled out by the Android terminal when the peripheral is detected to be pulled out, detecting whether the peripheral is inserted into the Android terminal again, mounting a path of a new equipment node to a path recorded by a specified file before the peripheral is pulled out if the peripheral is detected to be inserted into the Android terminal again, then continuously acquiring an upgrading package of the peripheral, re-signing and checking, starting upgrading after checking is successful, and finishing upgrading of an Android system according to the upgrading package; and when the peripheral is not unplugged, completing the Android system upgrade according to the upgrade package.
7. The peripheral upgrading and recovery system of the Android terminal of claim 6, further comprising:
the system comprises an upgrade package acquisition module, a cache partition acquisition module and a cache partition management module, wherein the upgrade package acquisition module is used for acquiring an upgrade package of an external device through an Android system of an Android terminal and recording a path of the upgrade package into an instruction file under the cache partition;
the restarting module is used for restarting the system and reading a command entering a recovery system from the instruction file;
and the loading starting module is used for starting loading and entering the recovery system.
8. The peripheral upgrading and recovery system of the Android terminal of claim 6, wherein the unplugging detection module comprises:
the peripheral recording unit is used for recording the uuid and the equipment node of the current peripheral;
the removing event screening unit is used for acquiring a hot plug event of the terminal kernel, judging whether an external removing event exists in the hot plug event, and if so, triggering the removing judgment unit; if not, the peripheral is not removed;
the unplugging judging unit is used for recording equipment nodes corresponding to the peripheral removal events; judging whether the equipment node corresponding to the peripheral removing event is consistent with the equipment node of the peripheral, and if so, considering that the peripheral is pulled out; if not, the peripheral is not removed.
9. The peripheral upgrading and recovery system of the Android terminal of claim 8, wherein the upgrading module comprises:
the adding event judging unit is used for acquiring a hot plug event of the terminal kernel, judging whether an external adding event exists or not, and triggering the universal unique identification code acquiring unit if the external adding event exists;
the universal unique identification code acquisition unit is used for recording equipment nodes corresponding to the peripheral adding events and acquiring uuids corresponding to the equipment nodes;
the reinsertion judging unit is used for judging whether the uuid corresponding to the peripheral adding event is consistent with the uuid of the pulled peripheral or not, and if so, the peripheral is considered to be reinserted into the Android terminal; if not, the adding event judgment unit is triggered.
10. The peripheral upgrading and recovery system of the Android terminal of claim 7, wherein the upgrading module comprises:
the re-mounting unit is used for completing mounting of the peripheral equipment again if the peripheral equipment is detected to be re-inserted into the Android terminal, and mounting the equipment node of the re-inserted peripheral equipment to a path according to the path recorded in the instruction file;
the re-verification unit is used for ending the prompt of the Android terminal, reentering the recovery system, acquiring the upgrade package according to the mounted path and performing re-signature verification on the upgrade package;
and the continuous upgrading unit is used for starting upgrading after the verification is successful, erasing the original data on the Android terminal, and copying the upgrading data in the upgrading packet to the Android terminal so as to complete the upgrading of the Android system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510360697.8A CN105045612B (en) | 2015-06-26 | 2015-06-26 | Peripheral upgrading recovery method and system for Android terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510360697.8A CN105045612B (en) | 2015-06-26 | 2015-06-26 | Peripheral upgrading recovery method and system for Android terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105045612A CN105045612A (en) | 2015-11-11 |
CN105045612B true CN105045612B (en) | 2020-05-26 |
Family
ID=54452176
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510360697.8A Active CN105045612B (en) | 2015-06-26 | 2015-06-26 | Peripheral upgrading recovery method and system for Android terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105045612B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1834977A (en) * | 2006-03-23 | 2006-09-20 | 李岳 | Authentication protection method based on USB device |
CN102682088A (en) * | 2012-04-23 | 2012-09-19 | Tcl集团股份有限公司 | Mount method and mount system of storage equipment, and television |
CN103530142A (en) * | 2013-05-08 | 2014-01-22 | Tcl集团股份有限公司 | Android system upgrading method and system based on storage device |
CN103544031A (en) * | 2013-08-27 | 2014-01-29 | Tcl集团股份有限公司 | Android system updating method and system of multi-partition external storage equipment |
-
2015
- 2015-06-26 CN CN201510360697.8A patent/CN105045612B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1834977A (en) * | 2006-03-23 | 2006-09-20 | 李岳 | Authentication protection method based on USB device |
CN102682088A (en) * | 2012-04-23 | 2012-09-19 | Tcl集团股份有限公司 | Mount method and mount system of storage equipment, and television |
CN103530142A (en) * | 2013-05-08 | 2014-01-22 | Tcl集团股份有限公司 | Android system upgrading method and system based on storage device |
CN103544031A (en) * | 2013-08-27 | 2014-01-29 | Tcl集团股份有限公司 | Android system updating method and system of multi-partition external storage equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105045612A (en) | 2015-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105094903B (en) | The method and device that firmware is upgraded | |
CN109358882B (en) | Method and device for upgrading firmware of television terminal | |
CN110399153B (en) | System upgrading method, device, terminal and computer readable storage medium | |
JP4601925B2 (en) | Information processing system | |
CN107766177A (en) | Start optimization method, device, storage medium and terminal device | |
CN113467981A (en) | Exception handling method and device | |
CN105045612B (en) | Peripheral upgrading recovery method and system for Android terminal | |
CN109634782B (en) | Method and device for detecting system robustness, storage medium and terminal | |
CN111355505B (en) | SIM card seat type identification method, device and computer readable medium | |
CN111078382B (en) | Command overtime processing method and device | |
CN109976790B (en) | Application updating method, device, terminal and storage medium | |
US11507384B2 (en) | Electronic device for performing booting, and operating method therefor | |
CN114637544B (en) | Intelligent terminal start control method and device and start switching device | |
CN108009039B (en) | Terminal information recording method, device, storage medium and electronic equipment | |
CN115421960A (en) | UE memory fault recovery method, device, electronic equipment and medium | |
CN115168119A (en) | PCIE (peripheral component interface express) link detection method, device and medium for server | |
CN109189562B (en) | Method and device for controlling process operation | |
CN113950044A (en) | Method and device for identifying user identification card, terminal equipment and storage medium | |
CN102236748A (en) | Computer software protection method | |
CN103049344B (en) | The method and apparatus of hardware plug fault-tolerant processing | |
CN109756620B (en) | Virtual camera identification method based on mobile phone and related equipment | |
CN112654964A (en) | Brush machine control method, brush machine control device and terminal equipment | |
CN115883822B (en) | Method and device for debugging camera of online examination system and storage medium | |
CN111475344B (en) | Program resetting system, method and device and computer readable storage medium | |
CN109301888B (en) | Charging interference-free control method, mobile terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 516006 TCL technology building, No.17, Huifeng Third Road, Zhongkai high tech Zone, Huizhou City, Guangdong Province Applicant after: TCL Technology Group Co., Ltd Address before: 516006 Guangdong province Huizhou Zhongkai hi tech Development Zone No. nineteen District Applicant before: TCL RESEARCH AMERICA Inc. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |