{"id":4435,"date":"2023-09-07T15:08:40","date_gmt":"2023-09-07T07:08:40","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=4435"},"modified":"2023-09-07T15:08:40","modified_gmt":"2023-09-07T07:08:40","slug":"android%e5%bc%80%e5%8f%91%e4%b8%ad%e7%9a%84apk%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/4435\/","title":{"rendered":"android\u5f00\u53d1\u4e2d\u7684apk\u662f\u4ec0\u4e48\uff1f"},"content":{"rendered":"

APK\uff08Android Application Package\uff09\u662fAndroid\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u7684\u5b89\u88c5\u5305\u6587\u4ef6\u683c\u5f0f\uff0c\u662f\u4e00\u79cd\u538b\u7f29\u6587\u4ef6\uff0c\u7528\u4e8e\u5728Android\u8bbe\u5907\u4e0a\u5b89\u88c5\u548c\u5206\u53d1\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecdAPK\u7684\u539f\u7406\u548c\u7ec4\u6210\u90e8\u5206\u3002<\/p>\n

1. APK\u7684\u7ec4\u6210<\/p>\n

\u4e00\u4e2aAPK\u6587\u4ef6\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2aZIP\u683c\u5f0f\u7684\u538b\u7f29\u6587\u4ef6\uff0c\u5b83\u5185\u90e8\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u76f8\u5173\u8d44\u6e90\u548c\u6587\u4ef6\u3002\u4e0b\u9762\u662fAPK\u6587\u4ef6\u7684\u4e3b\u8981\u7ec4\u6210\u90e8\u5206\uff1a<\/p>\n

– AndroidManifest.xml: \u8fd9\u662fAPK\u6587\u4ef6\u7684\u5165\u53e3\u6587\u4ef6\uff0c\u5b83\u63cf\u8ff0\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u7ec4\u4ef6\uff0c\u5305\u62ecActivities\u3001Services\u3001Broadcast Receivers\u548cContent Providers\u7b49\u3002<\/p>\n

– classes.dex: \u8fd9\u662fAPK\u6587\u4ef6\u4e2d\u7684\u4e3b\u8981\u4ee3\u7801\u6587\u4ef6\uff0c\u5b83\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709Java\u4ee3\u7801\uff0c\u7ecf\u8fc7\u7f16\u8bd1\u540e\u4f1a\u88ab\u8f6c\u6362\u4e3aDalvik\u5b57\u8282\u7801\uff0c\u4f9bAndroid\u8fd0\u884c\u65f6\u73af\u5883\u6267\u884c\u3002<\/p>\n

– resources.arsc: \u8fd9\u662fAPK\u6587\u4ef6\u4e2d\u7684\u8d44\u6e90\u6587\u4ef6\uff0c\u5b83\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u975e\u4ee3\u7801\u8d44\u6e90\uff0c\u5982\u5e03\u5c40\u6587\u4ef6\u3001\u5b57\u7b26\u4e32\u3001\u56fe\u7247\u3001\u58f0\u97f3\u7b49\u3002<\/p>\n

– lib\u76ee\u5f55: \u8fd9\u4e2a\u76ee\u5f55\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u6240\u9700\u8981\u7684\u6240\u6709\u672c\u5730\u5e93\u6587\u4ef6\uff0c\u6839\u636e\u4e0d\u540c\u7684\u8bbe\u5907\u67b6\u6784\uff08\u5982armeabi\u3001armeabi-v7a\u3001<\/p>\n

<\/figure>\n<\/p>\n

x86\u7b49\uff09\u4f1a\u6709\u4e0d\u540c\u7684\u76ee\u5f55\u3002<\/p>\n

– assets\u76ee\u5f55: \u8fd9\u4e2a\u76ee\u5f55\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u4e00\u4e9b\u539f\u59cb\u6587\u4ef6\uff0c\u5b83\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee3\u7801\u8fdb\u884c\u8bfb\u53d6\u548c\u4f7f\u7528\u3002<\/p>\n

– META-INF\u76ee\u5f55: \u8fd9\u4e2a\u76ee\u5f55\u5305\u542b\u4e86APK\u6587\u4ef6\u7684\u7b7e\u540d\u4fe1\u606f\u548c\u8bc1\u4e66\u3002<\/p>\n

2. APK\u7684\u751f\u6210\u8fc7\u7a0b<\/p>\n

\u5728Android\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0cAPK\u6587\u4ef6\u662f\u901a\u8fc7\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\u751f\u6210\u7684\uff1a<\/p>\n

– \u7f16\u5199\u5e94\u7528\u7a0b\u5e8f\u7684\u6e90\u4ee3\u7801\uff0c\u5305\u62ecJava\u4ee3\u7801\u3001\u5e03\u5c40\u6587\u4ef6\u3001\u56fe\u7247\u8d44\u6e90\u7b49\u3002<\/p>\n

– \u4f7f\u7528Java\u7f16\u8bd1\u5668\u5c06\u6e90\u4ee3\u7801\u7f16\u8bd1\u6210Java\u5b57\u8282\u7801\u3002<\/p>\n

– \u4f7f\u7528Android\u6784\u5efa\u5de5\u5177\u5c06Java\u5b57\u8282\u7801\u8f6c\u6362\u4e3aDalvik\u5b57\u8282\u7801\uff08dex\u683c\u5f0f\uff09\u3002<\/p>\n

\u4ee5\u4e0a\u6b65\u9aa4\u5f97\u5230\u7684\u6587\u4ef6\u4f1a\u88ab\u6253\u5305\u5230APK\u6587\u4ef6\u4e2d\uff0c\u540c\u65f6\u8fd8\u4f1a\u6dfb\u52a0\u4e00\u4e9b\u5fc5\u8981\u7684\u914d\u7f6e\u6587\u4ef6\u548c\u8d44\u6e90\u6587\u4ef6\u3002<\/p>\n

3. APK\u7684\u5b89\u88c5\u8fc7\u7a0b<\/p>\n

\u5f53\u7528\u6237\u5728Android\u8bbe\u5907\u4e0a\u70b9\u51fb\u5b89\u88c5\u4e00\u4e2aAPK\u6587\u4ef6\u65f6\uff0c\u7cfb\u7edf\u4f1a\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\u5b8c\u6210\u5b89\u88c5\u8fc7\u7a0b\uff1a<\/p>\n

– \u9996\u5148\uff0c\u7cfb\u7edf\u4f1a\u68c0\u67e5APK\u6587apk\u5305\u600e\u4e48\u6253\u5305<\/a>\u4ef6\u7684\u7b7e\u540d\u4fe1\u606f\uff0c\u4ee5\u786e\u8ba4APK\u6587\u4ef6\u7684\u5b8c\u6574\u6027\u548c\u6765\u6e90\u7684\u5408\u6cd5\u6027\u3002<\/p>\n

– \u7136\u540e\uff0c\u7cfb\u7edf\u4f1a\u89e3\u6790APK\u6587\u4ef6\u7684AndroidManifest.xml\u6587\u4ef6\uff0c\u83b7\u53d6\u5e94\u7528\u7a0b\u5e8f\u7684\u4fe1\u606f\u548c\u6240\u6709\u7ec4\u4ef6\u6253\u5305apk\u53d1\u5e03\u547d\u540d\u89c4\u8303<\/a>\u7684\u914d\u7f6e\u3002<\/p>\n

– \u7136\u540e\uff0c\u7cfb\u7edf\u4f1a\u5c06APK\u6587\u4ef6\u4e2d\u7684\u6587\u4ef6\u548c\u8d44\u6e90\u89e3\u538b\u5230\u8bbe\u5907\u4e0a\u7684\u7279\u5b9a\u4f4d\u7f6e\u3002<\/p>\n

– \u6700\u540e\uff0c\u7cfb\u7edf\u4f1a\u6ce8\u518c\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u7ec4\u4ef6\uff0c\u5e76\u5c06\u5e94\u7528\u7a0b\u5e8f\u7684\u56fe\u6807\u6dfb\u52a0\u5230\u5e94\u7528\u7a0b\u5e8f\u5217\u8868\u4e2d\u3002<\/p>\n

4. APK\u7684\u8fd0\u884c\u8fc7\u7a0b<\/p>\n

\u4e00\u65e6\u5e94\u7528\u7a0b\u5e8f\u5b89\u88c5\u5b8c\u6210\uff0c\u5e76\u4e14\u7528\u6237\u70b9\u51fb\u5e94\u7528\u7a0b\u5e8f\u7684\u56fe\u6807\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u7cfb\u7edf\u4f1a\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n

– \u9996\u5148\uff0c\u7cfb\u7edf\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u8fdb\u7a0b\u6765\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u7684\u4e3bActivity\u3002<\/p>\n

– \u7136\u540e\uff0c\u7cfb\u7edf\u4f1a\u6309\u9700\u52a0\u8f7d\u5e94\u7528\u7a0b\u5e8f\u7684\u4ee3\u7801\u548c\u8d44\u6e90\u3002<\/p>\n

– \u6700\u540e\uff0c\u7cfb\u7edf\u4f1a\u5c06\u5e94\u7528\u7a0b\u5e8f\u7684UI\u663e\u793a\u5728\u8bbe\u5907\u7684\u5c4f\u5e55\u4e0a\uff0c\u5e76\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\u4e0e\u7528\u6237\u7684\u4ea4\u4e92\u3002<\/p>\n

\u901a\u8fc7\u4ee5\u4e0a\u7684\u4ecb\u7ecd\uff0c\u6211\u4eec\u53ef\u4ee5\u4e86\u89e3\u5230APK\u662fAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u88c5\u5305\uff0c\u5b83\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u76f8\u5173\u8d44\u6e90\u548c\u6587\u4ef6\u3002APK\u6587\u4ef6\u901a\u8fc7\u4e00\u7cfb\u5217\u7684\u6253\u5305\u548c\u89e3\u6790\u8fc7\u7a0b\u751f\u6210\u548c\u5b89\u88c5\uff0c\u6700\u7ec8\u5728\u8bbe\u5907\u4e0a\u8fd0\u884c\u3002\u5bf9\u4e8e\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\uff0c\u7406\u89e3APK\u7684\u539f\u7406\u548c\u7ed3\u6784\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u66f4\u597d\u5730\u7406\u89e3\u548c\u8c03\u8bd5Android\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

APK\uff08Android Application Package\uff09\u662fAndroid\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u7684\u5b89\u88c5\u5305\u6587\u4ef6\u683c\u5f0f\uff0c\u662f\u4e00\u79cd\u538b\u7f29\u6587\u4ef6\uff0c\u7528\u4e8e\u5728Android\u8bbe\u5907\u4e0a\u5b89\u88c5\u548c\u5206\u53d1\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecdAP<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[8583,8582,12,16,294],"topic":[],"class_list":["post-4435","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-pychamapk","tag-apk","tag-12","tag-16","tag-294"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/4435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=4435"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/4435\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=4435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=4435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=4435"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=4435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}