美文网首页
lineageOS编译过程-2020/03/30 坑总结

lineageOS编译过程-2020/03/30 坑总结

作者: Wood木木 | 来源:发表于2023-04-28 16:14 被阅读0次

lineageOS上编译lineageOS

首先列出参考资料:
清华镜像源:https://mirrors.tuna.tsinghua.edu.cn/help/lineageOS/
编译官方教程:https://wiki.lineageos.org/devices/sagit/build
摘取Vender相关代码链接https://blog.csdn.net/yusakul/article/details/103270156

1,首先要安装相关库文件:

bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev openjdk-8-jdk
记得安装openJDK1.8哦。

2,repo的安装

repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git -b cm-14.1 --repo-url=https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

git config --global user.email "286095742@qq.com"
git config --global user.name "rubin"
更改相关源到清华源
使用文本编辑器打开.repo/manifest.xml
vim .repo/manifest.xml
修改以下内容
将<remote name="github" fetch=".."改成
<remote name="github" fetch="https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/"
将<remote name="aosp" fetch="https://android.googlesource.com"改成
<remote name="aosp" fetch="https://aosp.tuna.tsinghua.edu.cn"

这里跟清华源镜像里写的不一样,我们先这样改,再同步,之后会报一些项目找不到。这时个,你就把aosp再改为谷歌源就可以了。改动如下:
将<remote name="aosp" fetch="https://aosp.tuna.tsinghua.edu.cn"改成
<remote name="aosp" fetch="https://android.googlesource.com"

同步:
repo sync -f -c -j4
漫长的等待。之后报错了。
只要把aosp源重新改回谷歌源,再同步就可以了。

源码上用breakfast sagit,在我们这边是无法用的,我们需要手动拉取device相关文件

1,在项目源码目录下的device目录下,新建一个目录xiaomi
然后在xiaomi目录下同步2个仓库代码

git clone https://github.com/LineageOS/android_device_xiaomi_sagit.git sagit -b cm-14.1
git clone https://github.com/LineageOS/android_device_xiaomi_msm8998-common.git msm8998-common -b cm-14.1

然后需要下载一个835机型的内核源码
源码目录下的kernel目录下新建目录xiaomi,然后再xiaomi目录下执行代码

git clone https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android_kernel_xiaomi_msm8998.git msm8998 -b cm-14.1

项目还需要依赖一个android_packages_resources_devicesettings 也需要同步
在源码目录下的packages目录下新建目录resources,然后在resources目录下执行

git clone https://github.com/LineageOS/android_packages_resources_devicesettings.git -b cm-14.1 devicesettings

相关文章

  • 编译LineageOS

    源码下载:mkdir /opt/LineageOScd /opt/LineageOSrepo init -u ht...

  • lineageOS编译教程

    LineageOS 编译教程 大家好,我在群发现其实很多人想自己编译个Rom,但是不知道怎么开始。今天我就给大家示...

  • LineageOS 源码编译

    基础环境 注 虚机配置有点高,否者会编译的非常慢,硬盘和内存不足导致失败了很多次,最后将 硬盘更新到 300G 之...

  • ❄️浅斟黄昏暗香来

    ym2020-03-30

  • 周四 2020-12-03 23:10 - 06:30 阴 08

    2020-12-3 总结首尾的一天周四 2020-12-03 23:10 - 06:30 阴 08h41m 一 时...

  • SQL基础(三)

    事务 主要总结Mysql中操作事物的过程。 预编译 主要总结Mysql中操作预编译的过程。说出预编译的优点,画出S...

  • #羊妈日记#11 跟着羊羊读书5

    2020/04/20 周一 广州 晴 今日流水账 晨间,03:30起床。 晨间,1个番茄时间,总结昨日,计划今日。...

  • PHP的编译与执行

    分析PHP的执行编译过程 博主总结的PHP编译过程非常到位PHP词法分析ASTAST的遍历抽象语法树编译过程 相关...

  • Tinkpad-T430安装Ubuntu启动黑屏问题【恶心】

    前提:编译Lineageos5.1的源码,需要openjdk7环境,当时安装的ubuntu是17.04 只支持op...

  • iOS App 编译过程

    这篇文章是对于自己学习 App编译过程的一个总结 学习的相关文章 iOS App的编译过程iOS 编译过程的原理和...

网友评论

      本文标题:lineageOS编译过程-2020/03/30 坑总结

      本文链接:https://www.haomeiwen.com/subject/leyvuhtx.html