CN113535566A - Android application verification method, device, equipment and storage medium - Google Patents

Android application verification method, device, equipment and storage medium Download PDF

Info

Publication number
CN113535566A
CN113535566A CN202110820109.XA CN202110820109A CN113535566A CN 113535566 A CN113535566 A CN 113535566A CN 202110820109 A CN202110820109 A CN 202110820109A CN 113535566 A CN113535566 A CN 113535566A
Authority
CN
China
Prior art keywords
function
file
android application
service component
searching
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
CN202110820109.XA
Other languages
Chinese (zh)
Other versions
CN113535566B (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.)
Guangzhou Huya Technology Co Ltd
Original Assignee
Guangzhou Huya 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 Guangzhou Huya Technology Co Ltd filed Critical Guangzhou Huya Technology Co Ltd
Priority to CN202110820109.XA priority Critical patent/CN113535566B/en
Priority claimed from CN202110820109.XA external-priority patent/CN113535566B/en
Publication of CN113535566A publication Critical patent/CN113535566A/en
Application granted granted Critical
Publication of CN113535566B publication Critical patent/CN113535566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

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)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an android application verification method, device, equipment and storage medium. And after the android application is packaged, obtaining a packaged file, obtaining the service components and the function functions in the packaged file, searching the function functions capable of supporting the service components from the obtained function functions, and supplementing the function functions supporting the service components when the searching result is empty. After the android application is released, the user downloads and installs the android application from the application store, and in the android application running process, each service component in the application program has a supported function, so that abnormal errors caused by the support problem of the function can be avoided, and the stability of the android application program is improved.

Description

Android application verification method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to an android application development technology, in particular to an android application verification method, device, equipment and storage medium.
Background
With the emergence of intelligent mobile terminals, a batch of mobile terminal systems are emerging, for example, an Android (Android) system is an intelligent mobile terminal system widely applied at present.
The programming language used by the software of the android system is Java, the written Java codes are finally formed into APK (android Application Package) files through a series of compiling and packaging processes, and users can download the APK files from Application stores for installation and obtain corresponding Application programs (APPs) on the intelligent terminals.
At present, an android application program often has an abnormal error caused by a function support problem in the running process, so that the whole application process is crashed.
Disclosure of Invention
The invention provides an android application verification method, an android application verification device, android application verification equipment and a storage medium, which are used for avoiding the problem of application program breakdown caused by abnormal errors in the running process of an android application program and improving the stability of the android application program.
In a first aspect, an embodiment of the present invention provides an android application verification method, including:
determining that the android application is packaged completely to obtain a packaged file;
acquiring a service component and a function in the packed file;
searching the function which can support the service component from the acquired function;
and when the search result is empty, supplementing a function supporting the service component.
In a second aspect, an embodiment of the present invention further provides an apparatus for verifying an android application, including:
the package file obtaining module is used for determining that the android application is packaged completely to obtain a package file;
the acquisition module is used for acquiring the service components and the function functions in the packed file;
the searching module is used for searching the function which can support the service component from the acquired function functions;
and the supplement module is used for supplementing the function supporting the service component when the search result is empty.
In a third aspect, an embodiment of the present invention further provides a computer device, including:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the android application verification method as provided by the first aspect of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the android application verification method provided in the first aspect of the present invention.
According to the android application verification method provided by the embodiment of the invention, after the android application is packaged, a packaged file is obtained, the service components and the function functions in the packaged file are obtained, the function functions capable of supporting the service components are searched from the obtained function functions, and the function functions supporting the service components are supplemented when the search result is empty. After the android application is released, the user downloads and installs the android application from the application store, and in the android application running process, each service component in the application program has a supported function, so that abnormal errors caused by the support problem of the function can be avoided, and the stability of the android application program is improved.
Drawings
Fig. 1 is a flowchart of an android application verification method according to an embodiment of the present invention;
fig. 2A is a flowchart of an android application verification method according to a second embodiment of the present invention;
fig. 2B is a schematic flowchart of a process for acquiring a local method of a Java layer and a C function of a C function layer in a packed file according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an android application verification apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
As described above, currently, an android application program often has an abnormal error caused by a function support problem in a running process, so that the whole application process crashes. The inventor researches and finds that the abnormal error is mainly caused by a function which is not supported by a business component used for realizing the business function in the application program. However, the Software Development Kit (SDK) of the android where the function is located is mostly a dynamic library, and the dynamic library is not connected to the function when the program is compiled, but is loaded only when the program runs. Therefore, if the business component has no corresponding function, no abnormal error occurs in the compiling process of the android application. After the android application program is released, in the running process of the android application program, when a certain service function (for example, a payment function) needs to be started and a corresponding service execution component needs to be executed, the corresponding function needs to be called, and since the service component does not have the corresponding function, the abnormal error can be thrown out during calling, so that the whole application process is crashed.
In view of the above problems, an embodiment of the present invention provides an android application verification method, which can verify a service component and a function in an application before an android application is released, and when the service component lacks a supported function, supplement the function supporting the service component in the application, so as to avoid a problem that the application crashes due to an abnormal error occurring in an operation process of the android application, and improve stability of the android application.
Fig. 1 is a flowchart of an android application verification method provided in an embodiment of the present invention, where this embodiment is applicable to verifying a service component and a function in an application before an android application is published, and an abnormal error condition caused by a lack of a supported function in the service component in an operation process of the android application is avoided, and the method may be executed by an android application verification apparatus provided in an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner and is generally configured in a computer device, as shown in fig. 1, the method specifically includes the following steps:
s101, determining that the android application is packaged completely, and obtaining a packaged file.
The Android application is usually compiled through Android Studio or Gradle, and the embodiment of the present invention is not limited herein. The code for android applications is typically written in Java, with Java source code files being compiled into class files using Java commands. The class file contains the standard Oracle JVM Java bytecode. But android devices do not use this bytecode format. In contrast, android has its own unique bytecode format, called Dalvik. Dalvik bytecode is the same machine code instruction of a theoretical processor as Oracle JVM Java bytecode. The class file and any jar libraries are converted into a single class. The dx command splices all class and jar files into one class. Dex files and resources (such as images and layouts) in Android applications are then packaged by Android Asset Packaging Tool or aapt into zip-like files, called Android Package or APK files (i.e., Package files).
In the compiling process, whether the android application is packaged and finished or not can be determined through compiling task feedback. For example, after the APK file is packaged, a feedback signal indicating that the packaging task is completed is fed back, and then it is determined that the android application is packaged, and the packaged file is obtained.
S102, acquiring the service components and the function functions in the packaged file.
For example, in the embodiment of the present invention, the package file may be decompiled, for example, the Android Apktool is used to decompile the package file, so as to obtain the service component and the function in the package file, and the files such as the picture, the XML configuration, the language resource, and the like.
In the development process of the application program, along with the increase of developers and the increase of functions, if a reasonable development framework is not used in advance, codes become bloated, and code coupling between functions becomes more serious. When the code of a certain service is changed, other services may be affected. Therefore, in the development process of the application program, the splitting is performed according to the functional modules, and each functional module is a business component, such as a live component, a payment component, and the like. The function is used for supporting the service assembly, and when the service assembly is executed, the corresponding function is called, so that the opposite function of the service assembly is realized.
S103, searching the function capable of supporting the service component from the acquired function functions.
In the embodiment of the invention, the service components and the function functions are checked one by one according to the acquired service components and function functions. Specifically, for each service component, a function that can support the service component is searched from the obtained function functions.
As described above, the reason why the android application often has abnormal errors due to the support problem of the function in the running process is as follows: therefore, in the embodiment of the present invention, by obtaining the service components and the function functions in the package file, and searching the function functions capable of supporting the service components from the obtained function functions, it is determined whether each service component has the function supporting the service component.
And S104, supplementing a function supporting the service component when the search result is empty.
Specifically, when the search result is empty, that is, when a certain service component lacks a corresponding function, the function supporting the service component is supplemented to the packed file.
After supplementing the function functions of the supporting business components, the classes. The APK file is then signed using a standard jarsinger tool and released to an application store (e.g., Google Play application store), which helps android ensure that any future updates to the APK are the original updates and come from the original author. Signing the APK file means that an additional file is stored in the APK file, which is based on a checksum of the APK content and a separately generated private key. To ensure that the compressed portions of the files are byte aligned so that the android system can easily read them without decompressing the files, it is also generally necessary to run the APK file with a tool named zipalign to ensure that the compressed portions of the files are aligned on byte boundaries.
According to the android application verification method provided by the embodiment of the invention, after the android application is packaged, a packaged file is obtained, the service components and the function functions in the packaged file are obtained, the function functions capable of supporting the service components are searched from the obtained function functions, and the function functions supporting the service components are supplemented when the search result is empty. After the android application is released, the user downloads and installs the android application from the application store, and in the android application running process, each service component in the application program has a supported function, so that abnormal errors caused by the support problem of the function can be avoided, and the stability of the android application program is improved.
Example two
Fig. 2A is a flowchart of an android application verification method according to a second embodiment of the present invention, where the present embodiment describes in detail a detailed process of each step in the foregoing embodiment on the basis of the foregoing embodiment, and as shown in fig. 2A, the method includes:
s201, during android application compiling, a packaging task completion identifier is searched.
Illustratively, compiling is performed by Gradle, firstly compiling a Java source code file into a class file using a Java command, then converting the class file and any jar libraries into a single class.
Specifically, in the android application compiling process, the Gradle feeds back task progress information to the processor, where the feedback information includes an identifier of each task when the task starts or completes, and is used to indicate that the task starts or completes. For example, after the packaging task is completed, the feedback information includes a packaging task completion identifier zipaksfurdebug or zipaksfurrelease, and when the packaging task completion identifier is found, it can be determined that the android application packaging task is completed.
S202, when the packaging task identifier is found, the android application is determined to be packaged completely, and a packaged file is obtained.
Illustratively, when a packing task identifier zipaksforderb or zipaksforrelease is found, it is determined that the android application is packed completely, and a packed file is obtained.
S203, acquiring the service components and the function functions in the packaged file.
Applications of the android system are typically developed and compiled based on Java, and business components in the applications typically appear as Native methods in the Java layer. The native method is written in other languages, compiled into machine code associated with the processor, and is an interface for Java calls to non-Java code. Java is very convenient to use, however some levels of tasks are not easy to implement in Java, for example, when Java needs to exchange information with some underlying system such as an operating system or some hardware. Because the underlying system is usually compiled by C semantics, in this case, when the local method is executed, the C function for implementing the local method in the C function layer needs to be called, so that the interaction between Java and the underlying system is more convenient.
Most of android Software Development Kits (SDKs) in which the C function layer is located are dynamic libraries, and the dynamic libraries are not connected to the C function in the C function layer when the program is compiled, but are loaded only when the program runs. Therefore, if the local method does not have a corresponding implementation function in the C function layer, no abnormal error occurs in the compiling process of the android application. After the android application program is released, in the running process of the android application program, when a local method needs to be executed, a C function corresponding to the local method in a C function layer needs to be called, and since the local method does not have the corresponding C function in the C function layer, an exception error (for example, java.
Therefore, the service components and the function functions in the packaged file are obtained, namely the local method of the Java layer and the C function of the C function layer in the packaged file are obtained.
For example, in the embodiment of the present invention, the packaged file may be decompiled, for example, the packaged file is decompiled through Android Apktool, so as to obtain a local method of a Java layer in the packaged file, a C function in a C function layer, and files such as a picture, an XML configuration, a language resource, and the like.
Fig. 2B is a schematic flowchart of a process for acquiring a local method of a Java layer and a C function of a C function layer in a packed file according to an embodiment of the present invention, and exemplarily, as shown in fig. 2B, the process for acquiring a local method of a Java layer and a C function of a C function layer in a packed file includes the following steps:
s2031, a dex file and a so file in the packaged file are obtained.
For example, the package file may be decompiled, for example, the Android Apktool is used to decompile the package file, so as to obtain a dex file and a so file in the package file, and a file such as a picture, an XML configuration, a language resource, and the like.
The dex is an executable file of a Dalvik virtual machine on an Android platform, all source codes of the app are contained in the dex, and corresponding Java source codes can be obtained through a decompilation tool. The so file is a dynamic link library, is a binary file, namely an ELF file, and has the function equivalent to a dll file under windows. The so file is a function library of C, and contains packaged C functions for local method call.
S2032, searching the local method from the dex file.
All local methods are looked up from the dex file. In particular, all methods include a descriptor for the type of method, e.g. local methods include a descriptor named Native. Therefore, in the embodiment of the present invention, a dex file can be loaded through a dexClassLoader, all method types are found, all methods are parsed, the structures of all methods are determined, and a method with a descriptor of Native is used as a local method.
S2033, searching the object C function beginning with Java from the so file.
All C-functions are looked up from the so file and the target C-function starting with Java is determined from them. Specifically, the C functions used to implement the native methods all begin with Java. Therefore, in the embodiment of the present invention, the so file may be loaded, all functions may be parsed, structures of all functions may be determined, and a C function beginning with Java may be used as the target C function. By searching the target C function beginning with Java from the so file, the C function not beginning with Java is filtered out, the workload of subsequently searching the C function corresponding to the local method from the C function layer is reduced, and the searching efficiency is improved.
For example, the default so file in the libs directory may be directly loaded by a system.
And S204, determining a file path and a function name of a function supporting the business component according to the business component.
Illustratively, the business component and the corresponding function have a specific naming rule, and the file path and the function name of the function supporting the business component can be determined by the name of the business component.
In the embodiment of the present invention, as described above, the service component is represented as a local method in the Java layer, and the function is represented as a C function in the C function layer. Therefore, the file path and the function name of the function supporting the service component are determined according to the service component, that is, the file path and the function name of the C function implementing the local method are determined according to the local method.
Illustratively, the local method and the corresponding C function have a specific naming rule, and the file path and the function name of the C function implementing the local method can be determined by the name of the local method. Illustratively, taking the Native method getSymsBySoName with Native descriptors as an example, the implementation function of getSymsBySoName in the so file is Java _ com _ huya _ mtp _ symbolkit _ symbol _ jni _ ELFJni _ getSymsBySoName. Wherein com _ huya _ mtp _ symbolkit _ symbol _ jni is a file path, ELFJni is a class name, and getSymsBySoName is a function name.
S205, searching for a function simultaneously containing a file path and a function name in the obtained function functions.
As described above, the service component and the corresponding function have a specific naming rule, the file path and the function name of the function supporting the service component can be determined by the name of the service component, and then the function containing both the file path and the function name is searched for in the obtained function. In the embodiment of the present invention, as described above, the service component is represented as a local method in the Java layer, and the function is represented as a C function in the C function layer. Therefore, the function which simultaneously contains the file path and the function name is searched in the obtained function functions, namely, the C function which simultaneously contains the file path and the function name is searched from the C function.
Illustratively, all native methods and object C functions beginning with Java are obtained in the above steps. In some embodiments of the invention, to facilitate the lookup, a local method table and a C-function table may be established, with all local methods stored in the local method table and all target C-functions stored in the C-function table.
As described above, if the local method has an implementable C-function in the so file, the C-function has a specific naming rule as described above, and the file path and the function name of the C-function implementing the local method can be determined by the name of the local method. Therefore, the C-function containing both the file path and the function name can be searched from the C-function table based on the name of the local method.
And S206, when the search result is empty, determining a functional function supporting the service component and a file path of the functional function according to the service component.
Specifically, when the search result is empty, that is, when a certain service component lacks a corresponding function, the function supporting the service component and the file path of the function are determined according to the service component. In the specific embodiment of the present invention, that is, when the C function table cannot find the C function that simultaneously contains the file path and the function name corresponding to the local method, the file path and the function name of the C function that implements the local method are determined according to the local method.
In some embodiments of the present invention, when the search result is empty, an error prompt is issued. Illustratively, the error prompt may be fed back in the form of text plus a prompt tone, the text portion including a local method without an realizable C-function. And after receiving the error prompt, determining a file path and a function name of the C function for realizing the local method according to the local method in the error prompt.
The file path and the function name of the C function may be determined by a local method, and the specific determination process is described in detail in the foregoing embodiments, which are not described herein again in the embodiments of the present invention.
And S207, adding the function to the file path.
And supplementing the service components lacking the function, and adding the function to the corresponding file path. In the specific embodiment of the present invention, the C function that implements the local method is added to the corresponding file path. In the process of running the android application, the local method defined by the Java layer in the application program has the realized C function at the C function layer, so that abnormal errors caused by the problem of function support can be avoided, and the stability of the android application program is improved.
After the C function for implementing the local method is supplemented in the C function layer according to the error prompt, resources (such as images and layouts) in class. The APK file is then signed using a standard jarsinger tool and released to an application store (e.g., Google Play application store), which helps android ensure that any future updates to the APK are the original updates and come from the original author. Signing the APK file means that an additional file is stored in the APK file, which is based on a checksum of the APK content and a separately generated private key. To ensure that the compressed portions of the files are byte aligned so that the android system can easily read them without decompressing the files, it is also generally necessary to run the APK file with a tool named zipalign to ensure that the compressed portions of the files are aligned on byte boundaries.
According to the android application verification method provided by the embodiment of the invention, the dex file and the so file in the packed file are obtained and analyzed, the local method is searched from the dex file, the target C function starting with Java is searched from the so file, the target C function for realizing the local method is searched, when the C function for realizing the local method does not exist, an error prompt is sent, and the C function for realizing the local method is supplemented in the C function layer according to the error prompt. After the android application is released, a user downloads and installs the android application from an application store, and in the android application running process, due to the fact that the local methods defined by the Java layer in the application program have the C functions realized on the C function layer, abnormal errors caused by the problem of function support can be avoided, and the stability of the android application program is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an android application verification apparatus provided in the third embodiment of the present invention, and as shown in fig. 3, the apparatus includes:
a packaged file obtaining module 301, configured to determine that the android application is packaged completely, so as to obtain a packaged file;
an obtaining module 302, configured to obtain a service component and a function in the package file;
a searching module 303, configured to search, from the obtained function functions, a function that can support the service component;
a supplement module 304, configured to supplement the function supporting the service component when the search result is empty.
In some embodiments of the present invention, the package file acquiring module 301 includes:
the identifier searching submodule is used for searching a packaging task completion identifier during android application compiling;
and the packaging file acquisition submodule is used for determining that the android application is packaged completely when the packaging task identifier is found, so that a packaging file is obtained.
In some embodiments of the present invention, the service component includes a local method of a Java layer, the function includes a C function of a C function layer, and the obtaining module 302 includes:
and the obtaining submodule is used for obtaining a local method of a Java layer and a C function of a C function layer in the packed file.
In some embodiments of the invention, the acquisition submodule comprises:
the acquisition unit is used for acquiring a dex file and a so file in the packed files;
the local method searching unit is used for searching a local method from the dex file;
and the target C function searching unit is used for searching a target C function starting from Java from the so file.
In some embodiments of the invention, the local method lookup unit comprises:
the first analysis subunit is used for analyzing all the method types from the dex file;
and the first searching subunit is used for searching the method with the descriptor Native from all the method types as the local method.
In some embodiments of the invention, the target C function lookup unit comprises:
the second analysis subunit is used for analyzing all the function types from the so file;
and the second searching subunit is used for searching the C function of the function symbol starting from Java from all the function types as the target C function.
In some embodiments of the present invention, the lookup module 303 comprises:
the first determining submodule is used for determining a file path and a function name of a C function for realizing the local method according to the local method;
and the searching submodule is used for searching the function which simultaneously contains the file path and the function name in the obtained function functions.
In some embodiments of the invention, the supplemental module 305 comprises:
the second determining submodule is used for determining a functional function supporting the business assembly and a file path of the functional function according to the business assembly;
and the adding submodule is used for adding the functional function to the file path.
The android application verification device can execute the android application verification method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
A fourth embodiment of the present invention provides a computer device, and fig. 4 is a schematic structural diagram of the computer device provided in the fourth embodiment of the present invention, as shown in fig. 4, the computer device includes:
a processor 401, a memory 402, a communication module 403, an input device 404, and an output device 405; the number of the processors 401 in the mobile terminal may be one or more, and one processor 401 is taken as an example in fig. 4; the processor 401, the memory 402, the communication module 403, the input device 404 and the output device 405 in the mobile terminal may be connected by a bus or other means, and fig. 4 illustrates an example of a connection by a bus. The processor 401, memory 402, communication module 403, input device 404, and output device 405 described above may be integrated on a computer device.
The memory 402 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as the modules corresponding to the android application verification method in the above embodiments. The processor 401 executes various functional applications and data processing of the computer device by running software programs, instructions and modules stored in the memory 402, that is, the above-mentioned android application verification method is implemented.
The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the microcomputer, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 402 may further include memory located remotely from the processor 401, which may be connected to an electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
And a communication module 403, configured to establish a connection with an external device (e.g., an intelligent terminal), and implement data interaction with the external device. The input device 404 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the computer apparatus.
The computer device provided by the embodiment of the invention can execute the android application verification method provided by any embodiment of the invention, and has corresponding functions and beneficial effects.
EXAMPLE five
An embodiment of the present invention provides a storage medium containing computer-executable instructions, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method for verifying an android application provided in any of the above embodiments of the present invention is implemented, where the method includes:
determining that the android application is packaged completely to obtain a packaged file;
acquiring a service component and a function in the packed file;
searching the function which can support the service component from the acquired function;
and when the search result is empty, supplementing a function supporting the service component.
It should be noted that, as for the apparatus, the device and the storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and in relevant places, reference may be made to the partial description of the method embodiments.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, and the computer software product may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the android application verification method according to any embodiment of the present invention.
It should be noted that, in the above apparatus, each of the modules, sub-modules, units, and sub-units included in the apparatus is merely divided according to functional logic, but is not limited to the above division as long as the corresponding function can be implemented; in addition, the specific names of the functional modules are only for convenience of distinguishing from each other and are not used for limiting the protection scope of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by suitable instruction execution devices. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic 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.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (11)

1. An android application verification method is characterized by comprising the following steps:
determining that the android application is packaged completely to obtain a packaged file;
acquiring a service component and a function in the packed file;
searching the function which can support the service component from the acquired function;
and when the search result is empty, supplementing a function supporting the service component.
2. The android application verification method of claim 1, wherein determining that packaging of the android application is complete to obtain a packaged file comprises:
during android application compiling, searching a packaging task completion identifier;
and when the packaging task identifier is found, determining that the android application is packaged completely to obtain a packaged file.
3. The android application verification method of claim 1, wherein the service component comprises a native method of a Java layer, the function comprises a C function of a C function layer, and acquiring the service component and the function in the package file comprises:
and acquiring a local method of a Java layer and a C function of a C function layer in the packed file.
4. The android application verification method of claim 3, wherein obtaining a native method of a Java layer and a C function of a C function layer in the packed file comprises:
acquiring a dex file and a so file in the packed files;
searching a local method from the dex file;
and searching the object C function beginning with Java from the so file.
5. The android application verification method of claim 4, wherein finding a local method from the dex file comprises:
analyzing all method types from the dex file;
and searching a method with a descriptor Native from all method types as a local method.
6. The android application verification method of claim 4, wherein finding an object C function starting in Java from the so file comprises:
analyzing all function types from the so file;
and searching a C function of a function symbol starting from Java from all function types as a target C function.
7. The android application verification method of any of claims 1-6, wherein finding the function that can support the business component from the obtained function functions comprises:
determining a file path and a function name of a function supporting the service component according to the service component;
and searching the function which simultaneously comprises the file path and the function name in the acquired function functions.
8. The android application verification method of any of claims 1-6, wherein supplementing a function supporting the service component when the search result is null comprises:
determining a function supporting the service component and a file path of the function according to the service component;
adding the function to the file path.
9. An android application verification device, comprising:
the package file obtaining module is used for determining that the android application is packaged completely to obtain a package file;
the acquisition module is used for acquiring the service components and the function functions in the packed file;
the searching module is used for searching the function which can support the service component from the acquired function functions;
and the supplement module is used for supplementing the function supporting the service component when the search result is empty.
10. A computer device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the android application verification method of any of claims 1-8.
11. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the android application verification method of any of claims 1-8.
CN202110820109.XA 2021-07-20 Android application verification method, device, equipment and storage medium Active CN113535566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110820109.XA CN113535566B (en) 2021-07-20 Android application verification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110820109.XA CN113535566B (en) 2021-07-20 Android application verification method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113535566A true CN113535566A (en) 2021-10-22
CN113535566B CN113535566B (en) 2024-06-21

Family

ID=

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383785A (en) * 2016-09-21 2017-02-08 网易(杭州)网络有限公司 Mobile application debugging method and apparatus
US20170046438A1 (en) * 2015-08-13 2017-02-16 Quixey, Inc. Cloud-Enabled Caching Architecture for On-Demand Native Application Crawling
CN106650341A (en) * 2016-11-18 2017-05-10 湖南鼎源蓝剑信息科技有限公司 Android application reinforcement method based on the process confusion technology
CN108491327A (en) * 2018-03-26 2018-09-04 中南大学 A kind of Android application dynamic Receiver components local refusal service leak detection method
CN108920220A (en) * 2018-06-06 2018-11-30 北京奇虎科技有限公司 A kind of method, apparatus and terminal of function call
CN109948338A (en) * 2019-03-19 2019-06-28 中南大学 Android application Path-sensitive triggering method based on static analysis
CN111143869A (en) * 2019-12-30 2020-05-12 Oppo广东移动通信有限公司 Application package processing method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170046438A1 (en) * 2015-08-13 2017-02-16 Quixey, Inc. Cloud-Enabled Caching Architecture for On-Demand Native Application Crawling
CN106383785A (en) * 2016-09-21 2017-02-08 网易(杭州)网络有限公司 Mobile application debugging method and apparatus
CN106650341A (en) * 2016-11-18 2017-05-10 湖南鼎源蓝剑信息科技有限公司 Android application reinforcement method based on the process confusion technology
CN108491327A (en) * 2018-03-26 2018-09-04 中南大学 A kind of Android application dynamic Receiver components local refusal service leak detection method
CN108920220A (en) * 2018-06-06 2018-11-30 北京奇虎科技有限公司 A kind of method, apparatus and terminal of function call
CN109948338A (en) * 2019-03-19 2019-06-28 中南大学 Android application Path-sensitive triggering method based on static analysis
CN111143869A (en) * 2019-12-30 2020-05-12 Oppo广东移动通信有限公司 Application package processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US9811360B2 (en) Dynamic determination of application server runtime classloading
CN109491695B (en) Incremental updating method for integrated android application
CN105657191B (en) Application increment upgrading method and system based on Android system
CN111930382B (en) Application page access method, device and equipment
CN111399840B (en) Module development method and device
CN110308999B (en) Method for dynamically sharing dependency package between applications, storage medium and mobile terminal
CN108279940B (en) Module loading method and device in web container
CN104750528A (en) Management method and device for components in Android program
CN112769706B (en) Componentized routing method and system
CN113407362A (en) SOMEIP communication intermediate layer implementation method and system based on SOA architecture of vehicle-mounted Android system
CN110333872B (en) Application processing method, device, equipment and medium
KR101117165B1 (en) Web platform unit for mobile terminal connectioned web-application program in heterogeneous operating system
CN112416612B (en) Service calling method and device, computer equipment and readable storage medium
CN106775916B (en) Method and device for reducing application installation packages and electronic equipment
CN110941443B (en) Method and device for modifying file name in SDK (software development kit) and electronic equipment
CN112416418A (en) Application component generation method and device, computer equipment and readable storage medium
CN113535566B (en) Android application verification method, device, equipment and storage medium
CN106778270B (en) Malicious application detection method and system
CN113535566A (en) Android application verification method, device, equipment and storage medium
CN110502251B (en) Application installation method and device
CN114860204A (en) Program processing method, program operating device, terminal, smart card and storage medium
CN114840195A (en) Privatization method for iOS SDK static library
CN111338633B (en) Method and device for generating installation-free file and electronic equipment
CN111273940B (en) Method and device for uploading program file to code warehouse
CN113641389A (en) Software upgrading method, device and equipment based on OpenCPU

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