跳至主要内容

Nexus 5(hammerhead)上安装LineageOS 18(Android 11)


0.前言

周末看世界杯巴西对克罗地亚,中场休息时无事可干,把主意打到了躺在杂物箱里吃了6年灰的五儿子(Nexus5 hammerhead)身上。想起最近有个app因为android版本太低而装不上,决定在Nexus 5上装个LineageOS 18。说干就干,放狗搜教程,开始整活。

1.下载所需软件

刷LineageOS要求机器解锁并安装TWRP,同时刷入第三方修改版的LineageOS 18,先下载所需的软件备用。
打开手机,进入“设置”界面,点击“关于手机”,连续点击7次“版本号”,进入开发者模式,启用USB debugging;
用USB线把手机连接到电脑;
解压缩Android Platform Tools,在电脑运行CMD进入命令终端模式,切换到platform tools所以目录。运行以下命令:
adb devices   #可以终端窗口看到手机的serial no
adb reboot bootloader
fastboot oem unlock
通过音量键和电源键来确认bootloader unlock。重新启动手机。
fastboot reboot

3.写入TWRP HH.R recovery工具

进入bootloader
adb reboot bootloader
刷入TWRP HH.R
fastboot flash recovey twrp-version-HH.R-version.img
确认电脑上显示recovery写入成功,关闭手机。在设备关机状态下,同时按住音量减小键和电源键直到设备启动菜单出现,然后通过音量按键上下滚动,并通过电源键选择RECOVERY,进入recovery状态。

4.写入LineageOS 18.1 ROM

手机在TWRP状态下,加大/system分区到1444M。
打开TWRP终端,TWRP -> Advanced -> Terminal,在手机终端窗口输入命令:
hh_repart -m
等待手机重启进入TWRP状态,使用Wipe功能清除 cache, Data, and Dalvik cache数据。
手机连接USB线,把LineageOS 18.1和Google全家桶应用的zip压缩复制到手机根目录,利用Install功能依次写入LineageOS 18.1和GApps,完成后重启手机,就可以享受到丝般顺滑的Android 11系统了,五儿子成功原地复活。

5.注意事项

  • 如果adb连找到手机,而fastboot找不到设备,大概率是因为android手机的usb驱动缺失导致,可以通过更新Google USB驱动解决;
  • 一定要用TWRP HH.R扩展/system分区的空间,不然会因ROM写不进去,TWRP报E1001: “Failed to update system image. Updater process ended with ERROR: 1”的错误。

6.参考链接




评论

此博客中的热门博文

Installing RHEL EPEL Repo on Centos 5.x or 6.x

习惯了用yum来安装东西,试了下这篇文章提到的做法workable,再做一次搬运工。 原文出处: http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x Authored by: Rackspace Support How to install RHEL EPEL repository on Centos 5.x or 6.x The following article will describe how to configure a CentOS 5.x-based or Centos 6.x-based system to use Fedora Epel repos and third party remi package repos. These package repositories are not officially supported by CentOS, but they provide much more current versions of popular applications like PHP or MYSQL. Install the extra repositories The first step requires downloading some RPM files that contain the additional YUM repository definitions. The instructions below point to the 64-bit versions that work with our Cloud Server instances. Centos 5.x wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm sudo rpm -Uvh remi-release-5*.rpm epel...

64位OEL 6安装Oracle RCU报“libXext.so.6: cannot open shared object file: No such file or directory”的解决方法

在64位的Oracle Enterprise Linux 6上时报“ libXext.so.6: cannot open shared object file: No such file or directory ”的错误,已经装了64位x11相关的包,可见是缺少32位的包引起的。 1.libXext.so.6错误信息如下: 无法使用位置 /home/ecm/oinstall/rcuHome/rcu/log/logdir.2011-12-26_09-54/rcu.log 初始化日志记录程序 使用以下位置初始化日志记录程序: /tmp/logdir.2011-12-26_09-54/rcu.log Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/ecm/oinstall/rcuHome/jdk/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory     at java.lang.ClassLoader$NativeLibrary.load(Native Method)     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1806)     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1702)     at java.lang.Runtime.load0(Runtime.java:770)     at java.lang.System.load(System.java:1003)     at java.lang.ClassLoader$NativeLibrary.load(Native Method)     at java.lang.ClassLoader.loadLibrar...

How to Convert a VMware Pre-allocated Virtual Disk to a Growable Virtual Disk

受不了动辄几百G的虚机,记给自己看,只是在网络上搬运,来源在这里: http://www.virtuatopia.com/index.php/How_to_Convert_a_VMware_Pre-allocated_Virtual_Disk_to_a_Growable_Virtual_Disk 。 he vmware-vdiskmanager tool The VMware Disk Management Tool is a command line tool which is installed by default with VMware Server. The executable file is named   vmware-vdiskmanager   and is located in   \Program Files\VMware\VMware Server   on Windows hosts, and   /usr/bin   on Linux systems. The tool accepts a number of command-line arguments, a full listing of which can be obtained by running vmware-vdiskmanager with no options. vmware-vdiskmanager Virtual Disk Types The type to which a virtual disk is to be converted is specified using the -t flag, together with the target disk type. This is represented by a number as outlined in the following table: Type Identifier Description 0 Growable (single .vmdk file) 1 Growable (multiple 2GB files) 2 Pre-allocated (single file) 3 Pre...