Chromium for android 2 源码编译
来源:互联网 发布:淘宝卖高仿被买家诈骗 编辑:程序博客网 时间:2024/05/22 04:55
运行结果:
Install prerequisites
The Android SDK/NDK is checked into the chromium tree in $SRC/third_party/android_tools and does not need to be installed. The following script installs other tools needed by the Chrome on Android build.
cd $SRC/buildsudo ./install-build-deps-android.sh
In addition, you must manually install the Oracle Java JDK and configure it to be the default Java compiler:
- Visit http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Click on “Java SE 6 - JDK”
- Accept the license agreement
- Download jdk-6u38-linux-x64.bin
Here is how to configure it to be the default on Ubuntu:
cd /usr/lib/jvm && sudo /bin/sh ~/Downloads/jdk-6u38-linux-x64.bin -noregistersudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_38/bin/javac 50000sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_38/bin/java 50000sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_38/bin/javaws 50000sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_38/bin/javap 50000sudo update-alternatives --config javacsudo update-alternatives --config javasudo update-alternatives --config javawssudo update-alternatives --config javap
Also make sure /usr/bin/java is first in your $PATH. i.e.
which java
should return /usr/bin/java.
Compile
To build the ARM Android content shell:
export GYP_GENERATORS=ninja. build/android/envsetup.shandroid_gypninja -C out/Debug -j10 content_shell_apk
Enable USB debugging on your Android device
On Jellybean, developer options are hidden by default. To unhide them, go to "About phone" and tap 10 times on "Build number". Then the "Developer options" menu will be available. Check "USB debugging" to allow installing the APKs via ADB.5000
If you are running on an emulator, note that Chrome for Android requires hardware acceleration. Make sure that you have enabled GPU emulation in Hardware settings of the AVD being used.
Installing Content Shell
See http://www.chromium.org/developers/content-module for details on the content module and content shell.
To install, run, or debug, it we have shell scripts to assist:
build/android/adb_install_apk.py --apk ContentShell.apkbuild/android/adb_run_content_shellbuild/android/adb_gdb_content_shell
To pass command-line flags to the content-shell: build/android/adb_content_shell_command_line <arguments>
(以下内容因缺少文件,还无法编译通过)
Chromium TestShell (in development)
Based on the chrome layer, includes more stuff from Chromium.
To install, run, or debug, it we have shell scripts to assist:
yajun@yajun-OptiPlex-390:~/Public/chromium/src$ ninja -C out/Debug -j10 chromium_testshell
ninja: Entering directory `out/Debug'
ninja: error: '../../build/util/LASTCHANGE', needed by 'gen/chrome/common/chrome_version_info_posix.h', missing and no known rule to make it
if you come to this error, just create this file build/util/LASTCHANGE and fill the content as :
LASTCHANGE=182445
ninja -C out/Debug -j10 chromium_testshell
build/android/adb_install_apk.py --apk ChromiumTestShell.apkbuild/android/adb_run_chromium_testshellbuild/android/adb_gdb_chromium_testshell
To pass command-line flags to the testshell: build/android/adb_chromium_testshell_command_line <arguments>
Running Unit Tests
ninja -C out/Release -j10 android_builder_tests# Run with --help to get arguments.# Most useful: use -e to run tests in an emulator; else it assumes you have a phone plugged in.build/android/run_tests.py# Running a particular testbuild/android/run_tests.py -s base_unittests -f PathUtilTest.BasicTest
Running Instrumentation Tests
ninja -C out/Release -j10 content_shell_apk android_builder_testsbuild/android/adb_install_apk.py --apk ContentShell.apk# Run with --help to get arguments.build/android/run_instrumentation_tests.py -I --test-apk ContentShellTest -vvv
Rebuilding libchromeview.so for a particular release
In the case where you want to modify the native code for an existing release of Chrome for Android (v25+) you can do the following steps. Note that in order to get your changes into the official release, you'll need to send your change for a codereview using the regular process for committing code to chromium.
- Open Chrome on your Android device and visit chrome://version
- Copy down the id listed next to "Build ID:"
- Go to http://storage.googleapis.com/chrome-browser-components/BUILD_ID_FROM_STEP_2/index.html
- Download the listed files and follow the steps in the readme.
- Chromium for android 2 源码编译
- 编译 chromium for android
- chromium for android 编译
- Ubuntu下Chromium for Android 源码的编译
- 如何编译 chromium for android
- Ubuntu11.10编译chromium for android
- chromium for android的编译--完整版
- Ubuntu下编译Chromium for Android
- Ubuntu下编译Chromium for Android
- Chromium for linux, windows, android编译
- Ubuntu 16.04编译Chromium for android
- Chromium for android 1 源码获取
- chromium34源码下载及chromium for Android编译环境的搭建
- chromium for linux 编译
- 编译Chromium 源码
- chromium 源码编译
- Linux Mint 15下编译Chromium for Android
- 我的chromium for Android编译环境搭建
- 用Sqoop把数据从HDFS导入到关系型数据库
- JNI-Native代码访问Java代码(一)
- Java数据类型和MySql数据类型对应表
- “好了”式工作方法
- Taming Text-How to find organize and manipulate it(Jan.2013)
- Chromium for android 2 源码编译
- SecureCRT 部署服务器常用命令
- OpenMax在Android上的实现
- 揭秘赵本山
- MFC BEGIN_MESSAGE_MAP()
- 判断设备是iPhone还是iPad
- CWnd::PostNcDestroy
- 自动播放文件Autorun.inf的解读与应用
- Hoj 1948 回家