1. 程式人生 > >下載編譯chromium程式碼-android版本親測60

下載編譯chromium程式碼-android版本親測60

0.系統配置要求

最重要是能連線到國際網

  • A 64-bit Intel machine running Linux with at least 8GB of RAM. More than 16GB is highly recommended.
  • At least 100GB of free disk space.
  • You must have Git and Python installed already.

Most development is done on Ubuntu. Other distros may or may not work; see theLinux instructions for some suggestions.

Building the Android client on Windows or Mac is not supported and doesn't work.

1. 下載depot_tools

(紅色為shell命令)

Clone the depot_tools repository:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Add depot_tools to the end of your PATH (you will probably want to put this in your~/.bashrc

or~/.zshrc). Assuming you cloneddepot_tools to/path/to/depot_tools:

export PATH="$PATH:/path/to/depot_tools"

2. 獲取程式碼

Create a chromium directory for the checkout and change to it (you can call this whatever you like and put it wherever you like, as long as the full path has no spaces):

mkdir ~/chromium && cd ~/

chromium
fetch
--nohooks android

If you don't want the full repo history, you can save a lot of time by adding the--no-history flag tofetch.

Expect the command to take 30 minutes on even a fast connection, and many hours on slower ones.

If you've already installed the build dependencies on the machine (from another checkout, for example), you can omit the--nohooks flag andfetch will automatically executegclient runhooks at the end.

  • 如果遇到 gnutls_handshake失敗 
  • error: gnutls_handshake() failed: A TLS packet with unexpected length was received. while accessing ...
    fatal: HTTP request failed

可以參考

Got reason of the problem, it was gnutls package. It's working weird behind a proxy. Butopenssl is working fine even in weak network. So workaround is that we should compilegit with openssl. To do this, run the following commands:

sudo apt-get install build-essential fakeroot dpkg-dev
mkdir ~/git-openssl
cd ~/git-openssl
sudo apt-get source git
sudo apt-get build-dep git
sudo apt-get install libcurl4-openssl-dev
sudo dpkg-source -x git_1.7.9.5-1.dsc //具體版本看下載的
cd git_1.7.9.5 8.

Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances oflibcurl4-gnutls-dev with libcurl4-openssl-dev

sudo dpkg-buildpackage -rfakeroot -b

(if it's failing on test, you can remove the line TEST=test from the filedebian/rules)

sudo dpkg -i ../git_1.7.9.5-1_i386.deb

When fetch completes, it will have created a hidden .gclient file and a directory called src in the working directory. The remaining instructions assume you have switched to thesrc directory:

cd src

Converting an existing Linux checkout

If you have an existing Linux checkout, you can add Android support by appendingtarget_os = ['android'] to your.gclient file (in the directory abovesrc):

echo "target_os = [ 'android' ]">>../.gclient

Then run gclient sync to pull the new Android dependencies:

gclient sync

(This is the only difference between fetch android andfetch chromium.)

安裝依賴相關

Once you have checked out the code, run

build/install-build-deps-android.sh

to get all of the dependencies you need to build on Linux, plus all of the Android-specific dependencies (you need some of the regular Linux dependencies because an Android build includes a bunch of the Linux tools and utilities).

執行hooks

Once you've run install-build-deps at least once, you can now run the Chromium-specific hooks, which will download additional binaries and other things you might need:

注意這裡會提示要下載一份LICENSE檔案,需要使用者選擇接受還是拒絕。當選擇接受後,會繼續啟動下載,如果沒有選擇,那麼再執行一遍:gclient runhooks

gclient runhooks

Optional: You can also install API keys if you want your build to talk to some Google services, but this is not necessary for most development and testing purposes.

2.1. 切換分支(如果不需要請略過)

git fetch tags

切到自定義分支並同步遠端分支:

git checkout  60.0.3112.107

git checkout -b your_release_branch 60.0.3112.107

同步分支程式碼:

gclient sync --with_branch_heads --jobs 16

gclient runhooks

3.編譯程式碼

設定編譯引數

Chromium uses Ninja as its main build tool along with a tool called GN to generate .ninja files. You can create any number ofbuild directories with different configurations. To create a build directory which builds Chrome for Android, run:

gn gen --args='target_os="android"'out/Default

或者使用

gn args out/Default

檔案中配置:

target_os = "android"

#32位,不配置為64位,主動配置64為"arm64"

target_cpu = "arm"

is_official_build = true

is_debug = false

symbol_level = 1

enable_nacl = false

exclude_unwind_tables = true

proprietary_codecs = true

ffmpeg_branding = "Chrome"

remove_webcore_debug_symbols = true

is_component_build = false

is_clang = false

enable_incremental_javac = false

enable_webrtc = true

  • You only have to run this once for each new build directory, Ninja will update the build files as needed.
  • You can replace Default with another name, but it should be a subdirectory ofout.
  • For other build arguments, including release settings, see GN build configuration. The default will be a debug component build matching the current host operating system and CPU.
  • For more info on GN, run gn help on the command line or read thequick start guide.

Also be aware that some scripts (e.g. tombstones.py,adb_gdb.py) require you to setCHROMIUM_OUTPUT_DIR=out/Default.

編譯

Build Chromium with Ninja using the command:

60以上的chromium保證java是1.8版本

ninja -C out/Default chrome_public_apk

You can get a list of all of the other build targets from GN by running gn ls out/Default from the command line. To compile one, pass the GN label to Ninja with no preceding “//” (so, for//chrome/test:unit_tests useninja -C out/Default chrome/test:unit_tests).

相關推薦

下載編譯chromium程式碼-android版本60

0.系統配置要求 最重要是能連線到國際網 A 64-bit Intel machine running Linux with at least 8GB of RAM. More than 16GB is highly recommended.At least 100GB o

Quartus II 13.0 下載安裝、破解教程(有效)

作者因為安裝過程沒有截圖,所以沒有圖片,但是一定正確,因為裝過不止一次,有問題,可以聯絡作者 一、 首先是Quartus II 13.0.1 軟體的下載 如果你沒有那麼高的要求,用個低版本的Quartus II 就足夠了,而且低版本的軟體比較穩定, 為了免去大家找安裝檔案版本號不匹配的情況,

Pycharm永久破解啟用2018版本(可用)

國際慣例先上圖(直至2018/11/13親測有效): 第一步(修改hosts): 將 0.0.0.0 account.jetbrains.com 中的內容新增到hosts檔案中,hosts路徑為:C:\Windows\System32\drivers\etc 如果遇到無

Python一鍵升級所有庫---Python3.6版本請用

網上搜到的大部分是這個版本 import pip from subprocess import call for dist in pip.get_installed_distributions(): call("pip install --upgrade " +

Sublime text3 整理程式碼格式 (有效)

之前有使用過HBuilder編譯器,也聽使用別的編譯器的朋友提起過“一鍵整理程式碼格式”,但一直未見Sublime有快捷整理的方法。經搜尋/詢問得知設定/使用方法,只需要自定義按鍵即可,並不需要安裝外掛!英文版:中文版:設定方法:英文/原版  開啟:PreFerences  -->Key Binding

微信中禁止頁面上下滑動 ios android通用 可行

document.body.addEventListener('touchmove', function (e) {  e.preventDefault(); //阻止預設的處理方式(阻止下拉滑動的效果

關於Sublime text 3如何編輯less並轉(編譯)成css檔案,可用

今天開始學習使用less這個強大方便的前端工具,本來是考慮用koala(專門編輯less的軟體)來使用less的,但是發現sublime編輯器也可以實現對less的編譯及高亮顯示程式碼,這樣既能少用一個軟體還能擴充套件sublime的功能,何樂而不為,於是趕緊去網上查了資料

編譯opencv的android版本(with ffmpeg)

1. 下載opencv的原始碼2. 在opencv的根目錄下新建目錄mybuild3. 進入mybuild目錄,執行命令:cmake \    -D CMAKE_BUILD_TYPE=RELEASE \    -D CMAKE_INSTALL_PREFIX=/usr/lo

編譯OpenVX的Android版本, 記錄以下, 免得下次做重複工作

0: 下載最新NDK版本android-ndk-r16b-linux-x86_64, 解壓,設定NDK環境變數 ANDROID_NDK 1: 生成獨立交叉編譯工具鏈,切換到NDK目錄下,執行     ./build/tools/make_standalone_toolcha

網路爬蟲設計中需要注意的幾個問題us時時彩原始碼五合一盤口藍色版本 功能完美運營版

我是通過看「靜覓」上的文章接觸爬蟲的。作者最近還寫了本書「Python3網路爬蟲開發實戰 」,算是現在市面上比較系統的爬蟲書籍了。我也寫點東西總結一下做爬蟲過程中遇到的主要問題,希望對沒有接觸過的同學有參考意義,也希望老鳥們幫忙看看路子是否正確。本文主要是為了釐清爬蟲執行的思路,不會涉及太多的具體程式碼。「網

vlc android 程式碼編譯--可用

系統:ubuntu12.04 程式碼:git://git.videolan.org/vlc-ports/android.git 程式碼版本:375646994d0602 年初的時候搞了三個月的vlc android。昨天看到vlc android的beta版本釋出了,決定編

webstorm 2018安裝與啟用版本【mac也適用】下載(解壓直接可用)(有效)

安裝webstorm 2018 只需2步即可,永久免費 (2)註冊: ②在bin目錄下找到(webstorm.exe.vmoptions)和(webstorm64.exe.vmoptions)用記事本開啟這兩個檔案在最後面新增命令-javaagent:D:

WebRTC:下載編譯Android版本的WebRTC(M66)

    WebRTC是Google公司開源的一套免費的網頁實時音視訊通訊的解決方案,可以說效能非常強大。可以在Google WebRTC網站https://webrtc.org上下載並使用。 原始碼 下載     原始碼下載需要一套工具,因為Google為WebRTC原始

Android Studio編譯C++程式碼——Release與Debug版本的記錄

問題 部分C++程式碼庫,Release版本與Debug版本速度差異非常大,拿之前的Dlib的人臉檢測來說,Debug版本在手機上跑速度基本上是15秒1幀,而Release版本差不多是1秒2幀,這個速度差異非常的大。 AS上始終編譯不出Release版本的庫

Android原始碼:1、下載詳解(支援行動硬碟、mac)—成功

文章目錄 1、如果行動硬碟需要格式化 2、建立區分大小寫的磁碟映像 3、設定檔案描述符數量上限 4、下載原始碼 (1)安裝 、開啟Repo (2)替換國內清華的映象 (3)建立原始碼存放目錄 (4)初始化倉庫​ (5)同步原始碼樹 (6)更新完成 第一

在Mac上安裝 Android SDK 並下載SDK所需包(可以成功下載)(轉自網路前輩)

如果您能進來看到這一步,說明您對於Android SDK Manager已經不陌生了,在這裡就不再做解釋了,直接說方法。 一、先下載android sdk for mac,靠譜網址二選一即可,下載後解壓到某目錄: http://down.tech.sin

Android國內原始碼下載——成功

一、工具準備 首先安裝git和curl工具 sudo apt-get install git-core curl 然後通過curl下載repo並配置repo mkdir ~/bin echo "PAT

android studio 3.1 版本和 ButterKnife 8.8.1 不相容衝突問題,有效

       由於匯入別人的專案,更改了gradle 的版本號,導致專案一直報錯,最終查閱資料發現問題出在ButterKnife 上面,有的人是出現NullPointerException ,我出現的錯誤如下: gradle 版本號 classpath  'com.a

input type=file 上傳圖片前預覽 支援 ie8 chrome ff android及ios瀏覽器(將網上的版本整合一下)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html

Android studio專案匯入後編譯報 aapt2錯誤,解決方法。有用!

最近換了一家公司,公司給配的臺式電腦卡的爆了,最後想著嘗試一下在自己電腦上匯入公司的專案。 前面一切都很順利,到最後一步進行編譯的時候,爆出了aapte2 exception,如下: Error:Execution failed for task ':app:mergeD