{"id":1092,"date":"2020-12-31T17:54:41","date_gmt":"2020-12-31T09:54:41","guid":{"rendered":"http:\/\/www.max-shu.com\/blog\/?p=1092"},"modified":"2020-12-31T17:54:41","modified_gmt":"2020-12-31T09:54:41","slug":"android%e4%b8%8b%e4%bd%bf%e7%94%a8pm-disable%e5%91%bd%e4%bb%a4%e6%88%96package-restrictions-xml%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e6%9d%a5%e7%a6%81%e6%ad%a2%e6%9f%90%e4%b8%aaapp%e7%9a%84%e4%bd%bf","status":"publish","type":"post","link":"http:\/\/www.max-shu.com\/blog\/?p=1092","title":{"rendered":"Android\u4e0b\u4f7f\u7528pm disable\u547d\u4ee4\u6216package-restrictions.xml\u914d\u7f6e\u6587\u4ef6\u6765\u7981\u6b62\u67d0\u4e2aapp\u7684\u4f7f\u7528\u6216\u81ea\u542f\u52a8"},"content":{"rendered":"<div>\u5fc5\u987broot\u7528\u6237\u64cd\u4f5c\u3002<\/div>\n<div><\/div>\n<div><strong>\u67e5\u770b\u54ea\u4e9bapp\u7684\u54ea\u4e9b\u7ec4\u4ef6\u76d1\u542c\u4e86BOOT_COMPLETED\u5e7f\u64ad\uff1a<\/strong><\/div>\n<div><span style=\"color: #ff0000;\"># pm query-receivers &#8211;components -a android.intent.action.BOOT_COMPLETED<\/span><\/div>\n<div>&#8230;<\/div>\n<div>com.autochips.atclogger\/.framework.LogReceiver<\/div>\n<div>&#8230;<\/div>\n<div><\/div>\n<div><strong>\u505c\u6b62\u63a5\u6536\u8be5\u5e7f\u64ad\u7684\u7ec4\u4ef6\uff08\u5982\u679c\u6709\u591a\u4e2a\u7528\u6237\u7528\u5230\u8be5app\uff0c\u5219\u53ef\u4ee5\u589e\u52a0&#8211;user XX\u53c2\u6570\uff09\uff1a<\/strong><\/div>\n<div><span style=\"color: #ff0000;\"># pm disable com.autochips.atclogger\/.framework.LogReceiver<\/span><\/div>\n<div>\u6548\u679c\u5728\u4e0b\u9762\u914d\u7f6e\u6587\u4ef6\u91cc\u4f53\u73b0\uff1a<\/div>\n<div><span style=\"color: #ff0000;\"># cat \/data\/system\/users\/0\/package-restrictions.xml<\/span><\/div>\n<div>&#8230;<\/div>\n<div>\u00a0\u00a0\u00a0\u00a0&lt;pkg name=&#8221;com.autochips.atclogger&#8221; ceDataInode=&#8221;81987&#8243;&gt;<\/div>\n<div><span style=\"color: #993366;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;disabled-components&gt;<\/span><\/div>\n<div><span style=\"color: #993366;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;item name=&#8221;com.autochips.atclogger.framework.LogReceiver&#8221; \/&gt;<\/span><\/div>\n<div><span style=\"color: #993366;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;\/disabled-components&gt;<\/span><\/div>\n<div>\u00a0\u00a0\u00a0\u00a0&lt;\/pkg&gt;<\/div>\n<div>&#8230;<\/div>\n<div><\/div>\n<div><strong>\u7acb\u5373\u4f1a\u751f\u6548\uff0c\u5f53\u7136\u8981\u6d4b\u8bd5\u7981\u6b62\u6389\u4e86BOOT_COMPLETED\uff0c\u5fc5\u987b\u91cd\u542f\u3002<\/strong><\/div>\n<div><\/div>\n<div><strong>\u5982\u679c\u8981\u5b8c\u5168\u7981\u6b62app\u7684\u4f7f\u7528\uff0cpm\u547d\u4ee4\u53ea\u5e26\u5305\u540d\u4e0d\u5e26\u7ec4\u4ef6\u540d\u5373\u53ef\uff1a<\/strong><\/div>\n<div><span style=\"color: #ff0000;\"># pm disable com.autochips.atclogger<\/span><\/div>\n<div>\u5982\u679c\u8981\u91cd\u65b0\u542f\u7528\uff1a<\/div>\n<div><span style=\"color: #ff0000;\"># pm\u00a0enable\u00a0com.autochips.atclogger<\/span><\/div>\n<div><\/div>\n<div><strong>\u53ef\u4ee5\u52a0\u5165\u5230init.rc\uff0c\u8fd9\u6837\u5c31\u4e0d\u7528\u7b49\u542f\u52a8\u540e\u518d\u624b\u5de5\u53bb\u6267\u884c\u4e00\u6b21\u7981\u6b62\u4e86\uff08\u5f53\u7136\u9700\u8981\u7528\u7684\u65f6\u5019\u5c31\u5f97\u624b\u5de5enable\uff09\uff1a<\/strong><\/div>\n<div><span style=\"color: #ff0000;\"># vi \/init.rc<\/span><\/div>\n<div>&#8230;<\/div>\n<div>on property:sys.boot_completed=1<\/div>\n<div>\u00a0 \u00a0 &#8230;<\/div>\n<div><span style=\"color: #993366;\">\u00a0 \u00a0 exec u:r:init:s0 &#8212;\u00a0\/system\/bin\/pm disable com.autochips.atclogger<\/span><\/div>\n<div>&#8230;<\/div>\n<div><\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5fc5\u987broot\u7528\u6237\u64cd\u4f5c\u3002 \u67e5\u770b\u54ea\u4e9bapp\u7684\u54ea\u4e9b\u7ec4\u4ef6\u76d1\u542c\u4e86BOOT_COMPLETED\u5e7f\u64ad\uff1a # pm query &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[394,825,826,827],"class_list":["post-1092","post","type-post","status-publish","format-standard","hentry","category-linuxandroid","tag-android","tag-pm-disable","tag-826","tag-827"],"views":6000,"_links":{"self":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1092"}],"version-history":[{"count":1,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1092\/revisions"}],"predecessor-version":[{"id":1093,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1092\/revisions\/1093"}],"wp:attachment":[{"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1092"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-shu.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}