在wsl 2中编译自己的魔趣(mokee) ROM
1.安装wsl2
a.在windows 10 系统中启用wsl2(只能是wsl2,wsl1 会编译失败), 并商店中下载ubuntu镜像,商店默认安装位置为C:\Program Files\WindowsApps,考虑到编译需要100多G空间,需要把app移动到其他盘.
用管理员权限打开cmd
1 :: 切换到目录中
2 c:\Program Files\WindowsApps> cd /d "C:\Program Files\WindowsApps"
3 :: 查找文件夹名字
4 c:\Program Files\WindowsApps>dir | findstr Ubuntu20
5 2022/02/07 16:35 <DIR> CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2021.825.0_neutral_split.scale-100_79rhkp1fndgsc
6 2022/02/07 16:35 <DIR> CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2021.825.0_neutral_~_79rhkp1fndgsc
7 2022/02/07 16:35 <DIR> CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2021.825.0_x64__79rhkp1fndgsc
8
9 xcopy CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2021.825.0_x64__79rhkp1fndgsc e:\wsl /E/H/C/I
b.直接双击运行ubuntu2004.exe,
2.准备环境
安装环境
https://source.android.google.cn/setup/initializing?hl=zh-cn
aosp编译流程
https://source.android.google.cn/setup/building?hl=zh-cn
3.由于大部分库都在墙外,设置代理
1 #repo设置proxy
2 export http_proxy=http://192.168.1.60:8080
3 export https_proxy=https://192.168.1.60:8080
4 #Git设置proxy
5 git config --global http.proxy http://192.168.1.60:8080
6 git config --global https.proxy http://192.168.1.60:8080
7#Git 取消proxy
8 git config --global --unset http.proxy
9 git config --global --unset https.proxy
4.下载代码,时间比较长.
1 $ mkdir ~/mokee
2 $ git config --global user.email "your@email.address"
3 $ git config --global user.name “Your Name”
4 $ cd ~/mokee
5
6 $ repo init -u https://github.com/MoKee/android -b mkq-mr1 --depth 1
7 $ repo sync -j4
5.执行breakfast.
1 DESKTOP-AIAM0DF:~/mokee$ breakfast
2 You're building on Linux
3
4 Lunch menu... pick a combo:
5 1. aosp_arm-eng
6 2. aosp_arm64-eng
7 3. aosp_car_arm-userdebug
8 4. aosp_car_arm64-userdebug
9 5. aosp_car_x86-userdebug
10 6. aosp_car_x86_64-userdebug
11 7. aosp_x86-eng
12 8. aosp_x86_64-eng
13 9. car_x86_64-userdebug
14 10. m_e_arm-userdebug
15 11. mini_emulator_arm64-userdebug
16 12. mini_emulator_x86-userdebug
17 13. mini_emulator_x86_64-userdebug
18 14. mokee_arm-userdebug
19 15. mokee_arm64-userdebug
20 16. mokee_dumpling-eng
21 17. mokee_dumpling-user
22 18. mokee_dumpling-userdebug
23 19. mokee_x86-userdebug
24 20. mokee_x86_64-userdebug
25 21. qemu_trusty_arm64-userdebug
26 22. uml-userdebug
27
28 Which would you like? [aosp_arm-eng] ^C
如果列表中没有 mokee_dumpling-userdebug,
则往.repo/manifests/default.xml中添加
<project path="vendor/oneplus/dumpling" name="MoKee/android_vendor_oneplus_dumpling" clone-depth="1" />
<project path="device/oneplus/dumpling" name="MoKee/android_device_oneplus_dumpling" groups="pdk" />
怎么知道name="MoKee/android_device_oneplus_dumpling", 其实是直接在 https://github.com/MoKee 中搜索dumpling,根据xml格式自己添加的,
再次执行repo sync
6.执行 lunch mokee_dumpling-userdebug
7.执行 mka bacon
等待漫长的编译过程, 我16G内存,占用了大约12G.所以内存最好16G以上.
中间碰到几个错误,google下都解决了.
碰到的一些错误.
错误 cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
解决 breakfast
repo sync
mkbacon
编译Android时报错:error while loading shared libraries: libncurses.so.5: cannot open shared object file:
解决方式
https://blog.csdn.net/druieam/article/details/106818875
参考文档
How To Port CyanogenMod/LineageOS Android To Your Own Device
在wsl 2中编译自己的魔趣(mokee) ROM的更多相关文章
- 使用 Windows 10 WSL 搭建 ESP8266 编译环境并使用 VSCODE 编程(一)(2019-08-23)
目录 使用 Windows 10 WSL 搭建 ESP8266 编译环境并使用 VSCODE 编程 安装前准备 安装 ESP8266 工具链 下载 ESP8266 SDK 编译 花絮 使用 Windo ...
- Java--自定义Class并且在内存中编译,加载,实例化
本文的目的: 使用者在程序运行期间,可以动态的写Java Class,不需要生成任何.Class文件就可以完全在内存中编译,加载,实例化. 1.需要用到的组件介绍 1)JavaCompiler:用于编 ...
- 在PLSQL中编译复杂的java(转)
原文地址:在PLSQL中编译复杂的java PLSQL中可以编译运行JAVA程序. 一个简单的例子: create or replace and compile java source named x ...
- 在VS2012中编译WinXP兼容的程序
VS2012默认是不兼容Windows XP的,编译链接出来的程序只能在Windows Vista及以上版本的操作系统上运行.可是有时需要在Windows XP上运行,又不得不用VS2012(例如用了 ...
- 在CentOS 6.4中编译安装gcc 4.8.1
在CentOS 6.4中编译安装gcc 4.8.1 分类: C/C++ Linux/Unix2013-11-28 21:02 1877人阅读 评论(0) 收藏 举报 原文链接:http://www.c ...
- eclipse中编译时enum出现cannot be resolved to a type错误
eclipse中编译时enum出现cannot be resolved to a type错误 通常是因为eclise使用的jdk版本的问题...默认是使用的是jdk1.5 应该去选择成jdk1.6或 ...
- [原]在Fedora中编译Libevent测试实例
在我的昨天的博文<[原]我在Windows环境下的首个Libevent测试实例>中介绍了在Windows环境下如何编译一个echo server例子.今天我又试了一下在Linux环境中编译 ...
- Debian中编译内核
转载: http://blog.163.com/libo_5/blog/static/156968520101016102051580/ http://hi.baidu.com/wg_wang/ite ...
- 在Eclipse中编译maven项目出的问题
在Eclipse中编译Maven项目,运行 jetty:run 指令的时候会出错,在 JRE选项卡中加入: -Dorg.mortbay.util.URI.charset=GBK-Xms512m -Xm ...
- 在vs2010中编译log4cxx-0.10.0详细方法
本文一共包含了17个步骤,按照下面的步骤就可以完成vs2010中编译log4cxx的工作了. 1. 下载 log4cxx 以及 apr 和 apr-util 源码: a) http://www.apa ...
随机推荐
- 如何完美运行黑苹果 macOS Catalina
2018年年初,我在闲鱼 APP 上,以799元的价格,购买了一台二手的联想 ThinkPad 11e 笔记本电脑.这是一台美版的教育用途电脑,成色较新,根据自带硬盘记录,该电脑使用时长仅有230+小 ...
- TCP/IP协议(4): 地址解析协议(ARP) —— 网络地址转换为物理地址的方式
TCP/IP协议(4): 地址解析协议(ARP)--网络地址转换为物理地址的方式 关于地址解析协议(Address Resolution Protocol, ARP) 关于 ARP 地址解析协议(Ad ...
- Vulhub 漏洞学习之:DNS
Vulhub 漏洞学习之:DNS 1 DNS域传送漏洞 DNS协议支持使用axfr类型的记录进行区域传送,用来解决主从同步的问题.如果管理员在配置DNS服务器的时候没有限制允许获取记录的来源,将会导致 ...
- Vue框架整理:computed计算属性设置与缓存
简单的一些小计算可以直接用模板内的表达式计算,比较复杂一点的就建议使用"计算属性来运算了",也方便后期的维护:vue所有的计算属性都以函数的形式写在Vue实例内的computed里 ...
- Integer使用==比较的问题
Integer使用==比较的问题 new一个对象 public Integer(int value) { this.value = value; } 自动装箱 public static Intege ...
- 若依-更换数据库-sqlite
基础 我是在ruoyi-vue已经安装了mybatis-plus的基础上进行的修改 关于SQLite SQLite 是一个软件库,实现了自给自足的.无服务器的.零配置的.事务性的 SQL 数据库引擎. ...
- adb server version (36) doesn‘t match this client (41)解决
问题描述:夜神模拟器,dos窗口下,然后adb devices发现连不上模拟器了,报adb server version (36) doesn't match this client (41); ki ...
- Centos 6.5 iptables 端口白名单设置
iptables -I INPUT -p tcp --dport 8888 -j DROPiptables -I INPUT -s 10.9.145.101 -p tcp --dport 8888 - ...
- Springboot 拦截器的配置
在Springboot项目中添加拦截器,分两步: 1:创建一个拦截器类 2:配置拦截器 以上步骤完成就可以使用了,下面来添加拦截器: 1:创建一个拦截器类 MyInteceptor 继承 Handle ...
- git提交到代码到远程仓库,合并分支提示entirely different commit histories(备忘)
最近提交代码到github,合并分支的时候提示"master and main are entirely different commit histories" master为本地 ...