Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> Android源碼中的目錄結構詳解

Android源碼中的目錄結構詳解

編輯:關於Android編程

Android 2.1
|-- Makefile
|-- bionic                        (bionic C庫)
|-- bootable                (啟動引導相關代碼)
|-- build                        (存放系統編譯規則及generic等基礎開發包配置)
|-- cts                        (Android兼容性測試套件標准)
|-- dalvik                        (dalvik JAVA虛擬機)
|-- development        (應用程序開發相關)
|-- external                (android使用的一些開源的模組)
|-- frameworks                (核心框架——java及C++語言)
|-- hardware                (部分廠家開源的硬解適配層HAL代碼)
|-- out                        (編譯完成後的代碼輸出與此目錄)
|-- packages                (應用程序包)
|-- prebuilt                (x86和arm架構下預編譯的一些資源)
|-- sdk                        (sdk及模擬器)
|-- system                        (底層文件系統庫、應用及組件——C語言)
`-- vendor                (廠商定制代碼)

bionic 目錄
|-- libc                        (C庫)
|   |-- arch-arm        (ARM架構,包含系統調用匯編實現)
|   |-- arch-x86        (x86架構,包含系統調用匯編實現)
|   |-- bionic                (由C實現的功能,架構無關)
|   |-- docs                (文檔)
|   |-- include                (頭文件)
|   |-- inet                (?inet相關,具體作用不明)
|   |-- kernel                (Linux內核中的一些頭文件)
|   |-- netbsd                (?nesbsd系統相關,具體作用不明)
|   |-- private                (?一些私有的頭文件)
|   |-- stdio                (stdio實現)
|   |-- stdlib                (stdlib實現)
|   |-- string                (string函數實現)
|   |-- tools                (幾個工具)
|   |-- tzcode                (時區相關代碼)
|   |-- unistd                (unistd實現)
|   `-- zoneinfo        (時區信息)
|-- libdl                        (libdl實現,dl是動態鏈接,提供訪問動態鏈接庫的功能)
|-- libm                        (libm數學庫的實現,)
|   |-- alpha                (apaha架構)
|   |-- amd64                (amd64架構)
|   |-- arm                (arm架構)
|   |-- bsdsrc                (?bsd的源碼)
|   |-- i386                (i386架構)
|   |-- i387                (i387架構?)
|   |-- ia64                (ia64架構)
|   |-- include                (頭文件)
|   |-- man                (數學函數,後綴名為.3,一些為freeBSD的庫文件)
|   |-- powerpc        (powerpc架構)
|   |-- sparc64                (sparc64架構)
|   `-- src                (源代碼)
|-- libstdc++                (libstdc++ C++實現庫)
|   |-- include                (頭文件)
|   `-- src                (源碼)
|-- libthread_db        (多線程程序的調試器庫)
|   `-- include                (頭文件)
`-- linker                        (動態鏈接器)
`-- arch                (支持arm和x86兩種架構)

bootable 目錄
.
|-- bootloader                                (適合各種bootloader的通用代碼)
|   `-- legacy                                (估計不能直接使用,可以參考)
|       |-- arch_armv6                (V6架構,幾個簡單的匯編文件)
|       |-- arch_msm7k                (高通7k處理器架構的幾個基本驅動)
|       |-- include                        (通用頭文件和高通7k架構頭文件)
|       |-- libboot                        (啟動庫,都寫得很簡單)
|       |-- libc                        (一些常用的c函數)
|       |-- nandwrite                (nandwirte函數實現)
|       `-- usbloader                (usbloader實現)
|-- diskinstaller                        (android鏡像打包器,x86可生產iso)
`-- recovery                                (系統恢復相關)
    |-- edify                                (升級腳本使用的edify腳本語言)
    |-- etc                                (init.rc恢復腳本)
    |-- minui                                (一個簡單的UI)
    |-- minzip                                (一個簡單的壓縮工具)
    |-- mtdutils                        (mtd工具)
    |-- res                                (資源)
    |   `-- images                        (一些圖片)
    |-- tools                                (工具)
    |   `-- ota                        (OTA Over The Air Updates升級工具)
`-- updater                        (升級器)

build目錄
.
|-- core                                (核心編譯規則)
|-- history                                (歷史記錄)
|-- libs                               
|   `-- host                        (主機端庫,有android “cp”功能替換)
|-- target                                (目標機編譯對象)
|   |-- board                        (開發平台)
|   |   |-- emulator        (模擬器)
|   |   |-- generic                (通用)
|   |   |-- idea6410        (自己添加的)
|   |   `-- sim                (最簡單)
|   `-- product                (開發平台對應的編譯規則)
|       `-- security        (密鑰相關)
`-- tools                                (編譯中主機使用的工具及腳本)
    |-- acp                        (Android "acp" Command)
    |-- apicheck                (api檢查工具)
    |-- applypatch                (補丁工具)
    |-- apriori                        (預鏈接工具)
    |-- atree                        (tree工具)
    |-- bin2asm                (bin轉換為asm工具)
    |-- check_prereq        (檢查編譯時間戳工具)
    |-- dexpreopt                (模擬器相關工具,具體功能不明)
    |-- droiddoc                (?作用不明,java語言,網上有人說和JDK5有關)
    |-- fs_config                (This program takes a list of files and directories)
    |-- fs_get_stats                (獲取文件系統狀態)
    |-- iself                        (判斷是否ELF格式)
    |-- isprelinked                (判斷是否prelinked)
    |-- kcm                        (按鍵相關)
    |-- lsd                        (List symbol dependencies)
    |-- releasetools                (生成鏡像的工具及腳本)
    |-- rgb2565                (rgb轉換為565)
    |-- signapk                (apk簽名工具)
    |-- soslim                        (strip工具)
`-- zipalign                (zip archive alignment tool)

dalvik目錄 dalvik虛擬機
.
|-- dalvikvm                        (main.c的目錄)
|-- dexdump                        (dex反匯編)
|-- dexlist                                (List all methods in all concrete classes in a DEX file.)
|-- dexopt                                (預驗證與優化)
|-- docs                                (文檔)
|-- dvz                                (和zygote相關的一個命令)
|-- dx                                (dx工具,將多個java轉換為dex)
|-- hit                                (?java語言寫成)
|-- libcore                                (核心庫)
|-- libcore-disabled                (?禁用的庫)
|-- libdex                                (dex的庫)
|-- libnativehelper                (Support functions for Android's class libraries)
|-- tests                                (測試代碼)
|-- tools                                (工具)
`-- vm                                (虛擬機實現)

development 目錄                (開發者需要的一些例程及工具)
|-- apps                                (一些核心應用程序)
|   |-- BluetoothDebug        (藍牙調試程序)
|   |-- CustomLocale        (自定義區域設置)
|   |-- Development        (開發)
|   |-- Fallback                (和語言相關的一個程序)
|   |-- FontLab                (字庫)
|   |-- GestureBuilder        (手勢動作)
|   |-- NinePatchLab        (?)
|   |-- OBJViewer                (OBJ查看器)
|   |-- SdkSetup                (SDK安裝器)
|   |-- SpareParts                (高級設置)
|   |-- Term                        (遠程登錄)
|   `-- launchperf                (?)
|-- build                                (編譯腳本模板)
|-- cmds                                (有個monkey工具)
|-- data                                (配置數據)
|-- docs                                (文檔)
|-- host                                (主機端USB驅動等)
|-- ide                                (集成開發環境)
|-- ndk                                (本地開發套件——c語言開發套件)
|-- pdk                                (Plug Development Kit)
|-- samples                        (例程)
|   |-- AliasActivity        (?)
|   |-- ApiDemos                (API演示程序)
|   |-- BluetoothChat        (藍牙聊天)
|   |-- BrowserPlugin        (浏覽器插件)
|   |-- BusinessCard        (商業卡)
|   |-- Compass                (指南針)
|   |-- ContactManager        (聯系人管理器)
|   |-- CubeLiveWallpaper        (動態壁紙的一個簡單例程)
|   |-- FixedGridLayout        (像是布局)
|   |-- GlobalTime                (全球時間)
|   |-- HelloActivity        (Hello)
|   |-- Home                        (Home)
|   |-- JetBoy                        (jetBoy游戲)
|   |-- LunarLander        (貌似又是一個游戲)
|   |-- MailSync                (郵件同步)
|   |-- MultiResolution        (多分辨率)
|   |-- MySampleRss        (RSS)
|   |-- NotePad                (記事本)
|   |-- RSSReader                (RSS閱讀器)
|   |-- SearchableDictionary        (目錄搜索)
|   |-- SimpleJNI                (JNI例程)
|   |-- SkeletonApp        (空殼APP)
|   |-- Snake                        (snake程序)
|   |-- SoftKeyboard        (軟鍵盤)
|   |-- Wiktionary                (?維基)
|   `-- WiktionarySimple(?維基例程)
|-- scripts                                (腳本)
|-- sdk                                (sdk配置)
|-- simulator                        (?模擬器)
|-- testrunner                        (?測試用)
`-- tools                                (一些工具)

external 目錄
.
|-- aes                        (AES加密)
|-- apache-http                (網頁服務器)
|-- astl                        (ASTL (Android STL) is a slimmed-down version of the regular C++ STL.)
|-- bison                        (自動生成語法分析器,將無關文法轉換成C、C++)
|-- blktrace                (blktrace is a block layer IO tracing mechanism)
|-- bluetooth                (藍牙相關、協議棧)
|-- bsdiff                        (diff工具)
|-- bzip2                        (壓縮工具)
|-- clearsilver                (html模板系統)
|-- dbus                        (低延時、低開銷、高可用性的IPC機制)
|-- dhcpcd                (DHCP服務)
|-- dosfstools                (DOS文件系統工具)
|-- dropbear                (SSH2的server)
|-- e2fsprogs                (EXT2文件系統工具)
|-- elfcopy                (復制ELF的工具)
|-- elfutils                        (ELF工具)
|-- embunit                (Embedded Unit Project)
|-- emma                        (java代碼覆蓋率統計工具)
|-- esd                        (Enlightened Sound Daemon,將多種音頻流混合在一個設備上播放)
|-- expat                        (Expat is a stream-oriented XML parser.)
|-- fdlibm                        (FDLIBM (Freely Distributable LIBM))
|-- freetype                (字體)
|-- fsck_msdos                (dos文件系統檢查工具)
|-- gdata                        (google的無線數據相關)
|-- genext2fs                (genext2fs generates an ext2 filesystem as a normal (non-root) user)
|-- giflib                        (gif庫)
|-- googleclient        (google用戶庫)
|-- grub                        (This is GNU GRUB, the GRand Unified Bootloader.)
|-- gtest                        (Google C++ Testing Framework)
|-- icu4c                        (ICU(International Component for Unicode)在C/C++下的版本)
|-- ipsec-tools                (This package provides a way to use the native IPsec functionality )
|-- iptables                (防火牆)
|-- jdiff                        (generate a report describing the difference between two public Java APIs.)
|-- jhead                        (jpeg頭部信息工具)
|-- jpeg                        (jpeg庫)
|-- junit                        (JUnit是一個Java語言的單元測試框架)
|-- kernel-headers        (內核的一些頭文件)
|-- libffi                        (libffi is a foreign function interface library.)
|-- libpcap                (網絡數據包捕獲函數)
|-- libpng                        (png庫)
|-- libxml2                (xml解析庫)
|-- mtpd                        (一個命令)
|-- netcat                        (simple Unix utility which reads and writes dataacross network connections)
|-- netperf                        (網絡性能測量工具)
|-- neven                        (看代碼和JNI相關)
|-- opencore                (多媒體框架)
|-- openssl                (SSL加密相關)
|-- openvpn                (VPN開源庫)
|-- oprofile                (OProfile是Linux內核支持的一種性能分析機制。)
|-- ping                        (ping命令)
|-- ppp                        (pppd撥號命令,好像還沒有chat)
|-- proguard                (Java class file shrinker, optimizer, obfuscator, and preverifier)
|-- protobuf                (a flexible, efficient, automated mechanism for serializing structured data)
|-- qemu                        (arm模擬器)
|-- safe-iop                (functions for performing safe integer operations )
|-- skia                        (skia圖形引擎)
|-- sonivox                (sole MIDI solution for Google Android Mobile Phone Platform)
|-- speex                        (Speex編/解碼API的使用(libspeex))
|-- sqlite                        (數據庫)
|-- srec                        (Nuance 公司提供的開源連續非特定人語音識別)
|-- strace                        (trace工具)
|-- svox                        (Embedded Text-to-Speech)
|-- tagsoup                (TagSoup是一個Java開發符合SAX的HTML解析器)
|-- tcpdump                (抓TCP包的軟件)
|-- tesseract                (Tesseract Open Source OCR Engine.)
|-- tinyxml                (TinyXml is a simple, small, C++ XML parser)
|-- tremor                        (I stream and file decoder provides an embeddable,integer-only library)
|-- webkit                        (浏覽器核心)
|-- wpa_supplicant        (無線網卡管理)
|-- xmlwriter                (XML 編輯工具)
|-- yaffs2                        (yaffs文件系統)
`-- zlib                        (a general purpose data compression library)

frameworks 目錄        (核心框架——java及C++語言)
.
|-- base                        (基本內容)
|   |-- api                  (?都是xml文件,定義了java的api?)
|   |-- awt                 (AWT庫)
|   |-- build                (空的)
|   |-- camera           (攝像頭服務程序庫)
|   |-- cmds              (重要命令:am、app_proce等)
|   |-- core                (核心庫)
|   |-- data                (字體和聲音等數據文件)
|   |-- docs                (文檔)
|   |-- graphics           (圖形相關)
|   |-- include             (頭文件)
|   |-- keystore        (和數據簽名證書相關)
|   |-- libs                (庫)
|   |-- location        (地區庫)
|   |-- media                (媒體相關庫)
|   |-- obex                (藍牙傳輸庫)
|   |-- opengl                (2D-3D加速庫)
|   |-- packages        (設置、TTS、VPN程序)
|   |-- sax                (XML解析器)
|   |-- services        (各種服務程序)
|   |-- telephony        (電話通訊管理)
|   |-- test-runner        (測試工具相關)
|   |-- tests                (各種測試)
|   |-- tools                (一些叫不上名的工具)
|   |-- vpn                (VPN)
|   `-- wifi                (無線網絡)
|-- opt                        (可選部分)
|   |-- com.google.android                                (有個framework.jar)
|   |-- com.google.android.googlelogin                (有個client.jar)
|   `-- emoji                (standard message elements)
`-- policies                (Product policies are operating system directions aimed at specific uses)
    `-- base               
        |-- mid        (MID設備)
        `-- phone   (手機類設備一般用這個,與鎖屏有關的代碼)

hardware 目錄                (部分廠家開源的硬解適配層HAL代碼)
|-- broadcom                        (博通公司)
|   `-- wlan                        (無線網卡)
|-- libhardware                        (硬件庫)
|   |-- include                        (頭文件)
|   `-- modules                (Default (and possibly architecture dependents) HAL modules)
|       |-- gralloc                (gralloc顯示相關)
|       `-- overlay                (Skeleton for the "overlay" HAL module.)
|-- libhardware_legacy        (舊的硬件庫)
|   |-- flashlight                (背光)
|   |-- gps                        (GPS)
|   |-- include                        (頭文件)
|   |-- mount                        (舊的掛載器)
|   |-- power                        (電源)
|   |-- qemu                        (模擬器)
|   |-- qemu_tracing        (模擬器跟蹤)
|   |-- tests                        (測試)
|   |-- uevent                        (uevent)
|   |-- vibrator                        (震動)
|   `-- wifi                        (無線)
|-- msm7k                        (高通7k處理器開源抽象層)
|   |-- boot                        (啟動)
|   |-- libaudio                (聲音庫)
|   |-- libaudio-qsd8k        (qsd8k的聲音相關庫)
|   |-- libcamera                (攝像頭庫)
|   |-- libcopybit                (copybit庫)
|   |-- libgralloc                (gralloc庫)
|   |-- libgralloc-qsd8k        (qsd8k的gralloc庫)
|   |-- liblights                (背光庫)
|   `-- librpc                        (RPC庫)
|-- ril                                (無線電抽象層)
|   |-- include                        (頭文件)
|   |-- libril                        (庫)
|   |-- reference-cdma-sms        (cdma短信參考)
|   |-- reference-ril                        (ril參考)
|   `-- rild                                (ril後台服務程序)
`-- ti                                                (ti公司開源HAL)
    |-- omap3                                (omap3處理器)
    |   |-- dspbridge                (DSP橋)
    |   |-- libopencorehw        (opencore硬件庫)
    |   |-- liboverlay                (overlay硬件庫)
    |   |-- libstagefrighthw        (stagefright硬件庫)
    |   `-- omx                        (omx組件)
    `-- wlan                                (無線網卡)

packages 目錄
.
|-- apps                            (應用程序庫)
|   |-- AlarmClock              (鬧鐘)
|   |-- Bluetooth                (藍牙)
|   |-- Browser                  (浏覽器)
|   |-- Calculator                (計算器)
|   |-- Calendar                  (日歷)
|   |-- Camera                   (相機)
|   |-- CertInstaller             (在Android中安裝數字簽名,被調用)
|   |-- Contacts                 (撥號(調用)、聯系人、通話記錄)
|   |-- DeskClock               (桌面時鐘)
|   |-- Email                       (Email)
|   |-- Gallery                     (相冊,和Camera類似,多了列表)
|   |-- Gallery3D                 (?3D相冊)
|   |-- GlobalSearch            (為google搜索服務,提供底層應用)
|   |-- GoogleSearch           (google搜索)
|   |-- HTMLViewer             (浏覽器附屬界面,被浏覽器應用調用,同時提供存儲記錄功能)
|   |-- IM                            (即時通訊,為手機提供信號發送、接收、通信的服務)
|   |-- Launcher                  (登陸啟動項,顯示圖片框架等等圖形界面)
|   |-- Launcher2                (登陸啟動項,負責應用的調用)
|   |-- Mms                        (?彩信業務)
|   |-- Music                        (音樂播放器)
|   |-- PackageInstaller        (安裝、卸載程序的響應)
|   |-- Phone                        (電話撥號程序)
|   |-- Provision                (預設應用的狀態,使能應用)
|   |-- Settings                (開機設定,包括電量、藍牙、設備信息、界面、wifi等)
|   |-- SoundRecorder        (錄音機,可計算存儲所需空間和時間)
|   |-- Stk                         (接收和發送短信)
|   |-- Sync                        (空)   -------○1
|   |-- Updater                (空)
|   `-- VoiceDialer                (語音識別通話)
|-- inputmethods                (輸入法)
|   |-- LatinIME                (拉丁文輸入法)
|   |-- OpenWnn                (OpenWnn輸入法)
|   `-- PinyinIME                (拼音輸入法)
|-- providers                        (提供器,提供應用程序、界面所需的數據)
|   |-- ApplicationsProvider                (應用程序提供器,提供應用程序啟動項、更新等)
|   |-- CalendarProvider                        (日歷提供器)
|   |-- ContactsProvider                        (聯系人提供器)
|   |-- DownloadProvider                (下載管理提供器)
|   |-- DrmProvider                        (創建和更新數據庫時調用)
|   |-- GoogleContactsProvider        (聯系人提供器的子類,用以同步聯系人)
|   |-- GoogleSubscribedFeedsProvider(設置信息提供器)
|   |-- ImProvider                                (空)
|   |-- ManagementProvider                (空)
|   |-- MediaProvider                        (媒體提供器,提供存儲數據)
|   |-- TelephonyProvider                (彩信提供器)
|   |-- UserDictionaryProvider        (用戶字典提供器,提供用戶常用字字典)
|   `-- WebSearchProvider                (空)
|-- services                                       
|   |-- EasService                                (空)
|   `-- LockAndWipe                        (空)
`-- wallpapers                                        (牆紙)
    |-- Basic                                        (基本牆紙,系統內置牆紙)
    |-- LivePicker                                (選擇動態壁紙)
    |-- MagicSmoke                        (壁紙特殊效果)
    `-- MusicVisualization                (音樂可視化,圖形隨音樂而變化)

○1裡面有一個隱藏的.git文件夾,內容都是一樣的,沒有有意義的代碼,config看似乎是一個下載程序,因此認為這些文件夾下沒有實質東西。

prebuilt 目錄                        (x86和arm架構下預編譯的一些資源)
.
|-- android-arm                (arm-android相關)
|   |-- gdbserver                (gdb調試器)
|   `-- kernel                        (模擬的arm內核)
|-- android-x86                (x86-android相關)
|   `-- kernel                        (空的)
|-- common                        (通用編譯好的代碼,應該是java的)
|-- darwin-x86                        (drawin x86平台)
|   `-- toolchain                (工具鏈)
|       |-- arm-eabi-4.2.1       
|       |-- arm-eabi-4.3.1       
|       `-- arm-eabi-4.4.0       
|-- darwin-x86_64                (drawin x86 64bit平台)
|-- linux-x86                        (linux x86平台)
|   `-- toolchain                (工具鏈,我們應該主要用這個)
|       |-- arm-eabi-4.2.1       
|       |-- arm-eabi-4.3.1       
|       |-- arm-eabi-4.4.0       
|       `-- i686-unknown-linux-gnu-4.2.1        (x86版編譯器)
|-- linux-x86_64                (linux x86 64bit平台)
|-- windows                        (windows平台)
`-- windows-x86_64        (64bit windows平台)
system 目錄                (底層文件系統庫、應用及組件——C語言)
.
|-- Bluetooth                (藍牙相關)
|-- core                        (系統核心工具盒接口)
|   |-- adb                (adb調試工具)
|   |-- cpio                (cpio工具,創建img)
|   |-- debuggerd        (調試工具)
|   |-- fastboot        (快速啟動相關)
|   |-- include                (系統接口頭文件)
|   |-- init                (init程序源代碼)
|   |-- libacc                (輕量級C編譯器)
|   |-- libctest                (libc測試相關)
|   |-- libcutils        (libc工具)
|   |-- liblog                (log庫)
|   |-- libmincrypt        (加密庫)
|   |-- libnetutils        (網絡工具庫)
|   |-- libpixelflinger        (圖形處理庫)
|   |-- libsysutils        (系統工具庫)
|   |-- libzipfile        (zip庫)
|   |-- logcat                (查看log工具)
|   |-- logwrapper        (log封裝工具)
|   |-- mkbootimg        (制作啟動boot.img的工具盒腳本)
|   |-- netcfg                (網絡配置netcfg源碼)
|   |-- nexus                (google最新手機的代碼)
|   |-- rootdir                (rootfs,包含一些etc下的腳本和配置)
|   |-- sh                        (shell代碼)
|   |-- toolbox                (toolbox,類似busybox的工具集)
|   `-- vold                (SD卡管理器)
|-- extras                        (額外工具)
|   |-- latencytop        (a tool for software developers ,identifying system latency happen)
|   |-- libpagemap        (pagemap庫)
|   |-- librank                (Java Library Ranking System庫)
|   |-- procmem        (pagemap相關)
|   |-- procrank        (Java Library Ranking System相關)
|   |-- showmap        (showmap工具)
|   |-- showslab        (showslab工具)
|   |-- sound                (聲音相關)
|   |-- su                        (su命令源碼)
|   |-- tests                (一些測試工具)
|   `-- timeinfo        (時區相關)
`-- wlan                        (無線相關)
    `-- ti                        (ti網卡相關工具及庫)


vendor 目錄                        (廠家定制內容)

|-- aosp                             (android open source project)
|   `-- products                  (一些板級規則)
|-- htc                               (HTC公司)
|   |-- common-open         (通用部分)
|   |   `-- akmd                 (解壓img用的工具)
|   |-- dream-open            (G1開放部分)
|   |-- prebuilt-open           (預編譯開放部分)
|   `-- sapphire-open         (sapphire這款型號開放內容)
|-- pv-open                       (沒東西)
|-- qcom                           (裡面基本是空的)
`-- sample                        (google提供的樣例)
    |-- apps                        (應用)
    |   |-- client                   (用戶)
    |   `-- upgrade              (升級)
    |-- frameworks             (框架)
    |   `-- PlatformLibrary   (平台庫)
    |-- products                  (產品)
    |-- sdk_addon              (sdk添加部分)
    `-- skins                       (皮膚)
        `-- WVGAMedDpi      (WVGA適用的圖片)
  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved