Deepin 编译cm 笔记

1安装软件

sudo apt-get install android-tools-adb android-tools-fastboot gnome-terminal git-core gnupg curl bison xsltproc flex pngquant schedtool gperf valgrind build-essential libxml2-utils ccache openjdk-7-jdk

2 安装repo

mkdir ~/bin
git clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/
cp git-repo/repo ~/bin/

3 设置环境

sudo gedit /etc/profile

 

alias repo="~/bin/repo"
export PATH=$PATH:/media/changyuet/android/CM12.1/out/host/linux-x86/bin
export ANDROID_PRODUCT_OUT=/media/changyuet/android/CM12.1/out/target/product/generic
export USE_CCACHE=1
export CCACHE_DIR=/media/changyuet/cache/ccache

设置默认shell

chsh
密码: 

请输入新值,或直接敲回车键以使用默认值

登录 Shell [/bin/bash]:/bin/bash

 

4 同步源码

cd /media/changyuet/android/
mkdir CM12.1
cd CM12.1
repo init -u https://github.com/CyanogenMod/android.git -b cm-12.1
repo sync

5 编译

. build/envsetup.sh
prebuilts/misc/linux-x86/ccache/ccache -M 30G
lunch
make -j8 otapackage

 

你可能感兴趣的:(Deepin 编译cm 笔记)