Compile android source and kernel for emulator in Debian
1、download the android source code
Reference from
http://source.android.com/source/downloading.html
follow the reference:
Create the dir and export the PATH
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Download the repo
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod 775 ~/bin/repo
Repo init the code version you want
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
finally sync the codes
$ repo sync
// better way
$ repo sync -j16
if try to stop the repo, just try
Ctrl + z
and continue the repo
$ repo sync
// or
$ repo sync -j16
after download, must enter "repo sync" to check the code again.
2、download the kernel
Reference from
https://android.googlesource.com/
click the kernel/common, there would be a instruction on the top:
git clone https://android.googlesource.com/kernel/common
the version for emulator
git clone https://android.googlesource.com/kernel/goldfish
3、Compile the source code
1) check the build environment
http://source.android.com/source/initializing.html
2) compile
$ cd ~/Android/source_code/
$ make
// or
$ make -j4
3) there would be the files in the following dir
$ ls out/host/linux-x86/bin/ | grep emulator
emulator
emulator64-arm
emulator64-mips
emulator64-x86
emulator-arm
emulator-mips
emulator_renderer
emulator-ui
emulator-x86
$ ls out/target/product/generic/ | grep img
ramdisk.img
system.img
userdata.img
4、 Compile the kernel
$ cd goldfish/
$ ls
but there is no files now.
checkout for the real codes.
$ git checkout
android-goldfish-2.6. master origin/linux-goldfish-3.0-wip
android-goldfish-3.4 origin/android-goldfish-2.6. origin/master
HEAD origin/android-goldfish-3.4
linux-goldfish-3.0-wip origin/HEAD
choose the version you want
$ git checkout android-goldfish-2.6.
Checking out files: % (/), done.
Branch android-goldfish-2.6. set up to track remote branch android-goldfish-2.6. from origin.
切换到一个新分支 'android-goldfish-2.6.29'
then
$ ls
arch CREDITS drivers include Kbuild MAINTAINERS net samples sound
block crypto firmware init kernel Makefile README scripts usr
COPYING Documentation fs ipc lib mm REPORTING-BUGS security virt
compile the kernel
1) crrect the Mafile
$ vim Makefile
//correct the following messenge
#ARCH ?= $(SUBARCH)
ARCH ?= arm
CROSS_COMPILE ?= arm-none-linux-gnueabi-
2) make menuconfig
$ make menuconfig
>> Save an Alternate Configuration File
3) make
TIPS : there would be error without libnucurses
$ sudo apt-get install libncurses5 libncurses5-dev
// in AMD64
$ sudo apt-get install libncurses5 libncurses5-dev
$ sudo apt-get install ia32-libs
$ sudo apt-get install lib32ncurses5 lib32ncurses5-dev
Compile android source and kernel for emulator in Debian的更多相关文章
- How to download and compile Android kernel goldfish ?
Prerequisites Assuming that we already downloaded the android-ndk-r12b and sdk. w4118@w4118:~/utils$ ...
- How to compile and install Linux Kernel 5.1.2 from source code
How to compile and install Linux Kernel 5.1.2 from source code Compiling a custom kernel has its adv ...
- 【转】在Ubuntu下编译Android源码并运行Emulator
原文网址:http://www.mcuos.com/thread-4553-1-1.html 建立编译环境 1.在VirtualBox上安装Ubuntu 2.安装JDK $ sudo apt-ge ...
- 【转】Ubuntu10.04上编译Android源码(Build Android source in Ubuntu10.04 Platform)
原文网址:http://blog.csdn.net/chenyafei617/article/details/6570928 一.Introduction 今天我们就来谈谈如何在Ubuntu平台上面编 ...
- how to compile and replace ubuntu kernel
how to compile and replace ubuntu kernel 0. environment -ubuntu 1804 64bit 1. prepare source code su ...
- 同步、更新、下载Android Source & SDK from 国内镜像站(转载)
同步.更新.下载Android Source & SDK from 国内镜像站 转自: 同步.更新.下载Android Source & SDK from 国内镜像站 Download ...
- 同步、更新、下载Android Source & SDK from 国内镜像站
转自: 同步.更新.下载Android Source & SDK from 国内镜像站 Download the android source from china mirrors 以 ...
- 配置android source 在ubuntu中编译环境
在Ubuntu中可以配置 android source 编译环境,推荐使用最新的64位的Ubuntu LTS(Long Time Support); 1.安装JDK. AOSP主分支代码需要java ...
- Error:Android Source Generator: [sdk] Android SDK is not specified.
有时候使用intellij idea 带入android 项目,运行提示Error:Android Source Generator: [sdk] Android SDK is not specifi ...
随机推荐
- 对ConditionQueue和锁的理解
1. 什么时候使用conditionQueue 使用conditionQueue的一个最基本的条件是,操作和状态相关,而且是多线程同时访问的状态. 也就是说在使用conditionQueue的时候, ...
- SqlServer循环执行存储过程
begin --申明变量 ) declare @zycs int --赋值变量 --申明游标 declare order_cursor cursor for (select blh, zycs fro ...
- linux 输出
在学习Linux的过程中,常会看到一些终端命令或者程序中有">/dev/null 2>&1 "出现,由于已经遇到了好几次了,为了理解清楚,不妨花点时间百度或者g ...
- 【转】Android EventBus初探
出处:http://blog.csdn.net/lmj623565791/article/details/40794879 1.概述 最近大家面试说经常被问到EventBus,github上果断dow ...
- 疑难杂症--在Windows Server 2008 R2上运行SQL Server 2008情况下,CPU过多导致的问题
64位的Windows7和Windows Server 2008 R2为了能够在一台机器上,支持超过64个逻辑CPU, 引入了Processor Group这个概念.Processor Group会把 ...
- if、else if 、else及switch...case使用小记(C#)
有时候编程编的久了,如果不停下来认真思考一下,即便是一些最基础的知识点,也可能让自己懵圈.其实,说到底还是打基础的时候没打牢,或者说自以为是地认为自己懂了,然后在打基础的时候就懒得思考懒得看了,结果就 ...
- mysql--数据库的简单认识
一.数据库的简单认识 1.数据库 1.数据库,简而言之可视为电子化的文件柜——存储电子文件的处所,用户可以对文件中的数据运行新增. 截取.更新.删除等操作.所谓“数据库”系以一定方式储存在一起.能予多 ...
- 2018-2019-2 20165219《网络对抗技术》Exp4 恶意代码分析
基础问题回答 实验目的 监控系统的运行状态,看有没有可疑的程序在运行 分析一个恶意软件,就分析Exp2或Exp3中生成后门软件:分析工具尽量使用原生指令或sysinternals,systracer套 ...
- python 将列表嵌套字典的unicode字符串转换为str格式的字符串的方法
今天在进行django开发的过程中遇到了一个非常棘手的问题, 因为需求原因, 需要将一份数据存为json格式到数据库中, 如下面这种格式: list_1 = [{"name":&q ...
- input disabled的情况下在IOS设备中怎么修改颜色
-webkit-text-fill-color:black; -webkit-opacity:1; opacity: 1; 一句代码就欧了