Android Pixel7 13.0源码编译记录

这篇只是记录下笔者在编译源码的时候遇到的一些问题,以及自己是如何解决的,其实这些东西是不难的,笔者想只要能够自己去编译源码的同学都完全有能力去解决。笔者的计划是调试一个DEMO出来,这是第一步。

首先具体怎么编译源码,大家可以参考这位大哥的,说的已经很清楚了。

https://blog.csdn.net/layman_pro/article/details/145750510

2025年12月21日21:50:23

因为笔者之前就编过 我的需求 512g就够了 至于非要16+g以上的内存 区别也只在于首次编译 但又不赶时间 所以尽可能的在2000以内 但还是超出了一点点

2025年12月31日20:10:29

代码都下载完成

Bin文件解压

Type "I ACCEPT" if you agree to the terms of the license: I ACCEPT

cpp 复制代码
vendor/
vendor/google_devices/
vendor/google_devices/panther/
vendor/google_devices/panther/device-partial.mk
vendor/google_devices/panther/android-info.txt
vendor/google_devices/panther/proprietary/
vendor/google_devices/panther/proprietary/BoardConfigVendor.mk
vendor/google_devices/panther/proprietary/com.shannon.imsservice.xml
vendor/google_devices/panther/proprietary/vbmeta_vendor.img
vendor/google_devices/panther/proprietary/Android.bp
vendor/google_devices/panther/proprietary/Android.mk
vendor/google_devices/panther/proprietary/ShannonIms.apk
vendor/google_devices/panther/proprietary/radio.img
vendor/google_devices/panther/proprietary/ShannonRcs.apk
vendor/google_devices/panther/proprietary/bootloader.img
vendor/google_devices/panther/proprietary/com.shannon.rcsservice.xml
vendor/google_devices/panther/proprietary/vendor.img
vendor/google_devices/panther/proprietary/vendor_dlkm.img
vendor/google_devices/panther/proprietary/device-vendor.mk
vendor/google_devices/panther/proprietary/lib64/
vendor/google_devices/panther/proprietary/lib64/libmediaadaptor.so
vendor/google_devices/panther/proprietary/QualifiedNetworksService.apk
vendor/google_devices/panther/BoardConfigPartial.mk
vendor/google_devices/panther/LICENSE
vendor/google_devices/panther/COPYRIGHT

Ubuntu 24.04

whsgzcy@whsgzcy :~/Documents/pixcel13/source$ sudo vim /usr/lib/sysctl.d/10-apparmor.conf

whsgzcy@whsgzcy :~/Documents/pixcel13/source$ sudo sysctl -p /usr/lib/sysctl.d/10-apparmor.conf

kernel.apparmor_restrict_unprivileged_userns = 0

权限消解

sudo chown -R USER:USER .

Swap内存报错 导致make -jx的时候 报错

我的解决方案是deepseek问

我的解决方案是

1. 查看当前swap使用情况

sudo swapon --show

free -h

2. 创建一个新的swap文件(推荐大小:8GB-16GB)

对于16GB内存,建议创建8GB的swap文件

sudo fallocate -l 8G /swapfile

如果fallocate失败,可以使用dd(但较慢)

sudo dd if=/dev/zero of=/swapfile bs=1M count=8192

3. 设置正确的权限

sudo chmod 600 /swapfile

4. 格式化为swap

sudo mkswap /swapfile

5. 启用新的swap文件

sudo swapon /swapfile

6. 验证是否生效

free -h

备份当前的fstab文件(安全起见)

sudo cp /etc/fstab /etc/fstab.bak

将swap文件添加到fstab

echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

验证fstab文件格式正确

sudo mount -a

编译报错集

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

推荐下述方式 因为一个工具包他有很多依赖

pass

build completed successfully (04:57:27 (hh:mm:ss))

相关推荐
Mr数据杨6 小时前
【Codex】用学生入学评估模块建立新生能力画像
android·java·javascript·django·codex·项目开发
●VON7 小时前
谁小时候不想要一个游戏修改器?我把电脑 Skill 做成了 Android 小助手
android·游戏·电脑
刃神太酷啦7 小时前
Linux 系统 MySQL 完整安装配置教程:从卸载 MariaDB 到优化 my.cnf----《Hello MySQL!》(1)
android·linux·c语言·c++·mysql·leetcode·mariadb
里欧跑得慢7 小时前
Flutter 三方库 function_tree — 鸿蒙应用开发中的动态数学公式解析与计算神器,实现鸿蒙深度适配下的复杂函数逻辑运行时求值实战(适配鸿蒙 HarmonyOS Next ohos)
android·前端·安全·flutter·华为·harmonyos
IT毕设实战小研7 小时前
基于安卓的空气质量查询系统
android·大数据·vue.js·爬虫·python·django·课程设计
雨声不在10 小时前
docker-android Android 16 支持与编译修改
android
天空之城--15 小时前
【无标题】
android
mmsx16 小时前
osmdroid 接入谷歌影像底图:瓦片 URL 拼接与多域名轮询实战
android·osmdroid
ZYJCSZKJ17 小时前
基于大语言模型的地域实体语义增强:生成式引擎优化(GEO)中的多模态内容生成实践
android·人工智能·语言模型
ssshooter17 小时前
Tauri + GitHub Actions 自动化发布 Android APK 技术总结
android·github·android studio