【转】基于Ubuntu 14.04 LTS编译Android4.4.2源代码
原文网址:http://blog.csdn.net/gobitan/article/details/24367439
- $sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dri:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 dpkg-dev
- $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
- # adb protocol on passion (Nexus One)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
- # fastboot protocol on passion (Nexus One)
- SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
- # adb protocol on crespo/crespo4g (Nexus S)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
- # fastboot protocol on crespo/crespo4g (Nexus S)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
- # adb protocol on stingray/wingray (Xoom)
- SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>"
- # fastboot protocol on stingray/wingray (Xoom)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>"
- # adb protocol on maguro/toro (Galaxy Nexus)
- SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>"
- # fastboot protocol on maguro/toro (Galaxy Nexus)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>"
- # adb protocol on panda (PandaBoard)
- SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>"
- # adb protocol on panda (PandaBoard ES)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0600", OWNER="<username>"
- # fastboot protocol on panda (PandaBoard)
- SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>"
- # usbboot protocol on panda (PandaBoard)
- SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>"
- # usbboot protocol on panda (PandaBoard ES)
- SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>"
- # adb protocol on grouper/tilapia (Nexus 7)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>"
- # fastboot protocol on grouper/tilapia (Nexus 7)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>"
- # adb protocol on manta (Nexus 10)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>"
- # fastboot protocol on manta (Nexus 10)
- SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"
然后执行如下命令,将上述文件中的username替换为你的用户名。
- $sudo sed -i 's/username/dennis/g' /etc/udev/rules.d/51-android.rules
4. 配置ccache
- $sudo apt-get install ccache
- $source ~/.bashrc
==========================================
- $ mkdir ~/bin
- $ PATH=~/bin:$PATH
(2) 下载repo工具
- curl http://git-repo.googlecode.com/files/repo-1.12 > ~/bin/repo
- $ chmod a+x ~/bin/repo
- $mkdir aosp
- $cd aosp
(2) 初始化repo
- 74.125.71.82 www.googlesource.com
- 74.125.31.82 android.googlesource.com
- 203.208.46.172 cache.pack.google.com
- 59.24.3.173 cache.pack.google.com
至于为什么要出现网络错误,你懂的!
- $repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.2_r2
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
- $repo sync
- $ cd aosp
- $ prebuilts/misc/linux-x86/ccache/ccache -M 50G
2. 设置输出目录
- dennis@dubuntu1404:~/devenv/aosp$ . build/envsetup.sh
- including device/samsung/manta/vendorsetup.sh
- including device/generic/mips/vendorsetup.sh
- including device/generic/armv7-a-neon/vendorsetup.sh
- including device/generic/x86/vendorsetup.sh
- including device/lge/mako/vendorsetup.sh
- including device/lge/hammerhead/vendorsetup.sh
- including device/asus/tilapia/vendorsetup.sh
- including device/asus/deb/vendorsetup.sh
- including device/asus/grouper/vendorsetup.sh
- including device/asus/flo/vendorsetup.sh
- including sdk/bash_completion/adb.bash
- dennis@dubuntu1404:~/devenv/aosp$
- dennis@dubuntu1404:~/devenv/aosp$ lunch
- You're building on Linux
- Lunch menu... pick a combo:
- 1. aosp_arm-eng
- 2. aosp_x86-eng
- 3. aosp_mips-eng
- 4. vbox_x86-eng
- 5. aosp_manta-userdebug
- 6. mini_mips-userdebug
- 7. mini_armv7a_neon-userdebug
- 8. mini_x86-userdebug
- 9. aosp_mako-userdebug
- 10. aosp_hammerhead-userdebug
- 11. aosp_tilapia-userdebug
- 12. aosp_deb-userdebug
- 13. aosp_grouper-userdebug
- 14. aosp_flo-userdebug
- Which would you like? [aosp_arm-eng] 9
- ============================================
- PLATFORM_VERSION_CODENAME=REL
- PLATFORM_VERSION=4.4.2
- TARGET_PRODUCT=aosp_mako
- TARGET_BUILD_VARIANT=userdebug
- TARGET_BUILD_TYPE=release
- TARGET_BUILD_APPS=
- TARGET_ARCH=arm
- TARGET_ARCH_VARIANT=armv7-a-neon
- TARGET_CPU_VARIANT=krait
- HOST_ARCH=x86
- HOST_OS=linux
- HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
- HOST_BUILD_TYPE=release
- BUILD_ID=KVT49L
- OUT_DIR=out
- ============================================
- dennis@dubuntu1404:~/devenv/aosp$ make -j4
注:j4中的数字跟你的CPU个数和核数有关,详细参见参考资料[3].
- $ sudo apt-get install android-tools-fastboot
- export ANDROID_PRODUCT_OUT=/home/dennis/devenv/aosp/out/target/product/mako
- $ adb reboot bootloader
- dennis@dubuntu1404:~/devenv/aosp/out$ fastboot flashall -w
- --------------------------------------------
- Bootloader Version...: PRIMEMD04
- Baseband Version.....: I9250XXLJ1
- Serial Number........: 0146A0D00600900B
- --------------------------------------------
- checking product...
- FAILED
- Device product is 'tuna'.
- Update requires 'mako'.
- finished. total time: 0.035s
- $ cd aosp
- dennis@dubuntu1404:~/devenv/aosp$ . build/envsetup.sh
- including device/samsung/manta/vendorsetup.sh
- including device/generic/mips/vendorsetup.sh
- including device/generic/armv7-a-neon/vendorsetup.sh
- including device/generic/x86/vendorsetup.sh
- including device/lge/mako/vendorsetup.sh
- including device/lge/hammerhead/vendorsetup.sh
- including device/asus/tilapia/vendorsetup.sh
- including device/asus/deb/vendorsetup.sh
- including device/asus/grouper/vendorsetup.sh
- including device/asus/flo/vendorsetup.sh
- including sdk/bash_completion/adb.bash
- dennis@dubuntu1404:~/devenv/aosp$ lunch aosp_arm-eng
- ============================================
- PLATFORM_VERSION_CODENAME=REL
- PLATFORM_VERSION=4.4.2
- TARGET_PRODUCT=aosp_arm
- TARGET_BUILD_VARIANT=eng
- TARGET_BUILD_TYPE=release
- TARGET_BUILD_APPS=
- TARGET_ARCH=arm
- TARGET_ARCH_VARIANT=armv7-a
- TARGET_CPU_VARIANT=generic
- HOST_ARCH=x86
- HOST_OS=linux
- HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
- HOST_BUILD_TYPE=release
- BUILD_ID=KVT49L
- OUT_DIR=out
- ============================================
- dennis@dubuntu1404:~/devenv/aosp$ make -j4
- ============================================
- PLATFORM_VERSION_CODENAME=REL
- PLATFORM_VERSION=4.4.2
- TARGET_PRODUCT=aosp_arm
- TARGET_BUILD_VARIANT=eng
- TARGET_BUILD_TYPE=release
- TARGET_BUILD_APPS=
- TARGET_ARCH=arm
- TARGET_ARCH_VARIANT=armv7-a
- TARGET_CPU_VARIANT=generic
- HOST_ARCH=x86
- HOST_OS=linux
- HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
- HOST_BUILD_TYPE=release
- BUILD_ID=KVT49L
- OUT_DIR=out
- ============================================
- including ./abi/cpp/Android.mk ...
- including ./art/Android.mk ...
- ....中间过程省略
- Install system fs image: out/target/product/generic/system.img
- out/target/product/generic/system.img+ maxsize=588791808 blocksize=2112 total=576716800 reserve=5947392
- $. build/envsetup.sh
- $lunch aosp_arm-eng
【转】基于Ubuntu 14.04 LTS编译Android4.4.2源代码的更多相关文章
- 基于Ubuntu 14.04 LTS编译Android4.4.2源代码
转载自:雨水:http://blog.csdn.net/gobitan/article/details/24367439 基于Ubuntu 14.04 LTS编译Android4.4.2源代码 ...
- 基于Ubuntu 14.04 LTS编译Android4.4.2源码
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/gobitan/article/details/24367439 基于Ubuntu 14.04 LTS ...
- 基于Ubuntu 15.04 LTS编译Android5.1.0源代码 (转)
原文链接:http://blog.csdn.net/yuxiangyunei/article/details/45365235 环境: ubuntu:ubuntu-15.04-desktop-am ...
- Ubuntu 14.04 LTS 下 android 2.3.5 源码编译过程
Ubuntu 14.04 LTS 下 android 2.3.5 源码编译过程 在新的Ubuntu 64位系统下去编译早期的安卓源码是会出现很多问题的,因为64位系统在安装完成后,很多32位的兼容 ...
- Ubuntu 14.04 LTS 64bit 编译SDL的问题
http://blog.csdn.net/jhting/article/details/38523945 Ubuntu 14.04 LTS 64bit 编译SDL的问题 分类: C/C++2014-0 ...
- 【Android 系统开发】CyanogenMod 13.0 源码下载 编译 ROM 制作 ( 手机平台 : 小米4 | 编译平台 : Ubuntu 14.04 LTS 虚拟机)
分类: Android 系统开发(5) 作者同类文章X 版权声明:本文为博主原创文章 ...
- ubuntu 14.04.5 编译Android 4.4.4 r1源码(最新)
本文博客链接:http://blog.csdn.net/qq1084283172/article/details/54426189 吐槽:ubuntu系统真是让人又爱又恨,也有可能是VMware Wo ...
- Ubuntu 14.04 LTS 安装 Juno 版 OpenStack Keystone
本文介绍如何在Ubuntu 14.04 LTS 上安装Juno版的Keystone, 我们采用的是手动安装的方式, 同时仅针对OpenStack的身份与访问管理系统Keystone. 事实上OpenS ...
- Ubuntu 14.04 LTS 安装和配置Bochs
Ubuntu 14.04 LTS 安装和配置Bochs 系统是:Ubuntu 14.04 LTS 64位 安装的是:bochs-2.6.8 Bochs 需要在 X11 环境下运行,因此你的 ...
随机推荐
- 添加samba用户,并设置密码
5.3.3 添加samba用户,并设置密码; 我们用的方法是先添加用户,但添加的这些用户都是虚拟用户,因为这些用户是不能通过SHELL登录系统的;另外值得注意的是系统用户密码和Samba用户的密码是不 ...
- Solr4.7新建core
Solr里面的core就像数据库里面的一个表,用来管理索引和相关配置. 一. 使用示例core 下载的solr完整包里面solr-4.7.0\example\multicore这个文件夹下面有2个示例 ...
- kindeditor-4.1.10在线编辑器的使用[多个]
<script type="text/javascript" charset="utf-8" src="../../Editor/kindedi ...
- SQL 查找存储过程及视图与自带函数
查找所有所有存储过程的名称及信息select * from sysobjectswhere type='P' 查看存储过程定义语句sp_helptext [存储过程名] 查看所有视图及信息select ...
- MyEclipse8.5注册码生成
步骤: 1.建立一个任意名称的Java project: 2.在该工程中建立一个名为MyEclipseGen的Java文件(MyEclipseGen.java) 3.运行下边代码,会在控制台出现&qu ...
- 04_过滤器Filter_01_入门简述
[简述] Filter也称之为过滤器.通过Filter技术,对web服务器管理的所有资源(如:Jsp.Servlet.静态图片文件.静态HTML文件等)进行拦截,从而实现一些特殊的功能.例如实现URL ...
- 关于网页强制被跳转到wpkg.org的解决
今天登陆MIT的网站看一篇文章,在进入到页面的时候,网页就会自动跳转到wpkg.org这个网页,查了下据说是DNS被污染了,暂时还是不是很清楚,先把问题解决了. 方法: 在C:\WINDOWS\sys ...
- windows phone 8 设置锁屏背景
本来想研究一下 利用闪光灯实现手电筒的代码,发现不是简答设置FlashMode属性可以解决问题的,ms也没有提供api,无意瞄了一眼侧边栏的文章列表,发现了设置屏幕锁屏背景的实现,手一抖点进去了.还算 ...
- docker 挂在本地目录
docker run -i -t -v /home/:/opt/data jenkins /bin/bash 运行jenkins,把本地中的/home/ 挂载到虚拟机中的/opt/data/ ...
- easy ui tabs 顶部绑定事件
$(function(){ $('#tb').tabs('bindclick', function(index, title){ }); }); $.extend($.fn.tabs. ...