How to use the signature tool to parse the apk, view the apk signature and basic information, the introduction of AndroidManifest.xml

How to view apk signature

After starting and running with appium, select this apk and check the running log, you can find the signature information of analytic apk data

[ADB] Starting 'D:\Program Files (x86)\Android\android-sdk\build-tools\29.0.3\apksigner.bat' with args '["verify","--print-certs","C:\\Users\\huxuejing\\AppData\\Local\\Programs\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-v1.18.0.apk"]'
[ADB] apksigner stdout: Signer #1 certificate DN: [email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US

View package name, activity

View the package name on one line of command to display Apk information.

aapt dump badging [xxx.apk]

How to parse apk

Use tool: jadx-1.0.0
Insert picture description hereInsert picture description here

Insert picture description here

How to view or verify the basic information of apk

After the apk is decompressed or parsed, find the AndroidManifest.xml file and open it to view the
package name:
Insert picture description here
version number:
Insert picture description here
targetSdkVersion:
Insert picture description here

MD5 signature:

CN 名称(名字与姓),OU 组织单位名称 ,O =组织名称  L 城市, ST=省份   C=国家

You can use keytool to generate certificates
Insert picture description here

Introduction to AndroidManifest.xml

Shows the general structure of the manifest file and the elements it can contain

<?xml version="1.0" encoding="utf-8"?> 
<manifest>  //根节点,描述了package中所有的内容 
    <uses-permission /> //请求你的package正常运作所需赋予的安全许可。一个manifest能包含零个或更多此元素 
    <permission />  //声明了安全许可来限制哪些程序能使用你的package中的组件和功能。一个manifest能包含零个或更多此元素 
    <permission-tree />  
    <permission-group /> 
    <instrumentation />  //声明了用来测试此package或其他package指令组件的代码。一个manifest能包含零个或更多此元素 
    <uses-sdk />  //指定当前应用程序兼容的最低sdk版本号 
    <application>  //包含package中application级别组件声明的根节点。此元素也可包含application中全局和默认的属性,如标签,icon,主 题,必要的权限,等等。一个manifest能包含零个或一个此元素(不允许多余一个) 
        <activity>  //用来与用户交互的主要工具。当用户打开一个应用程序的初始页面时一个activity,大部分被使用到的其他页面也由不同的activity所实现并声明在另外的activity标记中。 
            <intent-filter>  //声明了指定的一组组件支持的Intent值 
                <action /> 
                <category /> 
                <data /> 
                    <type/> 
                    <schema/> 
                    <authority/> 
                    <path/> 
            </intent-filter> 
            <meta-data /> 
        </activity> 
        <activity-alias> 
            <intent-filter> . . . </intent-filter> 
            <meta-data /> 
        </activity-alias> 
        <service>  //Service是能在后台运行任意时间的组件 
            <intent-filter> . . . </intent-filter> 
            <meta-data/> 
        </service> 
        <receiver>   //IntentReceiver能使你的application获得数据的改变或者发生的操作,即使它当前不在运行 
            <intent-filter> . . . </intent-filter> 
            <meta-data /> 
        </receiver> 
        <provider>  //ContentProvider是用来管理持久化数据并发布给其他应用程序使用的组件 
            <grant-uri-permission /> 
            <meta-data /> 
        </provider> 
        <uses-library /> 
        <uses-configuration />   
    </application> 
</manifest>

<uses-permission 含有系统权限和自定义权限

<permission 一般是自定义权限

<permission 与<uses-permission中的权限可存在重复权限

<uses-permission 和<permission 都是app所声明的权限,若存在权限未标记在此处的,则为未声明权限

Guess you like

Origin blog.csdn.net/u014150715/article/details/109781369