跳至內容

Android設備啟動過程

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書

安卓設備的啟動過程始於SoC(單片系統)通電,在見到主界面或進入恢復快速啟動等特殊模式時結束。[a]安卓設備的啟動過程受到SoC製造商所設計的固件影響。

背景

截至2018年,Android設備上90%的SoC由高通三星聯發科供應。[1]其他供應商包括瑞芯微電子美滿電子科技英偉達及之前的德州儀器

歷史

Android KitKat(Android 4.4)引入了啟動驗證,啟動驗證是加載引導程序時的安全措施。[2]

啟動階段

主引導程序

引導過程的第一階是啟動主引導程序(PBL),其存儲在引導ROM(Boot ROM)[3]中,由芯片組製造商編寫代碼。[4]

使用主引導程序來驗證下一階段引導程序的可靠性。

在三星智能手機上,引導ROM使用三星安全啟動密鑰(SSBK)來驗證下一階段。[5]

在高通的SoC上,可以從主引導程序進入高通緊急下載模式。

如果加載並驗證次級引導程序時失敗,則會進入EDL。[6][需要較佳來源]

次級引導程序

由於引導ROM中的儲存空間有限,因此使用嵌入式多媒體卡eMMC)或eUFS來加載次級引導程序。[7] 次級引導程序初始化TrustZone(信任區)。[7][8]

例如高通MSM8960,次級引導程序1加載次級引導程序2。 次級引導程序2會加載TrustZone和次級引導程序3。[9]

次級引導程序現在被高通稱為XBL(可擴展引導程序),並使用統一可延伸韌體介面(UEFI)來進行交叉兼容,以便在第二階段啟動除Android以外的操作系統。

高通使用LK(Little Kernel)或XBL(eXtenable Bootloader),聯發科使用Das U-Boot[10] Little Kernel是一個用於嵌入式設備微內核,經過高通的修改後可以用作次級引導程序。[11]

Android引導程序

Android Bootloader(Aboot),它實現了fastboot接口(三星設備中沒有fastboot)。Aboot用於驗證引導程序和恢復分區的可靠性。 [12]通過在手機上按下特定的組合鍵,設備還可以在恢復模式下啟動。接着Aboot將控制權轉移到Linux內核

Android內核和initramfs(初始RAM文件系統 )

initramfs是一個經過Gzip壓縮的Cpio檔案,其中包含一個小型根文件系統。它包含了被執行的init程序。Android內核是由Linux內核修改後的版本。Init程序掛載了分區。dm-verity用於驗證fstab文件中指定分區的完整性。dm-verity是由Google從Android 4.4開始引入的 Linux內核模塊。現今實現了基於塊的驗證,三星已增加對該文件的支持。 [13]

Zygote進程

Zygote進程由init進程衍生,負責啟動Android應用程序和服務。它將那些經常使用的類加載並初始化到堆中。例如庫的dex數據結構。Zygote進程啟動後,它會監聽套接字上的命令。當要啟動新應用程序時,會向Zygote進程發送命令,Zygote進程會執行fork系統調用[需要引用]

分區布局

Android系統被劃分在不同的分區中。 [14]

高通平台利用了GUID分區表。此規範是UEFI規範的一部分,但不依賴於UEFI固件。[15]

參見

注釋

  1. ^ These modes tend to support a feature to resume regular booting

參考文獻

  1. ^ Garri, Khireddine; Kenaza, Tayeb; Aissani, Mohamed. http://dx.doi.org/10.1109/saconet.2018.8585583 |chapterurl=缺少標題 (幫助). A Novel approach for bootkit detection in Android Platform. IEEE. October 2018: 277–282. ISBN 978-1-5386-9493-0. doi:10.1109/saconet.2018.8585583. 
  2. ^ Android Verified Boot [LWN.net]. LWN.net. [2021-09-25]. (原始內容存檔於2015-04-22). 
  3. ^ Yuan, Pengfei; Guo, Yao; Chen, Xiangqun; Mei, Hong. https://ieeexplore.ieee.org/document/8350440 |chapterurl=缺少標題 (幫助). Device-Specific Linux Kernel Optimization for Android Smartphones. March 2018: 65–72. ISBN 978-1-5386-4879-7. doi:10.1109/MobileCloud.2018.00018. 
  4. ^ Hay, Roee. fastboot oem vuln: android bootloader vulnerabilities in vendor customizations. Proceedings of the 11th USENIX Conference on Offensive Technologies. WOOT'17 (Vancouver, BC, Canada: USENIX Association). 2017-08-14: 22. 
  5. ^ Alendal, Gunnar; Dyrkolbotn, Geir Olav; Axelsson, Stefan. Forensics acquisition — Analysis and circumvention of samsung secure boot enforced common criteria mode. Digital Investigation. 2018-03-01, 24: S60–S67. ISSN 1742-2876. doi:10.1016/j.diin.2018.01.008. hdl:11250/2723051可免費查閱 (英語). 
  6. ^ Exploiting Qualcomm EDL Programmers (1): Gaining Access & PBL Internals. alephsecurity.com. 2018-01-22 [2021-09-13] (英語). 
  7. ^ 7.0 7.1 Yuan, Pengfei; Guo, Yao; Chen, Xiangqun; Mei, Hong. http://dx.doi.org/10.1109/mobilecloud.2018.00018 |chapterurl=缺少標題 (幫助). Device-Specific Linux Kernel Optimization for Android Smartphones. IEEE. March 2018: 65–72. ISBN 978-1-5386-4879-7. doi:10.1109/mobilecloud.2018.00018. 
  8. ^ Kanonov, Uri; Wool, Avishai. http://dx.doi.org/10.1145/2994459.2994470 |chapterurl=缺少標題 (幫助). Secure Containers in Android. SPSM '16. New York, NY, USA: ACM. 2016-10-24: 3–12. ISBN 9781450345644. doi:10.1145/2994459.2994470. 
  9. ^ Tao, Chen, Yue Zhang, Yulong Wang, Zhi Wei. Downgrade Attack on TrustZone. 2017-07-17. OCLC 1106269801. 
  10. ^ Garri, Khireddine; Kenaza, Tayeb; Aissani, Mohamed. http://dx.doi.org/10.1109/saconet.2018.8585583 |chapterurl=缺少標題 (幫助). A Novel approach for bootkit detection in Android Platform. IEEE. October 2018: 277–282. ISBN 978-1-5386-9493-0. doi:10.1109/saconet.2018.8585583. 
  11. ^ Tang, Qinghao. Internet of things security: principles and practice. Fan Du. Singapore. 2021: 166. ISBN 978-981-15-9942-2. OCLC 1236261208. 
  12. ^ Hay, Roee. fastboot oem vuln: android bootloader vulnerabilities in vendor customizations. Proceedings of the 11th USENIX Conference on Offensive Technologies. WOOT'17 (Vancouver, BC, Canada: USENIX Association). 2017-08-14: 22. 
  13. ^ Kanonov, Uri; Wool, Avishai. http://dx.doi.org/10.1145/2994459.2994470 |chapterurl=缺少標題 (幫助). Secure Containers in Android. SPSM '16. New York, NY, USA: ACM. 2016-10-24: 3–12. ISBN 9781450345644. doi:10.1145/2994459.2994470. 
  14. ^ Alendal, Gunnar; Dyrkolbotn, Geir Olav; Axelsson, Stefan. Forensics acquisition — Analysis and circumvention of samsung secure boot enforced common criteria mode. Digital Investigation. March 2018, 24: S60–S67. ISSN 1742-2876. doi:10.1016/j.diin.2018.01.008. hdl:11250/2723051可免費查閱. 
  15. ^ Zhao, Longze; Xi, Bin; Wu, Shunxiang; Aizezi, Yasen; Ming, Daodong; Wang, Fulin; Yi, Chao. http://dx.doi.org/10.1145/3207677.3278046 |chapterurl=缺少標題 (幫助). Physical Mirror Extraction on Qualcomm-based Android Mobile Devices. Csae '18. New York, New York, USA: ACM Press. 2018: 1–5. ISBN 9781450365123. doi:10.1145/3207677.3278046. 

外部連結