- 源码下载:
mkdir /opt/LineageOS cd /opt/LineageOS repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git -b cm-14.1 repo sync
- 下载vendor信息:
cd /opt/LineageOS/vendor/samsung git clone https://github.com/MoKee/android_vendor_samsung_exynos5420-common.git exynos5420-common
- 下载预编译镜像:
cd /tmp wget https://mirrorbits.lineageos.org/full/klimtwifi/20170628/lineage-14.1-20170628-nightly-klimtwifi-signed.zip
- 解压预编译镜像:
mkdir -p /tmp/android cd /tmp/android unzip /tmp/lineage-14.1-20170628-nightly-klimtwifi-signed.zip system.transfer.list system.new.dat
- 下载镜像处理工具:
cd /tmp/android git clone https://github.com/xpirt/sdat2img
- 提取系统镜像:
python sdat2img/sdat2img.py system.transfer.list system.new.dat system.img
- 挂载镜像:
cd /tmp/android mkdir system/ mount system.img system/
- 提取镜像文件:
cd /opt/LineageOS cd device/samsung/klimtwifi/ ./extract-files.sh /tmp/android
- 卸载并删除镜像:
umount /tmp/android/system rm -rf /tmp/android/system
- 设置环境变量:
cd /opt/LineageOS source build/envsetup.sh breakfast klimtwifi
- 打开缓存加速:
export USE_CCACHE=1 prebuilts/misc/linux-x86/ccache/ccache -M 50G export CCACHE_COMPRESS=1
- 配置jack:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
- 编译系统:
croot brunch klimtwifi
- 查看镜像:
ls $OUT
网友评论