Android 类原生编译教程

Android

1. 选择一个系统

  • Havoc / Evolution X / DotOS / Pixel Experience

2. 需要的基本知识

  • Linux 终端的基本语法
  • Git 基本操作指令

3. 硬件要求

  • 系统:Linux(Ubuntu LTS)
  • CPU:至少四核心,建议八核心
  • RAM:至少16GB,建议32GB及以上
  • 硬盘:至少500GB,建议2TB

4. 安装编译工具

Ubuntu 20.04 LTS:

sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev openjdk-11-jdk git vim

5. 同步源码

mkdir -p ~/evolution
cd ~/evolution
repo init -u https://github.com/Evolution-X/manifest -b elle
repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags

6. 修改设备树

device tree放到 device/lge/,kernel放到 kernel/lge/,vendor放到 vendor/lge/

7. 开始编译

export USE_CCACHE=1
export CCACHE_EXEC=/usr/bin/ccache
ccache -M 50G
. build/envsetup.sh
lunch evolution_flashlmdd-userdebug
brunch evolution_flashlmdd-userdebug
YouthGT

分享编程、嵌入式、Android、PCB等技术领域的学习经验与总结。

页面

浏览

社交

© 2019-2026 YouthGT.

Astro & Tailwind Github RSS