CN112230950A - Method for switching system signatures of Android device and reserving user data - Google Patents

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

Info

Publication number
CN112230950A
CN112230950A CN202010978241.9A CN202010978241A CN112230950A CN 112230950 A CN112230950 A CN 112230950A CN 202010978241 A CN202010978241 A CN 202010978241A CN 112230950 A CN112230950 A CN 112230950A
Authority
CN
China
Prior art keywords
signature
signature information
user
application
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.)
Granted
Application number
CN202010978241.9A
Other languages
Chinese (zh)
Other versions
CN112230950B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for switching Android equipment system signatures and reserving user data, which comprises the following steps: the method comprises the steps of upgrading an upgrade file by using an original system signature, upgrading an original Android device, deleting an original signature information file in the Android device by using an upgrade script in the upgrading process, restarting application data with the same package name before installation of a newly upgraded application, installing the application, regenerating signature information, restoring the original backup data and modifying new signature information corresponding to a user ID.

Description

Method for switching system signatures of Android device and reserving user data
Technical Field
The invention particularly relates to the technical field of Android device system signature reservation, and particularly relates to a method for switching Android device system signatures and reserving user data.
Background
In the maintenance of the Android intelligent device, the maintenance of the third-party Android device can be involved, and due to the safety of the signature information, the signature information of the third-party Android device cannot be acquired, so that troubles are brought to continuous maintenance.
The conventional upgrade replacement directly adopts an upgrade mode to replace the signature of recovery with a new signature, and the following defects are overcome: firstly, the system can not be used normally: after upgrading, signature information of the original system application cannot be updated, the signature matching is problematic, so that the application cannot normally operate, user data cannot be stored, even if the signature information is deleted, the signature data is regenerated, and when the application is reinstalled and generates the signature information, the user data cannot be matched with a new ID due to the fact that the user ID can be redistributed, and the application cannot access.
Disclosure of Invention
The invention aims to overcome the problems in the prior art and provides a method for switching system signatures of Android equipment and reserving user data.
In order to achieve the technical purpose and achieve the technical effect, the invention is realized by the following technical scheme: a method for switching system signatures of Android equipment and reserving user data comprises the following steps:
step S1: upgrading the upgrade file by using the original system signature, and upgrading the original Android equipment;
step S2: in the upgrading process, the original signature information file in the Android equipment is deleted by using the upgrading script;
step S3: restarting the application data with the same package name before installing the newly upgraded application;
step S4: installing the application and regenerating signature information;
step S5: restoring the original backup data and modifying new signature information corresponding to the user ID;
step S6: the data is recovered by modifying the user ID.
Preferably, the step S1: the signature of an upgrade package needs to be verified during the Android equipment upgrade, if the system signature switching is involved, the new upgrade package version needs to have the signature information of the original system, the upgrade installation verification can pass, and a normal upgrade system signature switching process is entered.
Preferably, the step S2: signature information of all applications of an original system is stored in a fixed file, the file indicates the signature information and authority information of the applications, if package names are matched in the application installation process, the signature information is verified, and the signature information can be guaranteed to be regenerated only by deleting the information.
Preferably, 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 installed before are detected, a user data directory under the package name is backed up.
Preferably, the step S4: and installing the application, analyzing the new signature information, and recording the new signature information in the signature information file.
Preferably, the step S5: and the application of the regenerated signature information corresponds to a new user ID, the backup data file name is modified into a new user data name with the same package name, then the attribution of the user ID is modified, and the attribution of the original backup package name user data file is modified into the user ID with the same package name in the new signature information. So that the new application can access the backup data.
Preferably, the step S6: after data backup, the data are restored by modifying the user ID, the application data with the same package name cannot be deleted, regeneration is not needed, the backup data file name is directly modified into a new user ID by the user ID, and the data can be directly restored by removing the suffix of the backup file name.
The benefit effects of the invention are:
1. upgrading the upgrade file by using the original system signature, and upgrading the original Android equipment;
2. in the upgrading process, the original signature information file in the Android equipment is deleted by using the upgrading script;
3. restarting the application data with the same package name before installing the newly upgraded application;
4. installing the application and regenerating signature information;
5. and restoring the original backup data to modify the new signature information corresponding to the user ID.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a structural block diagram of a method for switching a system signature of an Android device and retaining user data according to the present invention;
FIG. 2 is an installation flow chart of an upgrade file for switching Android device system signatures and retaining user data according to the present invention;
FIG. 3 is a flowchart illustrating a file backup and recovery process for switching Android device system signatures and retaining user data according to the present invention;
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
as shown in fig. 1 to 3, this embodiment is a method for switching a signature of an Android device system and retaining user data, and includes the following steps: upgrading an upgrade file by using an original system signature, upgrading an original Android device, deleting an original signature information file in the Android device by using an upgrade script in the upgrading process, restarting application data with the same package name before installing a new upgraded application, installing the application, regenerating signature information, restoring original backup data to modify new signature information corresponding to a user ID, and restoring the data by modifying the user ID.
One specific application of this embodiment is: the signature of an upgrade package needs to be checked when the Android equipment is upgraded, a Recovery partition of an original system of the Android equipment can read the signature information of a META-INF folder of the upgrade package, the upgrade can be carried out only if the signature information accords with the signature of the current equipment, if the system signature switching is involved, the META-INF of a new upgrade package version needs to have the signature information of the original system, the upgrade installation check can be passed, and a normal upgrade system signature switching process is entered; and if the system signatures cannot be matched and the upgrade cannot be normally carried out, 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 system signatures of Android equipment and reserving user data comprises the steps of upgrading an upgrade file by using an original system signature, upgrading the original Android equipment, deleting an original signature information file in the Android equipment by using an upgrade script in the upgrading process, restarting application data with the same package name before installing a newly upgraded application, installing the application, regenerating signature information, restoring the original backup data to modify new signature information corresponding to a user ID, and restoring the data by modifying the user ID.
The method comprises the steps that the signature of an upgrade package needs to be checked during upgrading of Android equipment, if system signature switching is involved, a new upgrade package version needs to have signature information of an original system, upgrade installation verification can pass, a normal upgrade system signature switching process is entered, 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 package names during application installation are matched, the signature information can be verified, the signature information can be guaranteed to be regenerated only by deleting the signature information, after upgrade installation is completed, the system can be restarted, all the applications can be reinstalled, and if applications with the same package name installed before installation are detected, a user data directory under the package name is backed up.
The specific application of this embodiment is: in the upgrading process, an original signature information file in the Android device is deleted by using an upgrading script, signature information of all applications of an original system is stored in fixed files of packages.list and packages.xml, the files indicate signature information and authority information of the applications, and if package names in the application installation process are matched, the signature information is verified. The application can be reused after successful verification, the information is deleted to ensure that the signature information is regenerated, a delete method is adopted to delete signatures of a signature list file package.list and a package.xml in an upgrade file script-emmc to ensure that the signature information is regenerated when the application is reinstalled, the signature information is consistent with the signature information built in the system, the application data with the same package name is backed up in advance before the newly upgraded application is installed, the system is restarted after the upgrade package is installed, all the applications are reinstalled, and whether the currently installed application is installed or not is detected before the application is installed. If the application with the same package name installed before is detected, a user data directory under the package name is backed up by a method of adding backup data in an installer module, the application data is stored in a/data/data/application package name folder, the folder is modified into a specific name by the backup data, and the specific name can be the package name plus a specific suffix, so that the application package name is matched in the data recovery process.
Example 3:
a method for switching system signatures of Android equipment and reserving user data comprises the following steps:
step S1: upgrading the upgrade file by using the original system signature, and upgrading the original Android equipment;
step S2: in the upgrading process, the original signature information file in the Android equipment is deleted by using the upgrading script;
step S3: restarting the application data with the same package name before installing the newly upgraded application;
step S4: installing the application and regenerating signature information;
step S5: restoring the original backup data and modifying new signature information corresponding to the user ID;
step S6: the data is recovered by modifying the user ID.
Wherein, the Android device upgrade needs to check the signature of the upgrade package, if the system signature switching is involved, the new upgrade package version needs to have the signature information of the original system, the upgrade installation check can pass, and the normal upgrade system signature switching process is entered, the signature information of all the applications of the original system is stored in a fixed file, the file indicates the signature information and the authority information of the applications, if the package names are matched in the application installation process, the signature information is checked, the signature information can be ensured to be regenerated only by deleting the 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, a user data directory under the package name is backed up, the applications are installed, the new signature information is analyzed and recorded in the signature information file, the signature information regenerated by the applications corresponds to a new user ID, and modifying the backup data file name into a new user data name with the same package name, then modifying the attribution of the user ID, and modifying the attribution of the original backup package name user data file into the user ID with the same package name in the new signature information.
One specific application of this embodiment is: installing an application, regenerating signature information, reinstalling the application, analyzing the signature information of the application, recording the signature information in a signature information file of a system, restoring original backup data to modify new signature information corresponding to a user ID, wherein the signature information regenerated by the application corresponds to the new user ID, the restored data cannot be used due to the fact that the ID of the same application is different from the ID of the same application before signature switching, a function of restoring data is added in an Insteller module, a name of a backup data folder with the same package name is modified to be an application package name folder name, attribute modification is carried out on the data needing to be restored, and all folders are changed to be new user ID attributes, so that the new application can access the backup data.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or the like described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. 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 to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments 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 utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (7)

1. A method for switching system signatures of Android devices and reserving user data is characterized in that: the method comprises the following steps:
step S1: upgrading the upgrade file by using the original system signature, and upgrading the original Android equipment;
step S2: in the upgrading process, the original signature information file in the Android equipment is deleted by using the upgrading script;
step S3: restarting the application data with the same package name before installing the newly upgraded application;
step S4: installing the application and regenerating signature information;
step S5: restoring the original backup data and modifying new signature information corresponding to the user ID;
step S6: the data is recovered by modifying the user ID.
2. The method for switching the system signature of the Android device and reserving the user data according to claim 1, comprising: the step S1: the signature of an upgrade package needs to be verified during the Android equipment upgrade, if the system signature switching is involved, the new upgrade package version needs to have the signature information of the original system, the upgrade installation verification can pass, and a normal upgrade system signature switching process is entered.
3. The method for switching the system signature of the Android device and reserving the user data according to claim 1, comprising: the step S2: signature information of all applications of an original system is stored in a fixed file, the file indicates the signature information and authority information of the applications, if package names are matched in the application installation process, the signature information is verified, and the signature information can be guaranteed to be regenerated only by deleting the information.
4. The method for switching the system signature of the Android device and reserving the user data according to claim 1, comprising: 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 installed before are detected, a user data directory under the package name is backed up.
5. The method for switching the system signature of the Android device and reserving the user data according to claim 1, comprising: the step S4: and installing the application, analyzing the new signature information, and recording the new signature information in the signature information file.
6. The method for switching the system signature of the Android device and reserving the user data according to claim 1, comprising: the step S5: and the application of the regenerated signature information corresponds to a new user ID, the backup data file name is modified into a new user data name with the same package name, then the attribution of the user ID is modified, and the attribution of the original backup package name user data file is modified into the user ID with the same package name in the new signature information. So that the new application can access the backup data.
7. The method for switching the system signature of the Android device and reserving the user data according to claim 1, comprising: the step S6: after data backup, the data are restored by modifying the user ID, the application data with the same package name cannot be deleted, regeneration is not needed, the backup data file name is directly modified into a new user ID by the user ID, and the data can be directly restored by removing the suffix of the backup file name.
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 true CN112230950A (en) 2021-01-15
CN112230950B 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 (8)

* 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
US20190034291A1 (en) * 2017-07-31 2019-01-31 Honeywell International Inc. Automatic firmware upgrade of an embedded node
US20200028737A1 (en) * 2017-02-23 2020-01-23 Pax Computer Technology (Shenzhen) Co., Ltd. Method and device for upgrading module firmware of pos machine
CN111338675A (en) * 2020-02-25 2020-06-26 杭州涂鸦信息技术有限公司 OTA (over the air) upgrading method, system and equipment of mobile equipment

Patent Citations (8)

* 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
US20200028737A1 (en) * 2017-02-23 2020-01-23 Pax Computer Technology (Shenzhen) Co., Ltd. Method and device for upgrading module firmware of pos machine
US20190034291A1 (en) * 2017-07-31 2019-01-31 Honeywell International Inc. Automatic firmware upgrade of an embedded node
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
CN112230950B (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN107493290B (en) OTA (over the air) upgrading method for Android smart television system software
KR20110086732A (en) Application restore points
CN107239273A (en) A kind of disk drive binding method of server
CN109634638B (en) Cluster software upgrading method, device, equipment and medium
CN104735107A (en) Recovery method and device for data copies in distributed storage system
CN111506326A (en) Method, device and equipment for upgrading terminal equipment and storage medium
US9652325B2 (en) Storage system and method to support scheduled and operational going down of a storing unit
CN112286543B (en) Application service deployment method and device
CN112230950A (en) Method for switching system signatures of Android device and reserving user data
CN113032183A (en) System management method, device, computer equipment and storage medium
CN106933604B (en) System upgrading method and device
CN101996254A (en) Software rollback method based on file system layer
CN104331311A (en) Upgrade package generating method and device
CN113448609B (en) Container upgrading method, device, equipment and storage medium
CN116257270A (en) Vehicle, upgrading method and device of vehicle
CN114546420A (en) Software remote installation protection uninstalling method
CN114546717A (en) Method and device for starting android intelligent terminal, intelligent terminal and storage medium
CN102999365B (en) A kind of fetal monitor software network security upgrading method and system
CA2299850C (en) System and method for the management of computer software maintenance
CN106547589A (en) A kind of upgrade-system and upgrade method
CN113688051A (en) Electric energy meter software upgrading test method and storage medium
CN113204359A (en) Online server upgrading method and device
CN112463208A (en) Version management method and device, electronic equipment and storage medium
CN111221556A (en) Method and system for remotely upgrading RSU mirror image
CN110795113A (en) Redis cluster service installation method, server and medium

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