一种apk文件加固的方法

APK file strengthening method

  • Inventors: LIU PENG
  • Assignees: 刘鹏
  • Publication Date: March 25, 2015
  • Publication Number: CN-104462883-A

Abstract

The invention discloses an APK file strengthening method. The APK file strengthening method comprises the steps that a source code of an APK file needing to be strengthened is divided into a first source code serving as a body part and a second source code serving as a core function part; the first source code and the second source code are coded into a first APK file and a second APK file respectively; the first APK file is decompressed, and a first classes.dex file in the first APK file is extracted; encryption processing is conducted on the second APK file, and statistics is conducted on the file length information of the encrypted second APK file; the encrypted second APK file and the file length information of the second APK file are added to the tail part of the first classes.dex file; file head information in the first classes.dex file is recalculated and updated, the first APK file is signed through a signing tool provided in an Android SDK, and the strengthened APK file is obtained. By means of the APK file strengthening method, decompilation of an existing Android reverse tool can be avoided, the difficulty of decompilation is increased, and thus the safety of the APK file can be improved to a great degree.
本发明公开一种APK文件加固的方法,其包括步骤:将需要加固的APK文件的源代码分成作为主体部分的第一源代码及作为核心功能部分的第二源代码;将第一源代码、第二源代码分别编译成第一APK文件及第二APK文件;解压第一APK文件,提取第一APK文件中的第一classes.dex文件;对第二APK文件进行加密处理,统计加密后第二APK文件的文件长度信息;将加密后的第二APK文件及其文件长度信息添加在第一classes.dex文件的尾部;重新计算并更新第一classes.dex文件中文件头信息,将使用Android SDK中提供的签名工具对第一APK文件进行签名,即得到加固处理后的APK文件。本发明可以规避现有Android逆向工具的反编译,增加反编译的难度,从而可以极大程度地提高APK文件的安全性。

Claims

Description

Topics

Download Full PDF Version (Non-Commercial Use)

Patent Citations (3)

    Publication numberPublication dateAssigneeTitle
    CN-102236757-ANovember 09, 2011北京邮电大学Software protection method and system applicable to Android system
    CN-104111832-AOctober 22, 2014北京思特奇信息技术股份有限公司Android application program installation package packing method and system and unpacking method
    KR-101284676-B1August 23, 2013건국대학교 산학협력단Cryptography-based copy protection system and method for android apps

NO-Patent Citations (0)

    Title

Cited By (2)

    Publication numberPublication dateAssigneeTitle
    CN-105426708-AMarch 23, 2016北京鼎源科技有限公司Reinforcing method of application program of Android system
    CN-105512521-AApril 20, 2016北京奇虎科技有限公司, 奇智软件(北京)有限公司Reinforcement and protection method and system for software installation package