oneplus3t-lineageos-16.1编译-android9
本仓库开发已经完毕,使用请直接从4.2开始
** LineageOS16_oneplus3t仓库群克隆 、 编译 、 刷机**
- 编译过程若
ctrl+c强制终止,请重新从头编译
LineageOS16_oneplus3t仓库群克隆过程
LineageOS16_oneplus3t仓库群克隆过程描述: LineageOS16_oneplus3t_gitRepoLs_clone_desc.pdf
0_clone_me
git clone --branch zzz-stable https://gitlab.com/lineage16_oneplus3t/manifest-parser/git-repo.git /app4/git-repo
#/app4/git-repo/.git/config
1_lineageOS16_android9_repo_pull
仅开发时执行,产物已在本仓库,用户无需执行
此步骤执行了修改的repo命令,从而获得LineageOS-16.0–oneplus3t仓库群
执行内容
bash -x <(curl https://gitlab.com/lineage16_oneplus3t/manifest-parser/git-repo/-/raw/zzz-stable/projGit_ls/lineageOS16_android9_repo_pull.sh)
lineageOS16(android9)代码仓库拉取 ( 执行展开 ),
输入
manifest/lineageos-android–oneplus3t/lineage-16.0/default.xml
产物
-
仓库群描述 : projGit_ls/gen
/[projGit_ls.*.json|projGit_ls.*.md] -
本地目录下仓库群 中 的 软链接命令、复制文件命令 : projGit_ls/gen
/[projCopyAndSoftLinkLs_ls.*.sh]
2_gitlabWebBatchImportReqXmlFile_gen
仅开发时执行,产物已在本仓库,用户无需执行
gitlab网页端批量导入请求生成
执行内容
bash /app4/git-repo/projGit_ls/json__to__gitlabWebBatchImportReqXmlFile/main.sh ( main.sh )
输入
即上一步产物: projGit_ls/gen/[projGit_ls.*.json|projGit_ls.*.md]
产物
gitlabWebBatchImportReq/*.xml
3_gitlabWebBatchImport
仅开发时执行, 产物已在本仓库,用户无需执行
gitlab网页批量导入LineageOS-16.0–oneplus3t仓库群**
执行内容
浏览器人工打开此网页批量导入仓库: gitlab网页批量导入
文档和例子manifest.xml
输入
即上一步产物: gitlabWebBatchImportReq/*.xml
产物
https://gitlab.com/lineage16_mirror
4_lineage16_clone
4.1
准备
仓库群描述 转换为 仓库群克隆文件
仅开发时执行, 产物已在本仓库,用户无需执行
产物 projGit_ls/gen/gitCloneCmd.sh 已在本仓库 。
bash /app4/git-repo/projGit_ls/json__to__cloneCmd/main.sh
4.2
执行内容
克隆LineageOS-16.0–oneplus3t仓库群
#克隆LineageOS-16.0--oneplus3t仓库群 , gitCloneCmd.sh 中 已写明 --depth=1 (只要以指定分支为起点的1个提交,以减小仓库尺寸)
root_dir=/app4/lineage16_oneplus3t_newdir bash /app4/git-repo/projGit_ls/gen/gitCloneCmd.sh
projGit_ls/json__to__cloneCmd/main.sh
projGit_ls/gen/gitCloneCmd.sh
输入
即 步骤2_gitlabWebBatchImportReqXmlFile_gen的产物: gitlabWebBatchImportReq/*.xml
产物
projGit_ls/gen/gitCloneCmd.sh
5_projCopyAndSoftLinkLs
本地目录下仓库群 中 的 软链接命令、复制文件命令 执行
root_dir=/app4/lineage16_oneplus3t_new bash -x /app4/git-repo/projGit_ls/gen/projCopyAndSoftLinkLs_ls.*.sh
#比如 projCopyAndSoftLinkLs_ls.1730372866.43542.sh
projGit_ls/gen//projCopyAndSoftLinkLs_ls.*.sh
LineageOS16_oneplus3t仓库群 编译
6_build
已在前几步完成 保留注释作为警醒
本文中注释掉的部分 都已在前几步完成了,保留注释只是为了保持警醒
主要由以下几处 完成了注释中的内容
- https://gitlab.com/lineage16_oneplus3t/manifest/lineageos-android/-/blob/lineage-16.0/default.xml
- https://gitlab.com/lineage16_oneplus3t/resource
### '已在前几步完成 保留注释作为警醒' 开始
#curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o /app/bin/repo#export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
#repo init --manifest-url https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git --manifest-branch $GitBranch # GitBranch=lineage-16.0#解决报错, resource layout/preference_category_material_settings (aka org.lineageos.settings.device:layout/preference_category_material_settings) not found
#git clone -b lineage-16.0 https://githubfast.com/LineageOS/android_packages_resources_devicesettings.git $D/packages/resources/devicesettings#git clone https://github.com/TheMuppets/proprietary_vendor_oneplus.git/oneplus3 -b lineage-16.0 $D/vendor/oneplus/oneplus3#$D/repo/manifests/default.xml
#<remote name="aosp" fetch="https://android.googlesource.com" fetch替换为 "https://mirrors.tuna.tsinghua.edu.cn/git/AOSP"#repo sync --current-branch --no-tags --prune#oneplus3t linux内核、第三方厂商vendor
#git clone -b $GitBranch https://github.com/LineageOS/android_device_oneplus_oneplus3.git $D/device/oneplus/oneplus3
#git clone -b $GitBranch https://github.com/LineageOS/android_device_oppo_common.git $D/device/oppo/common
#git clone -b $GitBranch https://github.com/LineageOS/android_kernel_oneplus_msm8996.git $D/kernel/oneplus/msm8996
#git clone -b $GitBranch https://github.com/LineageOS/android_packages_resources_devicesettings.git $D/packages/resources#解决编译错误, /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here### '已在前几步完成 保留注释作为警醒' 结束
编译步骤正文
#编译步骤正文开始export PATH_BASE=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/app/bin/
export PATH=$PATH_BASED=/app4/lineage16_oneplus3t_new
cd $D
#GitBranch=lineage-16.0source build/envsetup.sh#export V=1
export LC_ALL=C
export ALLOW_MISSING_DEPENDENCIES=true
lunch lineage_oneplus3-userdebug && mka showcommands bacon # lineage_oneplus3-eng
#编译步骤正文结束
参考: gitee/android_framework/oneplus3/lineage-build-simple-manual.md
某次编译产物举例
-
编译完成消耗时长为 53分钟(电脑配置: intel-12代i7+16GB内存),
-
获得的OTA全量卡刷包
lineage-16.0-20241101-UNOFFICIAL-oneplus3.zip尺寸为630MB -
/app4占据空间128GB,out目录大小为77GB, 源码目录大小为50GB
cat /proc/cpuinfo | grep 'model name' | uniq
#model name : 12th Gen Intel(R) Core(TM) i7-12650Hsudo dmidecode -t memory #16GB内存#Package Complete: /app4/lineage16_oneplus3t/out/target/product/oneplus3/lineage-16.0-20241101-UNOFFICIAL-oneplus3.zip# build completed successfully (53:32 (mm:ss)) ####ls -lh /app4/lineage16_oneplus3t/out/target/product/oneplus3/lineage-16.0-20241101-UNOFFICIAL-oneplus3.zip
#-rwxrwxrwx 630M 2024年11月1日 22点18分 /app4/lineage16_oneplus3t/out/target/product/oneplus3/lineage-16.0-20241101-UNOFFICIAL-oneplus3.zipdf -h /app4
#Filesystem Size Used Avail Use% Mounted on
#/dev/nvme0n1p1 239G 128G 111G 54% /app4###编译产物中的调试符号 比如 libandroid_runtime.so.debug
find out/ -type f -path "*/oneplus3*/*/libandroid_runtime.so*"
#out/target/product/oneplus3/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/libandroid_runtime.so.debug
#out/target/product/oneplus3/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/libandroid_runtime.so#pwd==/app4/lineage16_oneplus3t/
#out目录大小为77GB
du --threshold=1G --max-depth=1 --human-readable out/
#4.9G out/host
#30G out/soong
#42G out/target
#77G out/#源码目录大小为50GB
du --exclude=out --threshold=1G --max-depth=1 --human-readable .
#1.4G ./cts
#8.3G ./external
#2.5G ./frameworks
#31G ./prebuilts
#2.3G ./tools
#50G .
LineageOS16_oneplus3t仓库群 刷机
7_OTA_package_flush
刷机(OTA全量卡刷包)
前提: 已获得root 、 已解锁OEM
adb reboot bootloader
fastboot boot /app4/twrp-3.5.2_9-0-oneplus3.img #twrp界面 进入 sideload等待: Advance -> 'adb sideload' -> 清除 'davld cache' 、 `user cache' (双请) -> 底部进度条拉到右端
adb sideload /app4/lineage16_oneplus3t/out/target/product/oneplus3/lineage-16.0-20241101-UNOFFICIAL-oneplus3.zip
缺少依赖的报错解决记录
libncurses.so.5: cannot open shared object file
报错现象
m V=1 -j 1 bacon # 或mka showcommands bacon 报错如下
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
报错解决
apt-file search libncurses.so.5
#libncurses5: /lib/x86_64-linux-gnu/libncurses.so.5sudo apt install libncurses5
m4: command not found
sudo apt install -y build-essential m4
libtinfo.so.5: cannot open shared object file
报错现象
m V=1 -j 1 bacon # 或mka showcommands bacon 报错如下
prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
报错解决
apt-file search libtinfo.so.5
#libtinfo5: /lib/x86_64-linux-gnu/libtinfo.so.5
sudo apt install -y libtinfo5
The boot animation could not be generated, as ImageMagick is not installed in your system.
报错现象
m V=1 -j 1 bacon # 或mka showcommands bacon 报错如下
The boot animation could not be generated
as ImageMagick is not installed in your system.
报错解决
apt-file search ImageMagick
sudo apt install -y imagemagick
其他报错解决记录
aarch64-linux-android-gcc: No such file or directory
报错现象
m V=1 -j 1 bacon # 或mka showcommands bacon 报错如下
/OP3TLos16Build/kernel/oneplus/msm8996/Makefile:671: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
make[1]: aarch64-linux-android-gcc: No such file or directory
报错分析
aarch64-linux-android-gcc是个python2.7脚本,且指定了需要解释器路径为#!/usr/bin/python
head -n 1 /OP3TLos16Build/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc
##!/usr/bin/python/OP3TLos16Build/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc
#-bash: /OP3TLos16Build/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: /usr/bin/python: bad interpreter: No such file or directory
报错解决
sudo apt install -y python2.7
sudo ln -s /usr/bin/python2.7 /usr/bin/python
which python #/usr/bin/python
cp: preserving permissions for
报错现象
m V=1 -j 1 bacon # 或mka showcommands bacon 报错如下
/bin/bash -c "(rm -f /app4/lineage16_oneplus3t/out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates//classes*.dex ) && (cp -fp /app4/lineage16_oneplus3t/out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi//classes*.dex /app4/lineage16_oneplus3t/out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/ )"
cp: preserving permissions for '/app4/lineage16_oneplus3t/out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/classes.dex': Operation not permitted
报错解决
/app4所在分区挂载选项中增加 uid=1000,gid=1000, ,其中的数值是举例(表示ubuntu22当前登陆的用户的)
相关文章:
oneplus3t-lineageos-16.1编译-android9
本仓库开发已经完毕,使用请直接从4.2开始 ** LineageOS16_oneplus3t仓库群克隆 、 编译 、 刷机** 编译过程若ctrlc强制终止,请重新从头编译 LineageOS16_oneplus3t仓库群克隆过程 LineageOS16_oneplus3t仓库群克隆过程描述: LineageOS16_oneplus3t_gitRepoLs_c…...
VSCode+ESP-IDF开发ESP32-S3-DevKitC-1(1)开发环境搭建
VSCodeESP-IDF开发ESP32-S3-DevKitC-1(1)开发环境搭建 1.开发环境搭建(安装ESP-IDF)2.开发环境搭建(安装VS Code)3.开发环境搭建(VSCode中安装ESP-IDF插件及配置) 1.开发环境搭建&am…...
LeetCode --- 143周赛
题目列表 3345. 最小可整除数位乘积 I 3346. 执行操作后元素的最高频率 I 3347. 执行操作后元素的最高频率 II 3348. 最小可整除数位乘积 II 一、最小可整除数位成绩I 由于本题的数据范围比较小,我们直接暴力枚举即可,代码如下 class Solution { p…...
[AI] 【提高认知】自动翻译技术的演变:从规则系统到深度学习的崛起
机器自动翻译 (MT) 是人工智能历史上最早的应用之一,尤其是在英语和俄语之间的翻译应用。自诞生以来,自动翻译技术从符号系统逐步演化到依赖大数据和深度学习的先进模型。本文将深入探讨机器翻译的早期方法、统计方法和现代神经网络方法的演变过程,帮助大家了解自动翻译技术…...
python机器人Agent编程——多Agent框架的底层逻辑(上)
目录 一、前言二、两个核心概念2.1 Routines(1)清晰的Prompt(2)工具调用json schema自动生成(3)解析模型的toolcall指令(4)单Agent的循环决策与输出 PS.扩展阅读ps1.六自由度机器人相…...
渑池县中药材产业党委莅临河南广宇企业管理集团有限公司参观交流
11月14日,渑池县人大副主任、工商联主席杨航率县中药材产业党委代表团一行13人,莅临河南广宇集团参观交流。河南广宇集团总经理王峰、副总经理王培等领导热情接待并陪同参观、座谈。 代表团一行首先参观了集团旗下郑州美信中医院(庚贤堂中医药…...
学习日志011--模块,迭代器与生成器,正则表达式
一、python模块 在之前学习c语言时,我们学了分文件编辑,那么在python中是否存在类似的编写方式?答案是肯定的。python中同样可以实现分文件编辑。甚至还有更多的好处: 提高代码的可维护性:当代码被分成多个文件时…...
ChatGPT 搜索 vs Google 搜索
原文:Amanda Caswell - 2024.11.01 随着 OpenAI 推出的实时搜索功能,ChatGPT 正在逐步成为像 Google 这样的传统搜索引擎的竞争对手。ChatGPT 以其对话式的回答方式而闻名,它能够在没有广告干扰的情况下提供实时的上下文信息。 我迫不及待地…...
一文简单了解Android中的input流程
在 Android 中,输入事件(例如触摸、按键)从硬件传递到应用程序并最终由应用层消费。整个过程涉及多个系统层次,包括硬件层、Linux 内核、Native 层、Framework 层和应用层。我们将深入解析这一流程,并结合代码逐步了解…...
【MySQL】SQL语言
【MySQL】SQL语言 文章目录 【MySQL】SQL语言前言一、SQL的通用语法二、SQL的分类三、SQLDDLDMLDQLDCL 总结 前言 本篇文章将讲到SQL语言,包括SQL的通用语法,SQL的分类,以及SQL语言的DDL,DML,DQL,DCL。 一、SQL的通用语法 在学习具体的SQL语句之前,先来…...
5.4.2-1 编写Java程序在HDFS上创建文件
本次实战涉及使用Java操作Hadoop HDFS,包括创建文件、判断文件存在性及异常处理。通过手动添加依赖、启动HDFS服务,成功在HDFS上创建和检查文件。进一步探索了文件操作的最佳实践,如检查文件存在性以避免重复创建,以及处理HDFS安全…...
The 3rd Universal CupStage 15: Chengdu, November 2-3, 2024(2024ICPC 成都)
Problem L. Recover Statistics 题目意思: 给定a, b, c三个值,确保构造的数列中包含满足题目的数量 解题思路: 100 中 选择a 50个, b45个, c4个。 #include <iostream>using namespace std;using ll long …...
显示微服务间feign调用的日志
第一步 package com.niuniu.common.config;import com.niuniu.common.CommonConstant; import com.niuniu.common.utils.UserContext; import feign.Logger; import feign.RequestInterceptor; import feign.RequestTemplate; import org.springframework.context.annotation.…...
SOHO场景开局(小型,多子网):AP+管理型交换机+路由器+光猫
业务需求 1. 实现除光猫外,整网设备通过APP进行开局,开局部署完成后,能够通过APP远程运维。 2. 需要单独划分访客、办公、视频监控3个子网,其中访客子网供顾客无线上网使用,办公子网用于接入无线和有线办公终端&#x…...
Android - Pixel 6a 手机OS 由 Android 15 降级到 Android 14 操作记录
Pixel 6a 手机由 Android 14 升级到 Android 15了,但是由于一些原因又想降级回 Android 14, 能降吗?该怎么降级呢?本篇文章来记述实际操作过程,希望能给想做相同操作的人一些帮助。 答案当然是能降,而且我…...
linux系统kkFileView 配置https预览文件
思路: 1.kkfile的 context全局路径可以修改 context-path,比如:server.servlet.context-path 2.使用nginx反向代理 /kkfile 转发到 kkfile路径上 官网教程 kkFileView - 在线文件预览 1、配置config/application.properties. server.se…...
stm32——通用定时器时钟知识点
(该图来自小破站 铁头山羊老师的stm32标准库教学)...
前端无感刷新token
摘要: Axios 无感知刷新令牌是一种在前端应用中实现自动刷新访问令牌(access token)的技术,确保用户在进行 API 请求时不会因为令牌过期而中断操作 目录概览 XMLHttpRequestAxiosFetch APIJQuni.request注意事项: 访问…...
针对股票评论的情感分类器
🏡作者主页:点击! 🤖编程探索专栏:点击! ⏰️创作时间:2024年11月16日13点39分 神秘男子影, 秘而不宣藏。 泣意深不见, 男子自持重, 子夜独自沉。 论文链接 点击开启你的论文编程之旅…...
Day18 Nim游戏
你和你的朋友,两个人一起玩 Nim 游戏: 桌子上有一堆石头。 你们轮流进行自己的回合, 你作为先手 。 每一回合,轮到的人拿掉 1 - 3 块石头。 拿掉最后一块石头的人就是获胜者。 假设你们每一步都是最优解。请编写一个函数ÿ…...
day52 ResNet18 CBAM
在深度学习的旅程中,我们不断探索如何提升模型的性能。今天,我将分享我在 ResNet18 模型中插入 CBAM(Convolutional Block Attention Module)模块,并采用分阶段微调策略的实践过程。通过这个过程,我不仅提升…...
多场景 OkHttpClient 管理器 - Android 网络通信解决方案
下面是一个完整的 Android 实现,展示如何创建和管理多个 OkHttpClient 实例,分别用于长连接、普通 HTTP 请求和文件下载场景。 <?xml version"1.0" encoding"utf-8"?> <LinearLayout xmlns:android"http://schemas…...
在鸿蒙HarmonyOS 5中使用DevEco Studio实现录音机应用
1. 项目配置与权限设置 1.1 配置module.json5 {"module": {"requestPermissions": [{"name": "ohos.permission.MICROPHONE","reason": "录音需要麦克风权限"},{"name": "ohos.permission.WRITE…...
使用Spring AI和MCP协议构建图片搜索服务
目录 使用Spring AI和MCP协议构建图片搜索服务 引言 技术栈概览 项目架构设计 架构图 服务端开发 1. 创建Spring Boot项目 2. 实现图片搜索工具 3. 配置传输模式 Stdio模式(本地调用) SSE模式(远程调用) 4. 注册工具提…...
C++:多态机制详解
目录 一. 多态的概念 1.静态多态(编译时多态) 二.动态多态的定义及实现 1.多态的构成条件 2.虚函数 3.虚函数的重写/覆盖 4.虚函数重写的一些其他问题 1).协变 2).析构函数的重写 5.override 和 final关键字 1&#…...
Elastic 获得 AWS 教育 ISV 合作伙伴资质,进一步增强教育解决方案产品组合
作者:来自 Elastic Udayasimha Theepireddy (Uday), Brian Bergholm, Marianna Jonsdottir 通过搜索 AI 和云创新推动教育领域的数字化转型。 我们非常高兴地宣布,Elastic 已获得 AWS 教育 ISV 合作伙伴资质。这一重要认证表明,Elastic 作为 …...
统计学(第8版)——统计抽样学习笔记(考试用)
一、统计抽样的核心内容与问题 研究内容 从总体中科学抽取样本的方法利用样本数据推断总体特征(均值、比率、总量)控制抽样误差与非抽样误差 解决的核心问题 在成本约束下,用少量样本准确推断总体特征量化估计结果的可靠性(置…...
以太网PHY布局布线指南
1. 简介 对于以太网布局布线遵循以下准则很重要,因为这将有助于减少信号发射,最大程度地减少噪声,确保器件作用,最大程度地减少泄漏并提高信号质量。 2. PHY设计准则 2.1 DRC错误检查 首先检查DRC规则是否设置正确,然…...
十二、【ESP32全栈开发指南: IDF开发环境下cJSON使用】
一、JSON简介 JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,具有以下核心特性: 完全独立于编程语言的文本格式易于人阅读和编写易于机器解析和生成基于ECMAScript标准子集 1.1 JSON语法规则 {"name"…...
Ansys Maxwell:线圈和磁体的静磁 3D 分析
本博客展示了如何在 Ansys Maxwell 中执行静磁 3D 分析,以计算载流线圈和永磁体之间相互作用产生的扭矩。在这个例子中,线圈中的电流产生一个沿 Y 轴指向的磁场,而永磁体沿 X 轴被磁化。这种配置导致围绕 Z 轴的扭矩。分步工作流程包括构建几…...
