天天看點

Android源碼目錄結構

|-- 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架構)

|   |-- man                (數學函數,字尾名為.3,一些為freebsd的庫檔案)

|   |-- powerpc        (powerpc架構)

|   |-- sparc64                (sparc64架構)

|   `-- src                (源代碼)

|-- libstdc++                (libstdc++ c++實作庫)

|   `-- 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                                (資源)

|   `-- p_w_picpaths                        (一些圖檔)

|-- 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                                (測試代碼)

`-- vm                                (虛拟機實作)

development 目錄                (開發者需要的一些例程及工具)

|-- apps                                (一些核心應用程式)

|   |-- bluetoothdebug        (藍牙調試程式)

|   |-- customlocale        (自定義區域設定)

|   |-- development        (開發)

|   |-- fallback                (和語言相關的一個程式)

|   |-- fontlab                (字庫)

|   |-- gesturebuilder        (手勢動作)

|   |-- ninepatchlab        (?)

|   |-- objviewer                (obj檢視器)

|   |-- sdksetup                (sdk安裝器)

|   |-- spareparts                (進階設定)

|   |-- term                        (遠端登入)

|   `-- launchperf                (?)

|-- build                                (編譯腳本模闆)

|-- cmds                                (有個monkey工具)

|-- data                                (配置資料)

|-- 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                (記事本)

|   |-- r×××eader                (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                (×××開源庫)

|-- 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                (字型和聲音等資料檔案)

|   |-- graphics        (圖形相關)

|   |-- keystore        (和資料簽名證書相關)

|   |-- libs                (庫)

|   |-- location        (地區庫)

|   |-- media                (媒體相關庫)

|   |-- obex                (藍牙傳輸庫)

|   |-- opengl                (2d-3d加速庫)

|   |-- packages        (設定、tts、×××程式)

|   |-- sax                (xml解析器)

|   |-- services        (各種服務程式)

|   |-- telephony        (電話通訊管理)

|   |-- test-runner        (測試工具相關)

|   |-- tests                (各種測試)

|   |-- tools                (一些叫不上名的工具)

|   |-- 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)

|   |-- 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                                (無線電抽象層)

|   |-- 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.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适用的圖檔)