CN101510918B - Method and apparatus for dynamically modifying mobile phone software package - Google Patents

Method and apparatus for dynamically modifying mobile phone software package Download PDF

Info

Publication number
CN101510918B
CN101510918B CN2009101263658A CN200910126365A CN101510918B CN 101510918 B CN101510918 B CN 101510918B CN 2009101263658 A CN2009101263658 A CN 2009101263658A CN 200910126365 A CN200910126365 A CN 200910126365A CN 101510918 B CN101510918 B CN 101510918B
Authority
CN
China
Prior art keywords
kjava
software package
module
property value
value information
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
CN2009101263658A
Other languages
Chinese (zh)
Other versions
CN101510918A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN2009101263658A priority Critical patent/CN101510918B/en
Publication of CN101510918A publication Critical patent/CN101510918A/en
Application granted granted Critical
Publication of CN101510918B publication Critical patent/CN101510918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method for dynamically modifying a cellphone software package, which comprises: modifying property and/or property value information of a jad file; the kjava cellphone software package is: through compiling an interface function of a module waiting to be upgraded, adding the interface function into the kjava cellphone software package where the module waiting to be upgraded is needed to be added; in the kjava cellphone software package, parts other than the interface function are mixed up and packaged; decompressing the kjava cellphone software package, modifying property and property value information of a jar file, and packaging the modified jar file; modifying information describing the jar file in a jad file, finding the interface function of a module waiting to be upgraded, adding a code for realizing the module waiting to be upgraded into the kjava cellphone software package, as well as mixing up and packaging the kjava cellphone software package. Application of the invention can conveniently and effectively modify the cellphone software package.

Description

A kind of method and apparatus that on-the-fly modifies cellphone software package
Technical field
The present invention relates to the cell phone software technical field, relate in particular to a kind of method and apparatus that on-the-fly modifies cellphone software package.
Background technology
Development along with cell phone software; Requirement can realize dynamically revising to cellphone software package such as mobile phone games bags; To satisfy the requirement that changes cell phone software bandwagon effects such as mobile phone games; Perhaps, satisfy mobile phones software upgrading such as mobile phone games and change requirements such as cell phone software charging policy such as mobile phone games.
Be example with the mobile phone games bag below, the current method that on-the-fly modifies cellphone software package is described.In present mobile phone games bag, comparatively commonly used is kjava mobile phone games bags.Kjava mobile phone games bag is made up of with the file of expansion jad by name the file of expansion jar by name.Wherein, the jad file is descriptive file, includes information and the user-defined attribute and the property value information such as size, title, type, installation path, copyright of each program in the kjava game package; The jar file comprises the program file of recreation and relevant image and application data and mainfest.mf file, has comprised information and the User Defined attribute and the property value information such as title, type, version of each program in the kjava game package in the mianfest.mf file.User Defined attribute in the jad file and property value generally with the mainfest.mf file in User Defined attribute and property value identical.
Said User Defined attribute and property value for example can be recreation signal language, picture etc., and mobile phone terminal can carry out display game according to User Defined attribute and property value.
When kjava mobile phone games bag is installed into mobile phone terminal,, then in mobile phone terminal, store jad file and jar file in the kjava mobile phone games bag if said kjava mobile phone games bag is installed through the jad file; If said kjava mobile phone games bag is installed, then in mobile phone terminal, only store the jar file in the kjava mobile phone games bag through the jar file.
In the kjava mobile phone games bag User Defined attribute and property value can make amendment by kjava mobile phone games developer.Wherein, if the User Defined attribute in the jad file is different with User Defined attribute and property value in the mainfest.mf file with property value, then be as the criterion with User Defined attribute and property value in the jad file.
Because kjava mobile phone games bag is as the criterion with User Defined attribute and property value in its jad file; Therefore; When User Defined attribute in revising kjava mobile phone games bag and property value information, all be to realize at present through the jad file of only revising in the kjava mobile phone games bag.
The problem that the User Defined attribute in the existing this modification kjava mobile phone games bag and the method for property value exist is: although User Defined attribute in the jad file and property value information have been modified; But; If kjava mobile phone games bag is installed on the mobile phone terminal through the jar file; Because mobile phone terminal is only downloaded the jar file and is not downloaded the jad file; Therefore; Mobile phone terminal is still showed kjava mobile phone games bag according to User Defined attribute original in the jar file and property value, that is to say, existingly revises the effect that the method for attribute and property value information in the kjava mobile phone games bag can not play modification kjava mobile phone games bag bandwagon effect through revising the jad file.
In addition; Be used to realize also comprise other modules to be upgraded usually the game logic module of game logic the promptly follow-up module that needs upgrading in the kjava mobile phone games bag except comprising; For example; Accounting module, the login module that is used to login mobile phone games that is used for mobile phone games are chargeed, be used to be linked into the networking module of internet etc., the logic of these modules to be upgraded is generally by the company beyond the mobile phone games developer, and for example the mobile phone games operator is formulated.
At present; The concrete implementation method of kjava mobile phone games bag is: write module to be upgraded by the mobile phone games operator; The module to be upgraded that writes is offered the mobile phone games developer, and explain the concrete logic of said module to be upgraded to the mobile phone games developer, the mobile phone games developer is according to the concrete logic of module to be upgraded; In kjava mobile phone games bag, need to add the place of module to be upgraded; Add the code be used to realize module to be upgraded, the code that will be used to realize game logic module is then obscured with the code that is used to realize module to be upgraded and pack generation kjava mobile phone games bag.
When need upgrading owing to module to be upgraded; Thereby when needing to revise kjava mobile phone games bag; The mobile phone games operator is explained the new realization logic of module to be upgraded to the mobile phone games developer, kjava mobile phone games bag is made amendment according to said new realization logic by the mobile phone games developer.
It is thus clear that the method for module to be upgraded needs mobile phone games operator and mobile phone games developer to link up in the existing this modification kjava mobile phone games bag; And generally speaking; The mobile phone games operator can be cooperated with a plurality of mobile phone games developers usually, like this, in case need to upgrade module to be upgraded; Then the workload linked up of mobile phone games utilizations company and mobile phone games developer is very big; And, independently the kjava mobile phone games bag of himself developing is made amendment respectively by each mobile phone games developer, also caused the waste of a large amount of human and material resources.
Visible by above-mentioned analysis, existing method can not be revised the mobile phone games bag effectively, and it is excessive perhaps to revise required workload, and is convenient inadequately.
Summary of the invention
In view of this; The purpose of the embodiment of the invention is to provide a kind of method that on-the-fly modifies cellphone software package; So that when the kjava cellphone software package being installed through the jar file; Still can show cell phone softwares such as mobile phone games according to new User Defined attribute and property value information, and/or, when reducing to revise the module to be upgraded in the cellphone software package such as mobile phone games bag; The workload of cell phone software developer and the communication each other of cell phone software operator, feasible modification cellphone software package becomes effectively and makes things convenient for.
For achieving the above object, the technical scheme of the embodiment of the invention specifically is achieved in that
A kind of method that on-the-fly modifies cellphone software package comprises: revise attribute and/or property value information in the jad file in the kjava cellphone software package,
Said kjava cellphone software package is: through writing the interface function of module to be upgraded; The place that in the kjava cellphone software package, needs to add said module to be upgraded adds said interface function, the part except that said interface function in the said kjava cellphone software package is obscured packing obtain;
This method also comprises:
When User Defined attribute in on-the-fly modifying the kjava cellphone software package and/or property value information; Jar file in the decompress(ion) kjava cellphone software package; Attribute in the jar file and/or property value information are carried out decryption processing; Revise User Defined attribute and/or property value information in the said jar file, amended attribute and property value information are carried out encryption, amended jar file is packed; Revise the information of describing said jar file in the jad file;
The said kjava cellphone software package of decompress(ion); Find the interface function of module to be upgraded; Realize that with being used for the code of said module to be upgraded adds into said kjava cellphone software package, and the kjava cellphone software package of the code that adds said module to be upgraded is obscured and packed.
A kind of method that on-the-fly modifies cellphone software package comprises: revise attribute and/or property value information in the jad file in the kjava cellphone software package, this method also comprises:
When User Defined attribute in on-the-fly modifying the kjava cellphone software package and/or property value information; Jar file in the decompress(ion) kjava cellphone software package; Attribute in the jar file and/or property value information are carried out decryption processing; Revise User Defined attribute and/or property value information in the said jar file, amended attribute and property value information are carried out encryption, amended jar file is packed; Revise the information of describing said jar file in the jad file.
It is thus clear that the feasible modification of the method cellphone software package that on-the-fly modifies cellphone software package provided by the invention becomes effectively and makes things convenient for, particularly; On the one hand; When revising User Defined attribute and property value information, not only revise User Defined attribute in the jad file and property value information in the kjava cellphone software package, also revise User Defined attribute and property value information in the jar file; Therefore; Even if the kjava cellphone software package is installed through the jar file, it still can show mobile phone games according to new User Defined attribute and property value information, can realize effectively revising cellphone software package; On the other hand, when revising module to be upgraded, because the kjava cellphone software package is through writing the interface function of module to be upgraded; The place that in the kjava cellphone software package, need to add said module to be upgraded adds said interface function, the part except that said interface function in the said kjava cellphone software package is obscured to pack obtaining, and is used to realize that the code of said module to be upgraded is through the said kjava cellphone software package of decompress(ion); Find the interface function of module to be upgraded; And, obscuring packing then and adding the kjava cellphone software package, therefore adding into kjava cellphone software package by interface function; During module to be upgraded in revising the kjava cellphone software package; Only need carry out decompress(ion), find the interface function of module to be upgraded, revise the corresponding code of this interface function the kjava cellphone software package; And amended kjava cellphone software package obscured again and pack get final product; These work can be accomplished alone by the cell phone software operator, and it need provide the interface function of module to be upgraded to the cell phone software developer, in initial development kjava cellphone software package with when revising the kjava cellphone software package in the future; All need not to explain the concrete logic of mobile phone games module to the cell phone software developer; Thereby when having reduced in the modification cellphone software package module to be upgraded, the workload of cell phone software developer and the communication each other of cell phone software operator can realize revising more easily cellphone software package.
Description of drawings
Fig. 1 is that the present invention on-the-fly modifies User Defined attribute and/or the method flow diagram of property value information in the kjava mobile phone games bag.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, to further explain of the present invention.
Be example to on-the-fly modify kjava mobile phone games bag below; Method to on-the-fly modifying the kjava cellphone software package describes; Particularly; Two aspects of User Defined attribute from on-the-fly modify kjava mobile phone games bag and/or property value information and module to be upgraded describe the method that on-the-fly modifies kjava mobile phone games bag.To on-the-fly modifying the method for other kjava mobile phone games bags except that kjava mobile phone games bag, no longer do repeated description.
When User Defined attribute in on-the-fly modifying kjava mobile phone games bag and/or property value information; The present invention proposes; Not only revise User Defined attribute in the jad file and/or property value information in the kjava mobile phone games bag, also revise User Defined attribute and/or property value information in the jar file.
Fig. 1 is that the present invention on-the-fly modifies User Defined attribute and/or the method flow diagram of property value information in the kjava mobile phone games bag, and as shown in Figure 1, this method comprises:
Step 101, the jar file in the decompress(ion) kjava mobile phone games bag.
Step 102 is revised attribute and property value information in the said jar file.
Usually; In User Defined attribute in the jar file and/or the property value information stores mainfest.mf file in the jar file; Therefore, User Defined attribute and/or the property value information revised in the jar file are meant the attribute and the property value information of storing in the mainfest.mf file of revising.
Step 103 is packed to amended jar file.
Step 104 is revised the descriptors such as jar file size in the jad file.
Because the jar file is revised, so the information that is used to describe the jar file in the jad file also will be carried out corresponding modification.
In addition, in order to improve the security of revising the mobile phone games bag, the present invention proposes; Can also be after the attribute and property value information in revising said jar file; Before amended jar file packed, amended attribute and property value information are carried out encryption, correspondingly; Before each attribute of revising in the said jar file and property value information, all said attribute and property value information are carried out decryption processing.
For the method that on-the-fly modifies the module to be upgraded in the kjava mobile phone games bag; The present invention proposes, and when realizing kjava mobile phone games bag, the interface function of module to be upgraded is provided to the mobile phone games developer by the mobile phone games operator; The mobile phone games developer needs to add the place of module to be upgraded in kjava mobile phone games packet; The interface function that adds module to be upgraded is obscured the part except that said interface function in the said kjava mobile phone games bag, and then packing; So far, the mobile phone games developer has realized the exploitation of kjava mobile phone games bags.The mobile phone games operator is according to the concrete realization logic of module to be upgraded; Realize the code of module to be upgraded; The kjava mobile phone games bag realized of decompress(ion) mobile phone games developer then; Find the interface function of module to be upgraded, realize that with being used for the code of said module to be upgraded adds into said kjava mobile phone games bag, and the kjava mobile phone games bag of the code that adds said module to be upgraded is obscured and packed.In the time need making amendment to the concrete realization logic of module to be upgraded; From the kjava mobile phone games bag that adds the code of said module to be upgraded into, search the interface function of module to be upgraded; Revise the corresponding code of this interface function, and amended kjava mobile phone games bag is obscured again and packed.
It is thus clear that the method that on-the-fly modifies the mobile phone games bag provided by the invention can be revised mobile phone games easily and effectively.Particularly; On the one hand, when revising User Defined attribute and property value information, not only revise User Defined attribute in the jad file and property value information in the kjava mobile phone games bag; Also revise User Defined attribute and property value information in the jar file; Therefore, even if kjava mobile phone games bag is installed through the jar file, it still can show mobile phone games according to new User Defined attribute and property value information; On the other hand; When revising module to be upgraded,, find the interface function of module to be upgraded owing to only need carry out decompress(ion) to kjava mobile phone games bag; Revise the corresponding code of this interface function; And amended kjava mobile phone games bag obscured again and pack get final product, these work can be accomplished alone by the mobile phone games operator, and it need provide the interface function of module to be upgraded to the mobile phone games developer; At initial development kjava mobile phone games bag with when revising kjava mobile phone games bag in the future; All need not to explain the concrete logic of mobile phone games module to the mobile phone games developer, thereby when having reduced in the modification mobile phone games bag module to be upgraded, the workload of mobile phone games developer and the communication each other of mobile phone games operator.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention, all any modifications of within spirit of the present invention and principle, being made, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. a method that on-the-fly modifies cellphone software package is characterized in that, this method comprises: revise attribute and/or property value information in the jad file in the kjava cellphone software package,
Said kjava cellphone software package is: through writing the interface function of module to be upgraded; The place that in the kjava cellphone software package, needs to add said module to be upgraded adds said interface function, the part except that said interface function in the said kjava cellphone software package is obscured packing obtain;
When User Defined attribute in on-the-fly modifying the kjava cellphone software package and/or property value information; Jar file in the decompress(ion) kjava cellphone software package; Attribute in the jar file and/or property value information are carried out decryption processing; Revise User Defined attribute and/or property value information in the said jar file, amended attribute and property value information are carried out encryption, amended jar file is packed; Revise the information of describing said jar file in the jad file;
The said kjava cellphone software package of decompress(ion); Find the interface function of module to be upgraded; Realize that with being used for the code of said module to be upgraded adds into said kjava cellphone software package, and the kjava cellphone software package of the code that adds said module to be upgraded is obscured and packed.
2. the method for claim 1 is characterized in that, User Defined attribute and/or the property value information revised in the said jar file comprise:
Revise the attribute and the property value information of storing in the mainfest.mf file in the said jar file.
3. the method for claim 1 is characterized in that, this method further comprises:
From the kjava cellphone software package of adding the code of said module to be upgraded into, search the interface function of module to be upgraded, revise the corresponding code of this interface function, and amended kjava cellphone software package is obscured again and packed.
4. like claim 1 or 2 or 3 described methods, it is characterized in that said module to be upgraded comprises: accounting module and/or login module and/or networking module;
Said accounting module is used for chargeing according to the operating position of said cellphone software package;
Said login module is used to login said cellphone software package;
Said networking module is used to be linked into the internet.
5. method that on-the-fly modifies cellphone software package comprises: revise attribute and/or property value information in the jad file in the kjava cellphone software package, it is characterized in that this method also comprises:
When User Defined attribute in on-the-fly modifying the kjava cellphone software package and/or property value information; Jar file in the decompress(ion) kjava cellphone software package; Attribute in the jar file and/or property value information are carried out decryption processing; Revise User Defined attribute and/or property value information in the said jar file, amended attribute and property value information are carried out encryption, amended jar file is packed; Revise the information of describing said jar file in the jad file.
6. method as claimed in claim 5 is characterized in that, User Defined attribute and/or the property value information revised in the said jar file comprise:
Revise the attribute and the property value information of storing in the mainfest.mf file in the said jar file.
CN2009101263658A 2009-03-05 2009-03-05 Method and apparatus for dynamically modifying mobile phone software package Active CN101510918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101263658A CN101510918B (en) 2009-03-05 2009-03-05 Method and apparatus for dynamically modifying mobile phone software package

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101263658A CN101510918B (en) 2009-03-05 2009-03-05 Method and apparatus for dynamically modifying mobile phone software package

Publications (2)

Publication Number Publication Date
CN101510918A CN101510918A (en) 2009-08-19
CN101510918B true CN101510918B (en) 2012-05-23

Family

ID=41003179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101263658A Active CN101510918B (en) 2009-03-05 2009-03-05 Method and apparatus for dynamically modifying mobile phone software package

Country Status (1)

Country Link
CN (1) CN101510918B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081535B (en) * 2010-12-17 2013-07-31 东莞宇龙通信科技有限公司 Android-based application program upgrading method and system and application development platform
CN103902262A (en) * 2012-12-26 2014-07-02 成都勤智数码科技股份有限公司 Universal method for simplifying jar package based on J2SE client side application program
CN104281815B (en) * 2013-07-05 2017-09-29 中国移动通信集团北京有限公司 The method and system of file encryption-decryption
CN107145351A (en) * 2017-05-02 2017-09-08 山东浪潮通软信息科技有限公司 A kind of method, device, computer-readable recording medium and storage control for changing Digital signature Java bag
CN113867832B (en) * 2021-09-15 2024-04-02 广州云徙科技有限公司 Method, system, computer equipment and medium for dynamically modifying business data logic

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848837A (en) * 2005-04-14 2006-10-18 华为技术有限公司 Method and apparatus for realizing independent staging business software in set-top box
CN101169736A (en) * 2007-12-04 2008-04-30 腾讯科技(深圳)有限公司 Method, device and system for implementing automatic validation of payment during game operation
CN101206575A (en) * 2006-12-19 2008-06-25 大唐移动通信设备有限公司 Software mend on-line upgrade method, veneer and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848837A (en) * 2005-04-14 2006-10-18 华为技术有限公司 Method and apparatus for realizing independent staging business software in set-top box
CN101206575A (en) * 2006-12-19 2008-06-25 大唐移动通信设备有限公司 Software mend on-line upgrade method, veneer and system
CN101169736A (en) * 2007-12-04 2008-04-30 腾讯科技(深圳)有限公司 Method, device and system for implementing automatic validation of payment during game operation

Also Published As

Publication number Publication date
CN101510918A (en) 2009-08-19

Similar Documents

Publication Publication Date Title
US9471288B2 (en) Compile based obfuscation
CN101510918B (en) Method and apparatus for dynamically modifying mobile phone software package
KR102281052B1 (en) Mobile terminal application update method and apparatus
CN107045438B (en) Application top view processing method, device and component
CN107092475B (en) Calling method and device of interactive control
CN110442327B (en) Application program construction method, device and server
CN102622211A (en) Method for application development and device
CN103443763B (en) Comprise to connect the ISA Bridge of the support called rewriteeing virtual function
CN108647032B (en) Application loading method and device, computer device and computer readable storage medium
US20230222014A1 (en) Systems and methods for providing a hybrid mobile application
US9286054B2 (en) Deployment of mobile enterprise application platform
CN105740033A (en) Terminal equipment, plug-in loading and running device and plug-in loading and running method
CN110945475A (en) System and method for providing patchable ROM firmware
CN108762767A (en) Using dissemination method, device and computer readable storage medium
CN107463405A (en) The update method and device of a kind of application program
CN105653351A (en) Method and system for optimizing virtual machines of java cards
CN112181432A (en) System for realizing bundle modular packaging processing in ReactNative framework
CN105511935A (en) Resource index value acquiring method and device
CN112416303B (en) Software development kit hot repair method and device and electronic equipment
CN108170459A (en) Method for upgrading software, intelligent terminal and the device with store function
CN100464300C (en) ARM based binary operation circumstance platform and loading method using the same
CN105550050A (en) Hardware communication method and apparatus
CN107402749A (en) Realize the method and device in picture loading storehouse
CN104751026A (en) Software protection method and software application method of android system, and related devices
CN113791870A (en) Fine-grained migration method and system for distributed system of WebAssembly virtual machine

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant