在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ Android/ 根據(jù)設(shè)備構(gòu)建
下載源碼
根據(jù)設(shè)備構(gòu)建
Git 資源
構(gòu)建系統(tǒng)
Android 平臺(tái) 64 位構(gòu)建指導(dǎo)
初始化編譯環(huán)境
Android 源代碼
品牌指南
已知的問題
Repo 命令手冊(cè)
構(gòu)建內(nèi)核
Bug 的生命周期
代碼主線、分支和版本
使用 Eclipse
提交補(bǔ)丁
下載與構(gòu)建
參與
項(xiàng)目角色
補(bǔ)丁的生命周期
提交 Bugs
關(guān)于代碼風(fēng)格的指導(dǎo)
開發(fā)
代碼名稱,標(biāo)簽和版本號(hào)

根據(jù)設(shè)備構(gòu)建

這一篇補(bǔ)充說明主頁上有關(guān)構(gòu)建和運(yùn)行中運(yùn)行在特殊設(shè)備上的信息。

通過當(dāng)前已經(jīng)發(fā)放的版本,可以在 Nexus 4,Nexus 7 以及一些 Galaxy Nexus 的變異版本的手機(jī)上構(gòu)建。每一個(gè)設(shè)備的具體實(shí)用性水平,取決于硬件所屬的二進(jìn)制文件。

給 Nexus 4 和 Nexus 7,所有的配置都可以使用,并且所有的硬件都可以工作。由于硬件的不同,不要在 Nexus 7 上使用 4.1.1,它已經(jīng)被 4.1.2 以及后續(xù)的版本所取代。

所有的 Nexus 10 “manta” 配置可以使用 4.2.2。在這些設(shè)備上,圖像,音頻,Wi-Fi,藍(lán)牙,照相機(jī),NFC,GPS 和定向的感應(yīng)器都可以運(yùn)行。

Galaxy Nexus 變異版本可以使用的是 GSM/HSPA+ “maguro” 配置(只有在它已經(jīng)被 “yakju” 或者 “takju” 操作系統(tǒng)所替代),以及 VZW CDMA/LTE "toro" 配置。在這些設(shè)備上,圖形和視頻可以生效,和 Wi-Fi,藍(lán)牙一樣,它們都通過各自的細(xì)胞網(wǎng)絡(luò)連接。NFC 和方向感應(yīng)器也可以工作。

Galaxy Nexus 在 jb-mr1-dev-plus-aosp 分支上實(shí)驗(yàn)性的通過 Sprint CDMA/LTE 配置信息 “toroplus”。在此配置中,細(xì)胞網(wǎng)絡(luò)并不能正常工作,其他的功能像他們?cè)?“toro” 中一樣的工作。

使用 Android 4.1.2,Motorola Xoom 可以用在產(chǎn)于美國的 Wi-Fi 配置 “wingray“。圖形,音頻, Wi-Fi 和藍(lán)牙以及方向感應(yīng)都可以正常工作。

所有 Nexus S 和 Nexus S 4G 的配置都可以用于 Android 4.1.2 上。在這些設(shè)備上,所有的硬件都可以正常的工作。

此外,PandaBoard a.k.a ”panda“ 可以被用在 jb-mr1-dev-plus-aosp 分支上,但是僅僅是理論上可行。具體如何通過Android 開源工程來使用 PandaBoard,在資源樹中的 device/ti/panda/README 中查看。

創(chuàng)建 fastboot 和 adb

如果你還沒有安裝好這些工具,fastboot 和 adb 可以通過一般的 build 系統(tǒng)來構(gòu)建。按照網(wǎng)頁中有關(guān)Build and Running的信息,替換掉主要的 make 命令,改為一下的命令:

$ make fastboot adb

啟動(dòng)進(jìn)入 fastboot 模式

通過冷啟動(dòng),下面核心的組合可以被用來進(jìn)入 fastboot 模式,這是一個(gè)在 bootloader 中的一種模式,可以被用來啟動(dòng)設(shè)備:

Devices Keys
shamu Press and hold Volume Down, then press and hold Power
fugu Press and hold Power
volantis Press and hold Volume Down, then press and hold Power
hammerhead Press and hold both Volume Up and Volume Down, then press and hold Power
flo Press and hold Volume Down, then press and hold Power
deb Press and hold Volume Down, then press and hold Power
manta Press and hold both Volume Up and Volume Down, then press and hold Power
mako Press and hold Volume Down, then press and hold Power
grouper Press and hold Volume Down, then press and hold Power
tilapia Press and hold Volume Down, then press and hold Power
phantasm Power the device, cover it with one hand after the LEDs light up and until they turn red
maguro Press and hold both Volume Up and Volume Down, then press and hold Power
toro Press and hold both Volume Up and Volume Down, then press and hold Power
toroplus Press and hold both Volume Up and Volume Down, then press and hold Power
panda Press and hold Input, then press Power
wingray Press and hold Volume Down, then press and hold Power
crespo Press and hold Volume Up, then press and hold Power
crespo4g Press and hold Volume Up, then press and hold Power

同樣的,命令 adb reboot bootloader 可以被用于直接重啟 Android 進(jìn)入 bootloader 模式,并且不需要核心組合。

解鎖 bootloader

只有 bootloader 允許才能刷入客戶端。

默認(rèn)情況下 bootloader 是上鎖的。在設(shè)備處于 fastboot 模式下,bootloader 可以這么解鎖:

$ fastboot oem unlock

程序必須確認(rèn)在屏幕上,并且出于隱私原因?qū)?huì)刪除用戶數(shù)據(jù)。這只需要執(zhí)行一次即可。

所有數(shù)據(jù)都被刪除,也就是說不僅僅是應(yīng)用程序的私有數(shù)據(jù),還包括那些可以通過 USB 輕易獲取的公共數(shù)據(jù),其中包含照片和電影,都會(huì)被刪除。請(qǐng)?jiān)诮怄i bootloader 之前,確認(rèn)重要的數(shù)據(jù)是否都做了備份。

在 Nexus 10 上,解鎖 bootloader 之后內(nèi)置的存儲(chǔ)被置于未格式化的狀態(tài),所以必須通過下面的命令格式化:

$ fastboot format cache
$ fastboot format userdata

bootloader 可以通過下面的命令進(jìn)行加鎖

$ fastboot oem lock

注意,這會(huì)清除用戶在 Xoom 上的數(shù)據(jù)(包括 USB 共享數(shù)據(jù))

獲取特定的二進(jìn)制數(shù)據(jù)

Android 開源工程不能單單從純粹的源碼中使用,而且還必須通過硬件廠商的連接庫才能運(yùn)行,特別是那些具有硬件圖像加速功能的手機(jī)。

官方提供給支持的設(shè)備的二進(jìn)制文件被標(biāo)以 AOSP 標(biāo)簽免費(fèi)版本,是可以從 中下載的。這些用不開源的代碼,增加了額外的硬件能力。安裝構(gòu)建 AOSP 當(dāng)前分支,請(qǐng)使用 Binaries Preview for Nexus Devices。

當(dāng)給一個(gè)設(shè)備創(chuàng)建 master 分支時(shí),大多數(shù)被標(biāo)記發(fā)放或者多數(shù)不久之前的二進(jìn)制數(shù)據(jù)應(yīng)該是可以被使用的。

取出特定的二進(jìn)制數(shù)據(jù)

每一個(gè)特定的二進(jìn)制數(shù)據(jù),都會(huì)通過一個(gè)自取腳本,從壓縮的文檔中獲取。解壓縮每一個(gè)文件,從資源樹的根目錄中,運(yùn)行包括自取腳本,確認(rèn)你同意封閉許可協(xié)議,之后二進(jìn)制文件以及他們的匹配文件將會(huì)在資源樹的 vendor/ 層中安裝。

添加特定二進(jìn)制數(shù)據(jù)時(shí)的清理

為了確保取出后的二進(jìn)制數(shù)據(jù)正確的添加進(jìn)賬號(hào),之前已經(jīng)存在對(duì)外輸出的構(gòu)建必須像這樣刪除:

$ make clobber

選取和構(gòu)建匹配設(shè)備的配置

匹配和構(gòu)建 Android 開源工程的步驟被寫在了 Building上。

通過登錄菜單,給大多數(shù)設(shè)備推薦的 builds,當(dāng)運(yùn)行無參數(shù) lunch 命令時(shí)是可以運(yùn)行的。適配 Nexus 的工廠圖片和二進(jìn)制數(shù)據(jù)可以在這里下載:

https://developers.google.com/android/nexus/images

https://developers.google.com/android/nexus/drivers

Device Code name Build configuration
Nexus 6 shamu aosp_shamu-userdebug
Nexus Player fugu aosp_fugu-userdebug
Nexus 9 volantis (flounder) aosp_flounder-userdebug
Nexus 5 (GSM/LTE) hammerhead aosp_hammerhead-userdebug
Nexus 7 (Wi-Fi) razor (flo) aosp_flo-userdebug
Nexus 7 (Mobile) razorg (deb) aosp_deb-userdebug
Nexus 10 mantaray (manta) full_manta-userdebug
Nexus 4 occam (mako) full_mako-userdebug
Nexus 7 (Wi-Fi) nakasi (grouper) full_grouper-userdebug
Nexus 7 (Mobile) nakasig (tilapia) full_tilapia-userdebug
Galaxy Nexus (GSM/HSPA+) yakju (maguro) full_maguro-userdebug
Galaxy Nexus (Verizon) mysid (toro) aosp_toro-userdebug
Galaxy Nexus (Experimental) mysidspr (toroplus) aosp_toroplus-userdebug
PandaBoard (Archived) panda aosp_panda-userdebug
Motorola Xoom (U.S. Wi-Fi) wingray full_wingray-userdebug
Nexus S soju (crespo) full_crespo-userdebug
Nexus S 4G sojus (crespo4g) full_crespo4g-userdebug

不要在 Nexus 7 上使用 4.1.1,此機(jī)型只能使用 4.1.2 或更高版本。

設(shè)備刷入系統(tǒng)

如果有必要請(qǐng)將設(shè)備設(shè)置成 fastboot 模式(詳情請(qǐng)看上文)。

一個(gè)完整的 Android 系統(tǒng)可以用一條命令來給設(shè)備刷入一個(gè)系統(tǒng):在經(jīng)過核對(duì)被寫入的系統(tǒng)已經(jīng)成功的和已經(jīng)安裝過的 bootloader,廣播之間可以相互協(xié)作后,會(huì)將啟動(dòng),修復(fù),系統(tǒng)三個(gè)部分寫在一塊,最后重啟系統(tǒng)。這樣的操作也會(huì)清楚用戶數(shù)據(jù),就跟之前在 fastboot oem unlock 中提到的差不多。

$ fastboot -w flashall

需要注意的是,在 Motorola Xoom 上,文件系統(tǒng)創(chuàng)建出的 via fastboot 并不會(huì)良好的工作,并且強(qiáng)烈推薦用下面的命令重建它:

$ adb reboot recovery

一旦進(jìn)入回復(fù),打開菜單(按下電源和音量+),清除緩存部分,之后清除數(shù)據(jù)。

恢復(fù)設(shè)備出廠值

Nexus 5,Nexus 10,Nexus 4,Nexus Q,Nexus 7,Galaxy Nexus (GSM/HSPA+ "yakju" 和 "takju", 和 CDMA/LTE "mysid" 以及 "mysidspr"),Nexus S 和 Nexus S 4G 的出廠圖片,都可以在頁面下載。

Motorola Xoom 的工廠圖片則直接通過 Motorola 發(fā)布。