CN-119988180-B - Module migration analysis processing method and device, storage medium and electronic equipment
Abstract
The application discloses a module migration analysis processing method, a device, a storage medium and electronic equipment, and relates to the technical field of operating systems, wherein the method comprises the steps of determining candidate modules to be migrated from a system partition to a provider partition; the method comprises the steps of obtaining a candidate module, obtaining a module used by the candidate module, adopting a preset migration analysis processing tool to carry out module analysis processing on the candidate module to obtain a native module used by the candidate module, carrying out substitution analysis processing on the native module to obtain a substitution module of the native module, and outputting a partition migration analysis report of the candidate module, wherein the partition migration analysis report at least comprises module information of the candidate module, the native module and the substitution module. The application realizes efficient and reliable migration performance evaluation on the candidate modules needing to be migrated to the supplier partition.
Inventors
- GUAN YIN
Assignees
- 深圳TCL新技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20250108
Claims (8)
- 1. A module migration analysis processing method, comprising: Determining candidate modules to be migrated from the system partition to the vendor partition; Adopting a preset migration analysis processing tool to carry out module analysis processing on the candidate module to obtain a native module used by the candidate module, and Performing substitution analysis processing on the original module to obtain a substitution module of the original module, and Outputting a partition migration analysis report of the candidate module, wherein the partition migration analysis report at least comprises module information of the candidate module, the native module and the substitute module; The module analysis processing is performed on the candidate module to obtain a native module used by the candidate module, including: determining a dependency library on which the candidate module directly and indirectly depends; judging whether the dependent library depended on by the candidate module has a dependent library with a private module type or not; If yes, determining the dependency library with the category of private modules as a native module used by the candidate module; if not, scanning the guide packet class of the candidate module; Judging whether the guide packet class of the candidate module exists in guide packet classes which are not located in a preset public class packet or not; If yes, determining the guide packet class which is not located in the preset public class packet as a hidden interface, and determining the hidden interface as a native module used by the candidate module.
- 2. The method of claim 1, wherein after the outputting of the partition migration analysis report for the candidate module, the method further comprises: determining partition migration adaptation parameters corresponding to the module integrated file by adopting the preset migration analysis processing tool; And modifying the original system partition parameters in the module integrated file by adopting the partition migration adaptation parameters to obtain a modified module integrated file.
- 3. The method of claim 1, wherein performing a surrogate analysis process on the native module results in a surrogate module for the native module, comprising: Determining a native development library to which the vendor partitions match; performing similar module matching processing on the native modules in the native development library matched with the supplier partition to obtain modules matched with the native modules; And determining the module matched with the native module as a substitute module of the native module.
- 4. The method of claim 1, wherein after said determining whether there is a guided packet class in the guided packet class of the candidate module that is not in a preset common class packet, the method further comprises: generating a pile class with the same name as the guide packet class which is not positioned in the preset public class packet, wherein the pile class is used for being inserted into the source code of the candidate module; and listing the pile class with the same name as the guide packet class which is not positioned in the preset public class packet in the partition migration analysis report.
- 5. The method of claim 1, wherein the determining a dependency library on which the candidate module depends directly and indirectly comprises: The method comprises the steps that a scanning module integrates files to obtain the candidate module and a first dependency library of the candidate module, wherein the first dependency library is defined in the candidate module; Scanning and searching a dependent library which is relied by the first dependent library in the source code of the operating system to obtain a second dependent library; And determining the first dependency library set and the second dependency library set as the dependency libraries on which the candidate module directly and indirectly depends.
- 6. A module migration analysis processing apparatus, comprising: a determining unit configured to determine candidate modules to be migrated from the system partition to the provider partition; The interface comprises an analysis unit, a storage unit and a storage unit, wherein the analysis unit is used for carrying out module analysis processing on a candidate module by adopting a preset migration analysis processing tool to obtain a native module used by the candidate module, carrying out substitution analysis processing on the native module to obtain a substitution module of the native module, outputting a partition migration analysis report of the candidate module, the partition migration analysis report at least comprises module information of the candidate module, the native module and the substitution module, carrying out module analysis processing on the candidate module to obtain a native module used by the candidate module, determining a dependence library directly and indirectly depended by the candidate module, judging whether the dependence library depended by the candidate module is a dependence library of a private module or not, if so, determining the dependence library of the private module as the dependence library used by the candidate module, if not, scanning a guide package class of the candidate module, judging whether the guide package class of the candidate module is not located in a public class package exists, if so, hiding the guide package class of the candidate module in the public class is hidden as the preset one, and determining the interface as the interface.
- 7. A storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method of any of claims 1 to 5.
- 8. An electronic device comprising a memory storing a computer program, and a processor reading the computer program stored in the memory to perform the method of any one of claims 1 to 5.
Description
Module migration analysis processing method and device, storage medium and electronic equipment Technical Field The present application relates to the technical field of operating systems, and in particular, to a module migration analysis processing method, a device, a storage medium, and an electronic apparatus. Background There are many custom modules in android systems that are typically integrated in a system partition, and during pre-authoring, these custom modules may use native modules, such as hidden interfaces (HIDDEN API) and proprietary modules, that are typically provided for use only internally in the system and not disclosed to external applications and the like. When these custom modules migrate to vendor partitions, these native modules will not be available, resulting in poor portability of these custom modules, which currently do not typically have an efficient scheme for portability evaluation when migration of these custom modules is required. Disclosure of Invention The embodiment of the application provides a scheme which can realize efficient and reliable migration evaluation on the candidate modules which need to be migrated to the supplier partition. The embodiment of the application provides the following technical scheme: according to one embodiment of the application, a module migration analysis processing method comprises the steps of determining a candidate module to be migrated from a system partition to a provider partition, adopting a preset migration analysis processing tool to conduct module analysis processing on the candidate module to obtain a native module used by the candidate module, conducting substitution analysis processing on the native module to obtain a substitution module of the native module, and outputting a partition migration analysis report of the candidate module, wherein the partition migration analysis report at least comprises module information of the candidate module, the native module and the substitution module. In some embodiments of the present application, after the outputting of the partition migration analysis report of the candidate module, the method further includes determining partition migration adaptation parameters corresponding to the module integrated file by using the preset migration analysis processing tool, and modifying the original system partition parameters in the module integrated file by using the partition migration adaptation parameters to obtain a modified module integrated file. In some embodiments of the present application, the module analysis processing is performed on the candidate module to obtain a native module used by the candidate module, where the module analysis processing includes determining a dependency library on which the candidate module directly and indirectly depends, determining whether the dependency library on which the candidate module depends has a dependency library with a class of private modules, and if so, determining the dependency library with the class of private modules as the native module used by the candidate module. In some embodiments of the present application, after the determining whether the dependency library on which the candidate module depends has a dependency library with a class of private modules, the method further includes scanning a guided packet class of the candidate module if not, determining whether a guided packet class that is not located in a preset public class packet exists in the guided packet class of the candidate module, if so, determining the guided packet class that is not located in the preset public class packet as a hidden interface, and determining the hidden interface as a native module used by the candidate module. In some embodiments of the present application, the performing substitution analysis processing on the native module to obtain a substitution module of the native module includes determining a native development library matched with the vendor partition, performing similar module matching processing on the native module in the native development library matched with the vendor partition to obtain a module matched with the native module, and determining the module matched with the native module as the substitution module of the native module. In some embodiments of the present application, after the determining whether there is a guided packet class that is not located in a preset common class packet in the guided packet classes of the candidate module, the method further includes generating a stub class that is the same name as the guided packet class that is not located in the preset common class packet, where the stub class is used to insert into source codes of the candidate module, and listing the stub class that is the same name as the guided packet class that is not located in the preset common class packet in the partition migration analysis report. In some embodiments of the application, the determining the dependent libraries dir