安卓9.0刷linux,Ubuntu系统下编译Android 9.0系统
8种机械键盘轴体对比
本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选?
前言
在Ubuntu系统下编译Android系统。哎呀不知道是不是换了新电脑的缘故,这次编译居然从安装JDK和配置环境下载源码他喵的一次成功了,想之前真的是那台破电脑一堆问题最后好不容易才成功,不知道是不是跟我这台电脑配置的关系以及内存还有安装ubuntu的时候那几个分区的大小有没有关系。几乎每个分区的大小都是推荐大小的好几倍,尤其是那个交换空间分区不知道是不是。记录一下编译的过程。
安装JDK
编译Android系统需要JDK,可以在命令行安装:1sudo apt install openjdk-8-jdk
没有换源,一次成功,有的时候因为墙的原因可能会安装不了可以换阿里的源。
下载源码
下载源码是用的清华的镜像,以下几个步骤:
下载 repo 工具:1
2
3
4mkdir ~/bin
PATH=~/bin:$PATH
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo
chmod a+x ~/bin/repo
建立工作目录:1
2mkdir android_9.0_r3
cd android_9.0_r3
安装python:1sudo apt-get install python
初始化仓库:1repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
如果需要某个特定的 Android 版本(列表):1repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android_9.0_r3
同步源码树(以后只需执行这条命令来同步):1repo sync
编译源码
在AOSP的根目录,输入如下的命令:1source build/envsetup.sh
选择编译目标:1lunch
lunch命令是envsetup.sh里定义的一个命令,用来让用户选择编译目标。
会有以下信息输出:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. aosp_car_arm-userdebug
8. aosp_car_arm64-userdebug
9. aosp_car_x86-userdebug
10. aosp_car_x86_64-userdebug
11. mini_emulator_arm64-userdebug
12. m_e_arm-userdebug
13. m_e_mips64-eng
14. m_e_mips-userdebug
15. mini_emulator_x86_64-userdebug
16. mini_emulator_x86-userdebug
17. uml-userdebug
18. aosp_cf_x86_auto-userdebug
19. aosp_cf_x86_phone-userdebug
20. aosp_cf_x86_tablet-userdebug
21. aosp_cf_x86_tablet_3g-userdebug
22. aosp_cf_x86_tv-userdebug
23. aosp_cf_x86_wear-userdebug
24. aosp_cf_x86_64_auto-userdebug
25. aosp_cf_x86_64_phone-userdebug
26. aosp_cf_x86_64_tablet-userdebug
27. aosp_cf_x86_64_tablet_3g-userdebug
28. aosp_cf_x86_64_tv-userdebug
29. aosp_cf_x86_64_wear-userdebug
30. cf_x86_auto-userdebug
31. cf_x86_phone-userdebug
32. cf_x86_tablet-userdebug
33. cf_x86_tablet_3g-userdebug
34. cf_x86_tv-userdebug
35. cf_x86_wear-userdebug
36. cf_x86_64_auto-userdebug
37. cf_x86_64_phone-userdebug
38. cf_x86_64_tablet-userdebug
39. cf_x86_64_tablet_3g-userdebug
40. cf_x86_64_tv-userdebug
41. cf_x86_64_wear-userdebug
42. aosp_marlin-userdebug
43. aosp_marlin_svelte-userdebug
44. aosp_sailfish-userdebug
45. aosp_walleye-userdebug
46. aosp_walleye_test-userdebug
47. aosp_taimen-userdebug
48. hikey-userdebug
49. hikey64_only-userdebug
50. hikey960-userdebug
Which would you like? [aosp_arm-eng]
选择42,按回车。这可以安装到pixel设备(之前的nexus也是)
编译的几种不同的类型:user:用来正式发布到市场的版本,权限受限,如没有 root 权限,不能 dedug,adb默认处于停用状态。
userdebug:在user版本的基础上开放了 root 权限和 debug 权限,adb默认处于启用状态。一般用于调试真机。
eng:开发工程师的版本,拥有最大的权限(root等),具有额外调试工具的开发配置。一般用于模拟器。
开始编译:1make -j16
编译好后的状态,会有一个out文件夹,因为只有nexus 6p没有pixel手机了,所以没有刷进手机,想来跟nexus刷这些镜像文件没什么大的区别吧。
![](/picture/2019-03-15 23-52-10.png)
一个小时两分钟编译好,想之前用笔记本用了半天还不止。。。
编译后产生的文件:system.img:系统镜像,里面包含了Android系统主要的目录和文件,通过init.c进行解析并mount挂载到/system目录下。
userdata.img:用户镜像,是Android系统中存放用户数据的,通过init.c进行解析并mount挂载到/data目录下。
安卓9.0刷linux,Ubuntu系统下编译Android 9.0系统相关推荐
- android s905 编译_NanoPi K2 (Amlogic S905) Ubuntu 16.04 编译Android 5.1系统源码
NanoPi K2 (Amlogic S905) Ubuntu 16.04 编译Android 5.1系统源码 1. 下载源码 在这里下载https://www.mediafire.com/folde ...
- Ubuntu 12.04 下编译Android 4.0.3
在Ubuntu 12.04 下编译了Android 4.0.3发现了一大堆错误,网上找了一堆的更改源码啊,Android.mk的解决方法,虽然可以编译成功,但都有点坑爹的成分,为了不误人子弟就分享出来 ...
- Ubuntu 16.04 编译Android 6.0系统源码
准备环境 1.安装open-jdk7 [使用open-jdk8会报错],原因是: 在build/core/main.mk中默认指定的是jdk1.7 # Check for the correct ve ...
- Linux下编译build的命令,Linux命令行下编译Android NDK的示例代码
这几天琢磨写一个Android的Runtime用来加速HTML5 Canvas,让GameBuilder+CanTK 不但开发速度快,运行速度也能接近原生应用.所以花了点时间研究Android NDK ...
- 【转】ubuntu 11.10(32位系统)下编译android源码
原文网址:http://www.cnblogs.com/dwayne/archive/2011/11/16/2251734.html 本文介绍在ubuntu 11.10系统下编译android 2.3 ...
- ubuntu系统下载编译android源码
在ubuntu系统下编译android需要注意的事项: 1. 参考http://source.android.com/中的安装说明. 2. 安装JDK6中碰到的问题可以参考http://hi.baid ...
- Hadoop2.2.0伪分布式环境搭建(附:64位下编译Hadoop-2.2.0过程)
Hadoop2.2.0伪分布式环境搭建: 写在前面:Hadoop2.2.0默认是支持32位的OS,如果想要在64位OS下运行的话,可以通过在64位OS下面编译Hadoop2.2.0来实现,编译的操作步 ...
- Ubuntu系统下MRIcroN、FSL6.0.5、Freesurfer7.1.1、ANTs、MRtrix3、AFNI的安装详解——核磁共振数据处理必备
Ubuntu系统下MRIcroN.FSL6.0.5.Freesurfer7.1.1.ANTs.MRtrix3.AFNI的安装详解 一.安装MRIcroN 二. FSL6.0.5完整安装与FSLeyes ...
- 【Debian 9(Stretch)】linux系统下安装gcc-9.3.0
[Debian 9(Stretch)]linux系统下安装gcc-9.3.0 0 实验环境 1 下载并解压gcc-9.3.0 2 安装必要的库 2.1 安装大整数运算库gmp 2.1 安装mpfr库 ...
最新文章
- 剑指offer:面试题26. 树的子结构
- 如何知道一个网络中每个权重的重要性
- makefile问题
- mongodb性能分析方法:explain()
- CF603E-Pastoral Oddities【CDQ分治,可撤销并查集】
- python35安装教程_python详细安装教程,非常值得看的一篇文章
- JPA(五):映射关联关系------映射单向多对一的关联关系
- 57.Linux/Unix 系统编程手册(下) -- SOCKET : Unix domain
- 蓝牙诊断工具_蓝牙故障诊断和使用指南
- 阿里云国际版账号登录不上去,账号被风控怎么办?
- 知识点篇:8.1)坑爹的面试问题--选定轴孔配合公差等级
- 赛迪网:VMware访谈实录
- 海思Hi3519A 基础入门教程
- SWFAddress实现Flex深度链接(不同模块具有不同的URL)
- 文科类文献综述怎么写?
- 订单(一)——准备订单数据
- F8BT, PFBT, PFO-BT cas:210347-52-7,齐岳提供聚合物光电材料
- 基于51的单片机GPS定位系统设计
- 苹果手机桌面怎么显示便签内容?
- 抓包mysql乱码_抓包数据乱码是什么情况?
热门文章
- 逻辑网络拓扑与物理网络拓扑—Vecloud微云
- 【指标统计】标记存量遥控(成功/失败)遥信(正确/错误)
- VMware的“桥接”、“NAT”、“Host-only”上网方式的区别
- appium---【Mac】Appium-Doctor提示WARN:“ ios_webkit_debug_proxy cannot be found”解决方案...
- JS简单循环遍历json数组的方法
- 半导体制冷器性能计算
- 读《编程珠玑》 (三)
- 微软职位内部推荐-Senior SDE for Cloud Platform
- 数据库连接类:DatabaseConnection
- Java 基本功之(三)Java 核心技术