{"id":16473,"date":"2026-11-24T20:24:48","date_gmt":"2026-11-24T12:24:48","guid":{"rendered":"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473"},"modified":"2026-11-24T20:24:48","modified_gmt":"2026-11-24T12:24:48","slug":"aaos-%e4%bb%8e%e9%9b%b6%e5%88%b0%e8%b7%91%e8%b5%b7%e6%9d%a5-%e5%85%a8%e6%b5%81%e7%a8%8b-%e8%b8%a9%e5%9d%91%e8%af%a6%e8%a7%a3-ai%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473","title":{"rendered":"AAOS \u4ece\u96f6\u5230\u8dd1\u8d77\u6765 \u2014\u2014 \u5168\u6d41\u7a0b + \u8e29\u5751\u8be6\u89e3 (AI\u64cd\u4f5c)"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_16 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#AAOS_%E4%BB%8E%E9%9B%B6%E5%88%B0%E8%B7%91%E8%B5%B7%E6%9D%A5_-_%E5%85%A8%E6%B5%81%E7%A8%8B_%E8%B8%A9%E5%9D%91%E8%AF%A6%E8%A7%A3\" title=\"AAOS \u4ece\u96f6\u5230\u8dd1\u8d77\u6765 \u2014\u2014 \u5168\u6d41\u7a0b + \u8e29\u5751\u8be6\u89e3\">AAOS \u4ece\u96f6\u5230\u8dd1\u8d77\u6765 \u2014\u2014 \u5168\u6d41\u7a0b + \u8e29\u5751\u8be6\u89e3<\/a><ul class=\"ez-toc-list-level-2\"><li class=\"ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#0_%E6%95%B4%E4%BD%93%E6%9E%B6%E6%9E%84\" title=\"0. \u6574\u4f53\u67b6\u6784\">0. \u6574\u4f53\u67b6\u6784<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#1_%E8%99%9A%E6%8B%9F%E6%9C%BA%E5%87%86%E5%A4%87\" title=\"1. \u865a\u62df\u673a\u51c6\u5907\">1. \u865a\u62df\u673a\u51c6\u5907<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#2_%E7%B3%BB%E7%BB%9F%E5%88%9D%E5%A7%8B%E5%8C%96%EF%BC%88%E7%BC%96%E8%AF%91%E6%9C%BA%EF%BC%89\" title=\"2. \u7cfb\u7edf\u521d\u59cb\u5316\uff08\u7f16\u8bd1\u673a\uff09\">2. \u7cfb\u7edf\u521d\u59cb\u5316\uff08\u7f16\u8bd1\u673a\uff09<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#26_%E5%AE%89%E8%A3%85_repo%EF%BC%88%E5%BF%85%E9%A1%BB%E5%85%BC%E5%AE%B9_python36%EF%BC%89\" title=\"2.6 \u5b89\u88c5 repo\uff08\u5fc5\u987b\u517c\u5bb9 python3.6\uff09\">2.6 \u5b89\u88c5 repo\uff08\u5fc5\u987b\u517c\u5bb9 python3.6\uff09<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#3_%E4%B8%8B%E8%BD%BD%E6%BA%90%E7%A0%81\" title=\"3. \u4e0b\u8f7d\u6e90\u7801\">3. \u4e0b\u8f7d\u6e90\u7801<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#4_%E5%85%B3%E9%94%AE%E6%94%B9%E5%8A%A8%EF%BC%88%E4%B8%8D%E6%94%B9%EF%BC%8C%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%B8%80%E5%AE%9A%E8%B5%B7%E4%B8%8D%E6%9D%A5%EF%BC%89\" title=\"4. \u5173\u952e\u6539\u52a8\uff08\u4e0d\u6539\uff0c\u6a21\u62df\u5668\u4e00\u5b9a\u8d77\u4e0d\u6765\uff09\">4. \u5173\u952e\u6539\u52a8\uff08\u4e0d\u6539\uff0c\u6a21\u62df\u5668\u4e00\u5b9a\u8d77\u4e0d\u6765\uff09<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#41_%E7%94%A8_SDK_%E7%89%88%E8%BD%A6%E6%9C%BA%E4%BA%A7%E5%93%81\" title=\"4.1 \u7528 SDK \u7248\u8f66\u673a\u4ea7\u54c1\">4.1 \u7528 SDK \u7248\u8f66\u673a\u4ea7\u54c1<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#42_%E5%85%B3%E5%8A%A8%E6%80%81%E5%88%86%E5%8C%BA_productsystem_ext_%E5%90%88%E5%B9%B6%E8%BF%9B_system\" title=\"4.2 \u5173\u52a8\u6001\u5206\u533a + product\/system_ext \u5408\u5e76\u8fdb system\">4.2 \u5173\u52a8\u6001\u5206\u533a + product\/system_ext \u5408\u5e76\u8fdb system<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#43_fstab_%E6%94%B9%E6%88%90%E6%98%BE%E5%BC%8F%E8%AE%BE%E5%A4%87%E5%8F%B7\" title=\"4.3 fstab \u6539\u6210\u663e\u5f0f\u8bbe\u5907\u53f7\">4.3 fstab \u6539\u6210\u663e\u5f0f\u8bbe\u5907\u53f7<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#5_%E7%BC%96%E8%AF%91\" title=\"5. \u7f16\u8bd1\">5. \u7f16\u8bd1<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#6_%E5%9C%A8%E7%AC%94%E8%AE%B0%E6%9C%AC%E4%B8%8A%E8%B7%91%EF%BC%88KVM%EF%BC%89\" title=\"6. \u5728\u7b14\u8bb0\u672c\u4e0a\u8dd1\uff08KVM\uff09\">6. \u5728\u7b14\u8bb0\u672c\u4e0a\u8dd1\uff08KVM\uff09<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-13\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#61_%E7%AC%94%E8%AE%B0%E6%9C%AC%E7%8E%AF%E5%A2%83\" title=\"6.1 \u7b14\u8bb0\u672c\u73af\u5883\">6.1 \u7b14\u8bb0\u672c\u73af\u5883<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-14\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#62_%E7%9B%AE%E5%BD%95%E5%B8%83%E5%B1%80%EF%BC%88%E5%BF%85%E9%A1%BB%E5%92%8C%E6%9E%84%E5%BB%BA%E6%A0%91%E5%90%8C%E6%9E%84%EF%BC%89\" title=\"6.2 \u76ee\u5f55\u5e03\u5c40\uff08\u5fc5\u987b\u548c\u6784\u5efa\u6811\u540c\u6784\uff09\">6.2 \u76ee\u5f55\u5e03\u5c40\uff08\u5fc5\u987b\u548c\u6784\u5efa\u6811\u540c\u6784\uff09<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-15\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#63_emulator_adb\" title=\"6.3 emulator + adb\">6.3 emulator + adb<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-16\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#64_%E5%90%AF%E5%8A%A8%E8%84%9A%E6%9C%AC_aaosrun-carsh\" title=\"6.4 \u542f\u52a8\u811a\u672c ~\/aaos\/run-car.sh\">6.4 \u542f\u52a8\u811a\u672c ~\/aaos\/run-car.sh<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-17\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#7_%E6%97%A5%E5%B8%B8%E8%B0%83%E8%AF%95\" title=\"7. \u65e5\u5e38\u8c03\u8bd5\">7. \u65e5\u5e38\u8c03\u8bd5<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-18\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#8_%E8%B8%A9%E5%9D%91%E8%AF%A6%E8%A7%A3%EF%BC%88%E9%87%8D%E7%82%B9%EF%BC%89\" title=\"8. \u8e29\u5751\u8be6\u89e3\uff08\u91cd\u70b9\uff09\">8. \u8e29\u5751\u8be6\u89e3\uff08\u91cd\u70b9\uff09<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-19\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_1%EF%BC%9AVMware_%E9%87%8C%E7%9A%84_Ubuntu_%E6%B2%A1%E6%9C%89_devkvm\" title=\"\u5751 1\uff1aVMware \u91cc\u7684 Ubuntu \u6ca1\u6709 \/dev\/kvm\">\u5751 1\uff1aVMware \u91cc\u7684 Ubuntu \u6ca1\u6709 \/dev\/kvm<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-20\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_2%EF%BC%9Arepo_%E6%8A%A5_usrbinenv_python_%E6%B2%A1%E6%9C%89%E9%82%A3%E4%B8%AA%E6%96%87%E4%BB%B6%E6%88%96%E7%9B%AE%E5%BD%95\" title=\"\u5751 2\uff1arepo \u62a5 \/usr\/bin\/env: &#039;python&#039;: \u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\">\u5751 2\uff1arepo \u62a5 \/usr\/bin\/env: &#039;python&#039;: \u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-21\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_3%EF%BC%9Arepo_init_%E6%8A%A5_dubious_ownership_no_current_branch\" title=\"\u5751 3\uff1arepo init \u62a5 dubious ownership \/ no current branch\">\u5751 3\uff1arepo init \u62a5 dubious ownership \/ no current branch<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-22\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_4%EF%BC%9A%E4%BA%A7%E5%93%81%E9%80%89%E9%94%99_-_aosp_car_x86_64_%E2%89%A0_sdk_car_x86_64\" title=\"\u5751 4\uff1a\u4ea7\u54c1\u9009\u9519 \u2014\u2014 aosp_car_x86_64 \u2260 sdk_car_x86_64\">\u5751 4\uff1a\u4ea7\u54c1\u9009\u9519 \u2014\u2014 aosp_car_x86_64 \u2260 sdk_car_x86_64<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-23\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_5%EF%BC%9Apartitions_not_found_super_realpath_failed_devblockby-namesuper\" title=\"\u5751 5\uff1apartition(s) not found: super \/ realpath failed: \/dev\/block\/by-name\/super\">\u5751 5\uff1apartition(s) not found: super \/ realpath failed: \/dev\/block\/by-name\/super<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-24\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_6%EF%BC%9Apartitions_not_found_product_system_system_ext\" title=\"\u5751 6\uff1apartition(s) not found: product, system, system_ext\">\u5751 6\uff1apartition(s) not found: product, system, system_ext<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-25\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_7%EF%BC%9A%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%B8%8D%E7%94%9F%E6%88%90_devblockby-name_%E8%BD%AF%E9%93%BE\" title=\"\u5751 7\uff1a\u6a21\u62df\u5668\u4e0d\u751f\u6210 \/dev\/block\/by-name\/* \u8f6f\u94fe\">\u5751 7\uff1a\u6a21\u62df\u5668\u4e0d\u751f\u6210 \/dev\/block\/by-name\/* \u8f6f\u94fe<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-26\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_8%EF%BC%9Arebootvold-failed_%E6%97%A0%E9%99%90%E9%87%8D%E5%90%AF%EF%BC%881230_%E6%AC%A1%EF%BC%89\" title=\"\u5751 8\uff1areboot,vold-failed \u65e0\u9650\u91cd\u542f\uff0812~30 \u6b21\uff09\">\u5751 8\uff1areboot,vold-failed \u65e0\u9650\u91cd\u542f\uff0812~30 \u6b21\uff09<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-27\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_9%EF%BC%9A%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%BC%98%E5%85%88%E7%94%A8_system-qemuimg%EF%BC%8C%E8%80%8C%E5%AE%83%E4%B8%8D%E6%98%AF_ext4\" title=\"\u5751 9\uff1a\u6a21\u62df\u5668\u4f18\u5148\u7528 system-qemu.img\uff0c\u800c\u5b83\u4e0d\u662f ext4\">\u5751 9\uff1a\u6a21\u62df\u5668\u4f18\u5148\u7528 system-qemu.img\uff0c\u800c\u5b83\u4e0d\u662f ext4<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-28\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_10%EF%BC%9AWindows_%E6%89%93%E5%8C%85%E8%A7%A3%E5%8C%85%E4%B8%A2%E5%8F%AF%E6%89%A7%E8%A1%8C%E4%BD%8D\" title=\"\u5751 10\uff1aWindows \u6253\u5305\u89e3\u5305\u4e22\u53ef\u6267\u884c\u4f4d\">\u5751 10\uff1aWindows \u6253\u5305\u89e3\u5305\u4e22\u53ef\u6267\u884c\u4f4d<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-29\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_11%EF%BC%9A%E5%A4%A7%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93_-_%E7%BD%91%E7%BB%9C%E6%85%A2_%E4%BC%A0%E4%B8%80%E5%8D%8A%E6%96%AD\" title=\"\u5751 11\uff1a\u5927\u6587\u4ef6\u4f20\u8f93 \u2014\u2014 \u7f51\u7edc\u6162 \/ \u4f20\u4e00\u534a\u65ad\">\u5751 11\uff1a\u5927\u6587\u4ef6\u4f20\u8f93 \u2014\u2014 \u7f51\u7edc\u6162 \/ \u4f20\u4e00\u534a\u65ad<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-30\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_12%EF%BC%9A-qemu_%E7%9B%B4%E4%BC%A0%E5%8F%82%E6%95%B0%E4%BC%9A%E8%A2%AB_emulator_%E6%94%B9%E5%86%99\" title=\"\u5751 12\uff1a-qemu \u76f4\u4f20\u53c2\u6570\u4f1a\u88ab emulator \u6539\u5199\">\u5751 12\uff1a-qemu \u76f4\u4f20\u53c2\u6570\u4f1a\u88ab emulator \u6539\u5199<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-31\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_13%EF%BC%9Apkill_%E7%9A%84%E4%B8%A4%E4%B8%AA%E5%9D%91%EF%BC%88%E8%B0%83%E8%AF%95%E6%97%B6%E6%8A%8A%E8%87%AA%E5%B7%B1%E6%9D%80%E4%BA%86%EF%BC%89\" title=\"\u5751 13\uff1apkill \u7684\u4e24\u4e2a\u5751\uff08\u8c03\u8bd5\u65f6\u628a\u81ea\u5df1\u6740\u4e86\uff09\">\u5751 13\uff1apkill \u7684\u4e24\u4e2a\u5751\uff08\u8c03\u8bd5\u65f6\u628a\u81ea\u5df1\u6740\u4e86\uff09<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-32\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_14%EF%BC%9Aadb_offline_%E4%B8%80%E7%9B%B4%E4%B8%8D%E5%8F%98%E6%88%90_device\" title=\"\u5751 14\uff1aadb offline \u4e00\u76f4\u4e0d\u53d8\u6210 device\">\u5751 14\uff1aadb offline \u4e00\u76f4\u4e0d\u53d8\u6210 device<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-33\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_15%EF%BC%9AWindows_%E4%B8%8A%E7%9A%84_SDK_%E6%A8%A1%E6%8B%9F%E5%99%A8%E8%83%BD%E8%B7%91%E5%AE%98%E6%96%B9%E9%95%9C%E5%83%8F%EF%BC%8C%E4%BD%86%E8%B7%91%E4%B8%8D%E4%BA%86%E4%BD%A0%E7%BC%96%E7%9A%84%E9%95%9C%E5%83%8F\" title=\"\u5751 15\uff1aWindows \u4e0a\u7684 SDK \u6a21\u62df\u5668\u80fd\u8dd1\u5b98\u65b9\u955c\u50cf\uff0c\u4f46\u8dd1\u4e0d\u4e86\u4f60\u7f16\u7684\u955c\u50cf\">\u5751 15\uff1aWindows \u4e0a\u7684 SDK \u6a21\u62df\u5668\u80fd\u8dd1\u5b98\u65b9\u955c\u50cf\uff0c\u4f46\u8dd1\u4e0d\u4e86\u4f60\u7f16\u7684\u955c\u50cf<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-34\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_16%EF%BC%9A%E7%BC%96%E8%AF%91%E6%97%B6%E9%97%B4%E9%95%BF_%E5%A2%9E%E9%87%8F%E7%BC%96%E8%AF%91%E7%9A%84%E9%A2%84%E6%9C%9F\" title=\"\u5751 16\uff1a\u7f16\u8bd1\u65f6\u95f4\u957f \/ \u589e\u91cf\u7f16\u8bd1\u7684\u9884\u671f\">\u5751 16\uff1a\u7f16\u8bd1\u65f6\u95f4\u957f \/ \u589e\u91cf\u7f16\u8bd1\u7684\u9884\u671f<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-35\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#%E5%9D%91_17%EF%BC%9A%E9%AA%8C%E8%AF%81_KVM_%E5%88%B0%E5%BA%95%E6%9C%89%E6%B2%A1%E6%9C%89%E7%94%9F%E6%95%88\" title=\"\u5751 17\uff1a\u9a8c\u8bc1 KVM \u5230\u5e95\u6709\u6ca1\u6709\u751f\u6548\">\u5751 17\uff1a\u9a8c\u8bc1 KVM \u5230\u5e95\u6709\u6ca1\u6709\u751f\u6548<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-36\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#9_%E6%8E%92%E9%9A%9C%E5%91%BD%E4%BB%A4%E9%80%9F%E6%9F%A5\" title=\"9. \u6392\u969c\u547d\u4ee4\u901f\u67e5\">9. \u6392\u969c\u547d\u4ee4\u901f\u67e5<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-37\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=16473\/#10_%E4%B8%80%E5%8F%A5%E8%AF%9D%E6%80%BB%E7%BB%93\" title=\"10. \u4e00\u53e5\u8bdd\u603b\u7ed3\">10. \u4e00\u53e5\u8bdd\u603b\u7ed3<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"AAOS_%E4%BB%8E%E9%9B%B6%E5%88%B0%E8%B7%91%E8%B5%B7%E6%9D%A5_-_%E5%85%A8%E6%B5%81%E7%A8%8B_%E8%B8%A9%E5%9D%91%E8%AF%A6%E8%A7%A3\"><\/span>AAOS \u4ece\u96f6\u5230\u8dd1\u8d77\u6765 \u2014\u2014 \u5168\u6d41\u7a0b + \u8e29\u5751\u8be6\u89e3<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<blockquote>\n<p>\u73af\u5883\uff1aWindows \u5bbf\u4e3b\u673a + VMware \u91cc\u7684 <strong>Ubuntu 18.04 \u7f16\u8bd1\u673a<\/strong> + \u4e00\u53f0 <strong>Ubuntu 22.04 \u7b14\u8bb0\u672c<\/strong>\uff08\u8dd1\u6a21\u62df\u5668\uff0c\u9700\u8981 KVM\uff09<br \/>\n\u76ee\u6807\uff1a<code>sdk_car_x86_64-userdebug<\/code>\uff08Android 12L \/ API 32 \u8f66\u673a\u955c\u50cf\uff09\uff0cKVM \u4e0a\u542f\u52a8\u3001\u53ef\u6539\u6e90\u7801\u3001\u53ef\u91cd\u7f16\u91cd\u5237<br \/>\n\u7248\u672c\uff1aAOSP <code>android-12.1.0_r27<\/code>\uff0c\u6e05\u534e\u955c\u50cf<\/p>\n<\/blockquote>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"0_%E6%95%B4%E4%BD%93%E6%9E%B6%E6%9E%84\"><\/span>0. \u6574\u4f53\u67b6\u6784<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code>Windows \u5bbf\u4e3b\u673a\n \u251c\u2500 VMware Workstation \u2192 Ubuntu 18.04 \u865a\u62df\u673a\uff08\u7f16\u8bd1\u673a\uff0c8C\/32G\/400G\uff09\n \u2502     \u2514\u2500 AOSP \u6e90\u7801 + \u7f16\u8bd1 \u2192 out\/target\/product\/emulator_car_x86_64\/\n \u2514\u2500 \u7b14\u8bb0\u672c Ubuntu 22.04\uff08KVM\uff09\n       \u2514\u2500 AOSP \u81ea\u5e26 emulator + \u4e0a\u9762\u7684\u955c\u50cf \u2192 \u8f66\u673a\u754c\u9762<\/code><\/pre>\n<ul>\n<li>\u7f16\u8bd1\u653e\u865a\u62df\u673a\uff1a\u8981 200G+ \u78c1\u76d8\u300132G \u5185\u5b58\uff0c\u7b14\u8bb0\u672c 8G \u8dd1\u4e0d\u52a8<\/li>\n<li>\u8dd1\u6a21\u62df\u5668\u653e\u7b14\u8bb0\u672c\uff1a\u7f16\u8bd1\u673a\u5728 VMware \u91cc\uff0c<strong>AMD \u5e73\u53f0\u4e0d\u652f\u6301\u5d4c\u5957\u865a\u62df\u5316<\/strong>\uff0c\u865a\u62df\u673a\u5185\u6ca1\u6709 <code>\/dev\/kvm<\/code>\uff0c\u53ea\u80fd\u7eaf\u8f6f\u4ef6\u6a21\u62df\uff08\u6162\uff0c\u800c\u4e14 Android \u7684 watchdog \u4f1a\u628a system_server \u6253\u6b7b\uff09<\/li>\n<\/ul>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"1_%E8%99%9A%E6%8B%9F%E6%9C%BA%E5%87%86%E5%A4%87\"><\/span>1. \u865a\u62df\u673a\u51c6\u5907<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>VMware Workstation\uff1a4~8 vCPU\u3001\u5185\u5b58 32G\u3001\u78c1\u76d8 400G\uff08\u7cbe\u7b80\u7f6e\u5907\uff09\u3001\u7f51\u7edc NAT<\/li>\n<li>\u7cfb\u7edf\uff1aUbuntu 18.04.3 Desktop<\/li>\n<li>\u5bbf\u4e3b\u673a BIOS \u6253\u5f00 <strong>SVM \/ VT-x<\/strong>\uff08\u5bf9\u865a\u62df\u673a\u5185\u90e8\u65e0\u5f71\u54cd\uff09<\/li>\n<\/ul>\n<p>\u9a8c\u8bc1\uff08\u865a\u62df\u673a\u5185\uff09\uff1a<\/p>\n<pre><code class=\"language-bash\">ls -l \/dev\/kvm                      # \u901a\u5e38\u4e0d\u5b58\u5728\uff0c\u6b63\u5e38\ngrep -c -E &#039;vmx|svm&#039; \/proc\/cpuinfo  # \u5f88\u53ef\u80fd 0<\/code><\/pre>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"2_%E7%B3%BB%E7%BB%9F%E5%88%9D%E5%A7%8B%E5%8C%96%EF%BC%88%E7%BC%96%E8%AF%91%E6%9C%BA%EF%BC%89\"><\/span>2. \u7cfb\u7edf\u521d\u59cb\u5316\uff08\u7f16\u8bd1\u673a\uff09<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code class=\"language-bash\"># 2.1 \u6362\u6e05\u534e apt \u6e90\nsudo sed -i -e &#039;s#http:\/\/archive.ubuntu.com\/ubuntu#https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu#g&#039; \\\n             -e &#039;s#http:\/\/security.ubuntu.com\/ubuntu#https:\/\/mirrors.tuna.tsinghua.edu.cn\/ubuntu#g&#039; \\\n             \/etc\/apt\/sources.list\nsudo apt-get update\n\n# 2.2 AOSP \u7f16\u8bd1\u4f9d\u8d56\nsudo apt-get install -y git gnupg flex bison gperf build-essential zip curl zlib1g-dev \\\n  libc6-dev-i386 libncurses5 lib32ncurses5-dev x11proto-core-dev libx11-dev \\\n  lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig rsync bc \\\n  python3 python3-pip libssl-dev swig gcc-multilib g++-multilib \\\n  imagemagick libreadline-dev libelf-dev dos2unix lz4 cpio\n\n# 2.3 \u514d\u5bc6 sudo\uff08\u53ef\u9009\uff0c\u65b9\u4fbf\u811a\u672c\u5316\uff09\necho &quot;$USER ALL=(ALL) NOPASSWD:ALL&quot; | sudo tee \/etc\/sudoers.d\/010-$USER\nsudo chmod 440 \/etc\/sudoers.d\/010-$USER\n\n# 2.4 \u5185\u6838\u53c2\u6570\nsudo tee \/etc\/sysctl.d\/99-aaos.conf &gt;\/dev\/null &lt;&lt;&#039;EOF&#039;\nfs.inotify.max_user_instances = 1024\nfs.inotify.max_user_watches = 524288\nfs.file-max = 1000000\nvm.swappiness = 10\nvm.overcommit_memory = 1\nEOF\nsudo sysctl -p \/etc\/sysctl.d\/99-aaos.conf\n\n# 2.5 \u5173\u95ed\u4ea4\u6362\uff08\u5185\u5b58\u591f\u65f6\u7f16\u8bd1\u66f4\u7a33\uff0c\u53ef\u9009\uff09\nsudo swapoff -a<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"26_%E5%AE%89%E8%A3%85_repo%EF%BC%88%E5%BF%85%E9%A1%BB%E5%85%BC%E5%AE%B9_python36%EF%BC%89\"><\/span>2.6 \u5b89\u88c5 repo\uff08\u5fc5\u987b\u517c\u5bb9 python3.6\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\">sudo git clone --depth 1 --branch v2.32 \\\n  https:\/\/mirrors.tuna.tsinghua.edu.cn\/git\/git-repo \/opt\/git-repo\nsudo chown -R $USER:$USER \/opt\/git-repo\ncd \/opt\/git-repo &amp;&amp; git checkout -B v2.32\n\n# \u5305\u88c5\u4e00\u5c42\uff0c\u56fa\u5b9a\u8d70\u6e05\u534e\u955c\u50cf\nsudo tee \/usr\/local\/bin\/repo &gt;\/dev\/null &lt;&lt;&#039;EOF&#039;\n#!\/bin\/sh\nexport REPO_URL=&quot;${REPO_URL:-https:\/\/mirrors.tuna.tsinghua.edu.cn\/git\/git-repo}&quot;\nexec \/opt\/git-repo\/repo &quot;$@&quot;\nEOF\nsudo chmod +x \/usr\/local\/bin\/repo\nrepo --version<\/code><\/pre>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"3_%E4%B8%8B%E8%BD%BD%E6%BA%90%E7%A0%81\"><\/span>3. \u4e0b\u8f7d\u6e90\u7801<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code class=\"language-bash\">mkdir -p ~\/aaos &amp;&amp; cd ~\/aaos\n\nrepo init -u https:\/\/mirrors.tuna.tsinghua.edu.cn\/git\/AOSP\/platform\/manifest \\\n  -b android-12.1.0_r27 --depth=1 --no-clone-bundle\n\nrepo sync -c -j8 --no-tags --no-clone-bundle --optimized-fetch --prune<\/code><\/pre>\n<ul>\n<li>\u6e05\u534e AOSP \u955c\u50cf\uff0c<code>--depth=1<\/code> \u6d45\u514b\u9686\uff0c\u7ea6 <strong>45G \/ 25~40 \u5206\u949f<\/strong>\uff08\u89c6\u7f51\u7edc\uff09<\/li>\n<li>\u4e2d\u65ad\u4e86\u5c31\u91cd\u8dd1 <code>repo sync<\/code>\uff0c\u652f\u6301\u7eed\u4f20<\/li>\n<\/ul>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"4_%E5%85%B3%E9%94%AE%E6%94%B9%E5%8A%A8%EF%BC%88%E4%B8%8D%E6%94%B9%EF%BC%8C%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%B8%80%E5%AE%9A%E8%B5%B7%E4%B8%8D%E6%9D%A5%EF%BC%89\"><\/span>4. \u5173\u952e\u6539\u52a8\uff08\u4e0d\u6539\uff0c\u6a21\u62df\u5668\u4e00\u5b9a\u8d77\u4e0d\u6765\uff09<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<blockquote>\n<p>\u4e0b\u9762\u4e09\u5904\u662f\u5b9e\u6d4b\u8e29\u51fa\u6765\u7684\uff0c\u7f3a\u4e00\u4e2a\u90fd\u8d77\u4e0d\u6765\u3002\u6539\u5b8c\u8bb0\u5f97\u5907\u4efd\u539f\u6587\u4ef6\u3002<\/p>\n<\/blockquote>\n<h3><span class=\"ez-toc-section\" id=\"41_%E7%94%A8_SDK_%E7%89%88%E8%BD%A6%E6%9C%BA%E4%BA%A7%E5%93%81\"><\/span>4.1 \u7528 SDK \u7248\u8f66\u673a\u4ea7\u54c1<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\">source build\/envsetup.sh\nlunch sdk_car_x86_64-userdebug<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"42_%E5%85%B3%E5%8A%A8%E6%80%81%E5%88%86%E5%8C%BA_productsystem_ext_%E5%90%88%E5%B9%B6%E8%BF%9B_system\"><\/span>4.2 \u5173\u52a8\u6001\u5206\u533a + product\/system_ext \u5408\u5e76\u8fdb system<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u7f16\u8f91 <code>device\/generic\/goldfish\/car\/sdk_car_x86_64.mk<\/code>\uff0c\u672b\u5c3e\u8ffd\u52a0\uff1a<\/p>\n<pre><code class=\"language-make\"># \u9759\u6001\u5206\u533a + product\/system_ext \u5408\u5e76\u8fdb system\uff08\u6a21\u62df\u5668\u53ef\u76f4\u63a5\u6302\u8f7d\uff09\nPRODUCT_BUILD_PRODUCT_IMAGE := false\nPRODUCT_BUILD_SYSTEM_EXT_IMAGE := false\nPRODUCT_USE_DYNAMIC_PARTITIONS := false\nPRODUCT_BUILD_SUPER_PARTITION := false<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"43_fstab_%E6%94%B9%E6%88%90%E6%98%BE%E5%BC%8F%E8%AE%BE%E5%A4%87%E5%8F%B7\"><\/span>4.3 fstab \u6539\u6210\u663e\u5f0f\u8bbe\u5907\u53f7<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u628a <code>device\/generic\/goldfish\/<\/code> \u4e0b\u8fd9 8 \u4e2a\u6587\u4ef6<strong>\u5168\u90e8<\/strong>\u66ff\u6362\uff1a<\/p>\n<pre><code class=\"language-bash\">G=$HOME\/aaos\/device\/generic\/goldfish\nfor f in fstab.ranchu fstab.ranchu.ex fstab.ranchu.initrd fstab.ranchu.initrd.ex \\\n         fstab.ranchu.noavb fstab.ranchu.noavb.ex fstab.ranchu.initrd.noavb fstab.ranchu.initrd.noavb.ex; do\n  [ -f &quot;$G\/$f&quot; ] || continue\n  cat &gt; &quot;$G\/$f&quot; &lt;&lt;&#039;EOF&#039;\n# Android fstab (explicit virtio-blk devices)\n\/dev\/block\/vda   \/system     ext4    ro,barrier=1     wait,first_stage_mount\n\/dev\/block\/vde   \/vendor     ext4    ro,barrier=1     wait,first_stage_mount\n\/dev\/block\/vdc   \/data       ext4    noatime,nosuid,nodev,nomblk_io_submit,errors=panic   wait,check,quota,fileencryption=aes-256-xts:aes-256-cts,reservedsize=128M,latemount\n\/dev\/block\/pci\/pci0000:00\/0000:00:06.0\/by-name\/metadata    \/metadata    ext4    noatime,nosuid,nodev    wait,formattable,first_stage_mount\nEOF\ndone<\/code><\/pre>\n<blockquote>\n<p>\u8bbe\u5907\u53f7\u6765\u5386\uff1a\u6a21\u62df\u5668\u6309 <code>system(0), cache(1), userdata(2), encrypt(3), vendor(4)<\/code> \u987a\u5e8f\u6302 virtio-blk\uff0c<br \/>\n\u5185\u6838\u6309\u987a\u5e8f\u547d\u540d \u2192 <code>vda, vdb, vdc, vdd, vde<\/code>\u3002<\/p>\n<\/blockquote>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"5_%E7%BC%96%E8%AF%91\"><\/span>5. \u7f16\u8bd1<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code class=\"language-bash\">cd ~\/aaos\nsource build\/envsetup.sh\nlunch sdk_car_x86_64-userdebug\n\n# \u9996\u6b21\u5168\u91cf\uff08\u673a\u68b0\u76d8\u7ea6 2.5 \u5c0f\u65f6\uff0cSSD 40~60 \u5206\u949f\uff09\nm -j8\n\n# \u6539 fstab \/ \u4ea7\u54c1\u914d\u7f6e\u540e\uff0c\u589e\u91cf\u91cd\u7f16\nm systemimage -j8      # 1~15 \u5206\u949f\nm vendor.img -j8       # \u6539\u4e86 fstab \u5fc5\u987b\u91cd\u7f16 vendor\uff08vold \u8bfb\u5b83\uff09<\/code><\/pre>\n<p>\u4ea7\u7269\u76ee\u5f55 <code>out\/target\/product\/emulator_car_x86_64\/<\/code>\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u6587\u4ef6<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>system.img<\/code><\/td>\n<td>\u7cfb\u7edf\uff08\u5df2\u542b product\/system_ext\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>vendor.img<\/code><\/td>\n<td>HAL\/\u9a71\u52a8 + <code>\/vendor\/etc\/fstab.ranchu<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>kernel-ranchu<\/code><\/td>\n<td>\u5185\u6838<\/td>\n<\/tr>\n<tr>\n<td><code>ramdisk-qemu.img<\/code><\/td>\n<td>\u9996\u9636\u6bb5 ramdisk\uff08\u542b fstab\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>userdata.img<\/code> \/ <code>cache.img<\/code> \/ <code>encryptionkey.img<\/code><\/td>\n<td>\u6570\u636e\u5206\u533a\u6a21\u677f<\/td>\n<\/tr>\n<tr>\n<td><code>advancedFeatures.ini<\/code> \/ <code>dtb.img<\/code><\/td>\n<td>\u6a21\u62df\u5668\u9700\u8981<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"6_%E5%9C%A8%E7%AC%94%E8%AE%B0%E6%9C%AC%E4%B8%8A%E8%B7%91%EF%BC%88KVM%EF%BC%89\"><\/span>6. \u5728\u7b14\u8bb0\u672c\u4e0a\u8dd1\uff08KVM\uff09<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"61_%E7%AC%94%E8%AE%B0%E6%9C%AC%E7%8E%AF%E5%A2%83\"><\/span>6.1 \u7b14\u8bb0\u672c\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Ubuntu 22.04 \u6574\u76d8\u5b89\u88c5\uff0cBIOS \u5f00 <strong>VT-x \/ SVM<\/strong>\uff0c\u5173 Secure Boot<\/li>\n<li>\u9a8c\u8bc1\uff1a<\/li>\n<\/ul>\n<pre><code class=\"language-bash\">ls -l \/dev\/kvm\ngrep -c -E &#039;vmx|svm&#039; \/proc\/cpuinfo\nsudo apt install -y cpu-checker &amp;&amp; kvm-ok<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"62_%E7%9B%AE%E5%BD%95%E5%B8%83%E5%B1%80%EF%BC%88%E5%BF%85%E9%A1%BB%E5%92%8C%E6%9E%84%E5%BB%BA%E6%A0%91%E5%90%8C%E6%9E%84%EF%BC%89\"><\/span>6.2 \u76ee\u5f55\u5e03\u5c40\uff08\u5fc5\u987b\u548c\u6784\u5efa\u6811\u540c\u6784\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\">mkdir -p ~\/aaos\/build-tree\/out\/target\/product\n# \u62f7\u5165\uff1a~\/aaos\/build-tree\/out\/target\/product\/emulator_car_x86_64\/\n#   \u542b system.img \/ vendor.img \/ kernel-ranchu \/ ramdisk-qemu.img \/ *.ini \u7b49<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"63_emulator_adb\"><\/span>6.3 emulator + adb<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\">mkdir -p ~\/aaos\/kvm-package\n# \u4ece\u7f16\u8bd1\u673a\u62f7 prebuilts\/android-emulator\/linux-x86_64 \u2192 ~\/aaos\/kvm-package\/linux-x86_64\n# \u4ece\u7f16\u8bd1\u673a\u62f7 out\/host\/linux-x86\/bin\/adb            \u2192 ~\/aaos\/kvm-package\/bin\/adb\nchmod -R u+x ~\/aaos\/kvm-package\/linux-x86_64 ~\/aaos\/kvm-package\/bin\/adb<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"64_%E5%90%AF%E5%8A%A8%E8%84%9A%E6%9C%AC_aaosrun-carsh\"><\/span>6.4 \u542f\u52a8\u811a\u672c <code>~\/aaos\/run-car.sh<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\">#!\/bin\/bash\nIMG=$HOME\/aaos\/build-tree\/out\/target\/product\/emulator_car_x86_64\nEMU=$HOME\/aaos\/kvm-package\/linux-x86_64\n\npkill -f &#039;qemu\/linux-x86_64\/qemu-system&#039; 2&gt;\/dev\/null\nsleep 1\n\nexport ANDROID_BUILD_TOP=&quot;$HOME\/aaos\/build-tree&quot;\nexport ANDROID_PRODUCT_OUT=&quot;$IMG&quot;\nexport ANDROID_EMULATOR_LAUNCHER_DIR=&quot;$EMU&quot;\nexport PATH=&quot;$EMU:$HOME\/aaos\/kvm-package\/bin:$PATH&quot;\n\ncd &quot;$IMG&quot; || exit 1\nexec &quot;$EMU\/emulator&quot; -no-snapshot -no-audio -gpu swiftshader_indirect &quot;$@&quot;<\/code><\/pre>\n<pre><code class=\"language-bash\">chmod +x ~\/aaos\/run-car.sh\n~\/aaos\/run-car.sh<\/code><\/pre>\n<p>KVM \u4e0b\u7ea6 <strong>40~60 \u79d2<\/strong>\u542f\u52a8\u3002\u9a8c\u8bc1\uff1a<\/p>\n<pre><code class=\"language-bash\">~\/aaos\/kvm-package\/bin\/adb devices\n~\/aaos\/kvm-package\/bin\/adb -s emulator-5554 shell getprop sys.boot_completed   # 1\n~\/aaos\/kvm-package\/bin\/adb -s emulator-5554 shell getprop ro.product.device    # emulator_car_x86_64<\/code><\/pre>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"7_%E6%97%A5%E5%B8%B8%E8%B0%83%E8%AF%95\"><\/span>7. \u65e5\u5e38\u8c03\u8bd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code class=\"language-bash\"># 7.1 \u6539 Java \/ App\uff08\u6700\u5feb\uff0c\u514d\u5237\u955c\u50cf\uff09\nm CarService -j8\nadb root &amp;&amp; adb remount\nadb push out\/target\/product\/emulator_car_x86_64\/system\/framework\/CarService.jar \/system\/framework\/\nadb shell stop &amp;&amp; adb shell start\n\n# 7.2 \u8f66\u673a\u670d\u52a1\nadb shell dumpsys car_service\nadb shell cmd car_service list\nadb logcat -s CarService CarPropertyService VehicleHal\n\n# 7.3 \u6539\u955c\u50cf\u7ea7\u5185\u5bb9\nm systemimage -j8      # \u7136\u540e\u628a system.img \u4f20\u5230\u7b14\u8bb0\u672c\u8986\u76d6\uff0c\u91cd\u8dd1 run-car.sh\n\n# 7.4 \u622a\u56fe\nadb exec-out screencap -p &gt; screen.png<\/code><\/pre>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"8_%E8%B8%A9%E5%9D%91%E8%AF%A6%E8%A7%A3%EF%BC%88%E9%87%8D%E7%82%B9%EF%BC%89\"><\/span>8. \u8e29\u5751\u8be6\u89e3\uff08\u91cd\u70b9\uff09<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<blockquote>\n<p>\u6bcf\u4e00\u6761\u90fd\u5199\u4e86\uff1a\u73b0\u8c61 \/ \u6839\u56e0 \/ \u600e\u4e48\u786e\u8ba4 \/ \u600e\u4e48\u89e3\u3002\u6309\u9047\u5230\u987a\u5e8f\u6392\u3002<\/p>\n<\/blockquote>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_1%EF%BC%9AVMware_%E9%87%8C%E7%9A%84_Ubuntu_%E6%B2%A1%E6%9C%89_devkvm\"><\/span>\u5751 1\uff1aVMware \u91cc\u7684 Ubuntu \u6ca1\u6709 <code>\/dev\/kvm<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a\u6a21\u62df\u5668\u80fd\u542f\u52a8\u4f46\u6781\u6162\uff0810 \u5206\u949f\u624d\u51fa\u753b\u9762\uff09\uff0c\u65e5\u5fd7\u5237 <code>DeadSystemException<\/code>\u3001<code>system_server<\/code> \u53cd\u590d\u88ab\u6740\u3002<\/p>\n<p><strong>\u6839\u56e0<\/strong>\uff1aVMware \u5728 AMD \u5e73\u53f0\u4e0a<strong>\u4e0d\u652f\u6301\u5d4c\u5957\u865a\u62df\u5316<\/strong>\uff08nested AMD-V\uff09\uff0c\u5ba2\u6237\u673a\u91cc\u770b\u4e0d\u5230 <code>svm<\/code> \u6807\u5fd7\uff0c\u81ea\u7136\u6ca1\u6709 <code>\/dev\/kvm<\/code>\u3002\u6a21\u62df\u5668\u53ea\u80fd\u9000\u56de TCG \u7eaf\u8f6f\u4ef6\u6a21\u62df\uff0c\u6027\u80fd\u5dee\u4e00\u4e2a\u6570\u91cf\u7ea7\uff0cAndroid \u7684 watchdog\uff08\u9ed8\u8ba4 60s\uff09\u7b49\u4e0d\u53ca\u5c31\u628a system_server \u6253\u6b7b\uff0c\u5f62\u6210\u91cd\u542f\u5faa\u73af\u3002<\/p>\n<p><strong>\u600e\u4e48\u786e\u8ba4<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\">ls -l \/dev\/kvm                    # No such file\ngrep -o svm \/proc\/cpuinfo | head  # \u7a7a<\/code><\/pre>\n<p><strong>\u89e3<\/strong>\uff1a\u7f16\u8bd1\u548c\u8fd0\u884c\u5206\u79bb \u2014\u2014 \u865a\u62df\u673a\u53ea\u8d1f\u8d23\u7f16\u8bd1\uff1b\u627e\u4e00\u53f0\u7269\u7406\u673a\uff08\u5f00 VT-x\/SVM\uff09\u8dd1\u6a21\u62df\u5668\u3002\u8fd9\u5c31\u662f\u7b14\u8bb0\u672c\u7684\u7528\u9014\u3002<\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_2%EF%BC%9Arepo_%E6%8A%A5_usrbinenv_python_%E6%B2%A1%E6%9C%89%E9%82%A3%E4%B8%AA%E6%96%87%E4%BB%B6%E6%88%96%E7%9B%AE%E5%BD%95\"><\/span>\u5751 2\uff1a<code>repo<\/code> \u62a5 <code>\/usr\/bin\/env: &#039;python&#039;: \u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a<code>repo init<\/code> \u76f4\u63a5\u5931\u8d25\u3002<\/p>\n<p><strong>\u6839\u56e0<\/strong>\uff1a\u6e05\u534e\u955c\u50cf\u7684 repo launcher \u7b2c\u4e00\u884c shebang \u662f <code>#!\/usr\/bin\/env python<\/code>\uff0c\u800c Ubuntu 18.04 \u9ed8\u8ba4\u53ea\u6709 <code>python3<\/code>\uff0c\u6ca1\u6709 <code>python<\/code>\u3002<\/p>\n<p><strong>\u89e3<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\">sed -i &#039;1s|.*|#!\/usr\/bin\/env python3|&#039; \/opt\/git-repo\/repo\nrepo --version   # \u80fd\u6253\u5370\u7248\u672c\u5373\u6210\u529f<\/code><\/pre>\n<blockquote>\n<p>\u4e0d\u8981\u88c5 python2 \u51d1\u5408\uff0cAOSP 12 \u7684 repo \u5de5\u5177\u94fe\u5df2\u7ecf\u9002\u914d py3\u3002<\/p>\n<\/blockquote>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_3%EF%BC%9Arepo_init_%E6%8A%A5_dubious_ownership_no_current_branch\"><\/span>\u5751 3\uff1a<code>repo init<\/code> \u62a5 <code>dubious ownership<\/code> \/ <code>no current branch<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a<code>fatal: detected dubious ownership in repository at &#039;\/opt\/git-repo&#039;<\/code>\uff0c\u6216 <code>repo init<\/code> \u8bf4\u6ca1\u6709\u5f53\u524d\u5206\u652f\u3002<\/p>\n<p><strong>\u6839\u56e0<\/strong>\uff1a<code>\/opt\/git-repo<\/code> \u662f root \u62f7\u7684\uff0c\u5c5e\u4e3b\u662f root\uff0c\u666e\u901a\u7528\u6237\u6267\u884c git \u4f1a\u89e6\u53d1\u5b89\u5168\u6821\u9a8c\uff08git 2.35+\uff09\u3002<\/p>\n<p><strong>\u89e3<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\">sudo chown -R $USER:$USER \/opt\/git-repo\ncd \/opt\/git-repo &amp;&amp; git checkout -B v2.32      # \u663e\u5f0f\u5efa\u5206\u652f<\/code><\/pre>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_4%EF%BC%9A%E4%BA%A7%E5%93%81%E9%80%89%E9%94%99_-_aosp_car_x86_64_%E2%89%A0_sdk_car_x86_64\"><\/span>\u5751 4\uff1a\u4ea7\u54c1\u9009\u9519 \u2014\u2014 <code>aosp_car_x86_64<\/code> \u2260 <code>sdk_car_x86_64<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a<code>lunch aosp_car_x86_64-userdebug<\/code> \u7f16\u51fa\u6765\u7684\u955c\u50cf\u662f\u7ed9 <strong>AOSP \u6784\u5efa\u6811\u5185<\/strong>\u7684\u6a21\u62df\u5668\u7528\u7684\uff08\u4f9d\u8d56 <code>super<\/code> \u52a8\u6001\u5206\u533a\u3001\u6784\u5efa\u6811\u76f8\u5bf9\u8def\u5f84\uff09\uff0c\u62f7\u5230\u5916\u90e8\u76ee\u5f55\u540e init \u76f4\u63a5\u62a5\u7f3a\u5206\u533a\u3002<\/p>\n<p><strong>\u6839\u56e0<\/strong>\uff1a\u4e24\u4e2a\u4ea7\u54c1\u5165\u53e3\u4e0d\u540c\uff1a<\/p>\n<ul>\n<li><code>aosp_car_x86_64<\/code>\uff1a<code>device\/generic\/car\/<\/code> \u4e0b\uff0c\u7528\u4e8e AOSP \u6811\u5185 <code>emulator<\/code><\/li>\n<li><code>sdk_car_x86_64<\/code>\uff1a<code>device\/generic\/goldfish\/car\/sdk_car_x86_64.mk<\/code>\uff0c\u7ee7\u627f <code>sdk_x86_64.mk<\/code>\uff0c\u662f<strong>\u7ed9 SDK \u98ce\u683c\u955c\u50cf\/\u6a21\u62df\u5668<\/strong>\u51c6\u5907\u7684<\/li>\n<\/ul>\n<p><strong>\u89e3<\/strong>\uff1a\u8f66\u673a\u6a21\u62df\u5668\u4e00\u5f8b\u7528<\/p>\n<pre><code class=\"language-bash\">lunch sdk_car_x86_64-userdebug<\/code><\/pre>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_5%EF%BC%9Apartitions_not_found_super_realpath_failed_devblockby-namesuper\"><\/span>\u5751 5\uff1a<code>partition(s) not found: super<\/code> \/ <code>realpath failed: \/dev\/block\/by-name\/super<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1ainit \u7b2c\u4e00\u9636\u6bb5\u7684\u65e5\u5fd7\uff1a<\/p>\n<pre><code>init: [libfs_mgr]ReadFstabFromDt(): failed to read fstab from dt\ninit: realpath failed: \/dev\/block\/by-name\/super: No such file or directory\ninit: Failed to mount required partitions early ...<\/code><\/pre>\n<p>\u7136\u540e kernel panic \u6216\u65e0\u9650\u91cd\u542f\u3002<\/p>\n<p><strong>\u6839\u56e0<\/strong>\uff08\u4e09\u5c42\uff09\uff1a<\/p>\n<ol>\n<li><code>sdk_car_x86_64<\/code> \u9ed8\u8ba4 <code>PRODUCT_USE_DYNAMIC_PARTITIONS := true<\/code>\uff0c<code>\/system<\/code>\u3001<code>\/product<\/code>\u3001<code>\/system_ext<\/code> \u90fd\u5728 <code>super<\/code> \u5206\u533a\u91cc\uff08\u903b\u8f91\u5206\u533a\uff0cLP metadata\uff09\u3002<\/li>\n<li>\u6a21\u62df\u5668 30.9 \u5728<strong>\u975e\u5b8c\u6574\u6784\u5efa\u6811\u73af\u5883<\/strong>\u4e0b\uff0c\u751f\u6210\u7684 <code>hardware-qemu.ini<\/code> \u53ea\u5217\u4e86 <code>system\/cache\/userdata\/encrypt\/vendor<\/code> \u4e94\u4e2a\u5757\u8bbe\u5907\uff0c<strong>\u6ca1\u6709 super<\/strong>\uff1bqemu \u547d\u4ee4\u884c\u91cc\u4e5f\u53ea\u6302 5 \u4e2a <code>virtio-blk<\/code>\u3002<\/li>\n<li>initrd \u91cc\u7684 <code>fstab.ranchu<\/code> \u5e26 <code>logical,avb=vbmeta,first_stage_mount<\/code>\uff0cinit \u5c31\u53bb\u627e <code>\/dev\/block\/by-name\/super<\/code> \u2192 \u627e\u4e0d\u5230 \u2192 \u5931\u8d25\u3002<\/li>\n<\/ol>\n<p><strong>\u600e\u4e48\u786e\u8ba4<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># 1) \u770b initrd \u91cc\u7684 fstab\uff08\u9700\u8981 lz4 + cpio\uff09\nlz4 -d -c ramdisk-qemu.img &gt; \/tmp\/rd.raw\nOFF=$(( ($(grep -abo &#039;TRAILER!!!&#039; \/tmp\/rd.raw | head -1 | cut -d: -f1) + 10 + 511) \/ 512 * 512 ))\ndd if=\/tmp\/rd.raw bs=1 skip=$OFF 2&gt;\/dev\/null | cpio -id --to-stdout .\/fstab.ranchu\n\n# 2) \u770b qemu \u6302\u4e86\u54ea\u4e9b\u76d8\ngrep -a &#039;Concatenated&#039; -A2 ~\/aaos\/emulator.log | tr &#039; &#039; &#039;\\n&#039; | grep &#039;id=&#039;\n# \u53ea\u51fa\u73b0 id=system\/cache\/userdata\/encrypt\/vendor\uff0c\u6ca1\u6709 super \u2192 \u8bc1\u5b9e\n\n# 3) \u770b\u955c\u50cf\u662f\u4e0d\u662f super\uff08LP metadata \u9b54\u6570\u5728\u504f\u79fb 4096\uff1a67 44 6c 61\uff09\ndd if=super.img bs=1 skip=4096 count=4 2&gt;\/dev\/null | od -An -tx1            # 67 44 6c 61 \u2192 \u662f super\ndd if=system-qemu.img bs=1 skip=4096 count=16 2&gt;\/dev\/null | od -An -tx1    # \u5168 0 \u2192 \u4e0d\u662f<\/code><\/pre>\n<p><strong>\u89e3<\/strong>\uff08\u4e24\u6761\u8def\uff0c\u9009\u540e\u8005\uff09\uff1a<\/p>\n<ul>\n<li>\u8ba9\u6a21\u62df\u5668\u6302 super\uff1a\u8bd5\u8fc7 <code>-qemu -drive ...<\/code> \u4f20\u53c2\uff0c\u88ab emulator \u53c2\u6570\u8f6c\u53d1\u7834\u574f\uff08\u89c1\u5751 12\uff09\uff0c\u653e\u5f03<\/li>\n<li><strong>\u6539\u6210\u9759\u6001\u5206\u533a<\/strong>\uff08\u672c\u6587 4.2\/4.3 \u7684\u505a\u6cd5\uff09\uff1a\u5173 <code>PRODUCT_USE_DYNAMIC_PARTITIONS<\/code>\uff0c<code>system.img<\/code> \u5c31\u662f\u771f ext4\uff0cfstab \u76f4\u63a5\u7528 <code>\/dev\/block\/vda<\/code><\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_6%EF%BC%9Apartitions_not_found_product_system_system_ext\"><\/span>\u5751 6\uff1a<code>partition(s) not found: product, system, system_ext<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a\u6539\u6210\u9759\u6001 fstab \u540e\uff0cinit \u7b49 10 \u79d2\u7136\u540e\uff1a<\/p>\n<pre><code>init: partition(s) not found in \/sys, waiting for their uevent(s): product, system, system_ext\ninit: Wait for partitions returned after 10011ms\ninit: Failed to mount required partitions early ...<\/code><\/pre>\n<p><strong>\u6839\u56e0<\/strong>\uff1a<code>product.img<\/code>\u3001<code>system_ext.img<\/code> \u662f<strong>\u72ec\u7acb\u5206\u533a\u955c\u50cf<\/strong>\uff0c\u4f46\u6a21\u62df\u5668\u53ea\u628a <code>system<\/code> \u548c <code>vendor<\/code> \u6302\u6210 virtio-blk\uff0cproduct\/system_ext \u6839\u672c\u6ca1\u5bf9\u5e94\u7684\u5757\u8bbe\u5907\u3002<\/p>\n<p><strong>\u89e3<\/strong>\uff1a\u628a\u8fd9\u4e24\u4e2a\u5206\u533a<strong>\u5408\u5e76\u8fdb system<\/strong>\uff08\u672c\u6587 4.2\uff09\uff1a<\/p>\n<pre><code class=\"language-make\">PRODUCT_BUILD_PRODUCT_IMAGE := false\nPRODUCT_BUILD_SYSTEM_EXT_IMAGE := false<\/code><\/pre>\n<p>\u539f\u7406\uff1a<code>build\/make\/core\/board_config.mk<\/code> \u91cc\uff0c\u8fd9\u4e24\u4e2a\u53d8\u91cf\u4e3a false \u65f6\uff1a<\/p>\n<pre><code class=\"language-make\">TARGET_COPY_OUT_PRODUCT := system\/product<\/code><\/pre>\n<p>\u5373 <code>\/product<\/code> \u7684\u5185\u5bb9\u843d\u5230 <code>\/system\/product<\/code>\uff0c<code>\/system_ext<\/code> \u540c\u7406\uff0c\u4e0d\u518d\u9700\u8981\u72ec\u7acb\u5206\u533a\u3002<\/p>\n<p><strong>\u6ce8\u610f<\/strong>\uff1a\u6539\u4e86\u8fd9\u4e24\u884c\u540e\uff0c\u7b2c\u4e00\u6b21\u589e\u91cf\u7f16\u53ef\u80fd\u62a5<\/p>\n<pre><code>ninja: error: mkdir(out\/target\/product\/emulator_car_x86_64\/system\/system_ext\/etc): No such file or directory<\/code><\/pre>\n<p>\u8fd9\u662f\u65e7 out \u76ee\u5f55\u6b8b\u7559\u5bfc\u81f4\u7684\u3002\u89e3\uff1a<code>rm -rf out\/target\/product\/emulator_car_x86_64<\/code> \u518d <code>m systemimage<\/code>\uff08\u5bf9\u8c61\u7f13\u5b58\u8fd8\u5728\uff0c\u4e0d\u4f1a\u5168\u91cf\u91cd\u7f16\uff09\u3002<\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_7%EF%BC%9A%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%B8%8D%E7%94%9F%E6%88%90_devblockby-name_%E8%BD%AF%E9%93%BE\"><\/span>\u5751 7\uff1a\u6a21\u62df\u5668\u4e0d\u751f\u6210 <code>\/dev\/block\/by-name\/*<\/code> \u8f6f\u94fe<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1afstab \u5199 <code>system \/system ext4 ... wait<\/code>\uff08\u9760 by-name\uff09\uff0cinit \u627e\u4e0d\u5230\u8bbe\u5907\u3002<\/p>\n<p><strong>\u6839\u56e0<\/strong>\uff1agoldfish \u7684 by-name \u94fe\u63a5\u6765\u81ea DT\uff08device tree\uff09\u91cc\u7684\u5206\u533a\u8282\u70b9\uff1b\u6a21\u62df\u5668\u5728\u5916\u90e8\u76ee\u5f55\u542f\u52a8\u65f6 DT \u91cc\u6ca1\u6709\u8fd9\u4e9b\u8282\u70b9\uff0c<code>ReadFstabFromDt()<\/code> \u76f4\u63a5\u5931\u8d25\uff08\u65e5\u5fd7\u91cc\u5c31\u6709\u8fd9\u884c\uff09\uff0c\u6240\u4ee5 by-name \u5168\u7a7a\u3002<\/p>\n<p><strong>\u89e3<\/strong>\uff1afstab \u522b\u7528\u540d\u5b57\uff0c\u76f4\u63a5\u5199\u5757\u8bbe\u5907\u8def\u5f84\uff1a<\/p>\n<pre><code>\/dev\/block\/vda   \/system  ext4  ro,barrier=1  wait,first_stage_mount\n\/dev\/block\/vde   \/vendor  ext4  ro,barrier=1  wait,first_stage_mount<\/code><\/pre>\n<p><strong>\u600e\u4e48\u786e\u8ba4\u8bbe\u5907\u53f7<\/strong>\uff1a\u770b qemu \u53c2\u6570\u91cc\u7684\u6302\u8f7d\u987a\u5e8f\uff1a<\/p>\n<pre><code class=\"language-bash\">grep -a &#039;Concatenated&#039; -A1 ~\/aaos\/emulator.log | tr &#039; &#039; &#039;\\n&#039; | grep -E &#039;^if=none&#039;\n# index=0 id=system \/ 1 cache \/ 2 userdata \/ 3 encrypt \/ 4 vendor\n# \u5185\u6838\u6309\u987a\u5e8f\u547d\u540d virtio-blk \u2192 vda, vdb, vdc, vdd, vde<\/code><\/pre>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_8%EF%BC%9Arebootvold-failed_%E6%97%A0%E9%99%90%E9%87%8D%E5%90%AF%EF%BC%881230_%E6%AC%A1%EF%BC%89\"><\/span>\u5751 8\uff1a<code>reboot,vold-failed<\/code> \u65e0\u9650\u91cd\u542f\uff0812~30 \u6b21\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a\u65e5\u5fd7\u91cc init \u8d77\u6765\u540e\u53c8\u9a6c\u4e0a\uff1a<\/p>\n<pre><code>init: Service &#039;vold&#039; (pid 190) received signal 6\ninit: Service with &#039;reboot_on_failure&#039; option failed, shutting down system.\ninit: Got shutdown_command &#039;reboot,vold-failed&#039;\nreboot: Restarting system with command &#039;vold-failed&#039;<\/code><\/pre>\n<p><strong>\u6839\u56e0<\/strong>\uff1a\u6211\u4e00\u5f00\u59cb\u628a fstab \u5199\u5f97\u592a\u201c\u5e72\u51c0\u201d\uff0c\u53ea\u7559\u4e86 system\/vendor \u4e24\u884c\uff0c<strong>\u5220\u6389\u4e86 <code>\/data<\/code> \u548c <code>\/metadata<\/code> \u6761\u76ee<\/strong>\u3002<code>vold<\/code>\uff08\u5b58\u50a8\u5b88\u62a4\u8fdb\u7a0b\uff09\u542f\u52a8\u65f6\u8981\u8bfb fstab \u91cc\u7684 data \u5206\u533a\uff0c\u8bfb\u4e0d\u5230\u5c31 abort\uff08signal 6 = SIGABRT\uff09\uff0c\u800c <code>vold.rc<\/code> \u91cc\u914d\u4e86 <code>reboot_on_failure<\/code>\uff0c\u4e8e\u662f\u65e0\u9650\u91cd\u542f\u3002<\/p>\n<p><strong>\u600e\u4e48\u786e\u8ba4<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># \u6570\u4e00\u4e0b\u91cd\u542f\u4e86\u51e0\u6b21\ngrep -ac &#039;init first stage started&#039; ~\/aaos\/emulator.log    # &gt;1 \u5c31\u662f\u5728\u5faa\u73af\n# \u627e\u91cd\u542f\u539f\u56e0\ngrep -aE &#039;reboot,|received signal&#039; ~\/aaos\/emulator.log | tail<\/code><\/pre>\n<p><strong>\u89e3<\/strong>\uff1afstab \u5fc5\u987b\u4fdd\u7559 data \u548c metadata\uff1a<\/p>\n<pre><code>\/dev\/block\/vdc   \/data       ext4    noatime,nosuid,nodev,nomblk_io_submit,errors=panic   wait,check,quota,fileencryption=aes-256-xts:aes-256-cts,reservedsize=128M,latemount\n\/dev\/block\/pci\/pci0000:00\/0000:00:06.0\/by-name\/metadata    \/metadata    ext4    noatime,nosuid,nodev    wait,formattable,first_stage_mount<\/code><\/pre>\n<p><strong>\u6ce8\u610f<\/strong>\uff1a<code>\/vendor\/etc\/fstab.ranchu<\/code> \u662f\u6253\u8fdb <code>vendor.img<\/code> \u7684\uff0c\u5149\u6539 ramdisk \u4e0d\u591f\uff0c\u5fc5\u987b <code>m vendor.img<\/code> \u91cd\u7f16\uff0c\u5426\u5219 vold \u8bfb\u7684\u8fd8\u662f\u65e7\u8868\uff08\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u4f1a\u9047\u5230\u201c\u6539\u4e86 fstab \u4f46\u6ca1\u751f\u6548\u201d\uff09\u3002<\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_9%EF%BC%9A%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%BC%98%E5%85%88%E7%94%A8_system-qemuimg%EF%BC%8C%E8%80%8C%E5%AE%83%E4%B8%8D%E6%98%AF_ext4\"><\/span>\u5751 9\uff1a\u6a21\u62df\u5668\u4f18\u5148\u7528 <code>system-qemu.img<\/code>\uff0c\u800c\u5b83\u4e0d\u662f ext4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1afstab \u6307\u5411 <code>vda<\/code>\uff0cinit \u62a5\uff1a<\/p>\n<pre><code>EXT4-fs (vda): VFS: Can&#039;t find ext4 filesystem\ninit: Failed to mount \/system: Invalid argument<\/code><\/pre>\n<p><strong>\u6839\u56e0<\/strong>\uff1a\u4ea7\u7269\u76ee\u5f55\u91cc\u540c\u65f6\u6709 <code>system.img<\/code> \u548c <code>system-qemu.img<\/code>\uff0c\u6a21\u62df\u5668<strong>\u4f18\u5148\u9009 <code>system-qemu.img<\/code><\/strong>\uff08\u65e5\u5fd7\uff1a<code>Using direct system image: ...system-qemu.img<\/code>\uff09\u3002\u4f46 <code>system-qemu.img<\/code> \u662f qemu \u4e13\u7528\u7684\u5305\u88c5\uff085.5G\uff0c\u5185\u542b super \u5e03\u5c40\uff09\uff0c<strong>\u4e0d\u662f ext4<\/strong>\uff0c\u5185\u6838\u6302\u4e0d\u4e0a\u3002<\/p>\n<p><strong>\u600e\u4e48\u786e\u8ba4<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># ext4 \u7684\u9b54\u6570 0xEF53 \u5728\u6587\u4ef6\u504f\u79fb 1024+56 = 1080\ndd if=system.img bs=1 skip=1080 count=2 2&gt;\/dev\/null | od -An -tx1        # 53 ef \u2192 ext4\ndd if=system-qemu.img bs=1 skip=1080 count=2 2&gt;\/dev\/null | od -An -tx1   # \u4e0d\u662f 53 ef<\/code><\/pre>\n<p><strong>\u89e3<\/strong>\uff1a\u628a <code>system-qemu.img<\/code> \u6539\u540d\/\u79fb\u8d70\uff0c\u903c\u6a21\u62df\u5668\u7528 <code>system.img<\/code>\uff1a<\/p>\n<pre><code class=\"language-bash\">mv system-qemu.img system-qemu.img.bak\n# vendor \u540c\u7406\uff1amv vendor-qemu.img vendor-qemu.img.bak\uff08\u7528 vendor.img\uff09<\/code><\/pre>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_10%EF%BC%9AWindows_%E6%89%93%E5%8C%85%E8%A7%A3%E5%8C%85%E4%B8%A2%E5%8F%AF%E6%89%A7%E8%A1%8C%E4%BD%8D\"><\/span>\u5751 10\uff1aWindows \u6253\u5305\u89e3\u5305\u4e22\u53ef\u6267\u884c\u4f4d<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a\u7b14\u8bb0\u672c\u4e0a <code>.\/emulator<\/code> \u62a5<\/p>\n<pre><code>Could not launch &#039;...\/qemu-system-x86_64&#039;: Permission denied<\/code><\/pre>\n<p><strong>\u6839\u56e0<\/strong>\uff1atar\/zip \u7ecf\u8fc7 Windows \u4e2d\u8f6c\uff0cUnix \u6743\u9650\u4f4d\u4e22\u5931\uff08\u6216\u6587\u4ef6\u7cfb\u7edf\u662f NTFS\/exFAT\uff0c\u672c\u8eab\u4e0d\u5b58\u6743\u9650\uff09\u3002<\/p>\n<p><strong>\u89e3<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\">chmod -R u+x ~\/aaos\/kvm-package\/linux-x86_64\nchmod +x ~\/aaos\/kvm-package\/bin\/adb<\/code><\/pre>\n<blockquote>\n<p>\u7528 <code>sudo<\/code> \u89e3\u538b\/\u8fd0\u884c\u8fc7\u7684\u8bdd\uff0c\u8fd8\u8981 <code>sudo chown -R $USER:$USER ~\/aaos<\/code>\uff0c\u5426\u5219\u5c5e\u4e3b\u662f root\u3002<\/p>\n<\/blockquote>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_11%EF%BC%9A%E5%A4%A7%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93_-_%E7%BD%91%E7%BB%9C%E6%85%A2_%E4%BC%A0%E4%B8%80%E5%8D%8A%E6%96%AD\"><\/span>\u5751 11\uff1a\u5927\u6587\u4ef6\u4f20\u8f93 \u2014\u2014 \u7f51\u7edc\u6162 \/ \u4f20\u4e00\u534a\u65ad<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a5.8G \u7684 <code>super.img<\/code> \u8d70 WiFi scp\uff0c\u901f\u5ea6 2~3MB\/s\uff0c\u4e2d\u9014\u65ad\u8fde\uff1bU \u76d8\u5c31\u5feb\u5f97\u591a\u3002<\/p>\n<p><strong>\u7ecf\u9a8c<\/strong>\uff1a<\/p>\n<ul>\n<li><strong>&gt; 1G \u7684\u6587\u4ef6\u8d70 U \u76d8<\/strong>\uff08USB3 \u7ea6 20~40MB\/s\uff0c\u6bd4 WiFi \u7a33\uff09<\/li>\n<li>\u975e\u8981\u8d70\u7f51\u7edc\uff0c\u5148 <code>gzip -1<\/code> \u538b\u7f29\uff08<code>super.img<\/code> 5.8G \u2192 846M\uff0c\u538b\u7f29\u7387\u6781\u9ad8\uff0c\u56e0\u4e3a\u5927\u91cf\u7a7a\u6d1e\uff09<\/li>\n<li>\u4f20\u5b8c<strong>\u5fc5\u987b\u6821\u9a8c<\/strong>\uff1a<\/li>\n<\/ul>\n<pre><code class=\"language-bash\">md5sum super.img        # \u4e24\u7aef\u5bf9\u6bd4\ngzip -t x.img.gz        # \u6821\u9a8c\u538b\u7f29\u5305\u5b8c\u6574\u6027<\/code><\/pre>\n<ul>\n<li>HTTP \u65ad\u70b9\u7eed\u4f20\u53ef\u4ee5\u7528 <code>curl -C -<\/code>\uff0c\u6216\u5206\u6bb5\uff1a<code>tail -c<\/code> \u8865\u4f20\u5269\u4f59\u5b57\u8282\u540e <code>cat &gt;&gt;<\/code> \u62fc\u63a5<\/li>\n<\/ul>\n<p><strong>\u6559\u8bad<\/strong>\uff1a\u6211\u4eec\u82b1\u4e86\u8fd1 20 \u5206\u949f\u91cd\u4f20\u4e00\u4e2a 954M \u7684\u5305\uff0c\u540e\u6765\u53d1\u73b0<strong>\u6839\u672c\u4e0d\u9700\u8981<\/strong>\u2014\u2014\u7f3a\u7684\u662f\u51e0\u4e2a\u5c0f\u6587\u4ef6\u3002\u5148\u60f3\u6e05\u695a\u7f3a\u4ec0\u4e48\uff0c\u518d\u51b3\u5b9a\u4f20\u4ec0\u4e48\u3002<\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_12%EF%BC%9A-qemu_%E7%9B%B4%E4%BC%A0%E5%8F%82%E6%95%B0%E4%BC%9A%E8%A2%AB_emulator_%E6%94%B9%E5%86%99\"><\/span>\u5751 12\uff1a<code>-qemu<\/code> \u76f4\u4f20\u53c2\u6570\u4f1a\u88ab emulator \u6539\u5199<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a\u60f3\u7ed9\u6a21\u62df\u5668\u52a0\u989d\u5916\u78c1\u76d8\uff1a<\/p>\n<pre><code class=\"language-bash\">emulator ... -qemu -drive &quot;file=product.img,if=none,id=product,format=raw,readonly=on&quot; \\\n                  -device &quot;virtio-blk-pci,drive=product&quot;<\/code><\/pre>\n<p>\u62a5\u9519\uff1a<\/p>\n<pre><code>qemu-system-x86_64-headless: -drive ...: A block device must be specified for &quot;file&quot;\n# \u6216\u8005\nqemu-system-x86_64-headless: -device virtio-blk-pci,drive=product: Device needs media, but drive is empty<\/code><\/pre>\n<p><strong>\u6839\u56e0<\/strong>\uff1aemulator \u4f1a\u628a <code>-qemu<\/code> \u4e4b\u540e\u7684\u53c2\u6570<strong>\u91cd\u65b0\u62fc\u63a5\/\u89e3\u6790<\/strong>\uff08\u9017\u53f7\u3001\u5f15\u53f7\u5904\u7406\u4e0d\u7a33\u5b9a\uff09\uff0c\u8def\u5f84\u6216 <code>readonly<\/code> \u4f20\u4e0d\u8fc7\u53bb\uff0cqemu \u6536\u5230\u7684 <code>file<\/code> \u662f\u7a7a\u503c\u3002<\/p>\n<p><strong>\u89e3<\/strong>\uff1a\u4e0d\u8981\u786c\u585e\u3002\u6539\u7528\u5b98\u65b9\u652f\u6301\u7684\u65b9\u5f0f\uff08\u672c\u6587\u7684 <code>PRODUCT_BUILD_*<\/code> \u5408\u5e76\u5206\u533a\uff09\u6216\u8005\u6539 AVD \u7684 <code>hardware-qemu.ini<\/code>\u3002<strong>\u7ed3\u8bba\uff1a\u80fd\u901a\u8fc7\u6784\u5efa\u914d\u7f6e\u89e3\u51b3\u7684\uff0c\u4e0d\u8981\u7528 <code>-qemu<\/code> \u7ed5\u3002<\/strong><\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_13%EF%BC%9Apkill_%E7%9A%84%E4%B8%A4%E4%B8%AA%E5%9D%91%EF%BC%88%E8%B0%83%E8%AF%95%E6%97%B6%E6%8A%8A%E8%87%AA%E5%B7%B1%E6%9D%80%E4%BA%86%EF%BC%89\"><\/span>\u5751 13\uff1a<code>pkill<\/code> \u7684\u4e24\u4e2a\u5751\uff08\u8c03\u8bd5\u65f6\u628a\u81ea\u5df1\u6740\u4e86\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1aSSH \u6267\u884c <code>pkill -f qemu-system<\/code>\uff0c\u8fde\u63a5\u76f4\u63a5\u65ad\u5f00\uff0c\u547d\u4ee4\u6ca1\u6709\u4efb\u4f55\u8f93\u51fa\u3002<\/p>\n<p><strong>\u6839\u56e0<\/strong>\uff1a<\/p>\n<ol>\n<li><code>pkill -f<\/code> \u5339\u914d\u7684\u662f<strong>\u5b8c\u6574\u547d\u4ee4\u884c<\/strong>\uff0c\u800c\u4f60\u8fd9\u6761\u547d\u4ee4\u7684 shell \u81ea\u8eab\u547d\u4ee4\u884c\u91cc\u5c31\u542b <code>qemu-system<\/code>\uff0c\u4e8e\u662f\u628a\u81ea\u5df1\u4e5f\u6740\u4e86\u3002<\/li>\n<li><code>pkill -x qemu-system-x86_64<\/code> \u4e0d\u751f\u6548 \u2014\u2014 Linux \u8fdb\u7a0b\u540d\u6700\u957f <strong>15 \u5b57\u7b26<\/strong>\uff08<code>qemu-system-x86<\/code>\uff09\uff0c\u5168\u540d\u5339\u914d\u4e0d\u4e0a\u3002<\/li>\n<\/ol>\n<p><strong>\u89e3<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># \u628a kill \u903b\u8f91\u5199\u8fdb\u811a\u672c\u91cc\u6267\u884c\uff08\u811a\u672c\u7684\u547d\u4ee4\u884c\u4e0d\u542b\u76ee\u6807\u4e32\uff09\npkill -f &#039;qemu\/linux-x86_64\/qemu-system&#039;\n# \u6216\u8005\u6309 PID\nkill $(pgrep -f &#039;qemu\/linux-x86_64\/qemu-system&#039; | head -1)<\/code><\/pre>\n<p><strong>\u53e6\u4e00\u4e2a\u5751<\/strong>\uff1a\u7528 <code>setsid nohup ... &amp;<\/code> \u542f\u52a8\u7684\u8fdb\u7a0b\uff0cSSH \u65ad\u5f00\u4e0d\u53d7\u5f71\u54cd\uff1b\u4f46\u5982\u679c\u4f60\u5728 SSH \u547d\u4ee4\u91cc\u7528 <code>pkill<\/code> \u628a\u7236 shell \u6740\u4e86\uff0cnohup \u7684\u8fdb\u7a0b\u4e5f\u4f1a\u88ab\u8fde\u5e26\u3002<strong>\u5148\u786e\u8ba4 PID \u518d\u6740\u3002<\/strong><\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_14%EF%BC%9Aadb_offline_%E4%B8%80%E7%9B%B4%E4%B8%8D%E5%8F%98%E6%88%90_device\"><\/span>\u5751 14\uff1a<code>adb offline<\/code> \u4e00\u76f4\u4e0d\u53d8\u6210 <code>device<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1a<code>adb devices<\/code> \u663e\u793a <code>emulator-5554 offline<\/code>\uff0c\u6301\u7eed\u51e0\u5206\u949f\u3002<\/p>\n<p><strong>\u6839\u56e0<\/strong>\uff08\u6309\u6982\u7387\uff09\uff1a<\/p>\n<ol>\n<li>\u7cfb\u7edf\u6839\u672c\u6ca1\u542f\u52a8\u5b8c\uff08init \u6302\u5728\u6302\u8f7d\/\u91cd\u542f\u5faa\u73af\uff09\u2014\u2014\u770b <code>-show-kernel<\/code> \u65e5\u5fd7<\/li>\n<li><code>adbd<\/code> \u6ca1\u8d77\u6765\uff08<code>init.rc<\/code> \u91cc adbd \u4f9d\u8d56 <code>\/data<\/code> \u6302\u8f7d\u6210\u529f\uff09<\/li>\n<li>adb \u7248\u672c\u4e0d\u5339\u914d\uff08\u6a21\u62df\u5668\u81ea\u5e26\u7684 <code>adb<\/code> \u5fc5\u987b\u7528\u540c\u4e00\u4e2a\uff09<\/li>\n<li>\u4e4b\u524d\u6b8b\u7559\u7684 adb server \u8fde\u7684\u662f\u65e7\u5b9e\u4f8b<\/li>\n<\/ol>\n<p><strong>\u89e3<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\">adb kill-server &amp;&amp; adb devices\n# \u770b\u5185\u6838\u65e5\u5fd7\u5224\u65ad\u662f\u4e0d\u662f\u5728\u91cd\u542f\u5faa\u73af\ngrep -ac &#039;init first stage started&#039; ~\/aaos\/emulator.log\n# \u4e00\u6b21\u6027\u5b8c\u6574\u65e5\u5fd7\nemulator -no-window -show-kernel -verbose &gt; emulator.log 2&gt;&amp;1<\/code><\/pre>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_15%EF%BC%9AWindows_%E4%B8%8A%E7%9A%84_SDK_%E6%A8%A1%E6%8B%9F%E5%99%A8%E8%83%BD%E8%B7%91%E5%AE%98%E6%96%B9%E9%95%9C%E5%83%8F%EF%BC%8C%E4%BD%86%E8%B7%91%E4%B8%8D%E4%BA%86%E4%BD%A0%E7%BC%96%E7%9A%84%E9%95%9C%E5%83%8F\"><\/span>\u5751 15\uff1aWindows \u4e0a\u7684 SDK \u6a21\u62df\u5668\u80fd\u8dd1\u5b98\u65b9\u955c\u50cf\uff0c\u4f46\u8dd1\u4e0d\u4e86\u4f60\u7f16\u7684\u955c\u50cf<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u73b0\u8c61<\/strong>\uff1aWindows \u7684 Android Emulator\uff08WHPX \u52a0\u901f\uff09\u80fd\u6b63\u5e38\u542f\u52a8\u5b98\u65b9 <code>android-automotive-playstore<\/code> API32 \u955c\u50cf\uff0c\u4f46\u6362\u6210\u81ea\u5df1\u7f16\u7684\u955c\u50cf\u5c31\u62a5\uff1a<\/p>\n<pre><code>partition(s) not found in \/sys: super, vbmeta<\/code><\/pre>\n<p><strong>\u6839\u56e0<\/strong>\uff1aSDK emulator 37.x \u548c AOSP \u81ea\u5e26 emulator 30.9 \u7684\u5206\u533a\u7ea6\u5b9a\u4e0d\u540c\uff1a\u524d\u8005\u6309 <code>advancedFeatures.ini<\/code> + \u955c\u50cf\u5185\u7684 <code>super_empty.img<\/code> \u51b3\u5b9a\u5e03\u5c40\uff0c\u540e\u8005\u6309\u6784\u5efa\u6811\u91cc\u7684 <code>hardware-qemu.ini<\/code>\u3002\u81ea\u7f16\u955c\u50cf\u9ed8\u8ba4\u662f\u52a8\u6001\u5206\u533a\uff0c\u4e24\u8fb9\u90fd\u4e0d\u8ba4\u201c\u6563\u88c5\u62f7\u8d1d\u201d\u7684\u573a\u666f\u3002<\/p>\n<p><strong>\u7ed3\u8bba<\/strong>\uff1a<strong>\u8dd1\u81ea\u7f16\u955c\u50cf\uff0c\u7528 AOSP \u81ea\u5e26\u7684 emulator + KVM Linux<\/strong>\uff0c\u4e0d\u8981\u5728 Windows SDK \u6a21\u62df\u5668\u4e0a\u6298\u817e\u3002<\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_16%EF%BC%9A%E7%BC%96%E8%AF%91%E6%97%B6%E9%97%B4%E9%95%BF_%E5%A2%9E%E9%87%8F%E7%BC%96%E8%AF%91%E7%9A%84%E9%A2%84%E6%9C%9F\"><\/span>\u5751 16\uff1a\u7f16\u8bd1\u65f6\u95f4\u957f \/ \u589e\u91cf\u7f16\u8bd1\u7684\u9884\u671f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th>\u573a\u666f<\/th>\n<th>\u65f6\u95f4\uff08\u673a\u68b0\u76d8\uff09<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>repo sync<\/code> \u9996\u6b21<\/td>\n<td>25~40 \u5206\u949f\uff0845G\uff09<\/td>\n<\/tr>\n<tr>\n<td><code>m -j8<\/code> \u5168\u91cf<\/td>\n<td><strong>\u7ea6 2 \u5c0f\u65f6 33 \u5206<\/strong><\/td>\n<\/tr>\n<tr>\n<td>\u6539 fstab \u540e <code>m systemimage<\/code><\/td>\n<td>7~15 \u5206\u949f<\/td>\n<\/tr>\n<tr>\n<td>\u53ea\u6539 ramdisk<\/td>\n<td>13 \u79d2<\/td>\n<\/tr>\n<tr>\n<td>\u6539\u4ea7\u54c1\u914d\u7f6e\u540e\u9996\u7f16\uff08out \u88ab\u6e05\uff09<\/td>\n<td>15~40 \u5206\u949f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u5efa\u8bae<\/strong>\uff1a<code>out\/<\/code> \u4e0d\u8981\u968f\u624b\u5220\uff1b\u6539\u4e86 <code>PRODUCT_*<\/code> \u53d8\u91cf\u5bfc\u81f4 ninja \u62a5\u76ee\u5f55\u4e0d\u5b58\u5728\u65f6\uff0c\u53ea\u5220 <code>out\/target\/product\/&lt;product&gt;<\/code>\uff0c\u522b\u5220 <code>out\/soong<\/code>\u3002<\/p>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9D%91_17%EF%BC%9A%E9%AA%8C%E8%AF%81_KVM_%E5%88%B0%E5%BA%95%E6%9C%89%E6%B2%A1%E6%9C%89%E7%94%9F%E6%95%88\"><\/span>\u5751 17\uff1a\u9a8c\u8bc1 KVM \u5230\u5e95\u6709\u6ca1\u6709\u751f\u6548<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\"># 1) \u6a21\u62df\u5668\u8fdb\u7a0b\u6709\u6ca1\u6709\u6253\u5f00 \/dev\/kvm\nlsof \/dev\/kvm\n# 2) \u542f\u52a8\u65e5\u5fd7\u91cc\u627e\u52a0\u901f\u4fe1\u606f\ngrep -aiE &#039;kvm|accel&#039; ~\/aaos\/emulator.log | head\n# 3) \u901f\u5ea6\u4f53\u611f\uff1aKVM \u4e0b 40~60 \u79d2\u8fdb\u8f66\u673a\uff1bTCG \u4e0b 10 \u5206\u949f\u4ee5\u4e0a<\/code><\/pre>\n<blockquote>\n<p>\u6ce8\u610f\uff1a<code>qemu<\/code> \u547d\u4ee4\u884c\u91cc\u4e0d\u4e00\u5b9a\u51fa\u73b0 <code>-enable-kvm<\/code> \u5b57\u6837\uff08emulator \u5185\u90e8\u5904\u7406\uff09\uff0c\u4ee5 <code>lsof \/dev\/kvm<\/code> \u4e3a\u51c6\u3002<\/p>\n<\/blockquote>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"9_%E6%8E%92%E9%9A%9C%E5%91%BD%E4%BB%A4%E9%80%9F%E6%9F%A5\"><\/span>9. \u6392\u969c\u547d\u4ee4\u901f\u67e5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code class=\"language-bash\"># \u5b8c\u6574\u542f\u52a8\u65e5\u5fd7\n$EMU\/emulator -no-window -show-kernel -verbose &gt; ~\/aaos\/emulator.log 2&gt;&amp;1 &amp;\n\n# \u91cd\u542f\u5faa\u73af\uff1f\ngrep -ac &#039;init first stage started&#039; ~\/aaos\/emulator.log\n\n# \u6302\u8f7d\u5931\u8d25\u539f\u56e0\ngrep -aE &#039;partition\\(s\\) not found|Failed to mount|realpath failed&#039; ~\/aaos\/emulator.log | tail\n\n# \u8c01\u89e6\u53d1\u4e86\u91cd\u542f\ngrep -aE &#039;reboot,|received signal|shutdown_command&#039; ~\/aaos\/emulator.log | tail\n\n# \u6302\u4e86\u54ea\u4e9b\u76d8\ngrep -a &#039;Concatenated&#039; -A1 ~\/aaos\/emulator.log | tr &#039; &#039; &#039;\\n&#039; | grep -E &#039;^if=none|^id=&#039;\n\n# \u955c\u50cf\u683c\u5f0f\ndd if=system.img bs=1 skip=1080 count=2 2&gt;\/dev\/null | od -An -tx1      # 53 ef = ext4\ndd if=super.img  bs=1 skip=4096 count=4 2&gt;\/dev\/null | od -An -tx1      # 67 44 6c 61 = LP metadata\n\n# \u6a21\u62df\u5668\u8fdb\u7a0b\npgrep -fa &#039;qemu\/linux-x86_64\/qemu-system&#039;<\/code><\/pre>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"10_%E4%B8%80%E5%8F%A5%E8%AF%9D%E6%80%BB%E7%BB%93\"><\/span>10. \u4e00\u53e5\u8bdd\u603b\u7ed3<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>\u7f16\u8bd1\u5728 VMware \u91cc\u7684 Ubuntu\uff08\u65e0 KVM \u4e5f\u80fd\u7f16\uff09\uff0c\u8dd1\u5728\u7269\u7406 Ubuntu \u7b14\u8bb0\u672c\uff08KVM\uff09<\/strong>\uff1b<br \/>\n\u81ea\u7f16\u955c\u50cf\u5fc5\u987b\u6539\u6210\u300c<strong>\u9759\u6001\u5206\u533a + product\/system_ext \u5408\u5e76\u8fdb system + \u663e\u5f0f\u8bbe\u5907\u53f7 fstab\uff08\u542b data\/metadata\uff09<\/strong>\u300d\uff0c\u624d\u80fd\u88ab AOSP \u81ea\u5e26 emulator \u542f\u52a8\u3002<\/p>\n<button class=\"simplefavorite-button\" data-postid=\"16473\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 AAOS \u4ece\u96f6\u5230\u8dd1\u8d77\u6765 \u2014\u2014 \u5168\u6d41\u7a0b + \u8e29\u5751\u8be6\u89e30. \u6574\u4f53\u67b6\u67841. \u865a\u62df\u673a\u51c6\u59072. \u7cfb\u7edf\u521d\u59cb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1245],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/16473"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16473"}],"version-history":[{"count":1,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/16473\/revisions"}],"predecessor-version":[{"id":16474,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/16473\/revisions\/16474"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16473"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}