一台服务器,要求如下:
有 Git 基本常识。
安装编译 Android 所用到的软件包:
apt-get update && apt-get upgrade -y apt-get install -y openjdk-8-jdk git gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses-dev libncurses5 x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip bc imagemagick ccache schedtool libssl-dev jq patchelf
设置 Git 信息。
git config --global user.name "在此处替换成你的名字" git config --global user.email "在此处替换成你的邮箱"
下载 Repo
mkdir ~/.bin PATH=~/.bin:$PATH curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo chmod +x ~/.bin/repo
如果你要经常使用,可以在 Shell 的启动文件(例如 Bash 的启动文件就是 ~/.bashrc)中加入 export PATH=~/.bin:$PATH 以将其添加到 PATH 环境变量。
export PATH=~/.bin:$PATH
建立一个文件夹并进入。
mkdir LineageOS && cd LineageOS
使用 LineageOS 的树初始化本地仓库
repo init --no-clone-bundle -u git://github.com/LineageOS/android.git -b lineage-17.1
如果你的网络状况不佳或只想编译 ROM,请在上面的命令后面加入 --depth=1 参数来仅拉取一层提交历史。
--depth=1
开始同步源代码。
repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags
开始构建。 加载编译环境:
source build/envsetup.sh
接下来分为三种情况:
有官方维护: brunch <设备代号> 即可。
brunch <设备代号>
无官方维护,但已有非官方源码:
<device/kernel/vendor>/设备厂商名/设备代号
无官方维护,且无非官方源码,但是有其他自定义 ROM 的源码:
编译完成 编译完成后,你可以在 out/target/product/<设备代号> 下找到你编译出来的刷机包,刷入即可。
out/target/product/<设备代号>
大佬nb
dalao好厉害
tql sdl ddw wscj knz
大佬tql
大佬nb tql
sdl tql xmsl awsl wsl ddw wcsl wscl wtcl tyql
看到第一步就放弃了
家境贫寒
Ryder233 xD
sdl whxm
大佬nb!!tql
大佬,介绍一下如何汉化、修改 apk嘛
alpha 最容易的方法 mt
表示8G内存编译Android 9已经不够了→_→
Pzqqt 16G跑安卓10也能跑到swap里了😂
Pzqqt 😂
tql wbh
wtcl tql
同步源代码最后报错
error: Unable to fully sync the tree. error: Downloading network changes failed. error: Checking out local projects failed. Try re-running with "-j1 --fail-fast" to exit at the first error.
在此基础上继续clone内核源码并编译,报错
[W][2020-04-08T13:32:13+0800][26025] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files [W][2020-04-08T13:32:13+0800][26025] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files build/make/core/product_config.mk:223: error: Can not locate config makefile for product "lineage_lineage_sakura". 13:32:13 dumpvars failed with: exit status 1 Device lineage_sakura not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS). Repository for lineage_sakura not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml. [W][2020-04-08T13:32:50+0800][26114] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files [W][2020-04-08T13:32:50+0800][26114] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files build/make/core/product_config.mk:223: error: Can not locate config makefile for product "lineage_lineage_sakura". 13:32:50 dumpvars failed with: exit status 1 [W][2020-04-08T13:33:25+0800][26187] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files [W][2020-04-08T13:33:25+0800][26187] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files build/make/core/product_config.mk:223: error: Can not locate config makefile for product "lineage_lineage_sakura". 13:33:28 dumpvars failed with: exit status 1 ** Don't have a product spec for: 'lineage_lineage_sakura' ** Do you have the right repo manifest? No such item in brunch menu. Try 'breakfast'
编译环境:ubuntu18.04(由于网卡驱动被迫降内核至5.0)
seimo 并不清楚具体是哪里的问题,但是源码就没有完整的下载,也没有成功检出