WO2016058291A1 - 移动应用打包的方法及系统 - Google Patents

移动应用打包的方法及系统 Download PDF

Info

Publication number
WO2016058291A1
WO2016058291A1 PCT/CN2015/071412 CN2015071412W WO2016058291A1 WO 2016058291 A1 WO2016058291 A1 WO 2016058291A1 CN 2015071412 W CN2015071412 W CN 2015071412W WO 2016058291 A1 WO2016058291 A1 WO 2016058291A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
apk
user
initial
apk file
Prior art date
Application number
PCT/CN2015/071412
Other languages
English (en)
French (fr)
Inventor
张金昕
范韬
付光
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016058291A1 publication Critical patent/WO2016058291A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention relates to the technical field of mobile application packaging, and in particular to a mobile application packaging method and system.
  • the main object of the present invention is to solve the technical problem of ensuring the security of mobile office.
  • a mobile application packaging system including a user management module, a mobile application management module, A package building module, a log management module, and a storage module, wherein:
  • the user management module is configured to: set a user permission to access a target APK file;
  • the mobile application management module is configured to: upload and download an initial APK file, a shell file corresponding to the initial APK file, and the target APK file;
  • the package building module is configured to: package the initial APK file and the shell file into the target APK file;
  • the log management module is configured to: record operation information of the user, and generate an operation log;
  • the storage module is configured to: receive and store the shell file, the initial APK file, and the target APK file.
  • the user management module includes a grading unit and a setting unit, where:
  • the grading unit is configured to: classify users of the login system according to preset instructions;
  • the setting unit is configured to: set a category of a target APK file that the user can access according to a level of the user.
  • the log management module includes a recording unit and a generating unit, where:
  • the recording unit is configured to record an operation of the user in the system according to the user name
  • the generating unit is configured to generate an operation log corresponding to the user name according to the operation of the recording.
  • the package building module includes an acquiring unit, a decompiling unit, an extracting unit, a merging unit, and a packaging building unit, where:
  • the obtaining unit is configured to: acquire the initial APK file and a shell file;
  • the decompiling unit is configured to: perform decompilation processing on the initial APK file;
  • the extracting unit is configured to: extract, from the decompiled processed file, an object file of the same file type as the shell file;
  • the merging unit is configured to: combine the target file and the shell file to obtain a merged file
  • the packaging construction unit is configured to: store the merged processed file and the initial APK file into a preset folder, and package the preset folder into the target APK file.
  • the package building module further includes a first determining unit and a second determining unit, where:
  • the first determining unit is configured to: obtain a file type of the initial APK file, and determine whether the type of the initial APK file is an APK type;
  • the second determining unit is configured to: if the type of the initial APK file is an APK type, obtain an xml file of the initial APK file, and determine whether there is preset marking information in the xml file;
  • the extracting unit is configured to extract, from the decompiled file, an object file having the same file type as the shell file in the following manner: when there is no preset tag information in the xml file, the decompilation is performed.
  • the processed file is extracted from the processed file with the same file type as the shell file.
  • a method for packaging a mobile application comprising the following steps:
  • the initial APK file and the shell file are packaged into a target APK file and stored in a target folder;
  • the operation information of the user is recorded, and an operation log is generated.
  • the step of setting a user permission to access the target APK file includes:
  • the step of recording user operation information and generating an operation log includes:
  • An operation log corresponding to the user name is generated according to the operation of the recording.
  • the step of packaging the initial APK file and the shell file into a target APK file and storing the file into a target folder includes:
  • the merged processed file and the initial APK file are stored into a preset folder, and the preset folder is packaged and built into the target APK file.
  • the method further includes:
  • the type of the initial APK file is an APK type
  • the step of extracting the object file of the same file type as the shell file from the decompiled file is executed.
  • a computer program comprising program instructions that, when executed by a computer, cause the computer to perform any of the above methods of packaging mobile applications.
  • the security of the file effectively improves the security of the mobile office.
  • the initial APK file is classified, and then one or more function shells are obtained according to the category of the initial APK file, and the obtained function shells are packaged one by one with the initial APK file.
  • the target APK file is packaged and built by the function shell and the initial APK file provided by the system, ensuring that the target APK file can be stably and reliably run on the system according to the requirements of the system, so that the security of the system is not threatened; Build, so that the target APK file itself has the function of restricting user access and use, thereby reducing non-essential user access to the target APK file, thereby ensuring the security of the mobile office; in addition, increasing the movement by packaging the target APK file Office security, easy to deploy, easy to maintain, flexible and scalable, and it does not require modification of the original IT system, nor mobile application transformation, thus effectively controlling the cost of mobile application packaging.
  • FIG. 1 is a schematic diagram of functional modules of a first embodiment of a mobile application package system according to the present invention
  • FIG. 2 is a schematic diagram of a refinement function module of a system user management module packaged by a mobile application according to the present invention
  • FIG. 3 is a schematic diagram of a refinement function module of an embodiment of a system package building module for a mobile application package according to the present invention
  • FIG. 4 is a schematic diagram of a refinement function module of another embodiment of a system package building module of a mobile application package according to the present invention.
  • FIG. 5 is a schematic diagram of a refinement function module of a system log management module packaged by a mobile application according to the present invention
  • FIG. 6 is a schematic flowchart of a method for packaging a mobile application according to the present invention.
  • FIG. 7 is a schematic flowchart showing the steps of the second step of the method for packaging a mobile application according to the present invention.
  • FIG. 8 is a schematic flowchart of step-by-step refinement of another embodiment of the second step of the method for packaging a mobile application according to the present invention.
  • FIG. 9 is a schematic flowchart showing the steps of the third step of the method for packaging a mobile application according to the present invention.
  • FIG. 10 is a schematic flowchart showing the steps of the fourth step of the method for packaging a mobile application according to the present invention.
  • the mobile application package system includes:
  • the user management module 10 is configured to: set a user permission to access the target APK file, and the user management module 10 specifically includes:
  • the grading unit 11 is configured to: classify users of the login system according to preset instructions;
  • the setting unit 12 is configured to set a category of the target APK file that the user can access according to the level of the user.
  • the administrator enters the system through the default account, and then sends an instruction to establish a user to the system, the system creates a user according to the instruction, and then sets the authority on the created user.
  • the system creates an advanced user and a normal user according to an administrator command, and sets an access permission of the ordinary user to only download part of the target APK file in the system and upload the target APK file to the system; and set the authority of the advanced user to In addition to uploading and downloading all target APK files, you can also upload the initial APK file and function shell, and package the initial APK file and function shell into the target APK file in the system.
  • the target APK file with the VPN function shell can be downloaded simultaneously for ordinary users and advanced users, and the target APK file with the valid function shell can only be downloaded by advanced users, and ordinary users cannot download.
  • the uploaded target APK file can be downloaded through the web, but if you want to run in the system, you must go through the system to check whether it meets the rules of the system.
  • the user's level can be divided into finer levels, and the user access rights of each level are also different.
  • the access of the partial target APK file is restricted by the account, thereby preventing the user with insufficient permission from accessing the confidential target APK file, thereby effectively increasing the confidential APK file.
  • Safety performance effectively improved Mobile office security.
  • the mobile application management module 20 is configured to: upload and download a shell file, an initial APK file, and a target APK file;
  • the mobile application management module 20 includes an uploading unit 21 and a downloading unit 22.
  • the uploading unit 21 is configured to allow the user to upload the initial APK file, the shell file, and the packaged target APK file
  • the download unit 22 is configured to download the packaged target APK file.
  • the mobile application management module 20 corresponds to the user management module 10.
  • the extents of the APK file types that can be downloaded and uploaded by users of different levels are different. For example, the advanced user can upload the initial APK file of the management class through the uploading unit 21, and the ordinary user can No.
  • the target APK file after uploading and packaging is mainly used for when the user uses the target APK file after the first package, and finds that the target APK file after the first package cannot meet the user's needs, and needs to be performed. Packed twice.
  • the target APK file is packaged for the first time in the system, the user needs to upload the first packaged target APK file as the initial packaged APK file.
  • the log management module 30 is configured to: record operation information of the user, and generate an operation log, and the log management module 30 specifically includes
  • the recording unit 31 is configured to record an operation of the user in the system according to the user name;
  • the generating unit 32 is configured to generate an operation log corresponding to the user name according to the recorded operation.
  • the user created according to the administrator's instruction whether it is an advanced user or an ordinary user, all of the operations are recorded in the operation log by the system to achieve an operation management of the system for all users.
  • the system establishes an operation log for each user who logs in to the system, and the operation log records all operations of the user, including the time of uploading or downloading the target APK file, the name of the target APK file, or the like, or running on the system.
  • the time of a target APK file, even the password set by the user when packaging the build target APK will be recorded. Take the function shell of the initial APK file plus VPN for the advanced user as an example.
  • the file name and time of the initial APK file uploaded by the advanced user are recorded in the log; the file name and time of the shell file of the upload function; and the VPN set during the package construction.
  • the system queries the user's operation log according to the permissions preset by each user. When it is found that the content in the operation log exceeds the preset permission of the user, the account is frozen and an alarm message is sent to the administrator.
  • By generating the user's operation log it is beneficial to the system to control the user, which is beneficial to the user according to the operation log. Operating the user's management is conducive to improving the security of mobile applications.
  • the storage module 40 is configured to: receive and store the shell file, the initial APK file, and the target APK file.
  • the storage module includes an initial storage unit for storing the initial APK file and the shell file, an intermediate storage unit for the packaging process, and a target storage unit for storing the packaged target APK file.
  • the initial storage unit is configured to receive the initial APK file and the shell file uploaded by the user, and store the received file.
  • the intermediate storage unit is configured to receive and store the parsed initial APK file and shell file in the packaging process.
  • the target storage unit is used to store the target APK file uploaded by the user in addition to the target APK file packaged and built in the system.
  • the storage module 40 corresponds to the user management module 10. The content in the storage module needs to be read and written by a user of a corresponding level. For example, the initial APK file and the target APK file of the management class can be read only by advanced users, but not by ordinary users.
  • the package building module 50 is configured to: package the initial APK file and the shell file into a target APK file, and the package building module 50 specifically includes:
  • the obtaining unit 51 is configured to: obtain an initial APK file and a shell file;
  • Receiving the initial APK file that the user is ready to pack receiving an instruction for the user to select the shell file, and extracting the required shell file from the shell file library according to the user's selection instruction.
  • the decompilation unit 52 is configured to: perform decompilation processing on the initial APK file;
  • the extracting unit 53 is configured to: extract, from the decompiled processed file, an object file of the same file type as in the shell file;
  • Decompilation also known as computer software restoration engineering, refers to the "reverse analysis and research" work of the target program (executable program) of other people's software.
  • the initial APK file is decompiled, only the first AndroidManifest.xml file and the first resource file are obtained, and the java code is not decompiled, and the dex file in the initial APK file is not decompiled, in the subsequent In the step, you can know that you can add the function to the initial APK file without compiling the code of the initial APK file.
  • the first AndroidManifest.xml file corresponds to the second AndroidManifest.xml file and the second resource file in the first resource file and the shell file.
  • APITool is an APK compilation tool provided by GOOGLE, which can be reversed.
  • Translate and compile apk files provided. Decompose the initial APK file to provide the necessary basic files for packaging and building new APK files.
  • the SSL file is taken as an example.
  • the SSL VPN is the simplest and most secure solution for remote users to access sensitive company data.
  • the SSL (Secure Sockets Layer) protocol is a general-purpose protocol for ensuring the security of sending information on the Internet. It adopts the B/S structure (Browser/Server, browser/server mode); the full name of VPN in English is “Virtual Private Network”. Is the "virtual private network.” Parse the known SSL VPN shell and get the second AndroidManifest.xml file and the second resource file of the shell.
  • the shell file is not limited to SSL VPN. Provides the necessary basic files for packaging and building new initial APK files by parsing the SSL VPN shell.
  • the merging unit 54 is configured to: combine the target file and the shell file;
  • the target file includes a first xml file and a first resource file of the initial APK file, and the shell file includes a second xml file and a second resource file;
  • the combination of the target file and the shell file includes:
  • the first xml file is the first AndroidManifest.xml file
  • the second xml file is the second AndroidManifest.xml file
  • the first MainActivity information of the initial APK file may be obtained, and the first Application information, and other information of the first AndroidManifest.xml file, which also includes the package name of the initial APK file
  • the second MainActivity information and the second Application information of the SSL VPN shell can be obtained, and Additional information for the second AndroidManifest.xml file.
  • the second MainActivity is arranged in front of the first MainActivity, and it will be set to start the activity, that is, set "android.intent.action.MAIN" and "android.intent.category.LAUNCHER",
  • the SSL VPN is executed before the initial APK file is executed; the first Application information of the initial APK file is merged with other activity nodes in the second Application information of the SSL VPN shell, and in the process of merging, the android:name is specified. Inherit the full class name of android.app.Application for the shell project.
  • the first resource file includes a first strings.xml file
  • the second resource file includes a second strings.xml file
  • the first strings.xml file and the second strings.xml file are merged, and the merged
  • the files are stored in a preset folder.
  • the merged file not only contains the entire contents of the first strings.xml file and the second strings.xml file, but also records the package name of the original apk file, and the information such as the startup activity.
  • the package building unit 55 is configured to: store the merged file and the initial APK file into a preset folder, and package and construct the preset folder as a target APK file.
  • Saving the merged file to the preset folder includes:
  • the file obtained by combining the contents of the first xml file and the second xml file with the same node type is stored in the preset folder; the file of the same file type of the sub-file in the first resource file and the second resource file is stored.
  • the files obtained by the merge processing and the files not subjected to the merge processing are stored in the preset folder.
  • the uncombined content in the first resource file is stored in the preset folder.
  • the files other than the first strings.xml file in the first resource file are copied to the corresponding directory in the second resource file, and the first resource file and the second resource file are combined. Stored in a preset folder.
  • the unmerged items in the first xml file and the second xml file are merged. Combine the other information in the first AndroidManifest.xml file obtained after parsing the first AndroidManifest.xml file with other information in the second AndroidManifest.xml file obtained after parsing the second AndroidManifest.xml file, and combine The files after the storage are stored in the preset folder.
  • Initial APK The file provides the target APK file with the functionality that the original APK file originally had. In the process of packaging the preset folder, you need to call apktool and use ant (Ant is a Java-based build tool).
  • the above is a process of adding a shell to a mobile application initial APK file.
  • the target APK file is used as the original file, and other shell files are selected, and then according to the above methods and steps. can.
  • the download will be provided to the user, and the user will be allowed to run the target APK file in the system.
  • the user can download the target APK file through the web.
  • the web server is open to the external network, the employee working outside can access the server through the Internet and download the desired target APK file.
  • the following is a process for an advanced user to use the system.
  • the user first opens the browser, enters the web address, enters the login interface, enters the correct username and password, and enters the system.
  • Select the APK file to be packaged for uploading After uploading the APK file, the user can select the function shell that needs to be packaged in the system as needed, such as VPN encryption shell, or upload the function shell by himself.
  • the first xml file and the first resource file are obtained by decompiling the initial APK file, and then the first xml file and the second xml file to be packed are combined, and the first resource file and the first resource file are processed.
  • the second resource file is merged and processed, and the processed file is stored in the preset folder.
  • the preset folder is packaged into a target APK file, so as to attach the function to be added to the initial APK file.
  • the package building module further includes:
  • the first determining unit 56 is configured to: obtain a file type of the initial APK file, and determine whether the type of the APK file is an APK type;
  • the second determining unit 57 is configured to: if the type of the initial APK file is an APK type, obtain an xml file of the initial APK file, and determine whether there is preset marking information in the xml file; the second determining unit 57 is further configured to: when xml When there is no preset tag information in the file, the extraction unit is The decompiled file extracts the same object file as the shell file.
  • the xml file is preferably an AndroidManifest.xml file.
  • the initial APK file needs to be detected to determine whether the initial APK file to be decompiled meets the requirements of decompilation. Specifically, determining whether the initial APK file meets the decompilation requirements includes the following aspects:
  • the word document becomes the initial APK file.
  • the judgment of this part is to first obtain the file type of the initial APK file, and then determine whether the type of the APK file is an APK type. If it is an APK type, continue with the following judgment. If it is not an APK type, exit the packer.
  • the APK file that determines whether the APK file is true can also be decompiled. By changing the suffix name of the APK file to .apk, the decompilation tool can give relevant prompts.
  • the determination is performed by detecting whether the initial APK file contains the identification information corresponding to the shell file. Whether an initial APK file meets the requirements of the shelling, in addition to determining that the file is a true initial APK file, it is also necessary to determine whether the initial APK file needs to increase the function of the shell file, and if it is detected that the initial APK file already has the function of the shell file, It is no longer necessary to add the same shell file to the same initial APK file. If the identification information of the shell file is not detected, the initial APK file is packed.
  • the AndroidManifest.xml file of the APK file is first obtained, and then the AndroidManifest.xml file is included to determine whether the preset identifier information corresponding to the shell file is included. If it exists, the initial APK file is no longer shelled. If not, Then extract the initial APK file.
  • the legality of the initial APK file is judged, and the non-APK type file is effectively removed, thereby avoiding unnecessary processing of the non-APK type file; adding the initial APK file
  • the necessity of the shell is judged, which effectively eliminates the operation of re-shelling the initial APK file and improves the efficiency of packing the mobile application.
  • the access of the target APK file is restricted by the account, so that the user who has insufficient permission is allowed to access the confidential target APK file, thereby effectively increasing the security performance of the confidential APK file, effectively improving the security of the mobile office;
  • the log is beneficial to the system's control over the user, which is beneficial to the user's management of the operation user according to the operation log, and is beneficial to improving the security of the mobile application; classifying the initial APK file, and then obtaining one or more corresponding data according to the category of the initial APK file.
  • the function shells are packaged and built with the initial APK file one by one; the target APK file is packaged and built by the function shell and the initial APK file provided by the system to ensure that the target APK file can be stably and reliably according to the requirements of the system.
  • the embodiment of the invention further provides a method for packaging a mobile application.
  • a method for packaging a mobile application includes:
  • Step S10 When receiving the initial APK file uploaded by the user, acquiring a shell file of the corresponding function according to the category of the initial APK file;
  • Step S20 The initial APK file and the shell file are packaged into a target APK file and stored in the target folder, including:
  • Step S21 acquiring an initial APK file and a shell file
  • Receiving the initial APK file that the user is ready to pack receiving an instruction for the user to select the shell file, and extracting the required shell file from the shell file library according to the user's selection instruction.
  • Step S22 Decompiling the initial APK file
  • Step S23 extracting, from the decompiled processed file, the same target file as the file type in the shell file;
  • Decompilation also known as computer software restoration engineering, refers to the target program through the software of others. Execution procedures) Conduct "reverse analysis, research" work.
  • the initial APK file is decompiled, only the first AndroidManifest.xml file and the first resource file are obtained, and the java code is not decompiled, and the dex file in the initial APK file is not decompiled, in the subsequent In the step, you can know that you can add the function to the initial APK file without compiling the code of the initial APK file.
  • the first AndroidManifest.xml file corresponds to the second AndroidManifest.xml file and the second resource file in the first resource file and the shell file.
  • the file provided by the initial APKtool (APKTool is the APK compilation tool provided by GOOGLE, which can decompile and compile apk) is utilized. Decompose the initial APK file to provide the necessary basic files for packaging and building new APK files.
  • the SSL file is taken as an example.
  • the SSL VPN is the simplest and most secure solution for remote users to access sensitive company data.
  • the SSL (Secure Sockets Layer) protocol is a general-purpose protocol for ensuring the security of sending information on the Internet. It adopts the B/S structure (Browser/Server, browser/server mode); the full name of VPN in English is “Virtual Private Network”. Is the "virtual private network.” Parse the known SSL VPN shell and get the second AndroidManifest.xml file and the second resource file of the shell.
  • the shell file is not limited to SSL VPN. Provides the necessary basic files for packaging and building new initial APK files by parsing the SSL VPN shell.
  • Step S24 combining the target file and the shell file
  • the target file includes a first xml file and a first resource file of the initial APK file, and the shell file includes a second xml file and a second resource file;
  • the combination of the target file and the shell file includes:
  • the first xml file is the first AndroidManifest.xml file
  • the second xml file is the second AndroidManifest.xml file
  • the first MainActivity information of the initial APK file may be obtained, and the first Application information, and other information of the first AndroidManifest.xml file, which also includes the package name of the initial APK file
  • the second MainActivity information and the second Application information of the SSL VPN shell can be obtained, and Additional information for the second AndroidManifest.xml file.
  • the second MainActivity is arranged in front of the first MainActivity, and it will be set to start the activity, that is, set "android.intent.action.MAIN" and "android.intent.category.LAUNCHER", so that the execution is performed before the initial APK file is executed.
  • SSL VPN merges the first Application information of the initial APK file with other activity nodes in the second Application information of the SSL VPN shell.
  • the android:name is specified as the shell project inheritance android.app.Application The full class name.
  • the first resource file includes a first strings.xml file
  • the second resource file includes a second strings.xml file
  • the first strings.xml file and the second strings.xml file are merged, and the merged
  • the files are stored in a preset folder.
  • the merged file not only contains the entire contents of the first strings.xml file and the second strings.xml file, but also records the package name of the original apk file, and the information such as the startup activity.
  • Step S25 storing the merged processed file and the initial APK file into a preset folder, and packaging and constructing the preset folder as a target APK file.
  • Saving the merged file to the preset folder includes:
  • the file obtained by combining the contents of the first xml file and the second xml file with the same node type is stored in the preset folder; the file of the same file type of the sub-file in the first resource file and the second resource file is stored.
  • the files obtained by the merge processing and the files not subjected to the merge processing are stored in the preset folder.
  • the uncombined content in the first resource file is stored in the preset folder.
  • the files other than the first strings.xml file in the first resource file are copied to the corresponding directory in the second resource file, and the first resource file and the second resource file are combined. Stored in a preset folder.
  • the unmerged items in the first xml file and the second xml file are merged. Will resolve first The other information in the first AndroidManifest.xml file obtained after the AndroidManifest.xml file is combined with other information in the second AndroidManifest.xml file obtained after parsing the second AndroidManifest.xml file, and the combined files are combined. Stored in a preset folder.
  • the initial APK file After the target file of the initial APK file and the SSL VPN shell file are merged and stored in the preset folder, the initial APK file needs to be copied to the preset folder.
  • the initial APK file provides the target APK file with the functionality that the original APK file originally had. In the process of packaging the preset folder, you need to call apktool and use ant (Ant is a Java-based build tool).
  • the above is a process of adding a shell to a mobile application initial APK file.
  • the target APK file is used as the original file, and other shell files are selected, and then according to the above methods and steps. can.
  • the download will be provided to the user, and the user will be allowed to run the target APK file in the system.
  • the user can download the target APK file through the web.
  • the web server is open to the external network, the employee working outside can access the server through the Internet and download the desired target APK file.
  • the following is a process for an advanced user to use the system.
  • the user first opens the browser, enters the web address, enters the login interface, enters the correct username and password, and enters the system.
  • Select the APK file to be packaged for uploading After uploading the APK file, the user can select the function shell that needs to be packaged in the system as needed, such as VPN encryption shell, or upload the function shell by himself.
  • the first xml file and the first resource file are obtained by decompiling the initial APK file, and then the first xml file and the second xml file to be packed are combined, and the first resource file and the first resource file are processed.
  • the second resource file is merged and processed, and the processed file is stored in the preset folder.
  • the preset folder is packaged into a target APK file, so as to attach the function to be added to the initial APK file.
  • step S22 the method further includes:
  • Step S26 Obtain a file type of the initial APK file, and determine whether the type of the APK file is an APK type.
  • Step S27 If the type of the initial APK file is an APK type, obtain an xml file of the initial APK file, and determine whether there is preset mark information in the xml file; the second determining unit 57 is further configured to: when there is no preset in the xml file When the information is marked, the extracting unit extracts the object file of the same file type as the shell file from the decompiled file.
  • the xml file is preferably an AndroidManifest.xml file.
  • the initial APK file needs to be detected to determine whether the initial APK file to be decompiled meets the requirements of decompilation. Specifically, determining whether the initial APK file meets the decompilation requirements includes the following aspects:
  • the word document becomes the initial APK file.
  • the judgment of this part is to first obtain the file type of the initial APK file, and then determine whether the type of the APK file is an APK type. If it is an APK type, continue with the following judgment. If it is not an APK type, exit the packer.
  • the APK file that determines whether the APK file is true can also be decompiled. By changing the suffix name of the APK file to .apk, the decompilation tool can give relevant prompts.
  • the determination is performed by detecting whether the initial APK file contains the identification information corresponding to the shell file. Whether an initial APK file meets the requirements of the shelling, in addition to determining that the file is a true initial APK file, it is also necessary to determine whether the initial APK file needs to increase the function of the shell file, and if it is detected that the initial APK file already has the function of the shell file, It is no longer necessary to add the same shell file to the same initial APK file. If the identification information of the shell file is not detected, the initial APK file is packed.
  • the AndroidManifest.xml file of the APK file is first obtained, and then the AndroidManifest.xml file is included to determine whether the preset identifier information corresponding to the shell file is included. If it exists, the initial APK file is no longer shelled. If not, Then the initial APK The pieces are extracted.
  • the legality of the initial APK file is judged, and the non-APK type file is effectively removed, thereby avoiding unnecessary processing of the non-APK type file; adding the initial APK file
  • the necessity of the shell is judged, which effectively eliminates the operation of re-shelling the initial APK file and improves the efficiency of packing the mobile application.
  • Step S30 setting the permission of the user to access the target APK file; specifically:
  • Step S31 grading users of the login system according to preset instructions
  • Step S32 Set the category of the target APK file that the user can access according to the level of the user.
  • the administrator enters the system through the default account, and then sends an instruction to establish a user to the system, the system creates a user according to the instruction, and then sets the authority on the created user.
  • the system creates an advanced user and a normal user according to an administrator command, and sets an access permission of the ordinary user to only download part of the target APK file in the system and upload the target APK file to the system; and set the authority of the advanced user to In addition to uploading and downloading all target APK files, you can also upload the initial APK file and function shell, and package the initial APK file and function shell into the target APK file in the system.
  • the target APK file with the VPN function shell can be downloaded simultaneously for ordinary users and advanced users, and the target APK file with the valid function shell can only be downloaded by advanced users, and ordinary users cannot download.
  • the uploaded target APK file can be downloaded through the web, but if you want to run in the system, you must go through the system to check whether it meets the rules of the system.
  • the user's level can be divided into finer levels, and the user access rights of each level are also different.
  • the access of the partial target APK file is restricted by the account, thereby preventing the user with insufficient permission from accessing the confidential target APK file, thereby effectively increasing the confidential APK file.
  • Security performance effectively improve the security of mobile office.
  • Step S40 Record the operation information of the user, and generate an operation log, which specifically includes:
  • Step S41 Record the operation of the user in the system according to the user name
  • Step S42 Generate an operation log corresponding to the user name according to the recorded operation.
  • the user created according to the administrator's instruction whether it is an advanced user or a general user
  • the user all its operations are recorded in the operation log by the system to achieve an operation management of the system for all users.
  • the system establishes an operation log for each user who logs in, and the operation log records all operations of the user, including the time of uploading or downloading the target APK file, the name of the target APK file, or the like, or running a certain system on the system.
  • the time of the target APK file, even the password set by the user when packaging the build target APK will be recorded. Take the function shell of the initial APK file plus VPN for the advanced user as an example.
  • the file name and time of the initial APK file uploaded by the advanced user are recorded in the log; the file name and time of the shell file of the upload function; and the VPN set during the package construction.
  • the system queries the user's operation log according to the permissions preset by each user. When it is found that the content in the operation log exceeds the preset permission of the user, the account is frozen and an alarm message is sent to the administrator.
  • the system is beneficial to the user's management and control, which is beneficial to the user's management of the operation user according to the operation log, and is beneficial to improving the security of the mobile application.
  • the mobile application management module 20 is configured to: upload and download a shell file, an initial APK file, and a target APK file;
  • the mobile application management module 20 includes an uploading unit 21 and a downloading unit 22.
  • the uploading unit 21 is configured to allow the user to upload the initial APK file, the shell file corresponding to the initial APK file, and the target APK file after the package is built.
  • the download unit 22 is configured to download the packaged target APK file.
  • the mobile application management module 20 corresponds to the user management module 10.
  • the extents of the APK file types that can be downloaded and uploaded by users of different levels are different. For example, the advanced user can upload the initial APK file of the management class through the uploading unit 21, and the ordinary user can No.
  • the storage module 40 is configured to: receive and store the shell file, the initial APK file, and the target APK file.
  • the storage module includes an initial storage unit for storing the initial APK file and the shell file, an intermediate storage unit for the packaging process, and a target storage unit for storing the packaged target APK file.
  • the initial storage unit is configured to receive a shell file of a function corresponding to the initial APK file uploaded by the user and the initial APK file, and store the received file.
  • the intermediate storage unit is configured to receive and store the parsed initial APK file and shell file in the packaging process.
  • the target storage unit is used to store the target APK file uploaded by the user in addition to the target APK file packaged and built in the system.
  • the storage module 40 corresponds to the user management module 10. The content in the storage module needs to be read and written by a user of a corresponding level. For example, the initial APK file and the target APK file of the management class can be read only by advanced users, but not by ordinary users.
  • the embodiment of the invention also discloses a computer program, comprising program instructions, which when executed by a computer, enable the computer to perform the method of packaging any of the above mobile applications.
  • the embodiment of the invention also discloses a carrier carrying the computer program.
  • the system By generating the operation log of the user, it is beneficial to the system to control the user, which is beneficial to the user's management of the operation user according to the operation log, and is beneficial to improving the security of the mobile application;
  • the initial APK file is classified, and then one or more function shells are obtained according to the category of the initial APK file, and the obtained function shells are packaged one by one with the initial APK file;
  • the target APK file is provided by the system.
  • the initial APK file is packaged and built to ensure that the target APK file can be stably and reliably run on the system according to the requirements of the system, so that the security of the system is not threatened; the packaged build of the function shell makes the target APK file itself have restrictions on the user.
  • the user accesses the target APK file, which is beneficial to the security of the mobile office; in addition, the security of the mobile office is improved by packaging the target APK file, which is easy to deploy, easy to maintain, and flexible, and it does not need to be modified.
  • the original IT system does not require mobile application transformation, which effectively controls the cost of packaging mobile applications.
  • the system By generating the operation log of the user, it is beneficial to the system to control the user, which is beneficial to the user's management of the operation user according to the operation log, and is beneficial to improving the security of the mobile application;
  • the initial APK file is classified, and then one or more function shells are obtained according to the category of the initial APK file, and the obtained function shells are packaged one by one with the initial APK file;
  • the target APK file is provided by the system.
  • the initial APK file is packaged and built to ensure that the target APK file can be stably and reliably run on the system according to the requirements of the system, so that the security of the system is not threatened; the packaged build of the function shell makes the target APK file itself have restrictions on the user.
  • the user accesses the target APK file, which is beneficial to the security of the mobile office; in addition, the security of the mobile office is improved by packaging the target APK file, which is easy to deploy, easy to maintain, and flexible, and it does not need to be modified.
  • the original IT system does not require mobile application transformation, which effectively controls the cost of packaging mobile applications. Therefore, the present invention has strong industrial applicability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种移动应用打包的系统和方法,该系统包括:用户管理模块,用于设置用户访问目标APK文件的权限;移动应用管理模块,用于上传和下载壳文件、初始APK文件以及目标APK文件;打包构建模块,用于将初始APK文件和壳文件打包构建成目标APK文件;日志管理模块,用于记录用户的操作信息,并生成操作日志;存储模块,用于接收和存储壳文件、初始APK文件以及目标APK文件。本发明技术方案通过对移动应用程序打包、建立用户操作日志和设置用户权限等方式来增加移动应用的安全。

Description

移动应用打包的方法及系统 技术领域
本发明涉及移动应用打包的技术领域,尤其涉及移动应用打包的方法及系统。
背景技术
随着社会的发展,企业移动信息化得到快速发展,使得移动应用管理越来越重要。随着移动终端的普及,使得越来越多的职能终端涌入企业,使得移动办公的安全性成为一个显著的问题,如:员工使用个人终端设备,登录企业IT,随意访问重要资源;员工使用个人终端设备,占用公司资源却做一些和公司无关的事情等等。由于企业以前主要采用PC办公,而在PC上使用的各类安全策略、准入控制、权限管理不能直接搬用到移动终端上使用,使得在PC上使用的各类安全措施不能用在移动应用的管理上。另外,目前各大解决安全问题的供应商所提供的BYOD(Bring Your Own Device指携带自己的设备办公)安全方案,都是比较庞大的一个全新系统,如需要云服务器,需要WEB服务器,需要注册终端,甚至有些需要和第三方软件合作修改。并且对于企业部署新系统改造老系统建设周期长,投资昂贵,后期维护的代价越来越高。因此,目前来说,没有一种能够简便、低成本的解决企业移动办公安全问题的方法。
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是相关技术。
发明内容
本发明的主要目的在于解决保障移动办公的安全性的技术问题。
为实现上述目的,采用如下技术方案:
一种移动应用打包的系统,包括用户管理模块、移动应用管理模块、打 包构建模块、日志管理模块和存储模块,其中:
所述用户管理模块设置成:设置用户访问目标APK文件的权限;
所述移动应用管理模块设置成:上传和下载初始APK文件、所述初始APK文件对应功能的壳文件、以及所述目标APK文件;
所述打包构建模块设置成:将所述初始APK文件和所述壳文件打包构建成所述目标APK文件;
所述日志管理模块设置成:记录用户的操作信息,并生成操作日志;
所述存储模块设置成:接收和存储所述壳文件、所述初始APK文件以及所述目标APK文件。
可选地,所述用户管理模块包括分级单元和设置单元,其中:
所述分级单元设置成:根据预置指令对登录系统的用户进行分级;
所述设置单元设置成:根据用户的级别设置用户可以访问的目标APK文件的类别。
可选地,所述日志管理模块包括记录单元和生成单元,其中:
所述记录单元设置成:根据用户名,记录用户在系统内的操作;
所述生成单元设置成:根据记录的所述操作,生成与所述用户名对应的操作日志。
可选地,所述打包构建模块包括获取单元、反编译单元、提取单元、合并单元和打包构建单元,其中:
所述获取单元设置成:获取所述初始APK文件和壳文件;
所述反编译单元设置成:对所述初始APK文件进行反编译处理;
所述提取单元设置成:从反编译处理后的文件中提取与所述壳文件中的文件类型相同的目标文件;
所述合并单元设置成:将所述目标文件和所述壳文件进行合并处理,得到合并处理后的文件;
所述打包构建单元设置成:将合并处理后的文件和所述初始APK文件存贮至预置文件夹,并将所述预置文件夹打包构建为所述目标APK文件。
可选地,所述打包构建模块还包括第一判断单元和第二判断单元,其中:
所述第一判断单元设置成:获取所述初始APK文件的文件类型,判断所述初始APK文件的类型是否为APK类型;
所述第二判断单元设置成:若所述初始APK文件的类型为APK类型,获取所述初始APK文件的xml文件,判断所述xml文件内是否存在预置的标记信息;
所述提取单元设置成按照如下方式从反编译处理后的文件中提取与所述壳文件中的文件类型相同的目标文件:当所述xml文件内不存在预置的标记信息时,从反编译处理后的文件中提取与所述壳文件的文件类型相同的所述目标文件。
一种移动应用打包的方法,包括以下步骤:
当接收到用户上传的初始APK文件时,根据所述初始APK文件的类别获取对应功能的壳文件;
将所述初始APK文件和所述壳文件打包构建成目标APK文件并存储至目标文件夹;
设置所述用户访问所述目标APK文件的权限;
记录所述用户的操作信息,并生成操作日志。
可选地,所述设置用户访问目标APK文件的权限的步骤包括:
根据预置指令对登录系统的用户进行分级;
根据用户的级别设置用户可以访问的目标APK文件的类别。
可选地,所述记录用户的操作信息,并生成操作日志的步骤包括:
根据用户名,记录所述用户在系统内的操作;
根据记录的所述操作,生成与所述用户名对应的操作日志。
可选地,所述将所述初始APK文件和所述壳文件打包构建成目标APK文件并存储至目标文件夹的步骤包括:
获取所述初始APK文件和壳文件;
对所述初始APK文件进行反编译处理,得到反编译处理后的文件;
从反编译处理后的文件中提取与所述壳文件中的文件类型相同的目标文件;
将所述目标文件和所述壳文件进行合并处理,得到合并处理后的文件;
将合并处理后的文件和所述初始APK文件存贮至预置文件夹,并将所述预置文件夹打包构建为所述目标APK文件。
可选地,所述对初始APK文件进行反编译处理的步骤之后,该方法还包括:
获取所述初始APK文件的文件类型,判断所述APK文件的类型是否为APK类型;
若所述初始APK文件的类型为APK类型,获取所述初始APK文件的xml文件,判断所述xml文件内是否存在预置的标记信息;
当所述xml文件内不存在预置的标记信息时,才执行所述从反编译处理后的文件中提取与所述壳文件的文件类型相同的目标文件的步骤。
一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行上述任意的移动应用打包的方法。
一种载有所述的计算机程序的载体。
本实施例,通过对用户分级,设置各级用户的访问权限,从而使得部分目标APK文件的访问受到账户的限制,从而达到禁止权限不够的用户访问机密目标APK文件,进而有效地增加了机密APK文件的安全性能,有效的提高了移动办公的安全性;通过生成用户的操作日志,有利于系统对用户的管控,有利于用户根据操作日志对操作用户的管理,有利于提高移动应用的安全;对初始APK文件进行分类,然后根据初始APK文件的类别获取相应的一个或者多个功能壳,并将所获取的功能壳逐一的与初始APK文件进行打包 构建;目标APK文件由系统提供的功能壳和初始APK文件打包构建生成,保证目标APK文件能稳定可靠的按照系统的要求在系统上运行,从而不会威胁到系统的安全;通过功能壳的打包构建,使得目标APK文件本身就具有限制用户访问和使用的功能,从而减少非必要的用户访问目标APK文件,从而有利于保障移动办公的安全;另外,通过打包构建目标APK文件的方式来增加移动办公的安全性,具有易部署、易维护、易弹性扩展性,并且它无需修改原有的IT系统,也无需移动应用改造,从而有效的控制了移动应用打包所耗费的成本。
附图概述
图1为本发明移动应用打包的系统第一实施例的功能模块示意图;
图2为本发明移动应用打包的系统用户管理模块的细化功能模块示意图;
图3为本发明移动应用打包的系统打包构建模块一实施例的细化功能模块示意图;
图4为本发明移动应用打包的系统打包构建模块另一实施例的细化功能模块示意图;
图5为本发明移动应用打包的系统日志管理模块的细化功能模块示意图;
图6为本发明移动应用打包的方法的流程示意图;
图7为本发明移动应用打包的方法第二步一实施例的步骤细化流程示意图;
图8为本发明移动应用打包的方法第二步另一实施例的步骤细化流程示意图;
图9为本发明移动应用打包的方法第三步的步骤细化流程示意图;
图10为本发明移动应用打包的方法第四步的步骤细化流程示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的较佳实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明实施例提供了一种移动应用打包的系统,参照图1至图5,在一实施例中,移动应用打包的系统包括:
用户管理模块10,设置成:设置用户访问目标APK文件的权限,用户管理模块10具体包括:
分级单元11,设置成:根据预置指令对登录系统的用户进行分级;
设置单元12,设置成:根据用户的级别设置用户可以访问的目标APK文件的类别。
本实施例中,管理员通过默认账号进入系统,然后对系统发送建立用户的指令,系统根据指令创建用户,然后对所创建的用户设置权限。具体地,系统根据管理员指令创建高级用户和普通用户,将普通用户的访问权限设置成仅可以下载系统内的部分目标APK文件和将目标APK文件上传至系统;而把高级用户的权限设置成,除可以上传和下载所有目标APK文件以外,还可以上传初始APK文件和功能壳,并在系统内对初始APK文件和功能壳打包构建成目标APK文件。例如,加有VPN功能壳的目标APK文件,可以供普通用户和高级用户同时下载,而加有有效期功能壳的目标APK文件就只允许高级用户下载,普通用户不能下载。不论是普通用户还是高级用户,上传的目标APK文件都可以通过web进行下载,但如果想要在系统内运行,就必须经过系统的检测,是否符合本系统运行的规则。当然,在其他实施例中,可以将用户的等级分得更细,每个等级的用户可访问权限也不相同。
本实施例中,通过对目标APK文件设置用户的访问权限,使得部分目标APK文件的访问受到账户的限制,从而达到禁止权限不够的用户访问机密目标APK文件,进而有效地增加了机密APK文件的安全性能,有效的提高了 移动办公的安全性。
移动应用管理模块20,设置成:上传和下载壳文件、初始APK文件以及目标APK文件;
本实施例中,移动应用管理模块20包括上传单元21和下载单元22。上传单元21用于供用户上传初始APK文件、壳文件以及打包构建后的目标APK文件,下载单元22用于供用户下载打包构建后的目标APK文件。当然,移动应用管理模块20与用户管理模块10对应,不同等级的用户可以下载和上传的APK文件类型的范围不同,如高级用户可以通过上传单元21上传管理类的初始APK文件,而普通用户则不能。其中,上传打包构建后的目标APK文件,主要用于,当用户在使用第一次打包后的目标APK文件时,发现第一次打包后的目标APK文件还不能满足用户的需求,需要进行第二次打包。当系统内第一次打包后的目标APK文件被清理时,用户需要上传第一次打包后的目标APK文件,作为第二次打包的初始APK文件。
日志管理模块30,设置成:记录用户的操作信息,并生成操作日志,日志管理模块30具体包括;
记录单元31,设置成:根据用户名,记录用户在系统内的操作;
生成单元32,设置成:根据记录的操作,生成与用户名对应的操作日志。
本实施例中,根据管理员指令创立的用户,不论是高级用户还是普通用户,其所有的操作都被系统记录在操作日志内,以达到系统对所有用户的一个操作管理。具体地,系统对每一位登录系统的用户都建立一个操作日志,操作日志记录该用户的所有操作,包括上传或下载目标APK文件的时间、目标APK文件的名称等,或者是在系统上运行某目标APK文件的时间,甚至用户在打包构建目标APK时设置的密码也会被记录。以高级用户给初始APK文件加VPN的功能壳为例,日志内会记录该高级用户上传初始APK文件的文件名称和时间;上传功能的壳文件的文件名称和时间;以及打包构建时设置的VPN的密码和打包构建的时间;以及目标APK存贮的目录。系统根据各用户预置的权限,来查询用户的操作日志,当发现操作日志内记录有超出该用户预置权限的内容时,冻结该账号,并给管理员发出警报信息。通过生成用户的操作日志,有利于系统对用户的管控,有利于用户根据操作日志对 操作用户的管理,有利于提高移动应用的安全。
存储模块40,设置成:接收和存储壳文件、初始APK文件以及目标APK文件。
存储模块包括用于存储初始APK文件和壳文件的初始存储单元,用于打包过程中的中间存储单元,以及用于存储打包构建后的目标APK文件的目标存储单元。初始存储单元用于接收用户上传的初始APK文件和壳文件,并将接收后的文件存储。中间存储单元用于接收和存储打包过程中解析后的初始APK文件和壳文件。目标存储单元除了存储在系统内打包构建的目标APK文件外,也用于存储用户上传的目标APK文件。存储模块40与用户管理模块10相对应,存储模块内的内容,需要相应等级的用户才能读取和写入。如管理类的初始APK文件和目标APK文件,只有高级用户可以读取,而普通用户则不能。
打包构建模块50,设置成:将初始APK文件和壳文件打包构建成目标APK文件,打包构建模块50具体包括:
获取单元51,设置成:获取初始APK文件和壳文件;
接收用户准备加壳的初始APK文件,接收用户选择壳文件的指令,根据用户的选择指令,从壳文件库中提取所需的壳文件。
反编译单元52,设置成:对初始APK文件进行反编译处理;
提取单元53,设置成:从反编译处理后的文件中提取与壳文件中的文件类型相同的目标文件;
反编译也称计算机软件还原工程,是指通过对他人软件的目标程序(可执行程序)进行“逆向分析、研究”工作。本实施例中,反编译初始APK文件,只是得到可读的第一AndroidManifest.xml文件和第一资源文件,没有反编译java代码,初始APK文件中的dex文件也不进行反编译,在后续的步骤中可以知道,不需要对初始APK文件的代码进行编译就可以实现为初始APK文件增加功能。第一AndroidManifest.xml文件和第一资源文件和壳文件中的第二AndroidManifest.xml文件和第二资源文件相对应。在反编译的过程中利用了初始APKtool(APKTool是GOOGLE提供的APK编译工具,能够反编 译及回编译apk)提供的文件。通过反编译初始APK文件,为打包构建新的APK文件提供必要的基本文件。
本实施例中,壳文件以SSL VPN为例,SSL VPN是解决远程用户访问敏感公司数据最简单最安全的解决技术。其中,SSL(安全套接层)协议是一种在internet上保证发送信息安全的通用协议,采用B/S结构(Browser/Server,浏览器/服务器模式);VPN的英文全称是“Virtual Private Network”,就是“虚拟专用网络”。对已知的SSL VPN壳进行解析,并得到壳的第二AndroidManifest.xml文件和第二资源文件。当然,在其它实施例中,壳文件不仅仅限于SSL VPN。通过解析SSL VPN壳,为打包构建新的初始APK文件提供必要的基本文件。
合并单元54,设置成:将目标文件和壳文件进行合并处理;
目标文件包括初始APK文件的第一xml文件和第一资源文件,壳文件包括第二xml文件和第二资源文件;
将目标文件和壳文件进行合并处理具体包括:
解析第一xml文件和第二xml文件;
本实施例中,第一xml文件为第一AndroidManifest.xml文件,第二xml文件为第二AndroidManifest.xml文件;解析第一AndroidManifest.xml文件后可获取初始APK文件的第一MainActivity信息、第一Application信息,以及第一AndroidManifest.xml文件的其它信息,其中还包括初始APK文件的包名;解析第二AndroidManifest.xml文件后,可获取SSL VPN壳的第二MainActivity信息、第二Application信息,以及第二AndroidManifest.xml文件的其它信息。
将第一xml文件和第二xml文件中节点类型相同的内容进行合并,并将第一资源文件和第二资源文件中子文件的文件类型相同的文件进行合并;
将初始APK文件的第一MainActivity信息和SSL VPN壳的第二MainActivity信息合并在一起,在合并的过程中,对第一MainActivity信息和第二MainActivity进行排序,为了先执行SSL VPN的壳程序,将第二MainActivity排列在第一MainActivity的前面,并其将设置为启动activity,即设置“android.intent.action.MAIN”和“android.intent.category.LAUNCHER”, 使得在执行初始APK文件前先执行SSL VPN;将初始APK文件的第一Application信息和SSL VPN壳的第二Application信息中其它的activity节点合并在一起,在合并的过程中,将android:name指定为壳工程继承android.app.Application的完整类名。
本实施例中,第一资源文件包括第一strings.xml文件,第二资源文件包括第二strings.xml文件,将第一strings.xml文件和第二strings.xml文件进行合并,并将合并后的文件存贮至预置文件夹中。合并后的文件,不仅包含了第一strings.xml文件和第二strings.xml文件全部内容,还记录了原始apk文件的包名,以及启动activity等信息。
打包构建单元55,设置成:将合并处理后的文件和初始APK文件存贮至预置文件夹,并打包构建预置文件夹为目标APK文件。
将合并处理后的文件存贮至预置文件夹包括:
将第一xml文件和第二xml文件中节点类型相同的内容进行合并处理得到的文件存贮至预置文件夹中;将第一资源文件和第二资源文件中子文件的文件类型相同的文件进行合并处理得到的文件与未进行合并处理的文件均存贮至预置文件夹中。
将第一资源文件中未合并的内容存贮至预置文件夹。本实施例中,将第一资源文件中除第一strings.xml文件以外的文件,拷贝到第二资源文件中对应的目录下保存,再将合在一起的第一资源文件和第二资源文件存贮到预置文件夹中。
合并第一xml文件和第二xml文件中未合并的项。将解析第一AndroidManifest.xml文件后获取的第一AndroidManifest.xml文件中的其它信息和解析第二AndroidManifest.xml文件后获取的第二AndroidManifest.xml文件中的其它信息合在一起,并将合在一起后的文件存贮至预置文件夹中。通过将初始APK文件的目标文件和SSL VPN壳文件合并在一起,为打包构建新的目标APK文件提供重要的组成部分,为新的目标APK启动提供驱动。
在将初始APK文件的目标文件和SSL VPN壳文件合并在一起,并存贮至预置文件夹以后,还需要将初始APK文件拷贝到预置文件夹下。初始APK 文件为目标APK文件提供初始APK文件本来拥有的功能。在打包预置文件夹的过程中,需要调用apktool和使用ant(Ant是一种基于Java的build工具)。
上述为给一个移动应用初始APK文件加一个壳的过程,当初始APK文件需要增加其它功能的壳时,将目标APK文件作为原始文件,选择其它的壳文件,然后按照上述的方法和步骤进行即可。
在系统生成目标APK文件后,才会向用户提供下载,才会允许用户在系统内运行此目标APK文件。用户可以通过web下载目标APK文件,当web服务器开放外网时,在外工作的员工就可以通过Internet访问服务器,下载需要的目标APK文件。
下面举一个高级用户使用系统的过程,用户先打开浏览器,输入网址,进入登录界面,输入正确的用户名和密码后进入系统。选择需要打包的APK文件进行上传,在将APK文件上传后,用户可根据需要在系统内选择需要打包的功能壳,如VPN加密壳,也可自行上传功能壳。选择好功能壳后就可以给系统发送打包命令,让系统对所选的初始APK文件和功能壳进行打包。
本实施例通过先对初始APK文件进行反编译获取第一xml文件和第一资源文件,然后对第一xml文件和待加壳的第二xml文件进行合并等处理、对第一资源文件和第二资源文件进行合并等处理并将处理后的文件存贮到预置文件夹,最后将预置文件夹打包构建成目标APK文件,以实现将待加壳的功能附加到初始APK文件上的目的,在此过程中不需要改变初始APK文件的源码、也不需要修改dex的文件结构,使得给相关的移动应用增加新的功能时灵活方便,简单易行,有利于企业更加简便快捷的定制和改造原有的企业移动应用。
在上述实施例的基础上,打包构建模块还包括:
第一判断单元56,设置成:获取初始APK文件的文件类型,判断APK文件的类型是否为APK类型;
第二判断单元57,设置成:若初始APK文件的类型为APK类型,获取初始APK文件的xml文件,判断xml文件内是否存在预置的标记信息;第二判断单元57还设置成:当xml文件内不存在预置的标记信息时,提取单元从 反编译处理后的文件中提取与壳文件的文件类型相同的目标文件。
本实施例中,xml文件优选为AndroidManifest.xml文件,在对初始APK文件进行反编译之前,还需要对初始APK文件进行检测,以判断欲反编译的初始APK文件是否符合反编译的要求。具体地,判断初始APK文件是否符合反编译要求包括以下几个方面:
首先,判断此文件是否为真的初始APK文件,一个文件是否为合格的初始APK文件,不能只从后缀名来判断,其它文件将后缀名改成初始APK后,此文件也将显示为初始APK文件。例如,将word文档的后缀名doc修改成初始APK后,word文档的形式上就成为了初始APK文件。这一部分的判断是先获取初始APK文件的文件类型,然后判断APK文件的类型是否为APK类型,如果是APK类型,则继续下面的判断,如果不是APK类型,则退出加壳程序。当然,判断APK文件是否为真的APK文件也可以通过反编译来进行,通过将不是APK文件的后缀名改为.apk,反编译工具可以给出相关提示。
然后,判断欲加壳的初始APK文件内是否包含壳文件的功能,本实施例中是通过检测初始APK文件内是否包含壳文件对应的标识信息来完成判断的。一个初始APK文件是否符合加壳要求,除了确定此文件为真初始APK文件外,还需判断此初始APK文件是否需要增加壳文件的功能,如果检测出初始APK文件已经具备壳文件的功能,则不再需要对同一初始APK文件增加同样的壳文件,如果没有检测到壳文件的标识信息,则对初始APK文件进行加壳处理。具体地,首先获取APK文件的AndroidManifest.xml文件,然后判断AndroidManifest.xml文件中是否包含与壳文件对应的预置标识信息,如果存在,则不再对初始APK文件进行加壳,如果不存在,则对初始APK文件进行提取。
通过在提取反编译后的初始APK文件前,对初始APK文件的合法性进行判断,有效的去除了非APK类型的文件,避免了对非APK类型的文件进行多余的处理;对初始APK文件加壳的必要性进行判断,有效的杜绝了对初始APK文件进行重加壳的操作,提高了对移动应用加壳的效率。
本实施例,通过对用户分级,设置各级用户的访问权限,从而使得部分 目标APK文件的访问受到账户的限制,从而达到禁止权限不够的用户访问机密目标APK文件,进而有效地增加了机密APK文件的安全性能,有效的提高了移动办公的安全性;通过生成用户的操作日志,有利于系统对用户的管控,有利于用户根据操作日志对操作用户的管理,有利于提高移动应用的安全;对初始APK文件进行分类,然后根据初始APK文件的类别获取相应的一个或者多个功能壳,并将所获取的功能壳逐一的与初始APK文件进行打包构建;目标APK文件由系统提供的功能壳和初始APK文件打包构建生成,保证目标APK文件能稳定可靠的按照系统的要求在系统上运行,从而不会威胁到系统的安全;通过功能壳的打包构建,使得目标APK文件本身就具有限制用户访问和使用的功能,从而减少非必要的用户访问目标APK文件,从而有利于保障移动办公的安全;另外,通过打包构建目标APK文件的方式来增加移动办公的安全性,具有易部署、易维护、易弹性扩展性,并且它无需修改原有的IT系统,也无需移动应用改造,从而有效的控制了移动应用打包所耗费的成本。
本发明实施例进一步提供一种移动应用打包的方法。
参照图6至图10,在一实施例中,移动应用打包的方法包括:
步骤S10:当接收到用户上传的初始APK文件时,根据初始APK文件的类别获取对应功能的壳文件;
步骤S20:将初始APK文件和壳文件打包构建成目标APK文件并存储至目标文件夹,具体包括:
步骤S21:获取初始APK文件和壳文件;
接收用户准备加壳的初始APK文件,接收用户选择壳文件的指令,根据用户的选择指令,从壳文件库中提取所需的壳文件。
步骤S22:对初始APK文件进行反编译处理;
步骤S23:从反编译处理后的文件中提取与壳文件中的文件类型相同的目标文件;
反编译也称计算机软件还原工程,是指通过对他人软件的目标程序(可 执行程序)进行“逆向分析、研究”工作。本实施例中,反编译初始APK文件,只是得到可读的第一AndroidManifest.xml文件和第一资源文件,没有反编译java代码,初始APK文件中的dex文件也不进行反编译,在后续的步骤中可以知道,不需要对初始APK文件的代码进行编译就可以实现为初始APK文件增加功能。第一AndroidManifest.xml文件和第一资源文件和壳文件中的第二AndroidManifest.xml文件和第二资源文件相对应。在反编译的过程中利用了初始APKtool(APKTool是GOOGLE提供的APK编译工具,能够反编译及回编译apk)提供的文件。通过反编译初始APK文件,为打包构建新的APK文件提供必要的基本文件。
本实施例中,壳文件以SSL VPN为例,SSL VPN是解决远程用户访问敏感公司数据最简单最安全的解决技术。其中,SSL(安全套接层)协议是一种在internet上保证发送信息安全的通用协议,采用B/S结构(Browser/Server,浏览器/服务器模式);VPN的英文全称是“Virtual Private Network”,就是“虚拟专用网络”。对待加已知的SSL VPN壳进行解析,并得到壳的第二AndroidManifest.xml文件和第二资源文件。当然,在其它实施例中,壳文件不仅仅限于SSL VPN。通过解析SSL VPN壳,为打包构建新的初始APK文件提供必要的基本文件。
步骤S24:将目标文件和壳文件进行合并处理;
目标文件包括初始APK文件的第一xml文件和第一资源文件,壳文件包括第二xml文件和第二资源文件;
将目标文件和壳文件进行合并处理具体包括:
解析第一xml文件和第二xml文件;
本实施例中,第一xml文件为第一AndroidManifest.xml文件,第二xml文件为第二AndroidManifest.xml文件;解析第一AndroidManifest.xml文件后可获取初始APK文件的第一MainActivity信息、第一Application信息,以及第一AndroidManifest.xml文件的其它信息,其中还包括初始APK文件的包名;解析第二AndroidManifest.xml文件后,可获取SSL VPN壳的第二MainActivity信息、第二Application信息,以及第二AndroidManifest.xml文件的其它信息。
将第一xml文件和第二xml文件中节点类型相同的内容进行合并,并将第一资源文件和第二资源文件中子文件的文件类型相同的文件进行合并;
将初始APK文件的第一MainActivity信息和SSL VPN壳的第二MainActivity信息合并在一起,在合并的过程中,对第一MainActivity信息和第二MainActivity进行排序,为了先执行SSL VPN的壳程序,将第二MainActivity排列在第一MainActivity的前面,并其将设置为启动activity,即设置“android.intent.action.MAIN”和“android.intent.category.LAUNCHER”,使得在执行初始APK文件前先执行SSL VPN;将初始APK文件的第一Application信息和SSL VPN壳的第二Application信息中其它的activity节点合并在一起,在合并的过程中,将android:name指定为壳工程继承android.app.Application的完整类名。
本实施例中,第一资源文件包括第一strings.xml文件,第二资源文件包括第二strings.xml文件,将第一strings.xml文件和第二strings.xml文件进行合并,并将合并后的文件存贮至预置文件夹中。合并后的文件,不仅包含了第一strings.xml文件和第二strings.xml文件全部内容,还记录了原始apk文件的包名,以及启动activity等信息。
步骤S25:将合并处理后的文件和初始APK文件存贮至预置文件夹,并打包构建预置文件夹为目标APK文件。
将合并处理后的文件存贮至预置文件夹包括:
将第一xml文件和第二xml文件中节点类型相同的内容进行合并处理得到的文件存贮至预置文件夹中;将第一资源文件和第二资源文件中子文件的文件类型相同的文件进行合并处理得到的文件与未进行合并处理的文件均存贮至预置文件夹中。
将第一资源文件中未合并的内容存贮至预置文件夹。本实施例中,将第一资源文件中除第一strings.xml文件以外的文件,拷贝到第二资源文件中对应的目录下保存,再将合在一起的第一资源文件和第二资源文件存贮到预置文件夹中。
合并第一xml文件和第二xml文件中未合并的项。将解析第一 AndroidManifest.xml文件后获取的第一AndroidManifest.xml文件中的其它信息和解析第二AndroidManifest.xml文件后获取的第二AndroidManifest.xml文件中的其它信息合在一起,并将合在一起后的文件存贮至预置文件夹中。通过将初始APK文件的目标文件和SSL VPN壳文件合并在一起,为打包构建新的目标APK文件提供重要的组成部分,为新的目标APK启动提供驱动。
在将初始APK文件的目标文件和SSL VPN壳文件合并在一起,并存贮至预置文件夹以后,还需要将初始APK文件拷贝到预置文件夹下。初始APK文件为目标APK文件提供初始APK文件本来拥有的功能。在打包预置文件夹的过程中,需要调用apktool和使用ant(Ant是一种基于Java的build工具)。
上述为给一个移动应用初始APK文件加一个壳的过程,当初始APK文件需要增加其它功能的壳时,将目标APK文件作为原始文件,选择其它的壳文件,然后按照上述的方法和步骤进行即可。
在系统生成目标APK文件后,才会向用户提供下载,才会允许用户在系统内运行此目标APK文件。用户可以通过web下载目标APK文件,当web服务器开放外网时,在外工作的员工就可以通过Internet访问服务器,下载需要的目标APK文件。
下面举一个高级用户使用系统的过程,用户先打开浏览器,输入网址,进入登录界面,输入正确的用户名和密码后进入系统。选择需要打包的APK文件进行上传,在将APK文件上传后,用户可根据需要在系统内选择需要打包的功能壳,如VPN加密壳,也可自行上传功能壳。选择好功能壳后就可以给系统发送打包命令,让系统对所选的初始APK文件和功能壳进行打包。
本实施例通过先对初始APK文件进行反编译获取第一xml文件和第一资源文件,然后对第一xml文件和待加壳的第二xml文件进行合并等处理、对第一资源文件和第二资源文件进行合并等处理并将处理后的文件存贮到预置文件夹,最后将预置文件夹打包构建成目标APK文件,以实现将待加壳的功能附加到初始APK文件上的目的,在此过程中不需要改变初始APK文件的源码、也不需要修改dex的文件结构,使得给相关的移动应用增加新的功能时灵活方便,简单易行,有利于企业更加简便快捷的定制和改造原有的企业移动应用。
在上述实施例的基础上,在步骤S22之后还包括:
步骤S26:获取初始APK文件的文件类型,判断APK文件的类型是否为APK类型;
步骤S27:若初始APK文件的类型为APK类型,获取初始APK文件的xml文件,判断xml文件内是否存在预置的标记信息;第二判断单元57还设置成:当xml文件内不存在预置的标记信息时,提取单元从反编译处理后的文件中提取与壳文件的文件类型相同的目标文件。
本实施例中,xml文件优选为AndroidManifest.xml文件,在对初始APK文件进行反编译之前,还需要对初始APK文件进行检测,以判断欲反编译的初始APK文件是否符合反编译的要求。具体地,判断初始APK文件是否符合反编译要求包括以下几个方面:
首先,判断此文件是否为真的初始APK文件,一个文件是否为合格的初始APK文件,不能只从后缀名来判断,其它文件将后缀名改成初始APK后,此文件也将显示为初始APK文件。例如,将word文档的后缀名doc修改成初始APK后,word文档的形式上就成为了初始APK文件。这一部分的判断是先获取初始APK文件的文件类型,然后判断APK文件的类型是否为APK类型,如果是APK类型,则继续下面的判断,如果不是APK类型,则退出加壳程序。当然,判断APK文件是否为真的APK文件也可以通过反编译来进行,通过将不是APK文件的后缀名改为.apk,反编译工具可以给出相关提示。
然后,判断欲加壳的初始APK文件内是否包含壳文件的功能,本实施例中是通过检测初始APK文件内是否包含壳文件对应的标识信息来完成判断的。一个初始APK文件是否符合加壳要求,除了确定此文件为真初始APK文件外,还需判断此初始APK文件是否需要增加壳文件的功能,如果检测出初始APK文件已经具备壳文件的功能,则不再需要对同一初始APK文件增加同样的壳文件,如果没有检测到壳文件的标识信息,则对初始APK文件进行加壳处理。具体地,首先获取APK文件的AndroidManifest.xml文件,然后判断AndroidManifest.xml文件中是否包含与壳文件对应的预置标识信息,如果存在,则不再对初始APK文件进行加壳,如果不存在,则对初始APK文 件进行提取。
通过在提取反编译后的初始APK文件前,对初始APK文件的合法性进行判断,有效的去除了非APK类型的文件,避免了对非APK类型的文件进行多余的处理;对初始APK文件加壳的必要性进行判断,有效的杜绝了对初始APK文件进行重加壳的操作,提高了对移动应用加壳的效率。
步骤S30:设置用户访问目标APK文件的权限;具体包括:
步骤S31:,根据预置指令对登录系统的用户进行分级;
步骤S32:根据用户的级别设置用户可以访问的目标APK文件的类别。
本实施例中,管理员通过默认账号进入系统,然后对系统发送建立用户的指令,系统根据指令创建用户,然后对所创建的用户设置权限。具体地,系统根据管理员指令创建高级用户和普通用户,将普通用户的访问权限设置成仅可以下载系统内的部分目标APK文件和将目标APK文件上传至系统;而把高级用户的权限设置成,除可以上传和下载所有目标APK文件以外,还可以上传初始APK文件和功能壳,并在系统内对初始APK文件和功能壳打包构建成目标APK文件。例如,加有VPN功能壳的目标APK文件,可以供普通用户和高级用户同时下载,而加有有效期功能壳的目标APK文件就只允许高级用户下载,普通用户不能下载。不论是普通用户还是高级用户,上传的目标APK文件都可以通过web进行下载,但如果想要在系统内运行,就必须经过系统的检测,是否符合本系统运行的规则。当然,在其他实施例中,可以将用户的等级分得更细,每个等级的用户可访问权限也不相同。
本实施例中,通过对目标APK文件设置用户的访问权限,使得部分目标APK文件的访问受到账户的限制,从而达到禁止权限不够的用户访问机密目标APK文件,进而有效地增加了机密APK文件的安全性能,有效的提高了移动办公的安全性。
步骤S40:记录用户的操作信息,并生成操作日志,具体包括:
步骤S41:根据用户名,记录用户在系统内的操作;
步骤S42:根据记录的操作,生成与用户名对应的操作日志。
本实施例中,根据管理员指令创立的用户,不论是高级用户还是普通用 户,其所有的操作都被系统记录在操作日志内,以达到系统对所有用户的一个操作管理。具体地,系统对每一位登录的用户都建立一个操作日志,操作日志记录该用户的所有操作,包括上传或下载目标APK文件的时间、目标APK文件的名称等,或者是在系统上运行某目标APK文件的时间,甚至用户在打包构建目标APK时设置的密码也会被记录。以高级用户给初始APK文件加VPN的功能壳为例,日志内会记录该高级用户上传初始APK文件的文件名称和时间;上传功能的壳文件的文件名称和时间;以及打包构建时设置的VPN的密码和打包构建的时间;以及目标APK存贮的目录。系统根据各用户预置的权限,来查询用户的操作日志,当发现操作日志内记录有超出该用户预置权限的内容时,冻结该账号,并给管理员发出警报信息。通过生成用户的操作日志,有利于系统对用户的管控,有利于用户根据操作日志对操作用户的管理,有利于提高移动应用的安全。
在实现上述的方法步骤中,需要使用到以下模块:
移动应用管理模块20,设置成:上传和下载壳文件、初始APK文件以及目标APK文件;
本实施例中,移动应用管理模块20包括上传单元21和下载单元22。上传单元21用于供用户上传初始APK文件、初始APK文件对应功能的壳文件以及打包构建后的目标APK文件,下载单元22用于供用户下载打包构建后的目标APK文件。当然,移动应用管理模块20与用户管理模块10对应,不同等级的用户可以下载和上传的APK文件类型的范围不同,如高级用户可以通过上传单元21上传管理类的初始APK文件,而普通用户则不能。
存储模块40,设置成:接收和存储壳文件、初始APK文件以及目标APK文件。
存储模块包括用于存储初始APK文件和壳文件的初始存储单元,用于打包过程中的中间存储单元,以及用于存储打包构建后的目标APK文件的目标存储单元。初始存储单元用于接收用户上传的初始APK文件和初始APK文件对应功能的壳文件,并将接收后的文件存储。中间存储单元用于接收和存储打包过程中解析后的初始APK文件和壳文件。目标存储单元除了存储在系统内打包构建的目标APK文件外,也用于存储用户上传的目标APK文件。 存储模块40与用户管理模块10相对应,存储模块内的内容,需要相应等级的用户才能读取和写入。如管理类的初始APK文件和目标APK文件,只有高级用户可以读取,而普通用户则不能。
本发明实施例还公开了一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行上述任意的移动应用打包的方法。
本发明实施例还公开了一种载有所述的计算机程序的载体。
本实施例,通过对用户分级,设置各级用户的访问权限,从而使得部分目标APK文件的访问受到账户的限制,从而达到禁止权限不够的用户访问机密目标APK文件,进而有效地增加了机密APK文件的安全性能,有效的提高了移动办公的安全性;通过生成用户的操作日志,有利于系统对用户的管控,有利于用户根据操作日志对操作用户的管理,有利于提高移动应用的安全;对初始APK文件进行分类,然后根据初始APK文件的类别获取相应的一个或者多个功能壳,并将所获取的功能壳逐一的与初始APK文件进行打包构建;目标APK文件由系统提供的功能壳和初始APK文件打包构建生成,保证目标APK文件能稳定可靠的按照系统的要求在系统上运行,从而不会威胁到系统的安全;通过功能壳的打包构建,使得目标APK文件本身就具有限制用户访问和使用的功能,从而减少非必要的用户访问目标APK文件,从而有利于保障移动办公的安全;另外,通过打包构建目标APK文件的方式来增加移动办公的安全性,具有易部署、易维护、易弹性扩展性,并且它无需修改原有的IT系统,也无需移动应用改造,从而有效的控制了移动应用打包所耗费的成本。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
工业实用性
本实施例,通过对用户分级,设置各级用户的访问权限,从而使得部分目标APK文件的访问受到账户的限制,从而达到禁止权限不够的用户访问机密目标APK文件,进而有效地增加了机密APK文件的安全性能,有效的提高了移动办公的安全性;通过生成用户的操作日志,有利于系统对用户的管控,有利于用户根据操作日志对操作用户的管理,有利于提高移动应用的安全;对初始APK文件进行分类,然后根据初始APK文件的类别获取相应的一个或者多个功能壳,并将所获取的功能壳逐一的与初始APK文件进行打包构建;目标APK文件由系统提供的功能壳和初始APK文件打包构建生成,保证目标APK文件能稳定可靠的按照系统的要求在系统上运行,从而不会威胁到系统的安全;通过功能壳的打包构建,使得目标APK文件本身就具有限制用户访问和使用的功能,从而减少非必要的用户访问目标APK文件,从而有利于保障移动办公的安全;另外,通过打包构建目标APK文件的方式来增加移动办公的安全性,具有易部署、易维护、易弹性扩展性,并且它无需修改原有的IT系统,也无需移动应用改造,从而有效的控制了移动应用打包所耗费的成本。因此本发明具有很强的工业实用性。

Claims (12)

  1. 一种移动应用打包的系统,包括用户管理模块、移动应用管理模块、打包构建模块、日志管理模块和存储模块,其中:
    所述用户管理模块设置成:设置用户访问目标APK文件的权限;
    所述移动应用管理模块设置成:上传和下载初始APK文件、所述初始APK文件对应功能的壳文件、以及所述目标APK文件;
    所述打包构建模块设置成:将所述初始APK文件和所述壳文件打包构建成所述目标APK文件;
    所述日志管理模块设置成:记录用户的操作信息,并生成操作日志;
    所述存储模块设置成:接收和存储所述壳文件、所述初始APK文件以及所述目标APK文件。
  2. 如权利要求1所述的移动应用打包的系统,其中,所述用户管理模块包括分级单元和设置单元,其中:
    所述分级单元设置成:根据预置指令对登录系统的用户进行分级;
    所述设置单元设置成:根据用户的级别设置用户可以访问的目标APK文件的类别。
  3. 如权利要求1所述的移动应用打包的系统,其中,所述日志管理模块包括记录单元和生成单元,其中:
    所述记录单元设置成:根据用户名,记录用户在系统内的操作;
    所述生成单元设置成:根据记录的所述操作,生成与所述用户名对应的操作日志。
  4. 如权利要求1所述的移动应用打包的系统,其中,所述打包构建模块包括获取单元、反编译单元、提取单元、合并单元和打包构建单元,其中:
    所述获取单元设置成:获取所述初始APK文件和壳文件;
    所述反编译单元设置成:对所述初始APK文件进行反编译处理;
    所述提取单元设置成:从反编译处理后的文件中提取与所述壳文件中的文件类型相同的目标文件;
    所述合并单元设置成:将所述目标文件和所述壳文件进行合并处理,得到合并处理后的文件;
    所述打包构建单元设置成:将合并处理后的文件和所述初始APK文件存贮至预置文件夹,并将所述预置文件夹打包构建为所述目标APK文件。
  5. 如权利要求4所述的移动应用打包的系统,其中,所述打包构建模块还包括第一判断单元和第二判断单元,其中:
    所述第一判断单元设置成:获取所述初始APK文件的文件类型,判断所述初始APK文件的类型是否为APK类型;
    所述第二判断单元设置成:若所述初始APK文件的类型为APK类型,获取所述初始APK文件的xml文件,判断所述xml文件内是否存在预置的标记信息;
    所述提取单元设置成按照如下方式从反编译处理后的文件中提取与所述壳文件中的文件类型相同的目标文件:当所述xml文件内不存在预置的标记信息时,从反编译处理后的文件中提取与所述壳文件的文件类型相同的所述目标文件。
  6. 一种移动应用打包的方法,包括以下步骤:
    当接收到用户上传的初始APK文件时,根据所述初始APK文件的类别获取对应功能的壳文件;
    将所述初始APK文件和所述壳文件打包构建成目标APK文件并存储至目标文件夹;
    设置所述用户访问所述目标APK文件的权限;
    记录所述用户的操作信息,并生成操作日志。
  7. 如权利要求6所述的移动应用打包的方法,其中,所述设置用户访问目标APK文件的权限的步骤包括:
    根据预置指令对登录系统的用户进行分级;
    根据用户的级别设置用户可以访问的目标APK文件的类别。
  8. 如权利要求6所述的移动应用打包的方法,其中,所述记录用户的操作信息,并生成操作日志的步骤包括:
    根据用户名,记录所述用户在系统内的操作;
    根据记录的所述操作,生成与所述用户名对应的操作日志。
  9. 如权利要求6所述的移动应用打包的方法,其中,所述将所述初始APK文件和所述壳文件打包构建成目标APK文件并存储至目标文件夹的步骤包括:
    获取所述初始APK文件和壳文件;
    对所述初始APK文件进行反编译处理,得到反编译处理后的文件;
    从反编译处理后的文件中提取与所述壳文件中的文件类型相同的目标文件;
    将所述目标文件和所述壳文件进行合并处理,得到合并处理后的文件;
    将合并处理后的文件和所述初始APK文件存贮至预置文件夹,并将所述预置文件夹打包构建为所述目标APK文件。
  10. 如权利要求9所述的移动应用打包的方法,其中,所述对初始APK文件进行反编译处理的步骤之后,该方法还包括:
    获取所述初始APK文件的文件类型,判断所述APK文件的类型是否为APK类型;
    若所述初始APK文件的类型为APK类型,获取所述初始APK文件的xml文件,判断所述xml文件内是否存在预置的标记信息;
    当所述xml文件内不存在预置的标记信息时,才执行所述从反编译处理后的文件中提取与所述壳文件的文件类型相同的目标文件的步骤。
  11. 一种计算机程序,包括程序指令,当该程序指令被计算机执行时,使得该计算机可执行权利要求6-10中任一项所述的移动应用打包的方法。
  12. 一种载有如权利要求11所述的计算机程序的载体。
PCT/CN2015/071412 2014-10-15 2015-01-23 移动应用打包的方法及系统 WO2016058291A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410545613.3 2014-10-15
CN201410545613.3A CN105577720B (zh) 2014-10-15 2014-10-15 移动应用打包的方法及系统

Publications (1)

Publication Number Publication Date
WO2016058291A1 true WO2016058291A1 (zh) 2016-04-21

Family

ID=55746033

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/071412 WO2016058291A1 (zh) 2014-10-15 2015-01-23 移动应用打包的方法及系统

Country Status (2)

Country Link
CN (1) CN105577720B (zh)
WO (1) WO2016058291A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426182A (zh) * 2017-06-21 2017-12-01 郑州云海信息技术有限公司 一种存储管理系统的访问控制方法及系统
CN109814912A (zh) * 2018-12-15 2019-05-28 中国平安人寿保险股份有限公司 应用程序打包方法及系统
CN116107667A (zh) * 2023-04-13 2023-05-12 瞳见科技有限公司 一种基于虚幻引擎的模型管理方法、系统、终端及介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775842B (zh) * 2016-11-30 2020-02-11 北京酷我科技有限公司 一种可自定义的dex分包的方法
CN111523114A (zh) * 2020-03-11 2020-08-11 国网辽宁省电力有限公司大连供电公司 基于安全沙箱技术的移动业务应用数据防泄密系统
CN114048185B (zh) * 2021-11-18 2022-09-02 北京聚存科技有限公司 一种分布式文件系统中海量小文件透明打包存储与访问的方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130254837A1 (en) * 2013-05-16 2013-09-26 Sky Socket, Llc Rights Management Services Integration with Mobile Device Management
CN103886230A (zh) * 2014-02-24 2014-06-25 四川长虹电器股份有限公司 android系统的软件版权保护方法及其系统
CN103886270A (zh) * 2014-03-31 2014-06-25 宇龙计算机通信科技(深圳)有限公司 一种终端及提高系统安全性方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577731B (zh) * 2012-07-18 2016-10-05 中国移动通信集团公司 一种软件处理方法和装置
US9535674B2 (en) * 2012-12-21 2017-01-03 Bmc Software, Inc. Application wrapping system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130254837A1 (en) * 2013-05-16 2013-09-26 Sky Socket, Llc Rights Management Services Integration with Mobile Device Management
CN103886230A (zh) * 2014-02-24 2014-06-25 四川长虹电器股份有限公司 android系统的软件版权保护方法及其系统
CN103886270A (zh) * 2014-03-31 2014-06-25 宇龙计算机通信科技(深圳)有限公司 一种终端及提高系统安全性方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426182A (zh) * 2017-06-21 2017-12-01 郑州云海信息技术有限公司 一种存储管理系统的访问控制方法及系统
CN109814912A (zh) * 2018-12-15 2019-05-28 中国平安人寿保险股份有限公司 应用程序打包方法及系统
CN116107667A (zh) * 2023-04-13 2023-05-12 瞳见科技有限公司 一种基于虚幻引擎的模型管理方法、系统、终端及介质
CN116107667B (zh) * 2023-04-13 2023-08-11 瞳见科技有限公司 一种基于虚幻引擎的模型管理方法、系统、终端及介质

Also Published As

Publication number Publication date
CN105577720A (zh) 2016-05-11
CN105577720B (zh) 2020-04-10

Similar Documents

Publication Publication Date Title
WO2016058291A1 (zh) 移动应用打包的方法及系统
US10681050B2 (en) Ephemeral applications
US9992166B2 (en) Hierarchical rule development and binding for web application server firewall
WO2015154612A1 (zh) 扩展apk文件应用的方法及装置
US11757937B2 (en) Enabling webapp security through containerization
Do et al. Enhancing user privacy on android mobile devices via permissions removal
US20140007117A1 (en) Methods and apparatus for modifying software applications
US8904492B2 (en) Method of controlling information processing system, computer-readable recording medium storing program for controlling apparatus
US9942267B1 (en) Endpoint segregation to prevent scripting attacks
Alfalqi et al. Android platform malware analysis
Moshchuk et al. Content-based isolation: rethinking isolation policy design on client systems
KR101557455B1 (ko) 응용 프로그램 코드 분석 장치 및 그것을 이용한 코드 분석 방법
US20190098045A1 (en) Browser injection prevention method, browser client and apparatus
US20140229526A1 (en) Systems, methods and media for securely executing remote commands using cross-platform library
Nazar et al. Rooting Android–Extending the ADB by an auto-connecting WiFi-accessible service
US20160378982A1 (en) Local environment protection method and protection system of terminal responding to malicious code in link information
US10909228B2 (en) Server-side authentication policy determination for mobile applications
Shah Penetration Testing Android Applications
US20200089896A1 (en) Encrypted log aggregation
US10044728B1 (en) Endpoint segregation to prevent scripting attacks
Krishnan Android hypovisors: Securing mobile devices through high-performance, light-weight, subsystem isolation with integrity checking and auditing capabilities
Wang et al. Research on the principle and analysis of shellshock bug
Xu Security enhancement of secure USB debugging in Android system
CN117370989A (zh) 一种sql注入漏洞复现方法
Kim et al. Self‐Controllable Mobile App Protection Scheme Based on Binary Code Splitting

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15850487

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15850487

Country of ref document: EP

Kind code of ref document: A1