编译android6.0

原创 2016年08月28日 16:42:34

一、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, including master. The basic sequence of build commands is as follows:

Note: If you're building Android 6.0 or later, please see Compiling with Jack for information on this new default toolchain.

1、Set up environment

Initialize the environment with the envsetup.sh script. Note that replacing source 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:

Buildtype Use
user limited access; suited for production
userdebug like "user" but with root access and debuggability; preferred for debugging
eng development configuration with additional debugging tools

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 with lunch, 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




prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc问题解决

prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc问题解决 分类: And...
  • dj0379
  • dj0379
  • 2015年05月12日 17:19
  • 1821

三星7420 cpu 做的手机源码你们去编译过吗?

arter97 kernel for Galaxy S6 / S6 edge / Note 5 / S6 edge Plus Source Code: https://bitbucket.org/a...

[RK3288][Android6.0] 简易编译整个工程脚本

Platform: RK3288 OS: Android 6.0 Kernel: 3.10.92 RK没有直接提供编译整个工程的脚本,为了方便,简单编写了如下脚本, 这样就不需要每次手动敲命令了....

Android6.0/CM13源码编译笔记(一)

MOST IMPORTENT,首先得完整阅读一遍谷歌安卓及CM源码编译官方文档!我翻墙用红杏影梭,考验英语的时候到了!The Android Open Source Project (AOSP)Cya...

Android 6.0 源码编译以及通过AndroidStudio查看源码

闲来无事,准备折腾一下Android源码。特地记录一下从下载,编译,到最后利用AndroidStudio查看源码的全过程。 本文使用的是真机ubuntu 14.04 / AndroidStudio2....

Ubuntu14.04下载编译Android6.0源码

Git配置 进行过此配置的直接跳过。 git config --global user.name "Your Name" git config --global user.email "you...
  • tp7309
  • tp7309
  • 2017年04月17日 08:52
  • 1817

Android6.0 反编译systemUI

今天要反编译一个systemUI查看一些东西,本文是反编译Android 6.0的某手机的systemUI 准备工具: baksmali-2.1.3.jar smali-2.1.3.jar dex2j...
  • huml126
  • huml126
  • 2016年09月03日 17:00
  • 1978

Ubuntu 16 下载、编译Nexus 6 Android6.0源码记录

前一阵将Ubuntu从14升级到了16,首先做的就是把导航栏从左侧移到了下面,呵呵,Windows用习惯了。     这里就讲一下下载、编译nexus 6的Android6.0源码过程遇到的问题。  ...

ubuntu16.04编译android6.0源码

经过了3天时间的煎熬 各种google 这里顺便黑下。度太垃圾,,终于把android 6.0的源码编译通过了,下面就讲下在这过程中遇到的坑,以帮助有需要的人 少走弯路,其实也是作为我的一个笔记来记的...

在Mac 10.11编译最新的Android 6.0

背景因为只有一台可怜的256G MBPR,并没有足够的空间去装一个Ubuntu,所以之前在10.10的时候尝试编译5.0未果后(各种版本问题),就无奈放弃了。 前几天在看最新的aosp官网介绍时候h...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:编译android6.0
举报原因:
原因补充:

(最多只允许输入30个字)