在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 ...
随机推荐
- 基于IGServer的Web地图要素空间分析
1. 引言 MapGIS IGServer 是中地数码的一款跨平台GIS 服务器产品,提供了空间数据管理.分析.可视化及共享服务 MapGIS IGServer的下载(试用)地址:MapGIS IGS ...
- 化学式latex语法
$2 CO_2 \stackrel{光}{\underset{\text{催化剂}}{\longrightarrow}}2 Fe + 3 CO_2$ $\ce{CO2}$ $\ce{CU2+}$ $\ ...
- windows pwn(一)
前言 前几天因为看CS shellcode装了一个win10虚拟机,然后正好因为逆向课老师要装一系列工具.于是就想起来之前一直想看的windows pwn,就顺便装了一下相关工具并且入门了一下. 工具 ...
- LeetCode-2039 网络空闲的时刻
来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/the-time-when-the-network-becomes-idle 题目描述 给你一个有 ...
- flask + gunicorn + nginx
详解见网址:https://www.jianshu.com/p/dba83a473f12,问题解决:https://blog.51cto.com/yanconggod/1983494 我的配置:htt ...
- nginx 与 k8s ingress 配置转发websocket
环境 10.1.100.10:70 是后端websocket 服务 需要通过nginx 向后端转发,nginx 配置文件如下 # cat test-ue4.conf map $http_upgrade ...
- ComWin’ round 11部分题解
https://vjudge.net/contest/325913#overview A.Threehouses 题意:一直二维平面上的$n$个点中,前$e$个点落在小岛周围,并且有$p$条边已经连接 ...
- 提供一个方法,遍历获取HashMap<String,String>中的所有value,并存放在list中返回,考虑泛型的使用
public List<String> getValueList(HashMap<String,String> map){ ArrayList<String> va ...
- Mac 远程 屏幕共享 screen sharing
屏幕共享可以用于在局域网中控制另一台 Mac,也能通过 iMessage 在广域网环境下创建彼此的连接,用来指导和解决问题非常方便. 通过 Apple ID 来创建连接 1,Command+空格键 ...
- Gitlab Ubuntu部署
一.安装存储库 sudo curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh ...