分享好友 最新动态首页 最新动态分类 切换频道
Build LineageOS forGoogle Galaxy Nexus LTE (Sprint)
2024-12-27 04:04

These instructions will hopefully assist you to start with a stock Google Galaxy Nexus LTE (Sprint), unlock the bootloader (if necessary), and then download the required tools as well as the very latest source code for LineageOS (based on Google’s Android operating system) for your device. Using these, you can build both a LineageOS installation zip and a LineageOS Recovery image and install them on your device.

It is difficult to say how much experience is necessary to follow these instructions. While this guide is certainly not for the extremely uninitiated, these steps shouldn’t require a PhD in software development either. Some readers will have no difficulty and breeze through the steps easily. Others may struggle over the most basic operation. Because people’s experiences, backgrounds, and intuitions differ, it may be a good idea to read through just to ascertain whether you feel comfortable or are getting over your head.

Remember, you assume all risk of trying this, but you will reap the rewards! It’s pretty satisfying to boot into a fresh operating system you baked at home :). And once you’re an Android-building ninja, there will be no more need to wait for “nightly” builds from anyone. You will have at your fingertips the skills to build a full operating system from code and install it to a running device, whenever you want. Where you go from there– maybe you’ll add a feature, fix a bug, add a translation, or use what you’ve learned to build a new app or port to a new device– or maybe you’ll never build again– it’s all really up to you.

  • A Google Galaxy Nexus LTE (Sprint).
  • A relatively recent x86_64 computer:
    • Linux, macOS, or Windows - these build instructions are only tested using Ubuntu 20.04 LTS, so we recommend going with that.
    • A reasonable amount of RAM (16 GB to build up to , 32 GB or more for and up). The less RAM you have, the longer the build will take. Enabling ZRAM can be helpful.
    • A reasonable amount of Storage (200 GB to build up to , 300 GB for and up). You might require more free space for enabling or building for multiple devices. Using SSDs results in considerably faster build times than traditional hard drives.
  • A decent internet connection and reliable electricity. :)
  • Some familiarity with basic Android operation and terminology. It may be useful to know some basic command line concepts such as , which stands for “change directory”, the concept of directory hierarchies, and that in Linux they are separated by , etc.

Let’s begin!

If you haven’t previously installed and , you can download them from Google. Extract it running:

Now you have to add and to your PATH. Open and add the following:

Then, run to update your environment.

Several packages are needed to build LineageOS. You can install these using your distribution’s package manager.

To build LineageOS, you’ll need:

To build LineageOS 13.0, you’ll also need:

For Ubuntu 23.10 (mantic), install from 23.04 (lunar) as follows:

While for Ubuntu versions older than 23.10 (mantic), simply install:

Additionally, for Ubuntu versions older than 20.04 (focal), install also:

While for Ubuntu versions older than 16.04 (xenial), install:

Java

Different versions of LineageOS require different JDK (Java Development Kit) versions.

  • LineageOS 18.1+: OpenJDK 11 (included in source download)
  • LineageOS 16.0-17.1: OpenJDK 1.9 (included in source download)
  • LineageOS 14.1-15.1: OpenJDK 1.8 (install )
    • NOTE: For building these versions you’ll need to remove and from in .
  • LineageOS 11.0-13.0: OpenJDK 1.7 (install )*

* Ubuntu 16.04 and newer do not have OpenJDK 1.7 in the standard package repositories. See the Ask Ubuntu question “How do I install openjdk 7 on Ubuntu 16.04 or higher?”. Note that the suggestion to use PPA openjdk-r is outdated (the PPA has never updated their offering of openjdk-7-jdk, so it lacks security fixes); skip that answer even if it is the most upvoted.

Python

Different versions of LineageOS require different default Python versions.

  • LineageOS 17.1+: Python 3 (install )
  • LineageOS 11.0-16.0: Python 2 (install )

If your default is , but you’re building branch that requires , there are various methods to using it, e.g. symlinking it manually or creating a virtualenv for it. We recommend the latter:

Generate the virtualenv once using . Afterwards, activate it in each terminal where you need as default by running .

The path can be chosen freely, this is just an example!

You’ll need to set up some directories in your build environment.

To create them:

The directory will contain the git-repo tool (commonly named “repo”) and the directory will contain the source code of LineageOS.

Enter the following to download the binary and make it executable (runnable):

In recent versions of Ubuntu, should already be in your PATH. You can check this by opening with a text editor and verifying the following code exists (add it if it is missing):

Then, run to update your environment.

Given that requires you to identify yourself to sync Android, run the following commands to configure your identity:

Due to their size, some repos are configured for or . To make sure your distribution is prepared for this, run:

To avoid duplicated trailers in commit messages, especially when cherry-picking changes, make a known trailer to git:

Make use of if you want to speed up subsequent builds by running:

and adding that line to your file. Then, specify the maximum amount of disk space you want to use by typing this:

where corresponds to 50GB of cache. This needs to be run once. Anywhere from 25GB-100GB will result in very noticeably increased build speeds (for instance, a typical 1hr build time can be reduced to 20min). If you’re only building for one device, 25GB-50GB is fine. If you plan to build for several devices that do not share the same kernel source, aim for 75GB-100GB. This space will be permanently occupied on your drive, so take this into consideration.

You can also enable the optional compression. While this may involve a slight performance slowdown, it increases the number of files that fit in the cache. To enable it, run:

The following branches can be used to build for the Google Galaxy Nexus LTE (Sprint):

  • cm-13.0

Enter the following to initialize the repository:

To start the download of the source code to your computer, type the following:

The LineageOS manifests include a sensible default configuration for repo, which we strongly suggest you use (i.e. don’t add any options to sync). For reference, our default values are and . The part implies be four simultaneous threads/connections. If you experience problems syncing, you can lower this to or . On the other hand, makes repo to pull in only the current branch instead of all branches that are available on GitHub.

After the source downloads, ensure you’re in the root of the source code (), then type:

This will download your device’s device specific configuration and kernel.

Now ensure your Google Galaxy Nexus LTE (Sprint) is connected to your computer via the USB cable, with ADB and root enabled, and that you are in the folder. Then run the script:

The blobs should be pulled into the folder. If you see “command not found” errors, may need to be placed in .

Time to start building! Now, type:

The build should begin.

Assuming the build completed without errors (it will be obvious when it finishes), type the following in the terminal window the build ran in:

There you’ll find all the files that were created. The two files of more interest are:

  1. , which is the LineageOS recovery image.
  2. , which is the LineageOS installer package.
最新文章
西安微信小程序注册事项
说到微信小程序,可以说是这几年挺流行的。特别是因为小程序不需要下载任何软件,可以随身使用,非常方便。所以一旦上市,就受到很多朋友的喜欢。不过可能有朋友认为只有技术人员才能注册微信小程序。其实这个想法并不是特别正确,只要掌握
汽修工具品牌排行榜前十名每年变化大吗
汽修工具品牌排行榜前十名每年变化大吗?变化不算特别大。目前常见的前十名品牌有世达/SATA、博世/BOSCH、绿林/greener、史丹利/STANLEY、德力西/DELIXI、长城精工、捷科/JETech、宝工/Pro’sKit、得力工具、钢盾/SHEFFIELD 。像世达,它是
使用 Python 爬虫抓取汽车品牌市场数据:销量、广告与消费者反馈
在现代商业环境中,数据已经成为最重要的资产之一,尤其在汽车行业。汽车制造商、经销商以及广告商都依赖于市场数据来优化他们的营销策略、产品开发和品牌定位。对于研究汽车行业的市场趋势和消费者反馈,抓取不同汽车品牌的市场销量、广告
这一抹红色,是从未忘却的纪念
它是飘落在地球上的一根红飘带是贵州旅游打卡的新地标它是什么?全国首个以长征为主题的全域行浸式数字科技体验馆“红飘带”项目9259如果奇迹有颜色那一定是中国红那,这样的红色你见过吗?它取自赤水河边的泥岩之色象征长征的艰辛历程和革
百度推广和安全联盟认证已被取消,现为百度信誉V认证
目前,在百度搜索框中输入某些关键词并搜索到一些自然网站排名时,把鼠标移动到百度推广蓝色V认证上面,发现没有显示百度推广身份认证和安全联盟认证字样,而是显示V已经通过百度信誉认证。由此看来,百度已经将百度推广认证和安全联盟认证
抖音信息流和内容热推的区别?抖音信息流价格分析软件
抖音广告投放策略比较:信息流和内容热推摘要:抖音作为当前流行的短视频平台,广告投放已经成为企业推广的重要手段。其中,信息流和内容热推是两种主要的广告投放策略。本文将从四个方面详细对比这两种策略的特点和应用场景,帮助企业更好
外贸SOHO建站报价——建个个人外贸网站多少钱
很多外贸SOHO和企业都需要建立外贸网站作为品牌推广的重要平台。因此,如果我们想知道建立一个外贸网站的价格,开发外贸网站Ueeshop可以跟大家一起看看都包含了哪一些内容。对于需要建立外贸网站的用户来说,他们可以看到很多不同的价格,
松鼠AI智能学习机:高效全科辅导新选择
松鼠AI智能学习机是一款高效全科辅导新选择,它结合了人工智能技术和教育知识体系,可以帮助学生自主学习、提高学习效率。松鼠AI智能学习机拥有多种学科的课程,包括语文、数学、英语、科学等,覆盖了小学到初中各年级的内容。学生可以根据
语音直播聊天系统开发(APP、公众号、小程序)
2015年01月15日潘锦霖系统开发,软件开发,APP开发,源码搭建,定制软件,社交电商,云电商,新媒体电商,O2O,F2C,B2C,B2B2C,F2B2C,C2B,B2C2N,S2B2C,微商城,App,手机网页,PC商城,小程序,微商管理系统,扫码红包,质量追溯,分销系统, 全返系统,分红系
用AI轻松生成超逼真美女写真,这款工具你一定要试!
在这个科技飞速发展的时代,AI生成技术的应用已经渗透到我们生活的各个角落。尤其是在摄影和艺术创作领域,AI工具带来了前所未有的便捷与可能性。想象一下,不用外出,只需要在你的手机或电脑屏幕前,就可以生成各类超逼真的美女写真,不再
相关文章
推荐文章
发表评论
0评