CN102402449A - Method for directly analyzing Android package (APK) file information of Android installation file on computer - Google Patents

Method for directly analyzing Android package (APK) file information of Android installation file on computer Download PDF

Info

Publication number
CN102402449A
CN102402449A CN2011104545507A CN201110454550A CN102402449A CN 102402449 A CN102402449 A CN 102402449A CN 2011104545507 A CN2011104545507 A CN 2011104545507A CN 201110454550 A CN201110454550 A CN 201110454550A CN 102402449 A CN102402449 A CN 102402449A
Authority
CN
China
Prior art keywords
file
apk
information
software
computer
Prior art date
Application number
CN2011104545507A
Other languages
Chinese (zh)
Inventor
蔡罗成
闵波
Original Assignee
成都三零瑞通移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都三零瑞通移动通信有限公司 filed Critical 成都三零瑞通移动通信有限公司
Priority to CN2011104545507A priority Critical patent/CN102402449A/en
Publication of CN102402449A publication Critical patent/CN102402449A/en

Links

Abstract

The invention discloses a method for directly analyzing the Android package (APK) file information of an Android installation file on a computer. The method comprises the following steps of: analyzing the software information of an APK file; and analyzing the identification information of a manufacturer. In the step of analyzing the software information of the APK file, the APK file is decompressed in a Zip mode, an Android Manifest.xml file which is acquired by decompression is subjected to inverse operation, and an original extensible markup language (XML) file which is obtained by inverse operation is analyzed. In the step of analyzing the identification information of the manufacturer, the APK file is read in a JarFile mode, all elements are traversed from META-INF, and each element is operated in a JarEntry mode to acquire a digital certificate of the element. By the method, the APK file is directly analyzed on the computer, so the method is easy to operate, the operation capacity of the computer is fully utilized, batched and concurrent analysis of the APK file information can be realized, and the analysis computation efficiency of data information is greatly improved.

Description

一种在计算机上直接解析Android安装文件APK文件信息 A direct installation file parsing Android APK file information on your computer

的方法 Methods

技术领域 FIELD

[0001] 本发明涉及一种在计算机上直接解析Android安装文件APK文件信息的方法。 [0001] The present invention relates to a method for the installation file parsing Android APK file information directly on the computer. 背景技术 Background technique

[0002] 目前智能手机、平板电脑等移动设备已较为普及,由于智能移动设备装备有通用操作系统,且一般均具有较强的运算、存储能力,因此用户在使用智能移动设备时均会根据需要自行安装较多的软件。 [0002] current smart phones, tablet PCs and other mobile devices have become more popular because of smart mobile devices equipped with a general-purpose operating system, and generally has a strong computing, storage capacity, so users in the use of smart mobile devices will if necessary self-install more software.

[0003] 在目前的移动设备操作系统中,Android的市场占有率位列前茅。 [0003] In the current mobile operating system, Android's market share in the forefront. 目前有较多的Android软件市场来提供软件发布、安装服务,包括Android操作系统开发商、各大手机/平板电脑提供商,还包括软件开发商、甚至论坛等均可提供软件下载及安装。 There are more Android software market to provide software distribution, installation services, including Android operating system developers, the major mobile phone / tablet PC provider, also includes software developers, and even forums can provide software to download and install. 因此Android移动设备的软件来源较为复杂,软件质量参差不齐,用户所安装的软件可能为病毒、窃听程序等恶意软件,从而导致用户数据的非法泄露。 Therefore, software source Android mobile devices is more complex, uneven quality software, software users have installed may be viruses, eavesdropping and other malicious software programs, leading to illegal disclosure of user data. 因此出现了较多的Android下软件安全检测方法,在这些检测方法中,均需解决一个共同的问题:如何对已知的软件进行特征值计算, 以供检测时进行匹配对比。 So there are more Android security software detection methods, the detection of these methods, are required to solve a common problem: how to characterize the value of the known software calculations for matching contrast detection. 软件特征值的计算步骤为:(1)获取软件自身信息(如程序名、 版本号、操作权限)和厂家标识等数据;(2)依据不同的需求对它们进行组合、计算;(3)形成该软件的特征值。 The step of calculating software feature values ​​is: (1) obtaining software own information (e.g., program name, version number, operating authority) and manufacturer identification and other data; (2) according to different needs of combining them is calculated; (3) is formed wherein the value of the software. 其关键技术即在于获取软件程序名、版本号、操作权限和厂家标识等信肩、ο That is the key technology is to obtain software program name, version number, operating authority, and manufacturers such as letter identification shoulder, ο

[0004] 传统的Android安装文件APK文件信息的解析需要Android等移动设备的参与, 借助移动设备获取安装包APK文件的信息,这种方法的操作方式较为不便;另外,移动设备的运算能力较弱,数据信息的解析效率较低。 Involved in [0004] conventional analytical Android installation files APK file information requires Android mobile devices such as, for installation by the mobile device APK package information file, the operation of such a method is inconvenient; In addition, the mobile device computing power is weak low resolution efficiency data information.

发明内容 SUMMARY

[0005] 本发明的目的在于解决现有Android安装文件APK文件信息解析方法的不足,提供一种新型的在计算机上直接解析Android安装文件APK文件信息的方法,克服传统方法需要Android等移动设备的参与,借助移动设备获取安装包APK文件的信息,操作不便且移动设备运算能力弱、数据解析效率低等缺点。 [0005] The object of the present invention is to solve shortcomings of the prior installation files Android APK file information analysis method, to provide a novel method of installation file parsing Android APK file information directly on the computer, to overcome the conventional method requires a mobile device such as Android participating, by the mobile device acquires information APK installation package file, and maneuver the mobile device computing capability is weak, low efficiency data analysis.

[0006] 本发明的目的是通过以下技术方案来实现的:一种在计算机上直接解析Android 安装文件APK文件信息的方法,它包括一个APK文件软件自身信息解析步骤和一个APK文件软件厂家标识信息解析步骤; [0006] The object of the present invention is achieved by the following technical solution: A method for parsing Android installation files APK file information directly on the computer, comprising a software APK own information file analyzing step, and a manufacturer identification information of the software file APK parsing step;

所述的APK文件软件自身信息解析步骤包括以下步骤: The software itself APK file information analyzing step comprises the steps of:

A、在计算机上以ZIP方式对APK文件进行解压; A, on a computer to decompress ZIP manner APK file;

B、对解压获取的AndroidManifest. xml文件进行逆运算,获得原始XML文件; . B, to extract the acquired AndroidManifest xml file inverse operation to obtain the original XML file;

C、解析该原始XML文件,获取APK文件软件的程序名、软件版本号和操作权限信息; 所述的APK文件软件厂家标识信息解析步骤包括以下步骤: C, parse the raw XML file, the software program obtain APK file name, software version number and operating authority information; APK file of the software manufacturer identification information analyzing step comprises the steps of:

(1)以JarFile方式读取APK文件;(2)遍历以“META-INF”开始的所有元素; (1) reads APK file JarFile; (2) through all elements are "META-INF" start;

(3)对每个元素均以JarEntry方式进行操作,获取各元素中的数字证书。 (3) operate on each element are JarEntry manner, obtain a digital certificate of each element.

[0007] 本发明的有益效果是:无需借助Android设备,直接在计算机上解析Android安装文件AH(文件,操作简便且可靠性强;充分利用了计算机的运算能力,可实现批量化、并发式的APK文件信息解析,大大提高了数据信息的解析计算效率。 [0007] Advantageous effects of the present invention is that: without using Android, parses the AH Android installation files (files, high reliability and easy operation directly on the computer; full use of the computing power of the computer can achieve mass, the concurrent APK file information analysis, greatly improving the efficiency of analytical calculation of data information.

附图说明 BRIEF DESCRIPTION

[0008] 图1为本发明APK文件软件自身信息解析步骤流程图; 图2为本发明APK文件软件厂家标识信息解析步骤流程图。 APK own information file analyzing step flowchart software [0008] Figure 1 of the present invention; FIG. 2 APK file software manufacturer identification information analyzing step of the flowchart of the present invention.

具体实施方式 Detailed ways

[0009] 下面结合附图进一步描述本发明的技术方案:一种在计算机上直接解析Android 安装文件APK文件信息的方法,它包括一个APK文件软件自身信息解析步骤和一个APK文件软件厂家标识信息解析步骤; An analytic method for the installation files Android APK file information directly on the computer, comprising a software APK own information file analyzing step, and a manufacturer identification APK file information analysis software: [0009] drawings is further described below in connection with the present invention step;

如图1所示,所述的AH(文件软件自身信息解析步骤包括以下步骤: As shown, according to the AH (own software file information analyzing step comprises the steps of 1:

A、在计算机上以ZIP方式对APK文件进行解压; A, on a computer to decompress ZIP manner APK file;

B、对解压获取的AndroidManifest. xml文件进行逆运算,获得原始XML文件; . B, to extract the acquired AndroidManifest xml file inverse operation to obtain the original XML file;

C、解析该原始XML文件,获取APK文件软件的程序名、软件版本号和操作权限等信息; APK文件的软件厂家标识信息位于META-INF目录下,如图2所示,所述的APK文件软件 C information, to parse the raw XML file, the software program obtain APK file name, software version number and operating permissions; software manufacturers APK file identification information located in the META-INF directory, shown in Figure 2, the APK file software

厂家标识信息解析步骤包括以下步骤: Manufacturer identification information analyzing step comprises the steps of:

(1)以JarFile方式读取APK文件; (1) reads JarFile APK file;

(2)遍历以“META-INF”开始的所有元素; (2) through all the elements in order to "META-INF" begins;

(3)对每个元素均以JarEntry方式进行操作,获取各元素中的数字证书。 (3) operate on each element are JarEntry manner, obtain a digital certificate of each element.

[0010] 获取上述软件程序名、版本号、操作权限和厂家标识等数据后,根据不同的需要进行组合、计算等,即获得了该软件的特征值。 [0010] After obtaining the above-described software program name, version number, and the operating authority identification data such as the manufacturer, be combined according to different needs, calculation, i.e., to obtain the characteristic value of the software.

4 4

Claims (1)

1. 一种在计算机上直接解析Android安装文件AH(文件信息的方法,其特征在于:它包括一个APK文件软件自身信息解析步骤和一个APK文件软件厂家标识信息解析步骤; 所述的APK文件软件自身信息解析步骤包括以下步骤:A、在计算机上以ZIP方式对APK文件进行解压;B、对解压获取的AndroidManifest. xml文件进行逆运算,获得原始XML文件;C、解析该原始XML文件,获取APK文件软件的程序名、软件版本号和操作权限信息; 所述的APK文件软件厂家标识信息解析步骤包括以下步骤:(1)以JarFile方式读取APK文件;(2)遍历以“META-INF”开始的所有元素;(3)对每个元素均以JarEntry方式进行操作,获取各元素中的数字证书。 CLAIMS 1. A computer-resolved on the AH method Android installation files (file information, characterized in that: it comprises a software APK own information file analyzing step, and a software manufacturer APK file identification information analyzing step; APK file of the software own information analyzing step comprises the steps of: a, in ZIP manner decompress APK file on the computer; B, to extract the acquired AndroidManifest xml file inverse operation to obtain the original XML document; C, to parse the raw XML file, acquired. APK file name of the software program, the software version number and operating authority information; APK file of the software manufacturer identification information analyzing step comprises the steps of: (1) reads JarFile APK files; (2) traversed to "META-INF "All the elements starting; (3) operate on each element are JarEntry manner, obtain a digital certificate of each element.
CN2011104545507A 2011-12-30 2011-12-30 Method for directly analyzing Android package (APK) file information of Android installation file on computer CN102402449A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011104545507A CN102402449A (en) 2011-12-30 2011-12-30 Method for directly analyzing Android package (APK) file information of Android installation file on computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011104545507A CN102402449A (en) 2011-12-30 2011-12-30 Method for directly analyzing Android package (APK) file information of Android installation file on computer

Publications (1)

Publication Number Publication Date
CN102402449A true CN102402449A (en) 2012-04-04

Family

ID=45884682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011104545507A CN102402449A (en) 2011-12-30 2011-12-30 Method for directly analyzing Android package (APK) file information of Android installation file on computer

Country Status (1)

Country Link
CN (1) CN102402449A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831338A (en) * 2012-06-28 2012-12-19 北京奇虎科技有限公司 Security detection method and system of Android application program
CN102831210A (en) * 2012-08-14 2012-12-19 深圳市宜搜科技发展有限公司 Information extraction method and system for resources
CN104063306A (en) * 2013-03-18 2014-09-24 腾讯科技(深圳)有限公司 Automatic login method, device and system in intelligent terminal software testing
CN104462971A (en) * 2014-12-17 2015-03-25 北京奇虎科技有限公司 Malicious application program recognition method and device according to application program declaration characteristics
CN105009139A (en) * 2013-03-15 2015-10-28 迈克菲股份有限公司 Generic unpacking of applications for malware detection
US10311233B2 (en) 2013-12-26 2019-06-04 Mcafee, Llc Generic unpacking of program binaries

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216771A (en) * 2007-12-29 2008-07-09 宇龙计算机通信科技(深圳)有限公司 Method, system and device for accomplishing mobile phones software upgrading through personal computer
CN102054038A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 File decompression method and device as well as mobile terminal
CN102087605A (en) * 2011-01-28 2011-06-08 宇龙计算机通信科技(深圳)有限公司 Android-based platform application installation control method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216771A (en) * 2007-12-29 2008-07-09 宇龙计算机通信科技(深圳)有限公司 Method, system and device for accomplishing mobile phones software upgrading through personal computer
CN102054038A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 File decompression method and device as well as mobile terminal
CN102087605A (en) * 2011-01-28 2011-06-08 宇龙计算机通信科技(深圳)有限公司 Android-based platform application installation control method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
《360doc个人图书馆》 20110706 CevenCheng Java解压缩APK并重新局部替换文件后打包 第2-4页 1 , *
CEVENCHENG: "Java解压缩APK并重新局部替换文件后打包", 《360DOC个人图书馆》, 6 July 2011 (2011-07-06), pages 2 - 4 *
杨勇义等: "基于Android平台的软件保护技术研究", 《中国科技论文在线》, 4 June 2012 (2012-06-04), pages 1 - 8 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831338A (en) * 2012-06-28 2012-12-19 北京奇虎科技有限公司 Security detection method and system of Android application program
CN102831338B (en) * 2012-06-28 2015-09-30 北京奇虎科技有限公司 A kind of safety detection method of Android application program and system
CN102831210A (en) * 2012-08-14 2012-12-19 深圳市宜搜科技发展有限公司 Information extraction method and system for resources
CN105009139B (en) * 2013-03-15 2018-02-06 迈克菲股份有限公司 For being unpacked to the general of application for malware detection
CN105009139A (en) * 2013-03-15 2015-10-28 迈克菲股份有限公司 Generic unpacking of applications for malware detection
US9811663B2 (en) 2013-03-15 2017-11-07 Mcafee, Inc. Generic unpacking of applications for malware detection
CN104063306B (en) * 2013-03-18 2017-12-01 腾讯科技(深圳)有限公司 Automatic logging method, device and system in intelligent terminal software test
CN104063306A (en) * 2013-03-18 2014-09-24 腾讯科技(深圳)有限公司 Automatic login method, device and system in intelligent terminal software testing
US10311233B2 (en) 2013-12-26 2019-06-04 Mcafee, Llc Generic unpacking of program binaries
CN104462971A (en) * 2014-12-17 2015-03-25 北京奇虎科技有限公司 Malicious application program recognition method and device according to application program declaration characteristics

Similar Documents

Publication Publication Date Title
Au et al. Pscout: analyzing the android permission specification
Bläsing et al. An android application sandbox system for suspicious software detection
US7359884B2 (en) Method and apparatus for processing usage rights expressions
US9438631B2 (en) Off-device anti-malware protection for mobile devices
Faruki et al. Android security: a survey of issues, malware penetration, and defenses
Viennot et al. A measurement study of google play
CN102831338B (en) A kind of safety detection method of Android application program and system
US20160210458A1 (en) Quantifying the risks of applications for mobile devices
Liu et al. Software abstractions for trusted sensors
US8671452B2 (en) Apparatus and method for moving rights object from one device to another device via server
Garriss et al. Trustworthy and personalized computing on public kiosks
US20090257595A1 (en) Single Security Model In Booting A Computing Device
US20120090021A1 (en) Platform Specific Application Building
US20030229593A1 (en) Rights expression profile system and method
US20130074158A1 (en) Method and apparatus for domain-based data security
Vidas et al. Toward a general collection methodology for Android devices
US20120317561A1 (en) Automatic recognition of web application
US8683610B2 (en) Method and apparatus for managing digital rights of secure removable media
JP2011138497A (en) Automated security control using encoded security information
Barmpatsalou et al. A critical review of 7 years of Mobile Device Forensics
CN101436141B (en) Firmware upgrading and encapsulating method and device based on digital signing
CN102135992A (en) Terminal application program classifying method and terminal
WO2011146785A1 (en) Electronic license management
US9747425B2 (en) Method and system for restricting execution of virtual application to a managed process environment
JP5540160B2 (en) Program analysis / verification service providing system, control method thereof, control program, control program for causing computer to function, program analysis / verification device, program analysis / verification tool management device

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)