{"id":1884,"date":"2018-02-22T08:46:09","date_gmt":"2018-02-22T00:46:09","guid":{"rendered":"http:\/\/blog.md5.red\/?p=1884"},"modified":"2018-02-22T08:46:45","modified_gmt":"2018-02-22T00:46:45","slug":"%e5%a4%87%e4%bb%bd%e5%92%8c%e8%bf%98%e5%8e%9f%e6%89%80%e6%9c%89%e5%ae%89%e8%a3%85%e7%9a%84apk","status":"publish","type":"post","link":"https:\/\/blog.md5.red\/?p=1884","title":{"rendered":"\u5907\u4efd\u548c\u8fd8\u539f\u6240\u6709\u5b89\u88c5\u7684apk"},"content":{"rendered":"<p>&nbsp;<\/p>\n<ul class=\"list-paddingleft-2\">\n<li>\u627e\u51fa\u8bbe\u5907\u4e0a\u5b89\u88c5\u7684\u7b2c\u4e09\u65b9apk\u5305\u540d: adb shell pm list packages -3<\/li>\n<li>\u4f9d\u636eapk\u5305\u540d\u627e\u51faapk: adb shell pm path $pkg<\/li>\n<li>\u5bfc\u51faapk\u6587\u4ef6: adb shell pull $path<\/li>\n<li>\u628a\u5bfc\u51fa\u7684apk\u6587\u4ef6\u5b89\u88c5\u5230\u65b0\u8bbe\u5907\u91cc: adb install -r $file<\/li>\n<\/ul>\n<p>\u811a\u672c\uff1a<\/p>\n<p>#!\/bin\/shecho -n \"\" &gt; apksadb shell pm list packages -3 | sed -E \"s\/ $\/\/\" | while read linedo pkg=${line#*:} line=$(adb shell pm path \"$pkg\"&amp;) path=${line#*:} echo $pkg:$path &gt;&gt; apksdonecat apkscat apks | sed -E \"s\/ $\/\/\" | while read linedo pkg=${line%:*} path=${line#*:} adb pull \"$path\" \"$pkg.apk\" echo $pathdonerm apks#echo $apks;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u627e\u51fa\u8bbe\u5907\u4e0a\u5b89\u88c5\u7684\u7b2c\u4e09\u65b9apk\u5305\u540d: adb shell pm list packages -3  ...<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1884","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/blog.md5.red\/index.php?rest_route=\/wp\/v2\/posts\/1884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.md5.red\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.md5.red\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.md5.red\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.md5.red\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1884"}],"version-history":[{"count":2,"href":"https:\/\/blog.md5.red\/index.php?rest_route=\/wp\/v2\/posts\/1884\/revisions"}],"predecessor-version":[{"id":1886,"href":"https:\/\/blog.md5.red\/index.php?rest_route=\/wp\/v2\/posts\/1884\/revisions\/1886"}],"wp:attachment":[{"href":"https:\/\/blog.md5.red\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.md5.red\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.md5.red\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}