{"id":23776205,"url":"https://github.com/bihe0832/android-getapkinfo","last_synced_at":"2025-05-15T09:07:45.413Z","repository":{"id":43189803,"uuid":"77030088","full_name":"bihe0832/Android-GetAPKInfo","owner":"bihe0832","description":"获取Android应用基本信息的工具集","archived":false,"fork":false,"pushed_at":"2024-11-08T05:19:06.000Z","size":7838,"stargazers_count":746,"open_issues_count":0,"forks_count":155,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-10T06:39:12.738Z","etag":null,"topics":["android","apk","apk-signature-scheme","apk-signature-scheme-v2","axmlprinter2","signature"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bihe0832.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-21T07:48:29.000Z","updated_at":"2025-04-08T02:19:37.000Z","dependencies_parsed_at":"2024-11-21T11:43:12.678Z","dependency_job_id":null,"html_url":"https://github.com/bihe0832/Android-GetAPKInfo","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bihe0832%2FAndroid-GetAPKInfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bihe0832%2FAndroid-GetAPKInfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bihe0832%2FAndroid-GetAPKInfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bihe0832%2FAndroid-GetAPKInfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bihe0832","download_url":"https://codeload.github.com/bihe0832/Android-GetAPKInfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310515,"owners_count":22049469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","apk","apk-signature-scheme","apk-signature-scheme-v2","axmlprinter2","signature"],"created_at":"2025-01-01T07:13:48.730Z","updated_at":"2025-05-15T09:07:40.406Z","avatar_url":"https://github.com/bihe0832.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AndroidGetAPKInfo\n\n## 项目简介\n\n作为基于Android平台的渠道SDK的开发者或者联调同学每天都会面对大量的apk，需要检查他们的包名（packageName）、版本(versionName\\versionCode)、应用签名(Signature)等信息，尤其现在Android的V2签名认证(APK Signature Scheme v2)带来的问题更多，为了提高工作效率，整理了一个获取应用基本信息的系列工具集。\n\n目前主干已经修改为使用Android Studio来构建，如果需要使用Eclipse来构建，请查看项目分支：\n\nEclipse：[https://github.com/bihe0832/Android-GetAPKInfo/tree/eclipse](https://github.com/bihe0832/Android-GetAPKInfo/tree/eclipse)\n## 目录结构\n\n\t│\n\t├── AXMLPrinter2_zixie.jar ：对于官方工具AXMLPrinter2的优化，解决因为不同api下apk的AndroidMainfest编码引起的问题\n\t│\n\t├── AXMLPrinter2_zixie ：AXMLPrinter2_zixie.jar的源码\n\t│\t│\n\t├── CheckAndroidSignature.jar ：基于官方签名相关的工具apksigner的源码改造的安卓签名校验工具\n\t│\n\t├── CheckAndroidSignatureByAPKSig ：CheckAndroidSignature.jar的源码\n\t│\n\t├── GetAPKInfo.jar ：一款基于Java环境的读取apk的包名、版本号、签名、是否使用V2签名，V2签名校验是否通过的工具\n\t│\n\t├── GetApkInfo ： GetAPKInfo.jar的源码\n\t│\n\t├── apksig ： Android SDK Build Tools中关于签名相关的工具apksigner的源码（提供了V2、V3签名以及校验的方法）\n\t│\n\t└── README.md\n\t\n**备注：除了根目录，每个子项目下面都有对应功能介绍相关的ReadMe文件，如果想了解具体项目的详细信息，可以进入子项目查看**\n\t\n## 使用方法\n\n### AXMLPrinter2_zixie.jar \n\n非可执行jar，主要是对官方工具AXMLPrinter2针对不同api下AndroidMainfest编码不同导致解析异常的优化，解决[https://github.com/bihe0832/Android-GetAPKInfo/issues/1](https://github.com/bihe0832/Android-GetAPKInfo/issues/1) 和 [https://github.com/bihe0832/Android-GetAPKInfo/issues/5](https://github.com/bihe0832/Android-GetAPKInfo/issues/5)遇到的问题\n\n### CheckAndroidSignature.jar\n\n\t➜  java -jar ./CheckAndroidSignature.jar ./YSDK_Android_1.3.1_629-debug-ysdktest-inner.apk\n\t{\"ret\":0,\"msg\":\"\",\"isV1OK\":false,\"isV2\":true,\"isV2OK\":true,\"isV3\":true,\"isV3OK\":true,\"keystoreMd5\":\"80fa5a8552e418f6bd805c65bcddf4c8\"}\n\t\n### GetAPKInfo.jar\n\n\t➜  java -jar ./getPackageInfo.jar ./YSDK_Android_1.3.1_629-debug-ysdktest-inner.apk\n\t\n\t执行结果: 成功\n\t应用信息:\n\t  包名: com.huohoubrowser\n\t  版本名: 4.0.1.8\n\t  版本号: 4018\n\t  签名文件MD5: f430582429f49b685c3572ba28995e39\n\t  V1签名验证通过: false\n\t  使用V2签名: false\n\t  V2签名验证通过: false\n\t  使用V3签名: false\n\t  V3签名验证通过: false\n\t  签名验证详细信息: {\"ret\":0,\"msg\":\"\",\"isV1OK\":false,\"isV2\":true,\"isV2OK\":true,\"isV3\":true,\"isV3OK\":true,\"keystoreMd5\":\"80fa5a8552e418f6bd805c65bcddf4c8\"}\n\t  \n### GetMoreAPKInfo.jar\n\n➜  java -jar ./GetMorePackageInfo.jar ./test.apk\n\t  \n\t执行结果: 成功\n\t应用信息:\n\t  包名: com.tencent.jygame\n\t  版本名: 0.0.1.30\n\t  版本号: 287\n\t  签名文件MD5: 634b6933d798de3498f20a9b02452575\n\t  SDK版本:\n\t      minSdkVersion:12\n\t      targetSdkVersion:25\n\t  V1签名验证通过: true\n\t  使用V2签名: true\n\t  V2签名验证通过: true\n\t  使用V3签名: false\n\t  V3签名验证通过: false\n\t  签名验证详细信息: {\"ret\":0,\"msg\":\"\",\"isV1OK\":false,\"isV2\":true,\"isV2OK\":true,\"isV3\":true,\"isV3OK\":true,\"keystoreMd5\":\"80fa5a8552e418f6bd805c65bcddf4c8\"}\n\t  使用权限列表:\n\t      android.permission.INTERNET\n\t      android.permission.VIBRATE\n\t      android.permission.MOUNT_UNMOUNT_FILESYSTEMS\n\t      android.permission.WRITE_EXTERNAL_STORAGE\n\t      android.permission.ACCESS_NETWORK_STATE\n\t      android.permission.ACCESS_WIFI_STATE\n\t      android.permission.READ_PHONE_STATE\n\n### GetAPKInfo\n\n\n**近期对 GetAPKInfo 做了调整，后续将在`AndroidAppFactory-Sample` 中维护，这里仅提供下载链接**。对于源码Github为：\n\nhttps://github.com/bihe0832/AndroidAppFactory-Sample\n\n- 下载地址：https://android.bihe0832.com/doc/summary/samples.html\n\n- UI 截图\n\n\t\u003cimg src=\"https://android.bihe0832.com/doc/demo/getapkinfo.png\" width=\"60%\" /\u003e\n\n \t\u003cimg src=\"https://android.bihe0832.com/doc/demo/getapkinfo_dialog.png\" width=\"60%\" /\u003e\n      \n## 相关文章\n\n- [一款基于Java环境的读取应用包名、签名、是否V2签名等基本信息的工具](http://blog.bihe0832.com/java-getpackageinfo.html)\n\n- [关于Android的APK Signature Scheme v2签名相关的资料汇总](http://blog.bihe0832.com/android-v2.html)\n\n- [Android的APK Signature Scheme v2签名及一款基于Java环境的校验工具介绍](http://blog.bihe0832.com/android-v2-signature.html)\n\n- [如何使用Eclipse开发可执行Jar程序，并生成混淆过的jar程序](http://blog.bihe0832.com/runnable-jar.html)\n\n- [使用Android Studio开发可独立运行（runnable）混淆过的Jar程序](http://blog.bihe0832.com/as-runnable-jar.html)\n\n- [一个关于APK Signature Scheme v2签名的神奇bug定位经历](http://blog.bihe0832.com/android-v2-issue.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbihe0832%2Fandroid-getapkinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbihe0832%2Fandroid-getapkinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbihe0832%2Fandroid-getapkinfo/lists"}