CN104021320A - Method, device and system for protecting copyrights of APK files - Google Patents

Method, device and system for protecting copyrights of APK files Download PDF

Info

Publication number
CN104021320A
CN104021320A CN201410277365.9A CN201410277365A CN104021320A CN 104021320 A CN104021320 A CN 104021320A CN 201410277365 A CN201410277365 A CN 201410277365A CN 104021320 A CN104021320 A CN 104021320A
Authority
CN
China
Prior art keywords
apk file
file
apk
encrypting
data field
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.)
Pending
Application number
CN201410277365.9A
Other languages
Chinese (zh)
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.)
Fujian TQ Digital Co Ltd
Original Assignee
Fujian TQ Digital 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 Fujian TQ Digital Co Ltd filed Critical Fujian TQ Digital Co Ltd
Priority to CN201410277365.9A priority Critical patent/CN104021320A/en
Publication of CN104021320A publication Critical patent/CN104021320A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The invention discloses a method for protecting copyrights of APK files. The method comprises the steps that a submitting end is used for encrypting central catalogue data areas in the APK files; a user side receives the APK files; the user side decrypts the encrypted central catalogue data areas in the APK files; the user side installs the APK files. Correspondingly, the invention further discloses a system for protecting the copyrights of the APK files, a device for encrypting the APK files and a device for encrypting the APK files. According to the technical scheme, the APK files on special equipment of a manufacturer can be effectively prevented from being led out and installed and used on other equipment, the copyrights of the APK files are protected, and the service provided by the application is further protected.

Description

The methods, devices and systems of protection APK file copyright
Technical field
The present invention relates to the encryption and decryption field of application program, relate more specifically to a kind of methods, devices and systems of the APK of protection file copyright.
Background technology
Current, along with the develop rapidly of electronic technology, from work, study to amusement and recreation, the every aspect of people's daily life is occupied by all kinds of mobile intelligent terminals more and more.Android system is one of system that in current mobile intelligent terminal operating system, market share is relatively leading.
APK is the abbreviation of AndroidPackage, i.e. Android installation kit (apk).APK is the file layout of similar Symbian Sis or Sisx.By APK file directly being passed in Android simulator or Android mobile phone, carry out and can install.Apk file is the same with sis, and the engineering of android sdk compiling is packaged into an installation procedure file, and form is apk.APK file is zip form in fact, but suffix name is modified to apk, after UnZip decompress(ion), can see Dex file, Dex is the abbreviation of DalvikVM executes, i.e. Android Dalvik executive routine, the not bytecode of Java ME but Dalvik bytecode.First Android needs UnZip to separate press operation when a program of operation.
For Android system, some enterprise development is produced Android terminal device especially, and the Android equipment on market is a feast for the eyes, and the competition direction between businessman and businessman is mainly also for hardware aspect.If can provide exclusive service by equipment, the sale of equipment will be promoted greatly.Such as, enterprise develops a Android flat-panel devices for K12 student, cost huge fund is produced or is bought online education resource and makes the ecosphere, enterprise's advantage does not lie in Android flat-panel devices, but online education resource, flat board for student's customization can be used online education resource service specially, will greatly impel student to buy panel computer.Now, if the Android equipment of other manufacturers also can be used online education resource, so the flat board of this enterprise by without any advantage, so enterprise must stop.But current do not have a Copyright Protection that corresponding technical scheme can solve APK formatted file.
Summary of the invention
Based on this, the present inventor provides a kind of method of the APK of protection file copyright, comprises step:
Application submits to end to be encrypted the central directory data field in APK file;
User side receives described APK file;
User side is decrypted the central directory data field in encrypted APK file;
User side is installed described APK file.
Further, in the method for described protection APK file copyright, application submits to end to encrypt behind the central directory data field in APK file, also comprises a step:
Whether at the APK file after encrypting, add for distinguishing is the sign of encrypting APK file;
User side is downloaded after APK file, also comprises a step:
According to described sign, judge whether APK file is encrypt file, and be while encrypting APK file, to decipher the central directory data field in APK file at the described APK file of judgement.
Further, in the method for described protection APK file copyright, distinguish whether whether APK file is that the method for encrypting APK file is specially:
Application submits to the APK file front end of end after encryption to add a default GUID value;
User side first judges that whether described APK file front end is this default GUID value, is if so, decrypted the central directory data field in encrypted APK file after downloading APK file.
Further, in the method for described protection APK file copyright, the central directory data field algorithm used in described encryption APK file is symmetric encipherment algorithm.
Inventor also provides a kind of device of the APK of encryption file, comprises ciphering unit, for the central directory data field to APK file, is encrypted.
Whether further, in the device of described encryption APK file, also comprise identify unit, be the sign of encrypting APK file for add for distinguishing at encrypted APK file;
Whether described interpolation is that the sign of encrypting APK file specifically comprises for distinguishing:
Identify unit adds a default GUID value at the APK file front end after encrypting.
Inventor also provides a kind of device of the APK of deciphering file, comprises application download unit, decryption unit and installation unit;
Described application download unit is used for receiving APK file;
Described decryption unit is for being decrypted the central directory data field of encrypted APK file;
Described installation unit is used for installing described APK file.
Further, in the device of described deciphering APK file, decryption unit is also for judging according to a sign whether APK file is encrypt file, and deciphers the central directory data field in APK file when encrypting APK file at the described APK file of judgement;
A described default GUID value that is designated that APK file front end adds.
Inventor also provides a kind of system of the APK of protection file copyright, comprises application submission end and user side; Described application is submitted to end to comprise and ciphering unit is encrypted for the central directory data field to APK file;
User side comprises application download unit, decryption unit and installation unit;
Described application download unit is used for receiving APK file;
Described decryption unit is for being decrypted the central directory data field of encrypted APK file;
Described installation unit is used for installing described APK file.
Whether further, in the system of described protection APK file copyright, application submits to end also to comprise identify unit, for add for distinguishing at encrypted APK file, be the sign of encrypting APK file; Whether described interpolation is that the sign of encrypting APK file specifically comprises for distinguishing: identify unit adds a default GUID value at the APK file front end after encrypting;
Decryption unit is also for judging that whether described APK file front end is this default GUID value, is if so, decrypted the central directory data field in encrypted APK file.
Technical scheme of the present invention can effectively stop the APK file on manufacturer's task equipment to be exported on other equipment to install and use, the copyright of protection APK file, the service of further protecting this application to provide.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of protecting the method for APK file copyright described in first embodiment of the invention;
Fig. 2 is the module diagram of encrypting the device of APK file described in second embodiment of the invention;
Fig. 3 is the module diagram of deciphering the device of APK file described in third embodiment of the invention;
Fig. 4 is the module diagram of protecting the system of APK file copyright described in four embodiment of the invention.
Description of reference numerals:
End is submitted in 1-application to
2-user side
11-ciphering unit
12-identify unit
21-application download unit
22-decryption unit
23-installation unit
Embodiment
By describing technology contents of the present invention, structural attitude in detail, being realized object and effect, below in conjunction with embodiment and coordinate accompanying drawing to be explained in detail.
Refer to Fig. 1, for protecting the process flow diagram of the method for APK file copyright described in first embodiment of the invention; Described method comprises step:
S1, application submit to end to be encrypted the central directory data field in APK file;
S2, user side receive described APK file;
S3, user side are decrypted the central directory data field in encrypted APK file;
S4, user side are installed described APK file.
Wherein, APK is exactly in fact a common ZIP bag, includes many files and catalogue, and ZIP bag is except preserving file and directory content, also need to preserve the information such as file and directory name, hierarchical structure relation, access file, the place that these information are preserved is called central directory data field.Encryption described in step S1 is encrypted this central directory data field.Just cannot be by common ZIP decompression tool to open through the APK file after encrypting, also cannot be by primary APK resolver resolves, thus on the Android equipment that cannot provide in other manufacturers, install.
Further, in the step S1 of the method for described protection APK file copyright, application submits to end to encrypt behind the central directory data field in APK file, also comprises a step:
Whether at the APK file after encrypting, add for distinguishing is the sign of encrypting APK file;
After step S2 user side is downloaded APK file and before step S3, also comprise a step:
According to described sign, judge whether APK file is encrypt file, and be while encrypting APK file, to decipher the central directory data field in APK file at the described APK file of judgement.
Further, in the method for described protection APK file copyright, distinguish whether whether APK file is that the method for encrypting APK file is specially:
Application submits to the APK file front end of end after encryption to add a default GUID value;
User side first judges that whether described APK file front end is this default GUID value, is if so, decrypted the central directory data field in encrypted APK file after downloading APK file.GUID is a kind of Globally Unique Identifier, and length is 16 bytes, and different files exist the possibility of 2 identical GUID values very little, therefore can play and differentiate and mark action.
Further, in the method for described protection APK file copyright, the central directory data field algorithm used of encrypting in APK file described in step S1 is symmetric encipherment algorithm AES.In other embodiments, also can take other can meet the cryptographic algorithm of safety requirements.
Thus, the Android system equipment that encrypted APK file only can You Ben manufacturer provides is resolved and is installed, the Android system equipment providing for Fei Ben manufacturer Here it is the file that cannot resolve installation through encryption, this has just fully ensured the copyright of APK file.
Refer to Fig. 2, for encrypting the module diagram of the device of APK file described in second embodiment of the invention; Described device comprises ciphering unit 11, for the central directory data field to APK file, is encrypted.
Wherein, APK is exactly in fact a common ZIP bag, includes many files and catalogue, and ZIP bag is except preserving file and directory content, also need to preserve the information such as file and directory name, hierarchical structure relation, access file, the place that these information are preserved is called central directory data field.The encrypted work that ciphering unit 11 carries out is encrypted this central directory data field.Just cannot be by common ZIP decompression tool to open through the APK file after encrypting, also cannot be by primary APK resolver resolves, thus on the Android equipment that cannot provide in other manufacturers, install.
Whether further, in the device of described encryption APK file, also comprise identify unit 12, be the sign of encrypting APK file for add for distinguishing at encrypted APK file;
Whether described interpolation is that the sign of encrypting APK file specifically comprises for distinguishing:
Identify unit 12 adds a default GUID value at the APK file front end after encrypting.
Thus, the Android system equipment that encrypted APK file only can You Ben manufacturer provides is resolved and is installed, the Android system equipment providing for Fei Ben manufacturer Here it is the file that cannot resolve installation through encryption, this has just fully ensured the copyright of APK file.
Refer to Fig. 3, for deciphering the module diagram of the device of APK file described in third embodiment of the invention; Described device comprises application download unit 21, decryption unit 22 and installation unit 23;
Described application download unit 21 is for receiving APK file;
Described decryption unit 22 is decrypted for the central directory data field to encrypted APK file;
Described installation unit 23 is for installing described APK file.
Further, in the device of described deciphering APK file, decryption unit 22 is also for judging according to a sign whether APK file is encrypt file, and deciphers the central directory data field in APK file when encrypting APK file at the described APK file of judgement;
A described default GUID value that is designated that APK file front end adds.
Because APK is exactly in fact a common ZIP bag, include many files and catalogue, ZIP bag, except preserving file and directory content, also needs to preserve the information such as file and directory name, hierarchical structure relation, access file, and the place that these information are preserved is called central directory data field.The received APK file of device of described deciphering APK file may be the file of central directory data field after encrypted, APK file after encrypting just cannot be by common ZIP decompression tool to open, also cannot be by primary APK resolver resolves, thereby on the Android equipment that cannot provide in other manufacturers, install, and can only on the Android equipment that is equipped with the device of deciphering APK file described in present embodiment, install.
After application download unit 21 is downloaded APK file, first decryption unit 22 judges that whether described APK file front end is this default GUID value, is if so, decrypted the central directory data field in encrypted APK file.GUID is a kind of Globally Unique Identifier, and length is 16 bytes, and different files exist the possibility of 2 identical GUID values very little, therefore can play and differentiate and mark action.
Refer to Fig. 4, for protecting the module diagram of the system of APK file copyright described in four embodiment of the invention.Described system comprises application submission end 1 and user side 2; Described application submits to end 1 to comprise ciphering unit 11, for the central directory data field to APK file, is encrypted;
User side 2 comprises application download unit 21, decryption unit 22 and installation unit 23;
Described application download unit 21 is for receiving APK file;
Described decryption unit 22 is decrypted for the central directory data field to encrypted APK file;
Described installation unit 23 is for installing described APK file.
Whether further, in the system of described protection APK file copyright, application submits to end 1 also to comprise identify unit 12, for add for distinguishing at encrypted APK file, be the sign of encrypting APK file; Whether described interpolation is that the sign of encrypting APK file specifically comprises for distinguishing: identify unit 12 adds a default GUID value at the APK file front end after encrypting;
Decryption unit 22 is also for judging that whether described APK file front end is this default GUID value, is if so, decrypted the central directory data field in encrypted APK file.
Wherein, APK is exactly in fact a common ZIP bag, includes many files and catalogue, and ZIP bag is except preserving file and directory content, also need to preserve the information such as file and directory name, hierarchical structure relation, access file, the place that these information are preserved is called central directory data field.The encrypted work that ciphering unit 11 carries out is encrypted this central directory data field.APK file after encrypting just cannot be by common ZIP decompression tool to open, also cannot be by primary APK resolver resolves, thereby on the Android equipment that cannot provide in other manufacturers, install, and only can by thering is the decryption unit 22 of decipher function, install at user side described in native system.
After application download unit 21 is downloaded APK file, first decryption unit 22 judges that whether described APK file front end is this default GUID value, is if so, decrypted the central directory data field in encrypted APK file.GUID is a kind of Globally Unique Identifier, and length is 16 bytes, and different files exist the possibility of 2 identical GUID values very little, therefore can play and differentiate and mark action.
The foregoing is only embodiments of the invention; not thereby limit scope of patent protection of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. a method of protecting APK file copyright, comprises step:
Application submits to end to be encrypted the central directory data field in APK file;
User side receives described APK file;
User side is decrypted the central directory data field in encrypted APK file;
User side is installed described APK file.
2. in the method for protection APK file copyright as claimed in claim 1, application submits to end to encrypt behind the central directory data field in APK file, also comprises a step:
Whether at the APK file after encrypting, add for distinguishing is the sign of encrypting APK file;
User side is downloaded after APK file, also comprises a step:
According to described sign, judge whether APK file is encrypt file, and be while encrypting APK file, to decipher the central directory data field in APK file at the described APK file of judgement.
3. in the method for protection APK file copyright as claimed in claim 1 or 2, distinguish whether whether APK file is that the method for encrypting APK file is specially:
Application submits to the APK file front end of end after encryption to add a default GUID value;
User side first judges that whether described APK file front end is this default GUID value, is if so, decrypted the central directory data field in encrypted APK file after downloading APK file.
4. in the method for protection APK file copyright as claimed in claim 1 or 2, the central directory data field algorithm used in described encryption APK file is symmetric encipherment algorithm.
5. a device of encrypting APK file, comprises ciphering unit, for the central directory data field to APK file, is encrypted.
6. whether in the device of encryption APK file as claimed in claim 5, also comprise identify unit, be the sign of encrypting APK file for add for distinguishing at encrypted APK file;
Whether described interpolation is that the sign of encrypting APK file specifically comprises for distinguishing:
Identify unit adds a default GUID value at the APK file front end after encrypting.
7. decipher a device for APK file, comprise application download unit, decryption unit and installation unit;
Described application download unit is used for receiving APK file;
Described decryption unit is for being decrypted the central directory data field of encrypted APK file;
Described installation unit is used for installing described APK file.
8. in the device of deciphering as claimed in claim 7 APK file, decryption unit is also for judge according to a sign whether APK file is encrypt file, and deciphers the central directory data field in APK file during for encryption APK file at the described APK file of judgement;
A described default GUID value that is designated that APK file front end adds.
9. protect a system for APK file copyright, comprise application submission end and user side; Described application is submitted to end to comprise and ciphering unit is encrypted for the central directory data field to APK file;
User side comprises application download unit, decryption unit and installation unit;
Described application download unit is used for receiving APK file;
Described decryption unit is for being decrypted the central directory data field of encrypted APK file;
Described installation unit is used for installing described APK file.
10. whether in the system of protection APK file copyright as claimed in claim 9, application submits to end also to comprise identify unit, for add for distinguishing at encrypted APK file, be the sign of encrypting APK file; Whether described interpolation is that the sign of encrypting APK file specifically comprises for distinguishing: identify unit adds a default GUID value at the APK file front end after encrypting;
Decryption unit is also for judging that whether described APK file front end is this default GUID value, is if so, decrypted the central directory data field in encrypted APK file.
CN201410277365.9A 2014-06-20 2014-06-20 Method, device and system for protecting copyrights of APK files Pending CN104021320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410277365.9A CN104021320A (en) 2014-06-20 2014-06-20 Method, device and system for protecting copyrights of APK files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410277365.9A CN104021320A (en) 2014-06-20 2014-06-20 Method, device and system for protecting copyrights of APK files

Publications (1)

Publication Number Publication Date
CN104021320A true CN104021320A (en) 2014-09-03

Family

ID=51438070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410277365.9A Pending CN104021320A (en) 2014-06-20 2014-06-20 Method, device and system for protecting copyrights of APK files

Country Status (1)

Country Link
CN (1) CN104021320A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768662A (en) * 2018-05-30 2018-11-06 格尔软件股份有限公司 A method of self-defined signature is increased to Android APK
CN110769008A (en) * 2019-11-05 2020-02-07 长沙豆芽文化科技有限公司 Data security protection method and device and service equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694394A (en) * 2005-04-14 2005-11-09 上海交通大学 Deciphering method for file password
CN102006302A (en) * 2010-12-03 2011-04-06 中国软件与技术服务股份有限公司 Method for identifying security classification of electronic file
CN102087605A (en) * 2011-01-28 2011-06-08 宇龙计算机通信科技(深圳)有限公司 Android-based platform application installation control method and system
CN103235906A (en) * 2013-03-27 2013-08-07 广东欧珀移动通信有限公司 Method and device for encrypting and decrypting application program
CN103605930A (en) * 2013-11-27 2014-02-26 湖北民族学院 Double file anti-divulging method and system based on HOOK and filtering driving
CN103745141A (en) * 2013-12-02 2014-04-23 上海斐讯数据通信技术有限公司 Method for preventing application program in intelligent terminal android system from being decompiled

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694394A (en) * 2005-04-14 2005-11-09 上海交通大学 Deciphering method for file password
CN102006302A (en) * 2010-12-03 2011-04-06 中国软件与技术服务股份有限公司 Method for identifying security classification of electronic file
CN102087605A (en) * 2011-01-28 2011-06-08 宇龙计算机通信科技(深圳)有限公司 Android-based platform application installation control method and system
CN103235906A (en) * 2013-03-27 2013-08-07 广东欧珀移动通信有限公司 Method and device for encrypting and decrypting application program
CN103605930A (en) * 2013-11-27 2014-02-26 湖北民族学院 Double file anti-divulging method and system based on HOOK and filtering driving
CN103745141A (en) * 2013-12-02 2014-04-23 上海斐讯数据通信技术有限公司 Method for preventing application program in intelligent terminal android system from being decompiled

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIANGHONGGE: "zip格式分析", 《URL:HTTP://BLOG.CSDN.NET/LIANGHONGGE/ARTICLE/DETAILS/6990204》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768662A (en) * 2018-05-30 2018-11-06 格尔软件股份有限公司 A method of self-defined signature is increased to Android APK
CN108768662B (en) * 2018-05-30 2021-05-07 格尔软件股份有限公司 Method for adding custom signature to Android APK
CN110769008A (en) * 2019-11-05 2020-02-07 长沙豆芽文化科技有限公司 Data security protection method and device and service equipment

Similar Documents

Publication Publication Date Title
CN105683990B (en) Method and apparatus for protecting dynamic base
CN104680039B (en) A kind of data guard method and device of application program installation kit
CN104866739A (en) Application program encryption method and application program encryption system in Android system
CN106415491B (en) Application protection method, server and terminal
CN108399319B (en) Source code protection method, application server and computer readable storage medium
EP3126973A1 (en) Method, apparatus, and computer-readable medium for obfuscating execution of application on virtual machine
CN104486355A (en) Method and device for preventing malicious manipulation of codes
CN108418893A (en) A kind of method of smart machine firmware safety upgrade
US8571210B2 (en) Content protection apparatus and method using binding of additional information to encryption key
GB2507749A (en) Ensuring completeness of a displayed web page
CN108133147B (en) Method and device for protecting executable code and readable storage medium
US9292708B2 (en) Protection of interpreted source code in virtual appliances
WO2022078366A1 (en) Application protection method and apparatus, device and medium
CN107257282B (en) Code full-package encryption method based on RC4 algorithm
CN105574441A (en) Embedded firmware protection method and device
CN104021320A (en) Method, device and system for protecting copyrights of APK files
CN102831357B (en) Encryption and authentication protection method and system of secondary development embedded type application program
CN109992974B (en) Method and device for protecting byte code file of virtual machine and readable storage medium
CN104657635A (en) Application processing method, device and server
CN112966227A (en) Code encryption and decryption method and device and storage medium
CN115964681A (en) Generation method of certificate file of target application program
CN110704814B (en) Anti-copy method and device, and storage medium
CN108563953B (en) Safe and extensible trusted application development method
CN104090772A (en) Method and device for generating android package (APK)
US20190199694A1 (en) Individual encryption of control commands

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140903