CN104991810B - Method and processing system in automatic addition APK to Android system - Google Patents

Method and processing system in automatic addition APK to Android system Download PDF

Info

Publication number
CN104991810B
CN104991810B CN201510442451.5A CN201510442451A CN104991810B CN 104991810 B CN104991810 B CN 104991810B CN 201510442451 A CN201510442451 A CN 201510442451A CN 104991810 B CN104991810 B CN 104991810B
Authority
CN
China
Prior art keywords
files
apk
catalogue
android
app
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510442451.5A
Other languages
Chinese (zh)
Other versions
CN104991810A (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.)
Gansu Xinyun Weimeng Information Technology Co.,Ltd.
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510442451.5A priority Critical patent/CN104991810B/en
Publication of CN104991810A publication Critical patent/CN104991810A/en
Application granted granted Critical
Publication of CN104991810B publication Critical patent/CN104991810B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses the method and processing system in a kind of automatic addition APK to Android system, this method includes:Step S1 parses the APK file under several catalogues, extracts each SO files wherein included to the same catalogue;Step S2 generates corresponding Android.mk files according to each catalogue;And step S3, all APK files and SO files are added in the macro PRODUCT_PACKAGES of system, are suitable for these APK files and SO files capable of being compiled by corresponding Android.mk files in make.The invention also discloses a kind of processing systems suitable for automatic addition APK file to Android source code.The automatic addition APK file of the present invention in Android source code method and processing system can parse APK file automatically, extract SO files therein, corresponding Android.mk files are automatically generated, and can also prevent SO files from repeating to write into Android.mk files and compiling is caused to malfunction.

Description

Method and processing system in automatic addition APK to Android system
Technical field
The present invention relates in mobile phone application software development field more particularly to a kind of automatic addition APK to Android system Method and processing system.
Background technology
With the arrival in mobile interchange epoch, the stability of mobile terminal software and the high efficiency of exploitation become Cell Phone Design The important indicator that company is pursued.Development efficiency how is improved, shortens the development cycle as the emphasis of scheme company pursuit, terminal production The morning and evening of product listing also determines the market sales volume of this machine.So improving development efficiency in links is all important this Into, software link, in the improvement of integrated APK file this block, there is presently no the appearances of good scheme.
Existing development mode requires engineer to be added manually to all integrated APK files are in every particular in source code, If APK file is excessive or APK file included in SO files can excessively waste a large amount of time and efforts of engineer, Include a SO files more than 100 as certain applications are inner, need to add that this is 100 multinomial manually, and if there is several different applications are drawn With the same third party SO files, extra addition can be caused, compiling when can report an error.
It is exemplified below in the prior art about the method for APK file being added in Android source code.
Due to that in mobile phone terminal software development process, can be related to the integration problem of many third-party applications, some are answered With needing to be integrated into the areas system, some applications need to be integrated into the areas data.Traditional development scheme is to need engineer by APK File unpacks, and takes out SO files therein and APK file is added to a certain catalogue under source code together, and establish Android.mk APK file and each SO files are respectively write into Android.mk files by file as an add-ins, such as one integrated PhicommCamera applications need Android.mk file contents to be added as follows:
include$(CLEAR_VARS)
LOCAL_APK:=FxCamera_20150113
LOCAL_MODULE:=PhicommCamera
LOCAL_MODULE_TAGS:=optional
LOCAL_SRC_FILES:=$ (LOCAL_APK) .APK
LOCAL_MODULE_PATH:=$ (TARGET_OUT_APPS)
LOCAL_MODULE_CLASS:=APPS
LOCAL_MODULE_SUFFIX:=$ (COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE:=PRESIGNED
LOCAL_REQUIRED_MODULES:=
libjni_mosaic\
liblocSDK4b\
include$(BUILD_PREBUILT)
include$(CLEAR_VARS)
LOCAL_PREBUILT_LIBS:=libjni_mosaic.SO
LOCAL_MODULE_TAGS:=optional
include$(BUILD_MULTI_PREBUILT)
include$(CLEAR_VARS)
LOCAL_PREBUILT_LIBS:=liblocSDK4b.SO
LOCAL_MODULE_TAGS:=optional
include$(BUILD_MULTI_PREBUILT)
Here every a line is required for engineer to add manually, if integrated application is excessive or some are using inner SO texts Part is excessive, and engineer's addition efficiency in every particular can be very low, and error-prone, causes development efficiency low.
Invention content
The object of the present invention is to provide the methods and processing system in a kind of automatic addition APK to Android system, to solve It the technical issues of automatic parsing and addition of APK file, avoids SO files from repeating to add, improves development efficiency.
In order to solve the above technical problem, the present invention provides a kind of method in automatic addition APK to Android system, packets Include following steps:
Step S1, parses the APK file under several catalogues, extracts each SO files wherein included respectively, and Automatically the difference subdirectory under several catalogues is sent;
Step S2 generates corresponding Android.mk files according to each subdirectory respectively;And
All APK files and SO files are added in the macro PRODUCT_PACKAGES of system, are suitable for by step S3 These APK files and SO files can be compiled by corresponding Android.mk files when make.
Further, the APK file under several catalogues is parsed in the step S1 wherein included each to extract The method of SO files to the same catalogue includes:To catalogue app-data-presigned, catalogue app-system-platform It is parsed with the APK file under catalogue app-system-presigned, extracts in each APK file SO files to catalogue lib- In system.
Further, include according to the method that each catalogue generates corresponding Android.mk files in the step S2:Operation Catalogue app-data-presigned, catalogue app-system-platform, catalogue app-system-presigned and catalogue Corresponding appmk.sh scripts under lib-system, to generate the Android.mk files under each catalogue.
Further, all APK files and SO files are added to the macro PRODUCT_ of system in the step S3 In PACKAGES, it is suitable for these APK files and SO files capable of being compiled by Android.mk files in make Method includes:Product_mk.sh scripts are run, PrebuiltProduct.mk files are generated, it should PrebuiltProduct.mk files are suitable for all APK files and SO files that parsing obtains being added to system macro In PRODUCT_PACKAGES, it is suitable for above-mentioned APK file and SO files being passed through corresponding Android.mk texts in make Part is compiled.
Another aspect, in order to solve above-mentioned same technical problem, the present invention also provides one kind being suitable for automatic addition APK To the processing system of Android system, including:
APK file resolution unit parses the APK file under several catalogues, extraction each SO texts wherein included Part is to the same catalogue;Android.mk file generating units generate corresponding Android.mk files according to each catalogue;And All APK files and SO files are added in the macro PRODUCT_PACKAGES of system, are suitable in make by compilation unit These APK files and SO files can be compiled by corresponding Android.mk files.
Further, several catalogues include:Catalogue app-data-presigned, catalogue app-system-platform With catalogue app-system-presigned;And it will extract in each SO files to catalogue lib-system wherein included.
Further, the Android.mk file generating units run catalogue app-data-presigned, catalogue Corresponding appmk.sh under app-system-platform, catalogue app-system-presigned and catalogue lib-system Script, to generate the Android.mk files under each catalogue.
Further, the compilation unit runs product_mk.sh scripts, generate PrebuiltProduct.mk texts Part, the PrebuiltProduct.mk files are suitable for all APK files and SO files that parsing obtains being added to system macro In PRODUCT_PACKAGES, it is suitable for above-mentioned APK file and SO files being passed through corresponding Android.mk texts in make Part is compiled.
The invention has the advantages that the method in the automatic addition APK to Android system of the present invention and processing system energy Enough automatic parsing APK files, extract SO files therein, automatically generate corresponding Android.mk files, and can also prevent SO files repeat to write into Android.mk files and compiling is caused to malfunction;It especially avoids when the reference of multiple APK files is same When SO files, since engineer adds these SO files due to the problem of causing to repeat to add, malfunction so as to cause compiling manually; Therefore, automatic addition APK file of the invention in Android source code method and processing system can greatly improve based on Android system The development efficiency of the corresponding software of system.
Description of the drawings
Fig. 1 is the flow chart one of the method in the automatic addition APK to Android system of the present invention;
Fig. 2 is the flowchart 2 of the method in the automatic addition APK to Android system of the present invention;
Fig. 3 is functional block diagram of the addition APK file to the processing system in Android system code automatically of the present invention.
Specific implementation mode
In conjunction with the accompanying drawings, the present invention is further explained in detail.These attached drawings are simplified schematic diagram, only with Illustration illustrates the basic structure of the present invention, therefore it only shows the composition relevant to the invention.
The present invention is to increase a precompile command operation when compiling terminal software version, specific operation be exactly The prebuilt_mk.sh scripts under root, specific implementation process detailed in Example 1 and reality are run before executing make orders Apply example 2:
Embodiment 1
As depicted in figs. 1 and 2, it the present invention provides a kind of method in automatic addition APK to Android system, refers specifically to certainly In dynamic addition APK file to Android source code, include the following steps:
Step S1, parses the APK file under several catalogues, extracts each SO files wherein included respectively, and Automatically the difference subdirectory under several catalogues is sent;
Step S2 generates corresponding Android.mk files according to each subdirectory respectively;And
All APK files and SO files are added in the macro PRODUCT_PACKAGES of system, are suitable for by step S3 These APK files and SO files can be compiled by corresponding Android.mk files when make.
Wherein, these APK files and SO files can be compiled by corresponding Android.mk files in make, i.e., Compiling in Android source code, or be compiled into corresponding software version (software version refers to detailed programs based on android system, such as High-pass platform, MTK platforms, the CPU models of each platform again there are many kinds of, each corresponds to each version) in, or be compiled into In Android system.
Specifically, being parsed to the APK file under several catalogues in the step S1 wherein included each to extract The method of SO files to the same catalogue includes:To catalogue app-data-presigned, catalogue app-system-platform It is parsed with the APK file under catalogue app-system-presigned, extracts in each APK file SO files to catalogue lib- In system.
Specifically, including according to the method that each catalogue generates corresponding Android.mk files in the step S2:Operation Catalogue app-data-presigned, catalogue app-system-platform, catalogue app-system-presigned and catalogue Corresponding appmk.sh scripts under lib-system pass through appmk.sh to generate the Android.mk files under each catalogue Script traverses above-mentioned catalogue, and corresponding Android.mk files are generated under each catalogue.
Wherein, correspondence is installed to different area directories, i.e. app-data- to the APK file in several catalogues respectively Presigned corresponds to the application placed and be installed to the areas data, and catalogue app-system-platform is corresponded to place and is installed to The application for needing system signature in the areas system, catalogue app-system-presigned are correspondingly placed into the areas system and need to answer With oneself signature, the application of system signature is not needed.
Further, all APK files and SO files are added to the macro PRODUCT_ of system in the step S3 In PACKAGES, it is suitable for these APK files and SO files capable of being compiled by Android.mk files in make Method includes:Product_mk.sh scripts are run, PrebuiltProduct.mk files are generated, it should PrebuiltProduct.mk files are suitable for all APK files and SO files that parsing obtains being added to system macro In PRODUCT_PACKAGES, it is suitable for above-mentioned APK file and SO files being passed through corresponding Android.mk texts in make Part is compiled.
Specifically, addition APK file is to the detailed process of the method in Android source code as shown in Fig. 2, i.e. automatically
Step S11, precompile start;
Step S12 scans three catalogues;
Step S13 parses APK all under each catalogue, if having SO files, takes out SO files therein and is put into another In an outer catalogue;
Step S14, it is to be resolved to finish;
Step S15 establishes the corresponding Android.mk files of above four catalogues;
All APK files and SO files are added in the macro PRODUCT_PACKAGES of system by step S16;
Step S17 starts MAKE orders, above-mentioned APK file and SO files is compiled into Android system.
Therefore, the method in a kind of automatic addition APK to Android system of the invention, refers specifically to add APK file automatically Into Android source code, including APK file can be parsed automatically, extract SO files therein, automatically generate corresponding Android.mk files, and can also prevent SO files from repeating to write into Android.mk files, cause compiling to malfunction;Especially keep away Exempt from when multiple APK files quote the same SO files, repeats to add due to causing since engineer adds these SO files manually The problem of adding, malfunctioning so as to cause compiling.Therefore, automatic addition APK file of the invention in Android source code method and place Reason system can greatly improve the development efficiency of corresponding software based on android system.
Embodiment 2
As shown in figure 3, on the basis of embodiment 1, the present invention also provides in a kind of automatic addition APK to Android system System refers specifically to add in APK file to Android source code automatically, including:
APK file resolution unit, parses the APK file under several catalogues, extracts respectively wherein included each SO files, and the difference subdirectory under several catalogues is sent automatically;
Android.mk file generating units generate corresponding Android.mk files according to each subdirectory respectively;And All APK files and SO files are added in the macro PRODUCT_PACKAGES of system, are suitable in make by compilation unit These APK files and SO files can be compiled by corresponding Android.mk files.
Further, several catalogues include:Catalogue app-data-presigned, catalogue app-system-platform With catalogue app-system-presigned;And it will extract in each SO files to catalogue lib-system wherein included.Tool Body, about the definition of each catalogue, it is expounded in embodiment 1, which is not described herein again.
Further, the Android.mk file generating units run catalogue app-data-presigned, catalogue Corresponding appmk.sh under app-system-platform, catalogue app-system-presigned and catalogue lib-system Script, to generate the Android.mk files under each catalogue.
Specifically, the compilation unit, that is, run product_mk.sh scripts, PrebuiltProduct.mk texts are generated Part, the PrebuiltProduct.mk files are suitable for all APK files and SO files that parsing obtains being added to system macro In PRODUCT_PACKAGES, it is suitable for above-mentioned APK file and SO files being passed through corresponding Android.mk texts in make Part is compiled.
Automatically the processing system for adding APK to Android system in this embodiment of the invention can parse APK file automatically, carry SO files therein are taken, corresponding Android.mk files are automatically generated, and can also prevent SO files from repeating to write into Android.mk files and cause compiling malfunction;It especially avoids when multiple APK files quote the same SO files, due to work Journey Shi Shoudong adds these SO files due to the problem of causing to repeat to add, malfunction so as to cause compiling;Therefore, it is of the invention from Dynamic addition APK file in Android source code method and processing system can greatly improve opening for corresponding software based on android system Send out efficiency.
It is enlightenment with above-mentioned desirable embodiment according to the present invention, through the above description, relevant staff is complete Various changes and amendments can be carried out without departing from the scope of the technological thought of the present invention' entirely.The technology of this invention Property range is not limited to the contents of the specification, it is necessary to determine its technical scope according to right.

Claims (2)

1. the method in addition APK to Android system automatically, which is characterized in that include the following steps:
Step S1, parses the APK file under several catalogues, extracts each SO files wherein included respectively, and automatic Send the difference subdirectory under several catalogues;It specifically includes:
To catalogue app-data-presigned, catalogue app-system-platform and catalogue app-system- APK file under presigned is parsed, and is extracted in each APK file in SO files to catalogue lib-system;
Step S2 generates corresponding Android.mk files according to each subdirectory respectively;It specifically includes:
Run catalogue app-data-presigned, catalogue app-system-platform, catalogue app-system- Corresponding appmk.sh scripts under presigned and catalogue lib-system, to generate the Android.mk files under each catalogue; And
All APK files and SO files are added in the macro PRODUCT_PACKAGES of system by step S3, with the energy in make The APK file and SO files are compiled by corresponding Android.mk files;
All APK files and SO files are added in the macro PRODUCT_PACKAGES of system in the step S3, are suitable for These APK files and SO files can be compiled by Android.mk files and be specifically included in make:
Product_mk.sh scripts are run, PrebuiltProduct.mk files, the PrebuiltProduct.mk files are generated All APK files and SO files suitable for obtaining parsing are added in the macro PRODUCT_PACKAGES of system, are suitable for Above-mentioned APK file and SO files can be compiled by corresponding Android.mk files when make.
2. the processing system suitable for automatic addition APK to Android system, which is characterized in that including:
APK file resolution unit, parses the APK file under several catalogues, extracts each SO texts wherein included respectively Part, and the difference subdirectory under several catalogues is sent automatically;Several described catalogues include:Catalogue app-data- Presigned, catalogue app-system-platform and catalogue app-system-presigned;And extraction is wherein wrapped In each SO files to catalogue lib-system contained;
Android.mk file generating units generate corresponding Android.mk files according to each subdirectory respectively, that is, run mesh Record app-data-presigned, catalogue app-system-platform, catalogue app-system-presigned and catalogue Corresponding appmk.sh scripts under lib-system, to generate the Android.mk files under each catalogue;And
All APK files and SO files are added in the macro PRODUCT_PACKAGES of system, are suitable for by compilation unit These APK files and SO files can be compiled by corresponding Android.mk files when make;
The compilation unit runs product_mk.sh scripts, generate PrebuiltProduct.mk files, should PrebuiltProduct.mk files are suitable for all APK files and SO files that parsing obtains being added to system macro In PRODUCT_PACKAGES, it is suitable for above-mentioned APK file and SO files being passed through corresponding Android.mk texts in make Part is compiled.
CN201510442451.5A 2015-07-24 2015-07-24 Method and processing system in automatic addition APK to Android system Active CN104991810B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510442451.5A CN104991810B (en) 2015-07-24 2015-07-24 Method and processing system in automatic addition APK to Android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510442451.5A CN104991810B (en) 2015-07-24 2015-07-24 Method and processing system in automatic addition APK to Android system

Publications (2)

Publication Number Publication Date
CN104991810A CN104991810A (en) 2015-10-21
CN104991810B true CN104991810B (en) 2018-10-12

Family

ID=54303626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510442451.5A Active CN104991810B (en) 2015-07-24 2015-07-24 Method and processing system in automatic addition APK to Android system

Country Status (1)

Country Link
CN (1) CN104991810B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446789A (en) * 2015-11-23 2016-03-30 上海斐讯数据通信技术有限公司 Method and apparatus for building application in android system
CN105912377A (en) * 2015-12-13 2016-08-31 乐视网信息技术(北京)股份有限公司 Method for coding mp3 and device for coding mp3
CN105867973A (en) * 2016-03-30 2016-08-17 乐视控股(北京)有限公司 Loading method and system for so file in application program
CN109828758A (en) * 2018-12-05 2019-05-31 苏州蜗牛数字科技股份有限公司 A kind of analytic method of SO file
CN109725907A (en) * 2019-01-03 2019-05-07 百度在线网络技术(北京)有限公司 Installation method, device, equipment and the computer-readable medium of preset application

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294514A (en) * 2013-06-26 2013-09-11 深圳Tcl新技术有限公司 System software release integrated method, compiling server and system
CN103713902B (en) * 2013-12-26 2017-10-24 Tcl集团股份有限公司 A kind of BOA Compilation Methods and system based on android system

Also Published As

Publication number Publication date
CN104991810A (en) 2015-10-21

Similar Documents

Publication Publication Date Title
CN104991810B (en) Method and processing system in automatic addition APK to Android system
CN106933609B (en) Android application program installation package generation method and device
CN106293664A (en) Code generating method and device
CN103218294B (en) A kind of adjustment method of embedded system, debugging conversion equipment and system
RU2014104582A (en) RUNNING SYSTEM
CN102289378A (en) Method for automatically generating APP (Application)
CN105468428B (en) A kind of Android compilation of source code method and system
CN104572072A (en) MVC (model view controller) mode-based language transformation method and equipment for program
CN103793254A (en) Android system and customized tailoring method thereof
CN105591779A (en) Method and device for inspecting network element
CN103942086A (en) AADL-based method for establishing, analyzing and simulating hybrid system model
CN101859244A (en) Multi-toolchain engineering construction method and system
CN104375858A (en) Method and device for multiple browser platforms to execute javascript
CN104391793A (en) Generation method and device of test steps and scripts
CN104102581A (en) Method and device for implementing unit testing
CN103544154A (en) Data format conversion method
CN103645888A (en) System and method for automatically building operation system
CN105279081A (en) In-loop test method for car controller development software
CN111176660A (en) Distributed architecture-oriented micro-service contract management method and device, computer equipment and readable storage medium
CN108874395B (en) Hard compiling method and device in modular stream processing process
CN103927213B (en) A kind of file compiling method and compilation device
CN102629213A (en) Analysis method and monitoring method for C language simulation model
CN105786465A (en) Scripting language execution method and device
Filipovikj et al. Analyzing industrial simulink models by statistical model checking
CN103677790A (en) Software function modifying method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201116

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201215

Address after: 210000 zhimengyuan, science and technology innovation block, model road, Gulou District, Nanjing City, Jiangsu Province

Patentee after: Wang Qian

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210226

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: 210000 zhimengyuan, science and technology innovation block, model road, Gulou District, Nanjing City, Jiangsu Province

Patentee before: Wang Qian

TR01 Transfer of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and processing system for automatically adding APK to Android system

Effective date of registration: 20230111

Granted publication date: 20181012

Pledgee: Huzhou Wuxing Rural Commercial Bank Co.,Ltd. high tech Zone Green sub branch

Pledgor: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Registration number: Y2023330000072

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20231205

Granted publication date: 20181012

Pledgee: Huzhou Wuxing Rural Commercial Bank Co.,Ltd. high tech Zone Green sub branch

Pledgor: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Registration number: Y2023330000072

PC01 Cancellation of the registration of the contract for pledge of patent right
TR01 Transfer of patent right

Effective date of registration: 20240918

Address after: Room 801-03, Building 45, Lanzhou Center Office Building, No. 16 Xijin West Road, Qilihe District, Lanzhou City, Gansu Province 730050

Patentee after: Gansu Xinyun Weimeng Information Technology Co.,Ltd.

Country or region after: China

Address before: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee before: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Country or region before: China