CN112230950B - Method for switching Android device system signature and reserving user data - Google Patents

Method for switching Android device system signature and reserving user data Download PDF

Info

Publication number
CN112230950B
CN112230950B CN202010978241.9A CN202010978241A CN112230950B CN 112230950 B CN112230950 B CN 112230950B CN 202010978241 A CN202010978241 A CN 202010978241A CN 112230950 B CN112230950 B CN 112230950B
Authority
CN
China
Prior art keywords
signature information
application
signature
file
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010978241.9A
Other languages
Chinese (zh)
Other versions
CN112230950A (en
Inventor
代聪
陈逸骏
陈峻峰
于庆波
傅永梁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Androidmov Technology Co ltd
Original Assignee
Chengdu Androidmov Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Androidmov Technology Co ltd filed Critical Chengdu Androidmov Technology Co ltd
Priority to CN202010978241.9A priority Critical patent/CN112230950B/en
Publication of CN112230950A publication Critical patent/CN112230950A/en
Application granted granted Critical
Publication of CN112230950B publication Critical patent/CN112230950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Abstract

The invention discloses a method for switching Android equipment system signatures and reserving user data, which comprises the following implementation steps: the invention provides a method for switching old system signature of Android equipment into new signature switching, and the method is characterized in that the original system signature is used for signing an upgrade file, the original signature information file in the Android equipment is deleted by an upgrade script in the upgrade process, application data with the same package name is backed up in advance before new upgraded application is installed, the application is installed, signature information is regenerated, and the original backup data is restored and modified to correspond to the new signature information.

Description

Method for switching Android device system signature and reserving user data
Technical Field
The invention particularly relates to the technical field of Android device system signature reservation, in particular to a method for switching Android device system signatures and reserving user data.
Background
In the maintenance of the Android intelligent equipment, the maintenance of the third-party Android equipment can be involved, signature information of the third-party Android equipment cannot be obtained due to the safety of the signature information, and the trouble is brought to continuous maintenance.
The conventional upgrade replacement directly adopts an upgrade mode to replace the signature of the recovery with a new signature, and the following defects are caused: firstly, the system cannot be used normally: after upgrading, signature information of the original system application cannot be updated, signature matching is problematic, so that the application cannot normally run, and second, user data cannot be stored, even if the signature information is deleted, the signature data is regenerated, and when the application is reinstalled and signature information is generated, the user ID can be redistributed, so that the user data cannot be matched with a new ID, and the application cannot access the problem.
Disclosure of Invention
The invention aims to overcome the problems in the prior art and provides a method for switching Android equipment system signatures and reserving user data.
In order to achieve the technical purpose and the technical effect, the invention is realized by the following technical scheme: a method for switching Android device system signatures and reserving user data comprises the following steps:
step S1: signing a new version file to be upgraded to the system by using an original system signature, and then upgrading original Android equipment;
step S2: the upgrade process uses the upgrade script to delete the original signature information file in the Android device;
step S3: and restarting the Android device after the Android device is updated. In the restarting process, before the application which is just upgraded to the equipment is installed, the original data of the application with the same package name in the equipment is backed up in advance;
step S4: installing an application and regenerating signature information;
step S5: restoring the backup data of the original application, and modifying the new signature information corresponding to the user ID of the application data file;
step S6: before the new application installation decompresses to generate the new data file, the application installation module restores the data by modifying the suffix name of the backup file.
Preferably, the step S1: the Android equipment upgrade needs to check the signature of an upgrade package, if the system signature is switched, a new upgrade package version needs to have the signature information of the original system, upgrade installation check can be passed, and a normal upgrade system signature switching flow is entered.
Preferably, the step S2: signature information of all applications of the original system is stored in a fixed file, the file indicates the signature information and authority information of the applications, if the package names of the application installation process are matched, the signature information is checked, and the signature information can be regenerated only by deleting the information.
Preferably, the step S3: after the upgrade is installed, the system is restarted, all the applications are reinstalled, and if the applications with the same package name are detected to be installed before the installation, the user data directory under the package name is backed up for one time.
Preferably, the step S4: and installing an application, analyzing the new signature information, and recording the new signature information in a signature information file.
Preferably, the step S5: the newly generated signature information is applied to correspond to a new user ID, the backed-up data file name is modified to be a new user data name with the same package name, then the user ID attribution modification is carried out, and the original backed-up package name user data file attribution is modified to be the user ID with the same package name in the new signature information. Such that the new application can access the backup data.
Preferably, the step S6: after the data is backed up, the data is restored by modifying the user ID, the application data with the same package name is not deleted, and is not regenerated, the backup data file name is directly modified into a new user ID, and the suffix of the backup file name is removed, so that the data can be directly restored.
The invention has the following benefits:
1. upgrading the upgrade file by using the original system signature, and upgrading the original Android equipment;
2. the upgrade process uses the upgrade script to delete the original signature information file in the Android device;
3. before the newly upgraded application is installed, the application data with the same package name is backed up in advance;
4. installing an application and regenerating signature information;
5. and restoring and modifying the original backup data to correspond to the new signature information of the user ID.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block diagram of a method for switching Android device system signatures and preserving user data;
FIG. 2 is a flow chart of the installation of an upgrade file for switching Android device system signatures and retaining user data;
FIG. 3 is a flowchart for file backup and recovery by switching Android device system signatures and retaining user data;
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1:
as shown in fig. 1-3, the present embodiment is a method for switching Android device system signatures and preserving user data, including the following steps: and upgrading the upgrade file by using the original system signature, upgrading the original Android equipment, deleting the original signature information file in the Android equipment by using an upgrade script in the upgrade process, restarting the application data with the same package name to be backed up in advance before the newly upgraded application is installed, installing the application, regenerating signature information, recovering the original backup data, modifying the new signature information corresponding to the user ID, and recovering the data in a mode of modifying the user ID.
One specific application of this embodiment is: the method comprises the steps that signature of an upgrade package is required to be checked for Android equipment upgrade, a Recovery partition of an original system of the Android equipment can read signature information of a META-INF folder of the upgrade package, the upgrade can be performed only when the signature of the current equipment is met, if system signature switching is involved, the META-INF of a new upgrade package version needs to have the signature information of the original system, upgrade installation checking can be performed only when the system signature switching process is completed, and a normal upgrade system signature switching flow is entered; if the system signatures cannot be matched, the upgrade cannot be performed normally, the Recovery partition of the upgrade package carries new signature information, and after the upgrade, the signature tool of the Android device is replaced.
Example 2:
a method for switching Android equipment system signature and retaining user data uses original system signature to upgrade an upgrade file, upgrades original Android equipment, deletes an original signature information file in the Android equipment by using an upgrade script in the upgrade process, restarts application data with the same package name to be backed up in advance before new upgraded application is installed, installs the application, regenerates signature information, restores original backup data to modify user ID to correspond to the new signature information, and restores data in a mode of modifying user ID.
If the system signature is switched, the new upgrade package version needs to have the signature information of the original system, the upgrade installation verification can be passed, the normal upgrade system signature switching flow is entered, the signature information of all applications of the original system is stored in a fixed file, the file indicates the signature information and authority information of the applications, if the package names of the application installation processes are matched, the signature information is verified, the signature information can be deleted to ensure regeneration of the signature information, after the upgrade installation is completed, the system is restarted, all the applications are reinstalled, and if the applications with the same package name are detected before the installation, the user data directory under the package name is backed up for one time.
The specific application of this embodiment is: and deleting the original signature information file in the Android device by using an upgrade script in the upgrade process, storing signature information of all applications of the original system in fixed files packages.list and packages.xml, wherein the files indicate the signature information and authority information of the applications, and if the package names of the application installation processes are matched, checking the signature information. And checking the application to be used again, deleting the information to ensure that signature information is regenerated, deleting signature list files of packages, lists and packages, xml signatures by adopting a delete method in an upgrade file script updater-script-emmc, ensuring that the signature information is regenerated when the application is reinstalled, ensuring that the signature information is consistent with the signature information built in the system, restarting the application data with the same package name before installing the newly upgraded application, backing up the application data with the same package name in advance, restarting the system after the upgrade package is installed, reinstalling all the applications, and detecting whether the currently installed application is installed before the installation. If the application with the same package name is detected to be installed before, the user data directory under the package name is backed up by the method of adding backup data in the database module, the application data is stored under the/data/data/application package name folder, the backup data modifies the folder into a specific name, and the specific name can be the package name plus a specific suffix, so that the process of recovering the data is convenient to match the application package name.
Example 3:
a method for switching Android device system signatures and reserving user data comprises the following steps:
step S1: signing the upgrade file by using the original system signature, and upgrading the original Android equipment;
step S2: the upgrade process uses the upgrade script to delete the original signature information file in the Android device;
step S3: before the newly upgraded application is installed, the application data with the same package name is backed up in advance;
step S4: installing an application and regenerating signature information;
step S5: restoring and modifying the original backup data to the new signature information corresponding to the user ID;
step S6: the data is restored by modifying the user ID.
If the system signature is switched, the new upgrade package version needs to have the signature information of the original system, the upgrade installation verification can pass, the normal upgrade system signature switching flow is entered, the signature information of all applications of the original system is stored in a fixed file, the file indicates the signature information and authority information of the applications, if the package names of the application installation process are matched, the signature information is verified, the signature information can be deleted to ensure regeneration of the signature information, after the upgrade installation is completed, the system is restarted, all the applications are reinstalled, if the applications with the same package name are detected before the installation, the user data directory under the package name is backed up for one part, the application is installed, the new signature information is analyzed and recorded in a signature information file, the signature information regenerated by the application corresponds to the new user ID, the backed up data file name is modified to the user data name with the new same package name, then the user ID of the user data file with the original backup is modified to the user ID of the same package name in the new signature information.
One specific application of this embodiment is: installing an application, regenerating signature information
The application is reinstalled, signature information of the application is analyzed and recorded in a signature information file of the system, original backup data is restored and modified, user ID (identity) corresponds to new signature information, the newly generated signature information of the application corresponds to new user ID, the restoration data cannot be used possibly because of inconsistent ID of the same application before signature switching, the function of restoring the data is added in an Installer module, the name of the file is modified by the backup data folder with the same package name, the name of the file folder with the application package name is changed, the data needing to be restored is subjected to attribute modification, and all the file folders are changed into new user ID attributes, so that the backup data which can be accessed by the new application can be obtained.
In the description of the present specification, the descriptions of the terms "one embodiment," "example," "specific example," and the like, mean that a particular feature, structure, material, etc., described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended only to assist in the explanation of the invention. The preferred embodiments are not exhaustive or to limit the invention to the precise form disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best understand and utilize the invention. The invention is limited only by the claims and the full scope and equivalents thereof.

Claims (7)

1. A method for switching Android equipment system signature and reserving user data is characterized by comprising the following steps: the method comprises the following steps:
step S1: signing a new version file to be upgraded to the system by using an original system signature, and then upgrading original Android equipment;
step S2: the upgrade process uses the upgrade script to delete the original signature information file in the Android device;
step S3: restarting the Android equipment after the Android equipment is updated; in the restarting process, before the application which is just upgraded to the equipment is installed, the original data of the application with the same package name in the equipment is backed up in advance;
step S4: installing an application and regenerating signature information;
step S5: in order to restore the backup data of the original application, the user ID of the backup application data file needs to be modified to correspond to the new signature information;
step S6: before the new application installation decompresses to generate the new data file, the application installation module restores the data by modifying the suffix name of the backup file.
2. The method for switching Android device system signatures and retaining user data according to claim 1, wherein the method is characterized by comprising the following steps: the step S1: the Android equipment upgrade needs to check the signature of an upgrade package, if the system signature is switched, a new upgrade package version needs to have the signature information of the original system, upgrade installation check can be passed, and a normal upgrade system signature switching flow is entered.
3. The method for switching Android device system signatures and retaining user data according to claim 1, wherein the method is characterized by comprising the following steps: the step S2: signature information of all applications of the original system is stored in a fixed file, the file indicates the signature information and authority information of the applications, if the package names of the applications are matched in the installation process, the signature information is checked, and the signature information stored in the fixed file in the original system is deleted to ensure that the signature information of the applications can be regenerated.
4. The method for switching Android device system signatures and retaining user data according to claim 1, wherein the method is characterized by comprising the following steps: the step S3: after the upgrade installation is completed, the system is restarted, all the applications are reinstalled, and if the applications with the same package name are detected to be installed before the application installation, the user data catalogue in the original system and under the same package name as the current installation is backed up for one time.
5. The method for switching Android device system signatures and retaining user data according to claim 1, wherein the method is characterized by comprising the following steps: the step S4: and installing the application, analyzing the signature information of the application in the new system, and recording the signature information in a signature information file.
6. The method for switching Android device system signatures and retaining user data according to claim 1, wherein the method is characterized by comprising the following steps: the step S5: the newly generated signature information is corresponding to a new user ID, the backed-up data file name is modified to be the user data name with the same new package name, then the user ID attribution modification is carried out, and the user ID of the original backed-up package name user data file is modified to be the user ID with the same package name in the new signature information.
7. The method for switching Android device system signatures and retaining user data according to claim 1, wherein the method is characterized by comprising the following steps: the step S6: after the data is backed up, the data is restored by modifying the user ID, the application data with the same package name is not deleted, and the application data is not regenerated, and the suffix of the backup file name is removed, so that the application data can be directly restored.
CN202010978241.9A 2020-09-17 2020-09-17 Method for switching Android device system signature and reserving user data Active CN112230950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010978241.9A CN112230950B (en) 2020-09-17 2020-09-17 Method for switching Android device system signature and reserving user data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010978241.9A CN112230950B (en) 2020-09-17 2020-09-17 Method for switching Android device system signature and reserving user data

Publications (2)

Publication Number Publication Date
CN112230950A CN112230950A (en) 2021-01-15
CN112230950B true CN112230950B (en) 2023-12-12

Family

ID=74108341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010978241.9A Active CN112230950B (en) 2020-09-17 2020-09-17 Method for switching Android device system signature and reserving user data

Country Status (1)

Country Link
CN (1) CN112230950B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707977A (en) * 2012-05-17 2012-10-03 江苏中科梦兰电子科技有限公司 Increment upgrading method based on Android application software
CN104166564A (en) * 2014-08-11 2014-11-26 成都瑞博慧窗信息技术有限公司 Display terminal program updating method
CN104598281A (en) * 2015-02-05 2015-05-06 深圳市成为信息技术有限公司 Method for upgrading system of electronic device
WO2015070777A1 (en) * 2013-11-14 2015-05-21 中兴通讯股份有限公司 Software upgrade method, client, server, system and storage medium
CN105550060A (en) * 2014-10-31 2016-05-04 Tcl集团股份有限公司 Increment upgrade backup method and device
CN111338675A (en) * 2020-02-25 2020-06-26 杭州涂鸦信息技术有限公司 OTA (over the air) upgrading method, system and equipment of mobile equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106899437B (en) * 2017-02-23 2020-05-01 百富计算机技术(深圳)有限公司 Method and device for upgrading POS machine module firmware
US11301332B2 (en) * 2017-07-31 2022-04-12 Honeywell International Inc. Automatic firmware upgrade of an embedded node

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707977A (en) * 2012-05-17 2012-10-03 江苏中科梦兰电子科技有限公司 Increment upgrading method based on Android application software
WO2015070777A1 (en) * 2013-11-14 2015-05-21 中兴通讯股份有限公司 Software upgrade method, client, server, system and storage medium
CN104166564A (en) * 2014-08-11 2014-11-26 成都瑞博慧窗信息技术有限公司 Display terminal program updating method
CN105550060A (en) * 2014-10-31 2016-05-04 Tcl集团股份有限公司 Increment upgrade backup method and device
CN104598281A (en) * 2015-02-05 2015-05-06 深圳市成为信息技术有限公司 Method for upgrading system of electronic device
CN111338675A (en) * 2020-02-25 2020-06-26 杭州涂鸦信息技术有限公司 OTA (over the air) upgrading method, system and equipment of mobile equipment

Also Published As

Publication number Publication date
CN112230950A (en) 2021-01-15

Similar Documents

Publication Publication Date Title
EP2318929B1 (en) Application restore points
US10423585B2 (en) Method and device for making differential upgrade package, and method and device for system differential upgrading
CN107493290B (en) OTA (over the air) upgrading method for Android smart television system software
WO2015078166A1 (en) Load processing method and device for system application installation package, and terminal
CN111158719B (en) Application software upgrading method and device
CN107463467B (en) Method and system capable of quickly restoring virtualization platform
CN111506326A (en) Method, device and equipment for upgrading terminal equipment and storage medium
CN113722155A (en) Data backup and repair method in distributed file system and related components
CN111651304B (en) Software recovery method and device based on double-core intelligent ammeter and computer equipment
CN114741096A (en) Upgrade processing method, device and storage medium
CN112230950B (en) Method for switching Android device system signature and reserving user data
CN112230947A (en) Upgrading method and upgrading system of operating system
US8132047B2 (en) Restoring application upgrades using an application restore point
CN113032183A (en) System management method, device, computer equipment and storage medium
CN112328284A (en) Application program upgrading method, system, equipment and storage medium
CN106933604B (en) System upgrading method and device
CN112579179A (en) Partition mounting method of embedded system
CA2299850C (en) System and method for the management of computer software maintenance
CN114546717A (en) Method and device for starting android intelligent terminal, intelligent terminal and storage medium
CN110471796B (en) File directory-oriented full and incremental backup recovery method
CN112099992A (en) System backup recovery method and device for server, computer equipment and storage medium
CN111857754A (en) Universal Windows driver deployment method and device, computer equipment and storage medium
CN111427718A (en) File backup method, recovery method and device
CN114546721B (en) Backup method, system and computer readable storage medium for application program in cluster
US20080183772A1 (en) Backup relative to install media

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant