{"id":111,"date":"2026-01-27T14:22:27","date_gmt":"2026-01-27T06:22:27","guid":{"rendered":"https:\/\/a.li6.cc\/?p=111"},"modified":"2026-01-27T14:54:09","modified_gmt":"2026-01-27T06:54:09","slug":"%e4%bd%bf%e7%94%a8adb%e8%b0%83%e8%af%95%e9%ad%85%e6%97%8f%e6%89%8b%e6%9c%ba%e6%b5%8f%e8%a7%88%e5%99%a8","status":"publish","type":"post","link":"https:\/\/a.li6.cc\/index.php\/2026\/01\/27\/%e4%bd%bf%e7%94%a8adb%e8%b0%83%e8%af%95%e9%ad%85%e6%97%8f%e6%89%8b%e6%9c%ba%e6%b5%8f%e8%a7%88%e5%99%a8\/","title":{"rendered":"\u4f7f\u7528adb\u8c03\u8bd5\u9b45\u65cf\u624b\u673a\u6d4f\u89c8\u5668"},"content":{"rendered":"<ol>\n<li>\u4e0b\u8f7dADB\u5de5\u5177<br \/>\ntext<\/li>\n<\/ol>\n<p>\u4e0b\u8f7d\u5730\u5740\uff1a<a href=\"https:\/\/dl.google.com\/android\/repository\/platform-tools-latest-windows.zip\">https:\/\/dl.google.com\/android\/repository\/platform-tools-latest-windows.zip<\/a><br \/>\n\u89e3\u538b\u5230\uff1aC:\\adb\\<\/p>\n<ol start=\"2\">\n<li>\n<p>\u624b\u673a\u8bbe\u7f6e\uff08\u9b45\u65cf\uff09<br \/>\ntext<\/p>\n<\/li>\n<li>\n<p>\u8bbe\u7f6e \u2192 \u5173\u4e8e\u624b\u673a \u2192 \u7248\u672c\u53f7\uff08\u70b97\u6b21\u5f00\u542f\u5f00\u53d1\u8005\u6a21\u5f0f\uff09<\/p>\n<\/li>\n<li>\n<p>\u8fd4\u56de \u2192 \u7cfb\u7edf\u66f4\u65b0 \u2192 \u5f00\u53d1\u8005\u9009\u9879<\/p>\n<\/li>\n<li>\n<p>\u5f00\u542f\uff1aUSB\u8c03\u8bd5<\/p>\n<\/li>\n<li>\n<p>\u5f00\u542f\uff1aUSB\u8c03\u8bd5\uff08\u5b89\u5168\u8bbe\u7f6e\uff09<\/p>\n<\/li>\n<\/ol>\n<p>\u4e8c\u3001\u8fde\u63a5\u6b65\u9aa4\uff08\u6bcf\u6b21\u8c03\u8bd5\uff09<br \/>\n\u6b65\u9aa41\uff1a\u8fde\u63a5USB<br \/>\nbash<\/p>\n<h1>\u6253\u5f00\u547d\u4ee4\u884c\uff08Win+R\uff0c\u8f93\u5165cmd\uff09<\/h1>\n<p>cd C:\\adb<br \/>\nadb devices<\/p>\n<p>\u5982\u679c\u663e\u793a unauthorized \u2192 \u624b\u673a\u4e0a\u70b9\u51fb&quot;\u5141\u8bb8USB\u8c03\u8bd5&quot;<br \/>\n\u6b65\u9aa42\uff1a\u7aef\u53e3\u8f6c\u53d1<br \/>\nbash<\/p>\n<p>adb forward tcp:9222 localabstract:chrome_devtools_remote<\/p>\n<p>\u6b65\u9aa43\uff1a\u6253\u5f00\u8c03\u8bd5\u9875\u9762<\/p>\n<pre><code>\u7535\u8111\u6253\u5f00 Chrome\u6d4f\u89c8\u5668\n\n\u5730\u5740\u680f\u8f93\u5165\uff1achrome:\/\/inspect\/#devices\n\n\u70b9\u51fb \"Port forwarding...\"\n\n\u52fe\u9009 \"Enable port forwarding\"\n\n\u6dfb\u52a0\uff1a9222 \u2192 localhost:9222<\/code><\/pre>\n<p>\u6b65\u9aa44\uff1a\u624b\u673a\u64cd\u4f5c<\/p>\n<pre><code>\u7528\u9b45\u65cf\u6d4f\u89c8\u5668\u6253\u5f00\u4f60\u7684\u7f51\u9875\n\n\u56de\u5230\u7535\u8111 chrome:\/\/inspect \u9875\u9762\n\n\u5e94\u8be5\u80fd\u770b\u5230\u4f60\u7684\u7f51\u9875\uff0c\u70b9\u51fb \"inspect\"<\/code><\/pre>\n<p>\u4e09\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3<br \/>\n\u95ee\u98981\uff1aadb devices \u6ca1\u53cd\u5e94<br \/>\ntext<\/p>\n<p>\u89e3\u51b3\uff1a<\/p>\n<ol>\n<li>\u6362USB\u7ebf\uff08\u8981\u80fd\u4f20\u8f93\u6570\u636e\uff09<\/li>\n<li>\u6362USB\u53e3\uff08\u7528\u7535\u8111\u540e\u9762\u7684USB\u53e3\uff09<\/li>\n<li>\u624b\u673a\u4e0b\u62c9\u901a\u77e5\u680f \u2192 USB\u8fde\u63a5\u65b9\u5f0f \u2192 \u9009\u62e9&quot;\u4f20\u8f93\u6587\u4ef6&quot;<\/li>\n<\/ol>\n<p>\u95ee\u98982\uff1adevice offline<br \/>\nbash<\/p>\n<h1>\u6267\u884c\uff1a<\/h1>\n<p>adb kill-server<br \/>\nadb start-server<\/p>\n<h1>\u7136\u540e\uff1a<\/h1>\n<ol>\n<li>\u62d4\u6389USB\u7ebf<\/li>\n<li>\u624b\u673a\uff1a\u5f00\u53d1\u8005\u9009\u9879 \u2192 \u64a4\u9500USB\u8c03\u8bd5\u6388\u6743<\/li>\n<li>\u91cd\u65b0\u8fde\u63a5USB<\/li>\n<\/ol>\n<p>\u95ee\u98983\uff1achrome:\/\/inspect \u770b\u4e0d\u5230\u9875\u9762<br \/>\nbash<\/p>\n<h1>\u68c0\u67e5\u7aef\u53e3\u8f6c\u53d1<\/h1>\n<p>adb forward --list<\/p>\n<h1>\u5c1d\u8bd5\u5176\u4ed6\u7aef\u53e3<\/h1>\n<p>adb forward tcp:9223 localabstract:chrome_devtools_remote<br \/>\nadb forward tcp:9224 localabstract:chrome_devtools_remote<\/p>\n<p>\u56db\u3001\u5feb\u6377\u811a\u672c<\/p>\n<p>\u5728 C:\\adb\\ \u521b\u5efa debug.bat\uff1a<br \/>\nbatch<\/p>\n<p>@echo off<br \/>\ncd \/d &quot;%~dp0&quot;<br \/>\necho 1. \u68c0\u67e5\u8fde\u63a5<br \/>\nadb devices<br \/>\necho.<br \/>\necho 2. \u5f00\u542f\u7aef\u53e3\u8f6c\u53d1<br \/>\nadb forward tcp:9222 localabstract:chrome_devtools_remote<br \/>\necho.<br \/>\necho 3. \u8bf7\u8bbf\u95ee chrome:\/\/inspect<br \/>\npause<\/p>\n<p>\u4e94\u3001\u8c03\u8bd5\u6280\u5de7<\/p>\n<pre><code>\u5b9e\u65f6\u4fee\u6539CSS\uff1a\u5728Elements\u9762\u677f\u4fee\u6539\u6837\u5f0f\n\n\u67e5\u770bConsole\uff1a\u67e5\u770bJavaScript\u9519\u8bef\n\n\u6a21\u62df\u8bbe\u5907\uff1aDevTools \u2192 \u5207\u6362\u8bbe\u5907\u5de5\u5177\u680f\n\n\u5c4f\u5e55\u622a\u56fe\uff1aDevTools \u2192 \u4e09\u4e2a\u70b9 \u2192 Capture screenshot<\/code><\/pre>\n<p>\u516d\u3001\u5982\u679cADB\u8fd8\u662f\u4e0d\u884c<\/p>\n<p>\u7528\u8fd9\u4e2a\u65b9\u6cd5\u9a8c\u8bc1\u952e\u76d8\u95ee\u9898\uff1a<br \/>\nbash<\/p>\n<h1>\u76f4\u63a5\u5728\u624b\u673a\u4e0a\u521b\u5efa\u6d4b\u8bd5\u9875\u9762<\/h1>\n<p>adb shell &quot;echo '&lt;input style=\\&quot;position:fixed;bottom:0\\&quot;&gt;' &gt; \/sdcard\/test.html&quot;<\/p>\n<h1>\u5728\u624b\u673a\u6d4f\u89c8\u5668\u6253\u5f00<\/h1>\n<p>adb shell am start -a android.intent.action.VIEW -d &quot;file:\/\/\/sdcard\/test.html&quot;<\/p>\n<p>\u6700\u7b80\u5355\u7684\u6d4b\u8bd5\uff1a\u76f4\u63a5\u5728\u624b\u673a\u6d4f\u89c8\u5668\u8bbf\u95ee\u8fd9\u4e2a\uff1a<br \/>\ntext<\/p>\n<p>data:text\/html,<input style=\"position:fixed;bottom:0;left:0;right:0;height:50px\"><\/p>\n<p>\u603b\u7ed3\u6b65\u9aa4\uff1a<\/p>\n<pre><code>\u4e0b\u8f7dADB\u5230 C:\\adb\\\n\n\u624b\u673a\u5f00USB\u8c03\u8bd5\n\n\u7535\u8111\u8fd0\u884c\uff1aadb forward tcp:9222 localabstract:chrome_devtools_remote\n\n\u7535\u8111Chrome\u8bbf\u95ee\uff1achrome:\/\/inspect\n\n\u624b\u673a\u6d4f\u89c8\u5668\u6253\u5f00\u4f60\u7684\u7f51\u9875<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u8f7dADB\u5de5\u5177 text \u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/\/dl.google.com\/ &hellip; <a href=\"https:\/\/a.li6.cc\/index.php\/2026\/01\/27\/%e4%bd%bf%e7%94%a8adb%e8%b0%83%e8%af%95%e9%ad%85%e6%97%8f%e6%89%8b%e6%9c%ba%e6%b5%8f%e8%a7%88%e5%99%a8\/\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts\/111"}],"collection":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":2,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":116,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts\/111\/revisions\/116"}],"wp:attachment":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}