進階搜尋


下載電子全文  
系統識別號 U0026-0102202001391900
論文名稱(中文) Android系統整合建置環境之設計與實作
論文名稱(英文) The Design and Implementation of an Integrated Building Environment for Android Systems
校院名稱 成功大學
系所名稱(中) 電腦與通信工程研究所
系所名稱(英) Institute of Computer & Communication
學年度 108
學期 1
出版年 109
研究生(中文) 吳奕寬
研究生(英文) Yi-Kuan Wu
電子信箱 ethanhots@gmail.com
學號 Q36041020
學位類別 碩士
語文別 中文
論文頁數 88頁
口試委員 指導教授-陳敬
口試委員-王明習
口試委員-張大緯
口試委員-姜美玲
召集委員-薛智文
中文關鍵字 Android  開發環境  建置系統  模組相依性 
英文關鍵字 Android  development environment  build system  module dependencies 
學科別分類
中文摘要 近年來,使用Android作為行動裝置之作業系統的產品不斷的增加,其中也包含了許多不使用原生Android系統或由廠商提供之Android系統,選擇由開源社群開發或自行開發之Android系統的使用者版本。然而若要使用自行開發之Android系統,則會碰到兩個困難,其一為需要逐一完成Android官方所提供的建置Android步驟以建置Android系統,Android之建置系統亦無圖形化介面讓使用者操作,使建置Android系統被認為是一個繁瑣且耗時的工作;其二是Android系統已發展數年,系統內容龐大且複雜,然而現今並無介面能夠讓使用者瀏覽內容,不易移除不需要之功能或模組。
本論文設計之Android系統整合建置環境,讓使用者透過圖形化介面佈署系統,增進Android系統建置之便利性。此整合建置環境由三個部份所組成:(1)提供模組相依性分析工具,使用者可參考本工具了解Android系統內容,得以配置出理想之Android系統;(2)提供腳本讓使用者進行系統配置、管理使用者專案、配置建置環境,生成建置指令及整理建置報告,使用者毋須手動輸入指令來建置Android系統;(3)提供圖形化介面以利開發。
本論文以Python進行功能實現,以Python之開發模組PyQt作為圖形化介面之實作工具。實作內容包含:(1)分析Android系統模組相依性,並實作查詢介面;(2)統整傳統之建置流程,並實作腳本將其自動化;(3)實作圖形化介面,增進開發效率。
本論文之主要貢獻有三:(1)設計模組相依性分析工具,讓使用者輕鬆查找Android系統之模組相依性,得以刪除系統中非必要之功能,達到系統輕量化之目標;(2)提供介面讓使用者快速配置Android系統(3)系統建置自動化。
英文摘要 In recent years, more and more embedded system products are shipped with Android system installed as their operating systems. Building an installable system image file of Android system, however, is not trivial because the whole process not only involves quite significant workload, including setting up environment and deploying affiliated apps, but also is time-consuming even no system customization is required. It is not uncommon that the building process failed due to a subtle mistake although quite a lot of guiding information and helpful resources are available in addition to the official documentation provided by Google. This is mainly because that there is no graphical interface for the official Android build system and the developer has to manually complete one by one the building steps listed by the official Android website. When system customization is desired, such as tailoring the source code or removing some unnecessary parts from the source code, the burden is even greater because the building rules of Android system lack enough flexibility and Android system has become bigger and more complicated during the past years. It is not only very challenging but also very difficult, if not impossible, to do the desired tailoring without help from certain analysis tools.
This work studies the official build system of Android and attempts to develop an integrated building environment for Android system. The goal is to help smoothly build a custom system image of Android with graphical user interfaces (GUIs) that integrate the functions needed or desirable in executing the building process. This integrated build environment consists of three parts: (1) Android module dependency analyzer which help customize the target Android system by providing dependency information among the modules of Android; (2) script files which not only help carry out the steps needed in building Android system image but also provide functions that might reduce the workload through automating execution and avoiding potential errors; (3) graphical user interfaces which allow easy operating and help enhance user experience. Through this integrated building environment, users can complete the needed operations, such as configuring the target Android system, removing unnecessary modules, building the target system image and browsing the output messages of the building process, easily and conveniently by mouse clicks. In addition, the module dependency analyzer can help understand the structure and implementation of Android system.
The integrated building environment is developed based on the build rules and shell scripts available from AOSP (Android Open Source Project). It is realized through (1) analyzing the dependencies among the modules of Android system source code and implementing graphical display of dependency; (2) unifying the standard building processes and implementing scripts for automating execution; (3) implementing graphical user interfaces to improve efficiency and enhance user experience. The implementation is carried out using Python and its plug-in “PyQt” in addition to shell.
The main contributions of this integrated building environment are: (1) develop a module dependency analysis tool to help remove unnecessary modules or features in customizing Android system image to reduce the image size and to help achieve better understanding the dependencies among the modules of Android system; (2) provide user-friendly graphical interfaces for users to easily and quickly build the target system image; and (3) achieve Android system image building automation. This integrated building environment can be useful and helpful in building Android system images.
論文目次 中文摘要 I
英文摘要 II
誌謝 IX
目錄 X
表目錄 XIII
圖目錄 XV
第1章 緒論 1
1.1 研究背景 1
1.2 研究動機 3
1.3 研究方法 4
1.4 章節規劃 5
第2章 相關研究 6
2.1 Android系統 6
2.1.1 Android系統架構 6
2.2 Android建置系統 10
2.2.1 Android建置系統簡介 10
2.2.2 Android建置系統主要文件 10
2.2.3 Android.mk之簡介 12
2.2.4 Android建置規則簡介 13
2.3 Android建置系統工具 15
2.3.1 Blueprint 16
2.3.2 Soong 17
2.3.3 Kati 17
2.3.4 Ninja 17
2.4 建置系統分析工具 18
2.4.1 MAKAO 18
2.4.2 SYMake 19
2.5 討論 20
第3章 系統設計 22
3.1 概述 22
3.2 整合建置環境架構 25
3.3 使用者設定管理 27
3.4 相依性分析管理 28
3.5 系統建置管理 31
3.6 建置結果報告管理 33
3.7 圖形化介面管理 34
第4章 系統實作 37
4.1 實作環境 37
4.2 使用者設定管理功能實作 37
4.2.1 讀寫使用者設定檔 38
4.2.2 新增或移除原生模組 39
4.2.3 新增或移除自定義模組 40
4.2.4 新增或移除自定義Linux核心 40
4.3 相依性分析管理功能實作 41
4.3.1 產生模組相依關係 42
4.3.2 分析模組相依關係 45
4.4 系統建置管理實作 46
4.4.1 環境與套件管理 46
4.4.2 建置工具管理 48
4.4.3 建置腳本管理 49
4.5 建置結果報告管理實作 50
4.5.1 建置過程訊息過濾 50
4.5.2 建置過程訊息分析 51
4.6 圖形化介面實作 52
4.6.1 系統配置 55
4.6.2 相依關係分析 58
4.6.3 系統配置確認 59
4.6.4 建置環境檢查 62
4.6.5 系統建置 64
4.6.6 建置結果報告 66
第5章 測試與成果 68
5.1 測試環境與規劃 68
5.1.1 功能測試規劃 68
5.1.2 效能測試規劃 72
5.2 功能測試 74
5.3 效能測試 80
第6章 結論與展望 83
6.1 結論 83
6.2 未來展望 83
參考文獻 85
參考文獻 [1] Android Debug Bridge (ADB). Available: https://en.droidwiki.org/wiki/Android_Debug_Bridge. [Accessed on February 3, 2020].
[2] A. O. K. Project. What is AOKP?. Available: http://aokp.co/about/. [Accessed on February 3, 2020].
[3] D. Röthlisberger. The Ninja build tool. Available: https://lwn.net/Articles/706404/. [Accessed on February 3, 2020].
[4] D. Smith. AOSP builds with ninja. Available: https://groups.google.com/forum/?pli=1#!topic/android-platform/Hhl_4hfOONg. [Accessed on February 3, 2020].
[5] Google. About the Android Open Source Project. Available: https://source.android.com/. [Accessed on February 3, 2020].
[6] Google. Blueprint. Available: https://opensource.google/projects/blueprint. [Accessed on February 3, 2020].
[7] Google. Building Android. Available: https://source.android.com/setup/build/building. [Accessed on February 3, 2020].
[8] Google. Building Kernels. Available: https://source.android.com/setup/build/building-kernels. [Accessed on February 3, 2020].
[9] Google. Establishing a Build Environment. Available: https://source.android.com/setup/build/initializing#setting-up-a-linux-build-environment. [Accessed on February 3, 2020].
[10] Google. Kati. Available: https://github.com/google/kati. [Accessed on February 3, 2020].
[11] Google. Soong Build System. Available: https://source.android.com/setup/build. [Accessed on February 3, 2020].
[12] Google. Supporting Older Versions. Available: https://source.android.com/setup/build/older-versions#reverting-from-make-382. [Accessed on February 3, 2020].
[13] H. A. N. Ahmed Tamrawi, Hung Viet Nguyen, Tien N. Nguyen. SYMake Introduction. Available: http://home.engineering.iastate.edu/~atamrawi/SYMake/index.html. [Accessed on February 3, 2020].
[14] H. A. N. Ahmed Tamrawi, Hung Viet Nguyen, Tien N. Nguyen. SYMake Overview Snapshot. http://home.engineering.iastate.edu/~atamrawi/SYMake/snapshots.html. [Accessed on February 3, 2020].
[15] H. Corporation. Unlocking Your Bootloader. Available: https://www.htcdev.com/bootloader. [Accessed on February 3, 2020].
[16] J. Crook. Motorola Offers Unlocked Bootloader Tool For Droid RAZR, Verizon Removes It. Available: https://techcrunch.com/2011/10/24/motorola-offers-unlocked-bootloader-tool-for-droid-razr-verizon-removes-it/. [Accessed on February 3, 2020].
[17] J. Rice. AOKP ROM Passes 3.5 Million Users, Android 4.3 Nightlies Available Now. Available: https://www.androidpolice.com/2013/09/28/aokp-rom-passes-3-5-million-users-nexus-7-2013-flo-and-oppo-find-5-android-4-3-nightlies-available-now/. [Accessed on February 3, 2020].
[18] K.-J. Dahlström. Sony Ericsson supports independent developers. Available: https://web.archive.org/web/20120212160322/http:/developer.sonyericsson.com/wp/2011/09/28/sony-ericsson-supports-independent-developers/. [Accessed on February 3, 2020].
[19] K. Yaghmour, "The Build System.". Available: https://www.oreilly.com/library/view/embedded-android/9781449327958/ch04.html. [Accessed on February 3, 2020].
[20] L. TEAM. Hello LineageOS 16.0. Available: https://lineageos.org/Changelog-22/. [Accessed on February 3, 2020].
[21] MENNO. CyanogenMod coming to the Galaxy S 2, thanks to Samsung. Available: https://www.androidcentral.com/cyanogenmod-coming-galaxy-sii-thanks-samsung. [Accessed on February 3, 2020].
[22] M. Helft. Meet Cyanogen, The Startup That Wants To Steal Android From Google. Available: https://www.forbes.com/sites/miguelhelft/2015/03/23/meet-cyanogen-the-startup-that-wants-to-steal-android-from-google-2/#5a6d074a6809. [Accessed on February 3, 2020].
[23] O. H. Alliance. Android overview. Available: http://www.openhandsetalliance.com/android_overview.html. [Accessed on February 3, 2020].
[24] Recursively-Expanded Variables. Available: https://riptutorial.com/makefile/example/21468/recursively-expanded-variables. [Accessed on February 3, 2020].
[25] T. Bird. Android aapt. Available: https://elinux.org/Android_aapt. [Accessed on February 3, 2020].
[26] T. M. Team. What does MAKAO do?. Available: http://mcis.polymtl.ca/makao.html. [Accessed on February 3, 2020].
[27] What is Graphviz?. Available: https://www.graphviz.org/. [Accessed on February 3, 2020].
[28] Wikipedia. Android (operating system). Available: https://en.wikipedia.org/w/index.php?title=Android_(operating_system)&oldid=933357697. [Accessed on February 3, 2020].
[29] Wikipedia. AOKP. Available: https://en.wikipedia.org/w/index.php?title=AOKP&oldid=931356961. [Accessed on February 3, 2020].
[30] Wikipedia. Code smell. Available: https://en.wikipedia.org/w/index.php?title=Code_smell&oldid=932734715. [Accessed on February 3, 2020].
[31] Wikipedia. DOT (graph description language). Available: https://en.wikipedia.org/w/index.php?title=DOT_(graph_description_language)&oldid=924117130. [Accessed on February 3, 2020].
[32] Wikipedia. Go (programming language). Available: https://en.wikipedia.org/w/index.php?title=Go_(programming_language)&oldid=933396332. [Accessed on February 3, 2020].
[33] Wikipedia. List of custom Android distributions. Available: https://en.wikipedia.org/w/index.php?title=List_of_custom_Android_distributions&oldid=933411771. [Accessed on February 3, 2020].
[34] Wikipedia. Ninja (build system). Available: https://en.wikipedia.org/w/index.php?title=Ninja_(build_system)&oldid=934187324. [Accessed on February 3, 2020].
[35] Wikipedia. Prolog. Available: https://en.wikipedia.org/wiki/Prolog. [Accessed on February 3, 2020].
[36] Wikipedia. PyQt. Available: https://en.wikipedia.org/w/index.php?title=PyQt&oldid=928633568. [Accessed on February 3, 2020]
論文全文使用權限
  • 同意授權校內瀏覽/列印電子全文服務,於2020-02-26起公開。
  • 同意授權校外瀏覽/列印電子全文服務,於2020-02-26起公開。


  • 如您有疑問,請聯絡圖書館
    聯絡電話:(06)2757575#65773
    聯絡E-mail:etds@email.ncku.edu.tw