编译android6.0
来源:互联网 发布:网络凶杀2 编辑:程序博客网 时间:2024/06/08 14:27
一、Xshell与ubuntu14连接
1、sudo apt-get update//更新软件源地址
2、sudo apt-get install openssh-server openssh-client //安装ssh框架
xshell连接虚拟机里的ubuntu用ssh安全,telnet和ftp是以明文传输,可能会在中间被黑客攻击
然后,打开Xshell,进行连接
xshell用于远程控制ubuntu
二、安装编译环境所依赖--Ubuntu 14.04 LTS
sudo apt-get update
1. Run below apt-get command to install the package
$ sudo apt-get -y install openjdk-7-jdk
2. Run below update-java-alternatives command to set open JDK 1.7 environment
$ update-java-alternatives -s java-1.7.0-openjdk-amd64
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip
三、android源码下载
由于国内限制,Google提供的下载地址,不能使用
可以参考:https://mirror.tuna.tsinghua.edu.cn/help/AOSP/
四、编译下载好的源码
Building the System
The following instructions to build the Android source tree apply to all branches, includingmaster
. The basic sequence of build commands is as follows:
Note: If you're building Android 6.0 or later, please seeCompiling with Jack for information on this new default toolchain.
1、Set up environment
envsetup.sh
script. Note that replacingsource
with .
(a single dot) saves a few characters, and the short form is more commonly used in documentation.$ source build/envsetup.sh
or
$ . build/envsetup.sh
2、Choose a Target
Choose which target to build with lunch
. The exact configuration can be passed as an argument. For example, the following command:
$ lunch aosp_arm-eng
refers to a complete build for the emulator, with all debugging enabled.
If run with no arguments lunch
will prompt you to choose a target from the menu.
All build targets take the form BUILD-BUILDTYPE
, where the BUILD
is a codename referring to the particular feature combination.
The BUILDTYPE is one of the following:
For more information about building for and running on actual hardware, see Running Builds.
3、Build the code
Build everything with make
. GNU make can handle parallel tasks with a-jN
argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. For example, on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16
and make -j32
.
$ make -j4
4、Run It!
You can either run your build on an emulator or flash it on a device. Please note that you have already selected your build target withlunch
, and it is unlikely at best to run on a different target than it was built for.
Flash a Device
To flash a device, you will need to use fastboot
, which should be included in your path after a successful build. Place the device in fastboot mode either manually by holding the appropriate key combination at boot, or from the shell with
$ adb reboot bootloader
Once the device is in fastboot mode, run
$ fastboot flashall -w
The -w
option wipes the /data
partition on the device; this is useful for your first time flashing a particular device but is otherwise unnecessary.
For more information about building for and running on actual hardware, see Running Builds.
Emulate an Android Device
The emulator is added to your path automatically by the build process. To run the emulator, type
$ emulator
- 编译android6.0
- Android6.0源码编译
- android6.0编译失败
- Android6.0 源码下载和编译
- android6.0源码编译及刷机
- Android6.0 源码编译 + AS阅读源码
- Mac 10.11 android6.0源码编译
- 下载及编译Android6.0异常解决
- Mac 10.11 android6.0源码编译
- Ubuntu16.04下编译android6.0源码
- Ubuntu16.04编译android6.0源代码
- ubuntu16.04编译Android6.0环境
- 使用Ubuntu16下载编译Android6.0源码
- Android6.0编译报错求大神指点
- Android6.0编译报错求大神指点
- Android6.0编译报错求大神指点
- Ubuntu14.04下载编译Android6.0源码
- ubuntu16.04编译android6.0源码
- 169. Majority Element*
- xlAddInManagerInfo/xlAddInManagerInfo12
- 【Android开源项目分析】android轻量级开源缓存框架——ASimpleCache(ACache)源码分析
- 剑指offer(51-60)
- shader开发_5.Surface shader官方例子(注释版本)
- 编译android6.0
- linux下qt5.7信号与槽之文本框同步
- 个人困惑之公司需不需要加班
- 图像处理书籍笔记1--图像基本数据结构
- 学习笔记-《零基础学习HTML5—html+css基础 》1.前端认知
- HTML5 安全问题解析
- deep learning---SAE(stacked autoencoder)
- 不靠谱的神经想法
- hibernate 采用映射文件配置